public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15822] New: Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others)
@ 2013-08-08  0:00 james_avera2 at yahoo dot com
  2014-06-13 13:13 ` [Bug libc/15822] " fweimer at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: james_avera2 at yahoo dot com @ 2013-08-08  0:00 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/15822] Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others)
  2013-08-08  0:00 [Bug libc/15822] New: Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others) james_avera2 at yahoo dot com
@ 2014-06-13 13:13 ` fweimer at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 13:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15822

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-13 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-08  0:00 [Bug libc/15822] New: Clashing specifications _POSIX_CHOWN_RESTRICTED (and possibly others) james_avera2 at yahoo dot com
2014-06-13 13:13 ` [Bug libc/15822] " fweimer at redhat dot com

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