1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

id: don't print context=... when POSIXLY_CORRECT is set

* src/id.c (print_full_info) [POSIXLY_CORRECT]: Don't print context.
Reported by Ulrich Drepper.
* NEWS (Changes in behavior): Mention it.
* doc/coreutils.texi (id invocation): Document that id also prints the
security context, when possible, and when POSIXLY_CORRECT is not set.
* tests/id/no-context: New file.  Test for this.
* tests/Makefile.am (TESTS): Add it.
This commit is contained in:
Jim Meyering
2009-09-11 16:30:27 +02:00
parent 398749b0cc
commit ebbf0a1f0f
5 changed files with 54 additions and 1 deletions

View File

@@ -12825,9 +12825,13 @@ running it if no user is specified. Synopsis:
id [@var{option}]@dots{} [@var{username}]
@end example
@vindex POSIXLY_CORRECT
By default, it prints the real user ID, real group ID, effective user ID
if different from the real user ID, effective group ID if different from
the real group ID, and supplemental group IDs.
In addition, if SELinux
is enabled and the @env{POSIXLY_CORRECT} environment variable is not set,
then print @samp{context=@var{c}}, where @var{c} is the security context.
Each of these numeric values is preceded by an identifying string and
followed by the corresponding user or group name in parentheses.