-
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
AD Provider: read sAMAccountName unconditionally #7497
Conversation
opts->user_map[SDAP_AT_USER_SAMACCOUNTNAME].sys_name, &samaccountname); | ||
if (ret == EOK) { | ||
ret = ENOENT; | ||
realm = dp_opt_get_cstring(opts->basic, SDAP_KRB5_REALM); |
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,
I think it would be better to use realm = dom->realm
here, opts->basic
contain the global options of the backend and SDAP_KRB5_REALM
is the realm of the domain you joined to. If the user is coming from a trusted domain this realm would be wrong.
bye,
Sumit
src/providers/ldap/sdap_utils.c
Outdated
return NULL; | ||
} | ||
|
||
realm = dp_opt_get_cstring(sdap_basic_opts, SDAP_KRB5_REALM); |
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,
same here, SDAP_KRB5_REALM
would be wrong for trusted domain. It works for get_enterprise_principal_string_filte()
because with enterprise principals it is expected that the realm is from the local domain and the request is send to the local KDC which then will look at the part before the realm with the \@
and will try to figure out from which trusted realm the principal might be coming from and if it found wound it will tell the client to forward the request to this realm. But all of this is special for enterprise principals. But here the proper canonical principal for a user from a trusted domain is needed and hence the realm must match.
bye,
Sumit
src/providers/ldap/sdap_utils.c
Outdated
/* we check the principal and if it contains our realm, then we drop it | ||
* for the comparison with sAMAccountName */ | ||
|
||
char *principal_string_to_sAMAccountName(TALLOC_CTX *mem_ctx, |
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.
switch to all lowercase principal_string_to_samaccountname
to follow C naming convention
9d04d38
to
e36fa7c
Compare
Hi, |
e36fa7c
to
5faf97b
Compare
It doesn't build:
|
5faf97b
to
0e0dd9a
Compare
Hello, is the PR in good shape now? Can anyone confirm? |
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.
Ack from me, thank you.
Hi, thanks for the update. Can you squash the new patch into the first one and rebase your patches on top of the current master so that the patch bye, |
Please 'rebase' instead of 'merge' |
Hi, |
5b61589
to
245daa8
Compare
Hi, thank you, this looks better now. Codewise I'm fine, I will do some final testing. bye, |
245daa8
to
aa665d0
Compare
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 patience, I have no further comments, ACK.
bye,
Sumit
This is a follow up to pull request #7476 incorporating the changes as Simo requested.