summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2014-09-23 17:44:41 -0400
committerJakub Hrozek <jhrozek@redhat.com>2014-09-29 18:15:51 +0200
commit5e381cc03f6e1cd15686bc5a0c8ea1c28723fd5c (patch)
tree2fe48ac96ecc3bd8baf51f473ec92a911755f75d /src/providers
parent5ae539828197f032d3e2ccb27e87ccf2a1d94996 (diff)
downloadsssd-5e381cc03f6e1cd15686bc5a0c8ea1c28723fd5c.tar.gz
sssd-5e381cc03f6e1cd15686bc5a0c8ea1c28723fd5c.tar.xz
sssd-5e381cc03f6e1cd15686bc5a0c8ea1c28723fd5c.zip
AD GPO: Fix incorrect sAMAccountName selection
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ad/ad_gpo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
index de4d44166..2f9e31611 100644
--- a/src/providers/ad/ad_gpo.c
+++ b/src/providers/ad/ad_gpo.c
@@ -1519,7 +1519,7 @@ ad_gpo_connect_done(struct tevent_req *subreq)
}
}
- sam_account_name = talloc_asprintf(state, "%s$", state->ad_hostname);
+ sam_account_name = sss_krb5_get_primary(state, "%S$", state->ad_hostname);
if (sam_account_name == NULL) {
ret = ENOMEM;
goto done;
@@ -1542,7 +1542,7 @@ ad_gpo_connect_done(struct tevent_req *subreq)
state->opts->user_map[SDAP_OC_USER].name,
state->opts->user_map[SDAP_AT_USER_NAME].name,
sam_account_name);
-
+ talloc_zfree(sam_account_name);
if (filter == NULL) {
ret = ENOMEM;
goto done;