This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug libc/14578] fchmodat(..., AT_SYMLINK_NOFOLLOW) returns ENOTSUP on non-symlinks


http://sourceware.org/bugzilla/show_bug.cgi?id=14578

--- Comment #6 from Rich Felker <bugdal at aerifal dot cx> 2012-09-13 23:16:43 UTC ---
Joseph, you're right; actually, I was unfortunately testing on a pre-O_PATH
kernel and didn't notice this, so I can't say for sure yet whether the code
does what's desired on a new kernel with O_PATH. I can confirm your fear about
older kernels though; the kernel happily opens the underlying file, which could
be bad if it's a device file, etc. In order to test for working O_PATH, one
could first open "/" with O_PATH and attempt to call getdents on the resulting
fd. Assuming the open succeeded, that would work if and only if O_PATH support
is missing. If the open failed due to missing permissions, that would also mean
O_PATH support is missing. If it failed for another reason, we probably have a
resource exhaustion issue and can just pass the error up.

-- 
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.


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