diff options
author | Karel Zak | 2016-02-15 13:55:37 +0100 |
---|---|---|
committer | Karel Zak | 2016-02-15 14:07:25 +0100 |
commit | c619d3d167115990e9228b27851e0cc2faa8f936 (patch) | |
tree | 01fa30c52400922e1e900a6fae0cbd8e245abefd /login-utils/su.1 | |
parent | libsmartcols: print title only with SCOLS_FMT_HUMAN (diff) | |
download | kernel-qcow2-util-linux-c619d3d167115990e9228b27851e0cc2faa8f936.tar.gz kernel-qcow2-util-linux-c619d3d167115990e9228b27851e0cc2faa8f936.tar.xz kernel-qcow2-util-linux-c619d3d167115990e9228b27851e0cc2faa8f936.zip |
su: clean up groups initialization
This patch does not change any su/runuser behaviour, code changes:
* don't use huge groups[NGROUPS_MAX]; the array has 256k, but we need
it only occasionally when -G/-g specified.
* the current code uses groups[0] for -g and the rest for -G, this patch adds
'gid' to remember -g argument to avoid memmove()
* add function add_supp_group() to simplify su_main()
* add note about -G and -g relation to the man pages (undocumented now)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/su.1')
-rw-r--r-- | login-utils/su.1 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/login-utils/su.1 b/login-utils/su.1 index f5fecf199..5e529ce3d 100644 --- a/login-utils/su.1 +++ b/login-utils/su.1 @@ -57,7 +57,8 @@ to the shell, which may or may not be useful, depending on the shell. Specify the primary group. This option is available to the root user only. .TP .BR \-G , " \-\-supp\-group" = \fIgroup -Specify a supplemental group. This option is available to the root user only. +Specify a supplemental group. This option is available to the root user only. The first specified +supplementary group is also used as a primary group if the option \fB\-\-group\fR is unspecified. .TP .BR \- , " \-l" , " \-\-login" Start the shell as a login shell with an environment similar to a real |