fix bug in modules/system/user.py (#37552)
for freebsd tool "pw" use date not days in "modify_user"
(cherry picked from commit d512bed495
)
This commit is contained in:
parent
923015d9d7
commit
a3798d9b62
1 changed files with 1 additions and 2 deletions
|
@ -903,9 +903,8 @@ class FreeBsdUser(User):
|
|||
cmd.append(','.join(new_groups))
|
||||
|
||||
if self.expires:
|
||||
days = (time.mktime(self.expires) - time.time()) // 86400
|
||||
cmd.append('-e')
|
||||
cmd.append(str(int(days)))
|
||||
cmd.append(str(int(time.mktime(self.expires))))
|
||||
|
||||
# modify the user if cmd will do anything
|
||||
if cmd_len != len(cmd):
|
||||
|
|
Loading…
Reference in a new issue