1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

smbdotconf: mark "ldap admin dn" with constant="1"

All the other LDAP related options like "ldap user suffix" don't support
variable substitution, so I guess it's safe to remove support for it from this
one as well.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2019-11-04 17:54:23 +01:00 committed by Stefan Metzmacher
parent 4d2a3c8a79
commit 050c28364a
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
<samba:parameter name="ldap admin dn"
context="G"
type="string"
constant="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>

View File

@ -324,7 +324,7 @@ bool fetch_ldap_pw(char **dn, char** pw)
char *key = NULL;
size_t size = 0;
*dn = smb_xstrdup(lp_ldap_admin_dn(talloc_tos()));
*dn = smb_xstrdup(lp_ldap_admin_dn());
if (asprintf(&key, "%s/%s", SECRETS_LDAP_BIND_PW, *dn) < 0) {
SAFE_FREE(*dn);

View File

@ -295,7 +295,7 @@ static bool store_ldap_admin_pw (char* pw)
if (!secrets_init())
return False;
return secrets_store_ldap_pw(lp_ldap_admin_dn(talloc_tos()), pw);
return secrets_store_ldap_pw(lp_ldap_admin_dn(), pw);
}
@ -310,7 +310,7 @@ static int process_root(int local_flags)
char *old_passwd = NULL;
if (local_flags & LOCAL_SET_LDAP_ADMIN_PW) {
char *ldap_admin_dn = lp_ldap_admin_dn(talloc_tos());
const char *ldap_admin_dn = lp_ldap_admin_dn();
if ( ! *ldap_admin_dn ) {
DEBUG(0,("ERROR: 'ldap admin dn' not defined! Please check your smb.conf\n"));
goto done;