diff options
author | Stanislav Brabec | 2019-04-24 11:16:53 +0200 |
---|---|---|
committer | Karel Zak | 2019-04-24 11:16:53 +0200 |
commit | 0d37969cbe2cb85d9c01f78071528a8a7c789f96 (patch) | |
tree | ca02da50c92922fadfc14d74d6673070ac97da28 /login-utils/lslogins.c | |
parent | fstrim: document kernel return minlen explicitly (diff) | |
download | kernel-qcow2-util-linux-0d37969cbe2cb85d9c01f78071528a8a7c789f96.tar.gz kernel-qcow2-util-linux-0d37969cbe2cb85d9c01f78071528a8a7c789f96.tar.xz kernel-qcow2-util-linux-0d37969cbe2cb85d9c01f78071528a8a7c789f96.zip |
lslogins: Fix discrepancies of SYS_UID_MIN
util-linux does not contain useradd. Its most popular implementation
comes from shadow. SYS_UID_MIN is one of common parameters. Its
hardcoded fallback value is equal to 101 in shadow useradd (see
shadow-4.6/libmisc/find_new_uid.c: get_ranges()), but 201 in
login-utils/lslogins.c.
Let lslogins use the same fallback as useradd from shadow.
Hopefully most distros define its custom value of SYS_UID_MIN in
/etc/login.defs, so this problem is not visible.
login-utils/lslogins.1 does not mention its default at all. Add a
reference and improve text of lslogins(1) to prevent off-by-one
interpretation.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/lslogins.c')
-rw-r--r-- | login-utils/lslogins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index efb20a4f7..3d9c9b97a 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -74,7 +74,7 @@ static int lslogins_flag; #define UL_UID_MIN 1000 #define UL_UID_MAX 60000 -#define UL_SYS_UID_MIN 201 +#define UL_SYS_UID_MIN 101 #define UL_SYS_UID_MAX 999 /* we use the value of outmode to determine |