1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

for freebsd tool "pw" use date not days in "modify_user"
This commit is contained in:
Lutz Reinhardt 2018-04-13 22:21:22 +02:00 committed by Brian Coca
parent d639d5dc96
commit d512bed495

View file

@ -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):