cache_req: use sysdb_search_user_by_upn_with_view_res()#7998
cache_req: use sysdb_search_user_by_upn_with_view_res()#7998alexey-tikhonov merged 5 commits intoSSSD:masterfrom
Conversation
|
Is this related to #7996? |
|
|
Do you know if it's applicable to sssd-2-9-4? |
Yes, looks like the issue is present since a long time. |
f5d64b3 to
b854636
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors user lookup by UPN to use a new function sysdb_search_user_by_upn_with_view_res that correctly applies overrides from views. The changes involve removing the old sysdb_getpwupn function, implementing the new one, and updating the cache request plugin and tests. The overall change is good and includes a relevant system test. I found one potential logic bug in the new function where an ENOENT error code might be incorrectly overwritten, which I've commented on with a suggested fix.
|
Note: Covscan is green. |
|
f-44 system test fails aren't due to this PR. |
The new call will apply overrides to a user object which was searched by UPN or email address before returning it. Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
To make sure any overrides are applied to the user even when searched by UPN or email address sysdb_search_user_by_upn_with_view_res() is now used in the cache request code. Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Add a system test to verify that IPA ID view overrides are correctly applied when looking up a user by email address. The test creates a user with an email, applies ID view overrides (login, uid, gid, home), and verifies that the overridden values are returned when looking up the user by: - original name - overridden name - email address Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com> Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
To make sure any overrides are applied to the user even when searched by
UPN or email address sysdb_search_user_by_upn_with_view_res() is now used
in the cache request code.