]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libads: ads_get_dnshostname & ads_get_samaccountname don't use param
authorNoel Power <noel.power@suse.com>
Fri, 12 Jan 2018 12:22:45 +0000 (12:22 +0000)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 2 Mar 2018 13:07:14 +0000 (14:07 +0100)
Both ads_get_dnshostname() & ads_get_samaccountname() are passed
a param machinename as a argument. Instead of using 'machinename' these
functions are erroneously using lp_netbiosname() instead.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libads/ldap.c

index c18837cc524d3097f83b20a33e167078288e7ca5..4f238ef83c299066c67ccd04e027858d8901589c 100644 (file)
@@ -3406,7 +3406,7 @@ char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine
        int count = 0;
        char *name = NULL;
 
-       status = ads_find_machine_acct(ads, &res, lp_netbios_name());
+       status = ads_find_machine_acct(ads, &res, machine_name);
        if (!ADS_ERR_OK(status)) {
                DEBUG(0,("ads_get_dnshostname: Failed to find account for %s\n",
                        lp_netbios_name()));
@@ -3470,7 +3470,7 @@ char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *mach
        int count = 0;
        char *name = NULL;
 
-       status = ads_find_machine_acct(ads, &res, lp_netbios_name());
+       status = ads_find_machine_acct(ads, &res, machine_name);
        if (!ADS_ERR_OK(status)) {
                DEBUG(0,("ads_get_dnshostname: Failed to find account for %s\n",
                        lp_netbios_name()));