summaryrefslogtreecommitdiffstats
path: root/source/sam
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-07-05 10:39:41 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-07-05 10:39:41 +0000
commit6c48309cda9538da5a32f3d88a7bb9c413ae9e8e (patch)
tree157e4be6d6458ef9ea48ae657a19c4e03daf91f9 /source/sam
parentc7118cb31dac24db3b762fe68ce655b17ea102e0 (diff)
downloadsamba-6c48309cda9538da5a32f3d88a7bb9c413ae9e8e.tar.gz
samba-6c48309cda9538da5a32f3d88a7bb9c413ae9e8e.tar.xz
samba-6c48309cda9538da5a32f3d88a7bb9c413ae9e8e.zip
Add some debug statments to our vampire code - try to make it easier to track
down failures. Add a 'auto-add on modify' feature to guestsam Fix some segfault bugs on no-op idmap modifications, and on new idmappings that do not have a DN to tack onto. Make the 'private data' a bit more robust. Andrew Bartlett
Diffstat (limited to 'source/sam')
-rw-r--r--source/sam/idmap_ldap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/sam/idmap_ldap.c b/source/sam/idmap_ldap.c
index 56a289d8aa8..ade88d92202 100644
--- a/source/sam/idmap_ldap.c
+++ b/source/sam/idmap_ldap.c
@@ -397,7 +397,7 @@ static NTSTATUS ldap_set_mapping_internals(const DOM_SID *sid, unid_t id,
int rc = -1;
int ldap_op;
fstring sid_string;
- char **values;
+ char **values = NULL;
int i;
sid_to_string( sid_string, sid );
@@ -424,7 +424,9 @@ static NTSTATUS ldap_set_mapping_internals(const DOM_SID *sid, unid_t id,
snprintf(id_str, sizeof(id_str), "%u", ((id_type & ID_USERID) ? id.uid : id.gid));
- values = ldap_get_values(ldap_state.smbldap_state->ldap_struct, entry, "objectClass");
+ if (entry)
+ values = ldap_get_values(ldap_state.smbldap_state->ldap_struct, entry, "objectClass");
+
if (values) {
BOOL found_idmap = False;
for (i=0; values[i]; i++) {