summaryrefslogtreecommitdiff
path: root/src/id.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/id.c')
-rw-r--r--src/id.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/id.c b/src/id.c
index b28643b18..ec255e2f8 100644
--- a/src/id.c
+++ b/src/id.c
@@ -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);
}