-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the DN from existing entry when updating a cached group #7360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for your patch. See slight remark inside. Otherwise ack.
Hi @scabrero, |
715cafa
to
27ad1f7
Compare
Hi, please see a couple of comments inline. Additionally it feels inconsistent that |
If the domain is case insensitive then users and groups must be correctly stored regardless name capitalization. Signed-off-by: Samuel Cabrero <[email protected]>
The sysdb_store_user() and sysdb_store_group() functinos search for the entry by name to check if it is already cached. This search considers SYSDB_ALIAS, added when the domain is case insensitive. If a matching entry is found use its SYSDB_NAME instead of the passed name. It may happen the group is stored in uppercase, but later some server returns a memberOf attribute in lowercase. When updating the group to add the memberships the first search will find the entry, but the modify operation will fail as the group name in the built DN will differ in case. Signed-off-by: Samuel Cabrero <[email protected]>
27ad1f7
to
517dcf2
Compare
@pbrezina , please take a look at the latest version. |
2.9/2.9.4 backport - #7788 |
I have found an issue where storing a group fails with:
The entry exists in the cache, although with different capitalization:
The problem is in that
sysdb_store_group()
searches the group including nameAlias, but subsequent modification fails because the DN is built based on the given name which may differ in case.IMO if the first search finds the entry, its DN must be used to modify it.