net_ads: fill ads->auth.realm from c->creds
commit5cc3c1b5f6b0289f91c01b20989558badc28fd61
authorStefan Metzmacher <metze@samba.org>
Thu, 2 Mar 2023 13:46:25 +0000 (2 14:46 +0100)
committerJule Anger <janger@samba.org>
Sun, 16 Apr 2023 15:41:16 +0000 (16 15:41 +0000)
treec7877b3593998e047794488a74dc57eaca3b9068
parent4f1d674aa929208a9d623ce933da3d38692f68b8
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>
(cherry picked from commit 0ef53b948e13eb36b536228cccd89aa4c2adbb90)
selftest/knownfail.d/samba4.blackbox.net_ads_search_server_P [deleted file]
source3/utils/net_ads.c