diff options
author | Jim McDonough <jmcd@samba.org> | 2004-03-11 16:32:19 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2004-03-11 16:32:19 +0000 |
commit | 3d18997afda94504e9db24115aaa56a58086a653 (patch) | |
tree | f419fd44f705171d45b4768c4de89207d2a44731 /source3/sam | |
parent | a26e22edfb036ba0ab9e1a8bbe859ba2c1092b12 (diff) | |
download | samba-3d18997afda94504e9db24115aaa56a58086a653.tar.gz samba-3d18997afda94504e9db24115aaa56a58086a653.tar.bz2 samba-3d18997afda94504e9db24115aaa56a58086a653.zip |
Get MungedDial actually working with full TS strings in it for pdb_ldap.
I know this isn't pretty, but neither was our assumption that all strings
from the directory fit inside a pstring. There was no way this worked
before will all versions of usrmgr (for example, the only version of
mine that has the TS Confic button).
(This used to be commit d275c0e384db08c2a6efc28e52844f676ff71fb6)
Diffstat (limited to 'source3/sam')
-rw-r--r-- | source3/sam/idmap_ldap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/sam/idmap_ldap.c b/source3/sam/idmap_ldap.c index 55f4578448..2124fb6879 100644 --- a/source3/sam/idmap_ldap.c +++ b/source3/sam/idmap_ldap.c @@ -204,7 +204,7 @@ static NTSTATUS ldap_next_rid(struct ldap_idmap_state *state, uint32 *rid, algorithmic_rid_base. The other two are to avoid stomping on the different sets of algorithmic RIDs */ - if (smbldap_get_single_attribute(state->smbldap_state->ldap_struct, entry, + if (smbldap_get_single_pstring(state->smbldap_state->ldap_struct, entry, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_ALGORITHMIC_RID_BASE), algorithmic_rid_base_string)) { @@ -224,7 +224,7 @@ static NTSTATUS ldap_next_rid(struct ldap_idmap_state *state, uint32 *rid, if (alg_rid_base > BASE_RID) { /* we have a non-default 'algorithmic rid base', so we have 'low' rids that we can allocate to new users */ - if (smbldap_get_single_attribute(state->smbldap_state->ldap_struct, entry, + if (smbldap_get_single_pstring(state->smbldap_state->ldap_struct, entry, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_RID), old_rid_string)) { *rid = (uint32)atol(old_rid_string); @@ -250,14 +250,14 @@ static NTSTATUS ldap_next_rid(struct ldap_idmap_state *state, uint32 *rid, if (!next_rid) { /* not got one already */ switch (rid_type) { case USER_RID_TYPE: - if (smbldap_get_single_attribute(state->smbldap_state->ldap_struct, entry, + if (smbldap_get_single_pstring(state->smbldap_state->ldap_struct, entry, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_USERRID), old_rid_string)) { *rid = (uint32)atol(old_rid_string); } break; case GROUP_RID_TYPE: - if (smbldap_get_single_attribute(state->smbldap_state->ldap_struct, entry, + if (smbldap_get_single_pstring(state->smbldap_state->ldap_struct, entry, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_GROUPRID), old_rid_string)) { *rid = (uint32)atol(old_rid_string); @@ -297,7 +297,7 @@ static NTSTATUS ldap_next_rid(struct ldap_idmap_state *state, uint32 *rid, pstring domain_sid_string; int error = 0; - if (!smbldap_get_single_attribute(state->smbldap_state->ldap_struct, domain_result, + if (!smbldap_get_single_pstring(state->smbldap_state->ldap_struct, domain_result, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_DOM_SID), domain_sid_string)) { ldap_mods_free(mods, True); @@ -420,7 +420,7 @@ static NTSTATUS ldap_allocate_id(unid_t *id, int id_type) } entry = ldap_first_entry(ldap_state.smbldap_state->ldap_struct, result); - if (!smbldap_get_single_attribute(ldap_state.smbldap_state->ldap_struct, entry, type, id_str)) { + if (!smbldap_get_single_pstring(ldap_state.smbldap_state->ldap_struct, entry, type, id_str)) { DEBUG(0,("ldap_allocate_id: %s attribute not found\n", type)); goto out; @@ -528,7 +528,7 @@ static NTSTATUS ldap_get_sid_from_id(DOM_SID *sid, unid_t id, int id_type) entry = ldap_first_entry(ldap_state.smbldap_state->ldap_struct, result); - if ( !smbldap_get_single_attribute(ldap_state.smbldap_state->ldap_struct, entry, LDAP_ATTRIBUTE_SID, sid_str) ) + if ( !smbldap_get_single_pstring(ldap_state.smbldap_state->ldap_struct, entry, LDAP_ATTRIBUTE_SID, sid_str) ) goto out; if (!string_to_sid(sid, sid_str)) @@ -642,7 +642,7 @@ static NTSTATUS ldap_get_id_from_sid(unid_t *id, int *id_type, const DOM_SID *si DEBUG(10, ("Found mapping entry at dn=%s, looking for %s\n", dn, type)); - if ( smbldap_get_single_attribute(ldap_state.smbldap_state->ldap_struct, entry, type, id_str) ) { + if ( smbldap_get_single_pstring(ldap_state.smbldap_state->ldap_struct, entry, type, id_str) ) { if ( (*id_type & ID_USERID) ) id->uid = strtoul(id_str, NULL, 10); else |