From: Noel Power Date: Fri, 12 Jan 2018 12:22:45 +0000 (+0000) Subject: s3:libads: ads_get_dnshostname & ads_get_samaccountname don't use param X-Git-Tag: talloc-2.1.12~301 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2dd94e41f6e76b4cbbeb1704778a8c27b6eb35f4;p=thirdparty%2Fsamba.git s3:libads: ads_get_dnshostname & ads_get_samaccountname don't use param 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 Reviewed-by: Jeremy Allison Reviewed-by: Andreas Schneider --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index c18837cc524..4f238ef83c2 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -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()));