public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "james_avera2 at yahoo dot com" <sourceware-bugzilla@sourceware.org> 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 [thread overview] Message-ID: <bug-15822-131@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2013-08-08 0:00 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-08-08 0:00 james_avera2 at yahoo dot com [this message] 2014-06-13 13:13 ` [Bug libc/15822] " fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-15822-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).