This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5778] New: pathconf(path,_PC_CHOWN_RESTRICTED) does not work correctly under Linux
- From: "axel dot philipp at mtu dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 20 Feb 2008 14:04:18 -0000
- Subject: [Bug libc/5778] New: pathconf(path,_PC_CHOWN_RESTRICTED) does not work correctly under Linux
- Reply-to: sourceware-bugzilla at sourceware dot org
pathconf(path,_PC_CHOWN_RESTRICTED)always returns POSIX_CHOWN_RESTRICTED even
if the filesystem where path is located is configured to allow unrestricted
chown.
This seems to be an inconsistency between kernel, glibc and LSB. although the
Linux syscall chown allows unpriviliged users to chown files if the filesystem
does, LSB 3.2 core generic para. 13.4.79 mandates that POSIX_CHOWN_RESTRICTED
be defined as 1. This variable should be undefined because that feature
definitely depends on filesystem and need not be the same for all fs on a host.
But even if POSIX_CHOWN_RESTRICTED were undefined, pathconf would return the
wrong value since it always returns -1 in that case.
I checked today http://sources.redhat.com/cgi-
bin/cvsweb.cgi/libc/sysdeps/posix/?cvsroot=glibc, pathconf.c is the same since
2003, I tested with 2.3.5.
Filesystems with unrestricted chown can be local (XFS
with /proc/sys/fs/xfs/restrict_chown=0) or NFS mounted.
--
Summary: pathconf(path,_PC_CHOWN_RESTRICTED) does not work
correctly under Linux
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: axel dot philipp at mtu dot de
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5778
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.