diff options
Diffstat (limited to '')
| -rw-r--r-- | src/id.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -98,7 +98,7 @@ or (when USERNAME omitted) for the current user.\n\ \n\ Without any OPTION, print some useful set of identified information.\n\ "), stdout); - emit_bug_reporting_address (); + emit_ancillary_info (); } exit (status); } @@ -187,7 +187,7 @@ main (int argc, char **argv) if (just_user + just_group + just_group_list + just_context > 1) error (EXIT_FAILURE, 0, _("cannot print \"only\" of more than one choice")); - if (just_user + just_group + just_group_list == 0 && (use_real | use_name)) + if (just_user + just_group + just_group_list == 0 && (use_real || use_name)) error (EXIT_FAILURE, 0, _("cannot print only names or real IDs in default format")); @@ -328,6 +328,9 @@ print_full_info (const char *username) free (groups); } #endif /* HAVE_GETGROUPS */ - if (context != NULL) + + /* POSIX mandates the precise output format, and that it not include + any context=... part, so skip that if POSIXLY_CORRECT is set. */ + if (context != NULL && ! getenv ("POSIXLY_CORRECT")) printf (_(" context=%s"), context); } |
