Univention Bugzilla – Attachment 10872 Details for
Bug 53012
S4 Connector calculates wrong expire Date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug53012.patch
bug53012.patch (text/plain), 1.40 KB, created by
Arvid Requate
on 2021-12-08 18:51:34 CET
(
hide
)
Description:
bug53012.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2021-12-08 18:51:34 CET
Size:
1.40 KB
patch
obsolete
>commit a22b54de7a >Author: Arvid Requate <requate@univention.de> >Date: Wed Dec 8 17:44:28 2021 +0100 > > Bug #53012: Patch proposal > > * Looks like accountExpires is not EOD in Samba but rather behaving > just like userexpiry in UDM > * Consider local server timezone when to define change of day > >diff --git services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >index b75a73f9a4..a0e2012305 100644 >--- services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >+++ services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >@@ -240,12 +240,12 @@ def encode_s4_resultlist(s4_resultlist): > > def unix2s4_time(l): > d = 116444736000000000 # difference between 1601 and 1970 >- return int(calendar.timegm(time.strptime(l, "%Y-%m-%d")) - 86400) * 10000000 + d # AD stores end of day in accountExpires >+ return int(time.mktime(time.strptime(l, "%Y-%m-%d"))) * 10000000 + d # AD stores end of day in accountExpires > > > def s42unix_time(l): > d = 116444736000000000 # difference between 1601 and 1970 >- return time.strftime("%Y-%m-%d", time.gmtime((l - d) / 10000000 + 86400)) # shadowExpire treats day of expiry as exclusive >+ return time.strftime("%Y-%m-%d", time.localtime((l - d) / 10000000)) # shadowExpire treats day of expiry as exclusive > > > def samba2s4_time(l):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53012
:
10670
|
10671
|
10672
| 10872