Make name of nobody group configurable and use nogroup on Debian

Fixes: https://pagure.io/freeipa/issue/9753

Signed-off-by: Frederik Himpe <frederik@frehi.be>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Frederik Himpe authored and Florence Blanc-Renaud committed 2025-02-26 16:14:28 +01:00
1 parent 0dee69d771
commit 1937189e60
3 files changed
+6 -2

No files matched your search

+1
View File
@@ -124,6 +124,7 @@ class BaseConstantsNamespace:
NAMED_OPTIONS_VAR = "OPTIONS"
NAMED_OPENSSL_ENGINE = None
NAMED_ZONE_COMMENT = ""
NOBODY_GROUP = Group("nobody")
PKI_USER = User("pkiuser")
PKI_GROUP = Group("pkiuser")
# ntpd init variable used for daemon options
+1
View File
@@ -29,5 +29,6 @@ class DebianConstantsNamespace(BaseConstantsNamespace):
ODS_USER = User("opendnssec")
ODS_GROUP = Group("opendnssec")
SECURE_NFS_VAR = "NEED_GSSD"
NOBODY_GROUP = Group("nogroup")
constants = DebianConstantsNamespace()
+4 -2
View File
@@ -123,9 +123,11 @@ def make_netbios_name(s):
def map_Guests_to_nobody():
env = {'LC_ALL': 'C'}
args = [paths.NET, '-s', '/dev/null', 'groupmap', 'add',
'sid=S-1-5-32-546', 'unixgroup=nobody', 'type=builtin']
'sid=S-1-5-32-546',
'unixgroup="' + constants.NOBODY_GROUP + '"', 'type=builtin']
logger.debug("Map BUILTIN\\Guests to a group 'nobody'")
logger.debug("Map BUILTIN\\Guests to a group '%s'",
constants.NOBODY_GROUP)
ipautil.run(args, env=env, raiseonerr=False, capture_error=True)