This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14578] fchmodat(..., AT_SYMLINK_NOFOLLOW) returns ENOTSUP on non-symlinks
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 13 Sep 2012 17:01:22 +0000
- Subject: [Bug libc/14578] fchmodat(..., AT_SYMLINK_NOFOLLOW) returns ENOTSUP on non-symlinks
- Auto-submitted: auto-generated
- References: <bug-14578-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14578
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-09-13 17:01:22 UTC ---
glibc can't check if it's a symlink itself without a race condition.
What does the kernel do if AT_SYMLINK_NOFOLLOW is passed to the fchmodat
syscall (both on symlinks, and on non-symlinks? (Any code expecting an
lchmod syscall can clearly be removed from glibc in any case - chmod
support for symlinks in future would have to be via a *at syscall to
accord with current Linux kernel practice regarding adding syscalls - so
#ifndef __NR_lchmod should be unconditional, #ifdef __NR_lchmod removed.)
If the syscall does the right thing, I suppose the check for
AT_SYMLINK_NOFOLLOW could be moved after the code using the fchmodat
syscall, so that the issue only applies to old kernels (for which it is
unavoidable because of the race).
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.