diff options
author | Günther Deschner <gd@samba.org> | 2008-01-08 13:46:54 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-08 14:07:01 +0100 |
commit | f89fa0a6f85b74469519ba97752f45db8b879689 (patch) | |
tree | 95cad5c68534e6fd42f0c650861b63b0c7c855fc | |
parent | f0b67934143b24914ef36c1d326350ef0ca66ee3 (diff) | |
download | samba-f89fa0a6f85b74469519ba97752f45db8b879689.tar.gz samba-f89fa0a6f85b74469519ba97752f45db8b879689.tar.bz2 samba-f89fa0a6f85b74469519ba97752f45db8b879689.zip |
Do not ignore provided machine_name in ads_get_upn().
Guenther
(This used to be commit ddc1307844379f99b3dde48fc351d0326d22a7ce)
-rw-r--r-- | source3/libads/ldap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 975e926864..28bc7793d7 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -3026,26 +3026,26 @@ char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name ) ADS_STATUS status; int count = 0; char *name = NULL; - - status = ads_find_machine_acct(ads, &res, global_myname()); + + status = ads_find_machine_acct(ads, &res, machine_name); if (!ADS_ERR_OK(status)) { DEBUG(0,("ads_get_upn: Failed to find account for %s\n", global_myname())); goto out; } - + if ( (count = ads_count_replies(ads, res)) != 1 ) { DEBUG(1,("ads_get_upn: %d entries returned!\n", count)); goto out; } - + if ( (name = ads_pull_string(ads, ctx, res, "userPrincipalName")) == NULL ) { DEBUG(2,("ads_get_upn: No userPrincipalName attribute!\n")); } out: ads_msgfree(ads, res); - + return name; } |