Skip to content

Commit

Permalink
Add backend support for suboridnate uids and gids
Browse files Browse the repository at this point in the history
These files list the set of subordinate uids and gids that users are allowed
to use.   The expect use case is with the user namespace but other uses are
allowed.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
ebiederm authored and hallyn committed Aug 5, 2013
1 parent 5620c5a commit f28ad4b
Show file tree
Hide file tree
Showing 5 changed files with 566 additions and 0 deletions.
8 changes: 8 additions & 0 deletions etc/login.defs
Expand Up @@ -226,6 +226,10 @@ UID_MAX 60000
# System accounts
SYS_UID_MIN 101
SYS_UID_MAX 999
# Extra per user uids
SUB_UID_MIN 100000
SUB_UID_MAX 600100000
SUB_UID_COUNT 10000

#
# Min/max values for automatic gid selection in groupadd(8)
Expand All @@ -235,6 +239,10 @@ GID_MAX 60000
# System accounts
SYS_GID_MIN 101
SYS_GID_MAX 999
# Extra per user group ids
SUB_GID_MIN 100000
SUB_GID_MAX 600100000
SUB_GID_COUNT 10000

#
# Max number of login(1) retries if password is bad
Expand Down
2 changes: 2 additions & 0 deletions lib/Makefile.am
Expand Up @@ -39,6 +39,8 @@ libshadow_la_SOURCES = \
pwio.c \
pwio.h \
pwmem.c \
subordinateio.h \
subordinateio.c \
selinux.c \
semanage.c \
sgetgrent.c \
Expand Down
6 changes: 6 additions & 0 deletions lib/getdef.c
Expand Up @@ -81,6 +81,12 @@ static struct itemdef def_table[] = {
{"SHA_CRYPT_MAX_ROUNDS", NULL},
{"SHA_CRYPT_MIN_ROUNDS", NULL},
#endif
{"SUB_GID_COUNT", NULL},
{"SUB_GID_MAX", NULL},
{"SUB_GID_MIN", NULL},
{"SUB_UID_COUNT", NULL},
{"SUB_UID_MAX", NULL},
{"SUB_UID_MIN", NULL},
{"SULOG_FILE", NULL},
{"SU_NAME", NULL},
{"SYS_GID_MAX", NULL},
Expand Down

0 comments on commit f28ad4b

Please sign in to comment.