diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-07-08 15:03:22 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-07-09 15:29:39 +0200 |
commit | b425e3571d9b64b461a916dcddfe117e78d2b1f5 (patch) | |
tree | c432403ea9e685c259a17c9fcdef8ea2d9c41d6b /eclass/acct-user.eclass | |
parent | x11-libs/libva: Don't install libtool archive files (diff) | |
download | gentoo-b425e3571d9b64b461a916dcddfe117e78d2b1f5.tar.gz gentoo-b425e3571d9b64b461a916dcddfe117e78d2b1f5.tar.bz2 gentoo-b425e3571d9b64b461a916dcddfe117e78d2b1f5.zip |
acct-user.eclass: Do not enforce UID unless requested
Correct the enewuser call not to enforce specified UID unless
ACCT_USER_ENFORCE_ID is set.
Reported-by: Toralf Förster <toralf@gentoo.org>
Tested-by: Marek Szuba <marecki@gentoo.org>
Closes: https://bugs.gentoo.org/689102
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/acct-user.eclass')
-rw-r--r-- | eclass/acct-user.eclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass index ec9c859aec27..60009643c144 100644 --- a/eclass/acct-user.eclass +++ b/eclass/acct-user.eclass @@ -325,8 +325,9 @@ acct-user_pkg_preinst() { debug-print-function ${FUNCNAME} "${@}" local groups=${ACCT_USER_GROUPS[*]} - enewuser -F -M "${ACCT_USER_NAME}" "${ACCT_USER_ID}" \ - "${ACCT_USER_SHELL}" "${ACCT_USER_HOME}" "${groups// /,}" + enewuser ${ACCT_USER_ENFORCE_ID:+-F} -M "${ACCT_USER_NAME}" \ + "${ACCT_USER_ID}" "${ACCT_USER_SHELL}" "${ACCT_USER_HOME}" \ + "${groups// /,}" if [[ ${ACCT_USER_HOME} != /dev/null ]]; then # default ownership to user:group |