Bug 50305 - Remove normalise_userAccountControl()
Remove normalise_userAccountControl()
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-02 16:45 CEST by Florian Best
Modified: 2019-11-06 14:41 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, UCS Performance
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (git:fbest/50305-remove-normalise-userAccountControl) (2.28 KB, patch)
2019-10-02 16:49 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-10-02 16:45:35 CEST
The function normalise_userAccountControl() sets the value of 'userAccountControl' hardcoded to '512' (up to 10 times in a loop) when creating a user object in Samba4-LDAP.

The function is a "post_con_create_functions" of the "user" mapping.

We can instead simply set the value directly in the addlist.
Maybe in the AD-Connector this is necessary. But with the current Samba version setting the attribute directly works fine.
Comment 1 Florian Best univentionstaff 2019-10-02 16:49:30 CEST
Created attachment 10196 [details]
patch (git:fbest/50305-remove-normalise-userAccountControl)
Comment 2 Florian Best univentionstaff 2019-10-10 15:32:20 CEST
Function has been marked as deprecated. The mapping now adds the value directly, which saves at least one ldap call.

univention-s4-connector (13.0.2-49)
a00ac4c2cd4b | Bug #50305: do not use normalise_userAccountControl() anymore.

univention-s4-connector.yaml
a00ac4c2cd4b | Bug #50305: do not use normalise_userAccountControl() anymore.
Comment 3 Arvid Requate univentionstaff 2019-10-10 21:37:54 CEST
Verified:
* Code review, for 'user' this now works in the same way as in 'windowscomputer' and 'dc'.
* Functional test
* Advisory Ok
Comment 4 Arvid Requate univentionstaff 2019-11-06 14:41:04 CET
<http://errata.software-univention.de/ucs/4.4/330.html>