mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
r7142: removing 'ldap filter' smb.conf option
This commit is contained in:
parent
38cad678b8
commit
e2f8eeb4e2
@ -238,7 +238,6 @@ typedef struct
|
||||
#endif
|
||||
int ldap_ssl;
|
||||
char *szLdapSuffix;
|
||||
char *szLdapFilter;
|
||||
char *szLdapAdminDn;
|
||||
char *szAclCompat;
|
||||
char *szCupsServer;
|
||||
@ -1116,7 +1115,6 @@ static struct parm_struct parm_table[] = {
|
||||
#endif
|
||||
{"ldap admin dn", P_STRING, P_GLOBAL, &Globals.szLdapAdminDn, NULL, NULL, FLAG_ADVANCED},
|
||||
{"ldap delete dn", P_BOOL, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED},
|
||||
{"ldap filter", P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, FLAG_ADVANCED},
|
||||
{"ldap group suffix", P_STRING, P_GLOBAL, &Globals.szLdapGroupSuffix, NULL, NULL, FLAG_ADVANCED},
|
||||
{"ldap idmap suffix", P_STRING, P_GLOBAL, &Globals.szLdapIdmapSuffix, NULL, NULL, FLAG_ADVANCED},
|
||||
{"ldap machine suffix", P_STRING, P_GLOBAL, &Globals.szLdapMachineSuffix, NULL, NULL, FLAG_ADVANCED},
|
||||
@ -1505,7 +1503,6 @@ static void init_globals(void)
|
||||
#endif /* WITH_LDAP_SAMCONFIG */
|
||||
|
||||
string_set(&Globals.szLdapSuffix, "");
|
||||
string_set(&Globals.szLdapFilter, "(uid=%u)");
|
||||
string_set(&Globals.szLdapMachineSuffix, "");
|
||||
string_set(&Globals.szLdapUserSuffix, "");
|
||||
string_set(&Globals.szLdapGroupSuffix, "");
|
||||
@ -1769,7 +1766,6 @@ FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer)
|
||||
FN_GLOBAL_INTEGER(lp_ldap_port, &Globals.ldap_port)
|
||||
#endif
|
||||
FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix)
|
||||
FN_GLOBAL_STRING(lp_ldap_filter, &Globals.szLdapFilter)
|
||||
FN_GLOBAL_STRING(lp_ldap_admin_dn, &Globals.szLdapAdminDn)
|
||||
FN_GLOBAL_INTEGER(lp_ldap_ssl, &Globals.ldap_ssl)
|
||||
FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, &Globals.ldap_passwd_sync)
|
||||
|
@ -198,7 +198,7 @@ int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
|
||||
* in the filter expression, replace %u with the real name
|
||||
* so in ldap filter, %u MUST exist :-)
|
||||
*/
|
||||
pstr_sprintf(filter, "(&%s%s)", lp_ldap_filter(),
|
||||
pstr_sprintf(filter, "(&%s%s)", "(uid=%u)",
|
||||
get_objclass_filter(ldap_state->schema_ver));
|
||||
|
||||
/*
|
||||
@ -1210,7 +1210,7 @@ static NTSTATUS ldapsam_setsampwent(struct pdb_methods *my_methods, BOOL update,
|
||||
const char **attr_list;
|
||||
BOOL machine_mask = False, user_mask = False;
|
||||
|
||||
pstr_sprintf( filter, "(&%s%s)", lp_ldap_filter(),
|
||||
pstr_sprintf( filter, "(&%s%s)", "(uid=%u)",
|
||||
get_objclass_filter(ldap_state->schema_ver));
|
||||
all_string_sub(filter, "%u", "*", sizeof(pstring));
|
||||
|
||||
@ -1806,7 +1806,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
|
||||
we need to return the samba attributes here */
|
||||
|
||||
escape_user = escape_ldap_string_alloc( username );
|
||||
pstrcpy( filter, lp_ldap_filter() );
|
||||
pstrcpy( filter, "(uid=%u)" );
|
||||
all_string_sub( filter, "%u", escape_user, sizeof(filter) );
|
||||
SAFE_FREE( escape_user );
|
||||
|
||||
@ -3328,7 +3328,7 @@ char *get_ldap_filter(TALLOC_CTX *mem_ctx, const char *username)
|
||||
char *result = NULL;
|
||||
|
||||
asprintf(&filter, "(&%s(objectclass=sambaSamAccount))",
|
||||
lp_ldap_filter());
|
||||
"(uid=%u)");
|
||||
if (filter == NULL) goto done;
|
||||
|
||||
escaped = escape_ldap_string_alloc(username);
|
||||
|
Loading…
x
Reference in New Issue
Block a user