diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
commit | bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7 (patch) | |
tree | 4edbacab40c67bb5d9d6bebe66a22949349cbf9a /source3/libads/ldap.c | |
parent | 8dbeca6e9d06d573adebe8d9c5114b24d8782e43 (diff) | |
parent | 62c91987d902d4dfe27023ff2ec2fb73e602105b (diff) | |
download | samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.gz samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.bz2 samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit ea36c3add588061cf338deabb2d8952f2213a8bd)
Diffstat (limited to 'source3/libads/ldap.c')
-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; } |