From b425e3571d9b64b461a916dcddfe117e78d2b1f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 8 Jul 2019 15:03:22 +0200 Subject: [PATCH] acct-user.eclass: Do not enforce UID unless requested MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- eclass/acct-user.eclass | 5 +++-- 1 file 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 -- 2.26.2