From: Andrew Bartlett Date: Tue, 24 Oct 2017 02:59:37 +0000 (+1300) Subject: python: This function converts days to a relative (ie negative) NTTIME X-Git-Tag: talloc-2.1.11~445 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d77776ce7e285ec001a925aa9289ffb33d76d80;p=thirdparty%2Fsamba.git python: This function converts days to a relative (ie negative) NTTIME It is not nttime2unix as it claimed. Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/python/samba/gpclass.py b/python/samba/gpclass.py index b13c117dd2d..c955005ad19 100644 --- a/python/samba/gpclass.py +++ b/python/samba/gpclass.py @@ -360,7 +360,7 @@ class inf_to_ldb(inf_to): self.gp_db.store(str(self), self.attribute, old_val) self.ldb.set_pwdProperties(val) - def nttime2unix(self): + def days2rel_nttime(self): seconds = 60 minutes = 60 hours = 24 @@ -371,8 +371,8 @@ class inf_to_ldb(inf_to): def mapper(self): '''ldap value : samba setter''' - return { "minPwdAge" : (self.ch_minPwdAge, self.nttime2unix), - "maxPwdAge" : (self.ch_maxPwdAge, self.nttime2unix), + return { "minPwdAge" : (self.ch_minPwdAge, self.days2rel_nttime), + "maxPwdAge" : (self.ch_maxPwdAge, self.days2rel_nttime), # Could be none, but I like the method assignment in update_samba "minPwdLength" : (self.ch_minPwdLength, self.explicit), "pwdProperties" : (self.ch_pwdProperties, self.explicit),