bug-coreutils
[Top][All Lists]
Advanced

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

Re: bug in chdir-safer


From: Jim Meyering
Subject: Re: bug in chdir-safer
Date: Fri, 23 Dec 2005 18:13:59 +0100

James Youngman <address@hidden> wrote:
> On Thu, Dec 22, 2005 at 03:03:35PM +0000, Eric Blake wrote:
>> I like the newly-added chdir-safer.  However, you need to
>> provide a dummy #define O_NOFOLLOW 0 for platforms
>> like cygwin which have not yet implemented this feature.
>
> I haven't looked at the code recently (and don't have time to do this
> today), but my first reaction is that this isn't such a good idea.

Look at the code :-)
If you see a problem with it, I'd be happy to hear about it.

> An additional wrinkle is that at compile time O_NOFOLLOW may be
> provided, but the resulting binary might be run on a system lacking
> support for O_NOFOLLOW.

Thanks, but if people are taking binaries compiled against new Linux or
*BSD systems and trying to run them on systems that are old enough to
lack O_NOFOLLOW, then won't they have far more to worry about (like header
skew, and real functionality lapses) than the mere detail of whether
open honors O_NOFOLLOW?

However, if some modern system that currently lacks O_NOFOLLOW
were to add it, then I could justify using code like what's in
findutils' check_nofollow function.

BTW, thanks for the suggestion to check the non-O_NOFOLLOW case.
I've just fixed the ChangeLog attribution.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]