From: Michał Górny Date: Mon, 8 Jul 2019 13:03:22 +0000 (+0200) Subject: acct-user.eclass: Do not enforce UID unless requested X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b425e3571d9b64b461a916dcddfe117e78d2b1f5;p=gentoo.git 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 Tested-by: Marek Szuba Closes: https://bugs.gentoo.org/689102 Signed-off-by: Michał Górny --- 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