This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH, HURD]: null pathnames shall return ENOENT
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 21 Sep 2009 19:55:00 +0200
- Subject: Re: [PATCH, HURD]: null pathnames shall return ENOENT
- References: <20090918214309.GQ5485@const.famille.thibault.fr> <20090918215702.680FA9A6@magilla.sf.frob.com>
Roland McGrath, le Fri 18 Sep 2009 14:57:02 -0700, a écrit :
> > Looking more closely, the reason why chdir and chroot append "/."
> > themselves is that contrary to __hurd_file_name_lookup which only
> > appends "/", "/." also checks for search permission, see the comment
> >
> > /* Append trailing "/." to directory name to force ENOTDIR if it's not a
> > directory and EACCES if we don't have search permission. */
> >
> > So we really need to append "/." here, but still not when the path is null.
>
> Oh, I see. It still would be better to give _hurd_change_directory_port a
> flag about calling reparent, and consolidate that magic to the one place.
Ok, should it rather be kept as an internal glibc flag, or exposed
through bits/fcntl.h? Would O_REPARENT be ok?
Samuel