fix bug in modules/system/user.py (#37552)

for freebsd tool "pw" use date not days in "modify_user"
pull/38764/merge
Lutz Reinhardt 7 years ago committed by Brian Coca
parent d639d5dc96
commit d512bed495

@ -903,9 +903,8 @@ class FreeBsdUser(User):
cmd.append(','.join(new_groups)) cmd.append(','.join(new_groups))
if self.expires: if self.expires:
days = (time.mktime(self.expires) - time.time()) // 86400
cmd.append('-e') cmd.append('-e')
cmd.append(str(int(days))) cmd.append(str(int(time.mktime(self.expires))))
# modify the user if cmd will do anything # modify the user if cmd will do anything
if cmd_len != len(cmd): if cmd_len != len(cmd):

Loading…
Cancel
Save