From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27889 invoked by alias); 8 Aug 2013 00:00:41 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 27792 invoked by uid 48); 8 Aug 2013 00:00:37 -0000 From: "james_avera2 at yahoo dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/15822] New: Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others) Date: Thu, 08 Aug 2013 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: james_avera2 at yahoo dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00010.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15822 Bug ID: 15822 Summary: Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others) Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: james_avera2 at yahoo dot com CC: drepper.fsp at gmail dot com (I first noticed this in glibc 2.17 in Ubuntu 13.04, but the problem is still there in the latest source checked out from git on 8/7/13) The semantics of _POSIX_CHOWN_RESTRICTED and possibly other feature-defines are specified in two conflicting ways. A programmer reading one of these specs will write wrong code if they don't notice. unistd.h says: "If any of these symbols is defined as -1, the corresponding option is not true for any file. If any is defined as other than -1, the corresponding option is true for all files. If a symbol is not defined at all, the value for a specific file can be obtained from `pathconf' and `fpathconf'. _POSIX_CHOWN_RESTRICTED _POSIX_NO_TRUNC etc. " However, bits/posix_opt.h contains this: /* Some filesystems allow all users to change file ownership. */ #define _POSIX_CHOWN_RESTRICTED 0 The comment with this definition implies that chown is not always restricted. But in that case, according to unistd.h, the symbol should not be defined at all (unistd.h says that if defined with *any* value other than -1, then the feature is true in all cases; there is no mention of a value of 0 being meaningful.) -- You are receiving this mail because: You are on the CC list for the bug.