Jason K Hall 11 hours ago committed by GitHub
commit 22eeafc9a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
bugfixes:
- "user module: FreeBSD backend now correctly ignores uid_min, uid_max, and umask,
instead of passing unsupported '-K' options to pw(8). (fixes #86252)"

@ -1507,9 +1507,10 @@ class FreeBsdUser(User):
cmd.append('-k')
cmd.append(self.skeleton)
if self.umask is not None:
cmd.append('-K')
cmd.append('UMASK=' + self.umask)
if self.module.get_bin_path('useradd', required=False):
if self.umask is not None:
cmd.append('-K')
cmd.append('UMASK=' + self.umask)
if self.shell is not None:
cmd.append('-s')
@ -1526,13 +1527,14 @@ class FreeBsdUser(User):
else:
cmd.append(str(calendar.timegm(self.expires)))
if self.uid_min is not None:
cmd.append('-K')
cmd.append('UID_MIN=' + str(self.uid_min))
if self.module.get_bin_path('useradd', required=False):
if self.uid_min is not None:
cmd.append('-K')
cmd.append('UID_MIN=' + str(self.uid_min))
if self.uid_max is not None:
cmd.append('-K')
cmd.append('UID_MAX=' + str(self.uid_max))
if self.uid_max is not None:
cmd.append('-K')
cmd.append('UID_MAX=' + str(self.uid_max))
# system cannot be handled currently - should we error if its requested?
# create the user

Loading…
Cancel
Save