This commit is contained in:
stefankaerst 2017-06-11 14:44:22 +02:00 committed by Stefan Kaerst
parent 8c2fae27d6
commit 54619f70f4

View file

@ -923,7 +923,10 @@ class FreeBsdUser(User):
if self.expires: if self.expires:
days = (time.mktime(self.expires) - time.time()) // 86400 days = (time.mktime(self.expires) - time.time()) // 86400
cmd.append('-e') cmd.append('-e')
cmd.append(str(int(days))) if self.clearexpires < 0:
cmd.append('0')
else:
cmd.append(str(int(days)))
# 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):