This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [David Madore <madore@quatramaran.ens.fr>] libc/1638: O_NOLINK documented but not implemented


tb@MIT.EDU (Thomas Bushnell, BSG) writes:

> James Antill <james@and.org> writes:
> 
> > Andreas Jaeger <aj@suse.de> writes:
> > 
> >  Well from the info explanation O_NOLINK == O_NOFOLLOW in Linux, so
> > glibc should probably define both (or maybe hurd could just change to
> > O_NOFOLLOW ?).
> >  As far as I know, _IGNORE_CTTY and _NOTRANS aren't implemented in
> > Linux though.
> 
> O_NOLINK and O_NOFOLLOW are different on the Hurd;
> libc/sysdeps/mach/hurd/fcntl.h says:
> 
> # define O_NOLINK	0x0040	/* No name mappings on final component.  */
> # define O_NOFOLLOW	0x00100000 /* Produce ENOENT if file is a symlink.  */
> 
> which are notably different.

 Ahhh, looking more closely at Linux it appears that it returns ELOOP
in the NOFOLLOW case not a valid fd[1]. So it looks like Linux doesn't
implement O_NOLINK at all.

 Ps. It's probably worth changing the errno on NOFOLLOW in hurd (or is
there a good reason why it's ENOENT) ?.

[1] presumably this is intentional, although the code do_follow_link()
suggests that it would return a valid fd and that open_namei() just
forgot about that case.

-- 
James Antill -- james@and.org
"If we can't keep this sort of thing out of the kernel, we might as well
pack it up and go run Solaris." -- Larry McVoy.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]