Bug 51720 - Licence Counting may be wrong -> SambaAcctFlags fixed sorting
Licence Counting may be wrong -> SambaAcctFlags fixed sorting
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-23 12:46 CEST by Dirk Schnick
Modified: 2020-07-27 11:38 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020072221000879
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2020-07-23 12:46:44 CEST
A customer reported, that our license_check counts deactivated users as it checks for 
sambaAcctFlags=[ULD       ]
In customers environment the flag has another order:
sambaAcctFlags: [UDL        ]

Samba documentation says:
"In fact, they can be set without problem in any order in the SambaAcctFlags record in the LDAP directory."

If we count license by these Flags, we should have a clear order in our samba.
Comment 1 Ingo Steuwer univentionstaff 2020-07-24 12:20:51 CEST
Any idea in which case the "other" order appears? Is it one of our implementations, was it a data migration, ...?
Comment 2 Florian Best univentionstaff 2020-07-26 20:03:57 CEST
The search filtes in users/user are probably meant here. We should check if there is a ldap matching rule (or if we can implement one) so we can search for (&(sambaAcctFlags:$MATCHING-RULE:=D)(sambaAcctFlags:$MATCHING-RULE:=L)).

Or just search for *D* & *L* …
Comment 3 Dirk Schnick univentionstaff 2020-07-27 11:38:16 CEST
(In reply to Ingo Steuwer from comment #1)
> Any idea in which case the "other" order appears? Is it one of our
> implementations, was it a data migration, ...?
I don't know how this happened. I have spoken with Arvid; he suggested to open this bug to clean sort these flags in future. It was also new for him, that there is nor given order and you can order them on your own.