From 2dd94e41f6e76b4cbbeb1704778a8c27b6eb35f4 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 12 Jan 2018 12:22:45 +0000 Subject: [PATCH] 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 --- source3/libads/ldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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())); -- 2.11.4.GIT