Re: read_branches_file ()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 Feb 2008, H.Merijn Brand wrote:

> I'm (again) trying to port git-1.5.4 to HP-UX, and I've already got rather
> far, but I'm hitting some stuff I cannot explain.
> 
> t5405-send-pack-rewind.sh fails the 'git fetch .. master:master' part in
> the setup, as deep down, read_branches_file () is called with in remote
> the name "..".
> 
> The file that it tries to open using git_path () is ".git/branches/.."
> That is weird. That is not a file, but a dir. "../.git/branches" would
> be more logical, but whatever. HP-UX 11.00 will gladly return a valid
> FILE * for opening a directory with fopen (), which, when read, will
> return anything but what is expected. So, maybe read_branches_file ()
> should be protected against opening anything but files. Maybe with some
> stat () and S_ISREG ()'s.
> 
> Or has something gone wrong earlier on?

It's doing this because it thinks you might have a remote configured with 
the name "..", which should probably be blocked at a higher level, if only 
for general sanity.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux