commit:     37079e4844246bbae7fea3204c2b3e8e8e24a9a5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 13:06:35 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 13:29:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37079e48

acct-group.eclass: Do not enforce GID unless requested

Correct the enewgroup call not to enforce specified GID unless
ACCT_GROUP_ENFORCE_ID is set.

Reported-by: Toralf Förster <toralf <AT> gentoo.org>
Tested-by: Marek Szuba <marecki <AT> gentoo.org>
Closes: https://bugs.gentoo.org/689100
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/acct-group.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index ab9095979ab..9eab00db690 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -117,7 +117,8 @@ acct-group_pkg_pretend() {
 acct-group_pkg_preinst() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       enewgroup -F "${ACCT_GROUP_NAME}" "${ACCT_GROUP_ID}"
+       enewgroup ${ACCT_GROUP_ENFORCE_ID:+-F} "${ACCT_GROUP_NAME}" \
+               "${ACCT_GROUP_ID}"
 }
 
 fi

Reply via email to