Re: read_branches_file ()

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

 



On Mon, 11 Feb 2008 11:00:52 +0100, Andreas Ericsson <ae@xxxxxx> wrote:

> H.Merijn Brand wrote:
> > -       if (!f)
> > +       if (stat (gp, &st_buf) || S_ISDIR (st_buf.st_mode))
> 
> Shouldn't this be
> 	if (stat(gp, &st_buf) || !S_ISREG(st_buf.st_mode))

Yes, see several follow-ups in this thread.

> ?
> 
> Otherwise, you might end up opening a FIFO, a socket or a
> block/char special, which is obviously undesired.

At the moment of the patch I was unsure if these were supported :)
At least FIFO's and character devices are less error-prone than DIR's

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/
-
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