net_ads: fill ads->auth.realm from c->creds
commit0ef53b948e13eb36b536228cccd89aa4c2adbb90
authorStefan Metzmacher <metze@samba.org>
Thu, 2 Mar 2023 13:46:25 +0000 (2 14:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 6 Apr 2023 12:51:30 +0000 (6 12:51 +0000)
tree545900f40ea04a81e07f1d2958967e62284325f1
parent3b585f9e8cc320841fab4cd5c3be53788d0a87ac
net_ads: fill ads->auth.realm from c->creds

We get the realm we use for authentication needs to
the realm belonging to the username we use.

We derive the username from c->creds, so we need to
do the same for the realm.

Otherwise we try to authenticate as the wrong user.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15323

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/knownfail.d/samba4.blackbox.net_ads_search_server_P [deleted file]
source3/utils/net_ads.c