diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-06 10:15:50 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-02-06 16:44:56 +0100 |
commit | 8c367162f09c7772091a80d8426de6bead0c030d (patch) | |
tree | 67e52953bf0e46da6a47ca2165baa6c2aa7b00ba /source3/passdb | |
parent | 08f2a8562f67982f69f4bbf5b1034a42529ab226 (diff) | |
download | samba-8c367162f09c7772091a80d8426de6bead0c030d.tar.gz samba-8c367162f09c7772091a80d8426de6bead0c030d.tar.xz samba-8c367162f09c7772091a80d8426de6bead0c030d.zip |
s3: In pdb_ads, cope with artificial samu structs
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ads.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 7a299e58547..68ce2b469ca 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -974,8 +974,7 @@ static NTSTATUS pdb_ads_enum_group_memberships(struct pdb_methods *m, { struct pdb_ads_state *state = talloc_get_type_abort( m->private_data, struct pdb_ads_state); - struct pdb_ads_samu_private *priv = pdb_ads_get_samu_private( - m, user); + struct pdb_ads_samu_private *priv; const char *attrs[1] = { "objectSid" }; struct tldap_message **groups; int i, rc, count; @@ -983,6 +982,15 @@ static NTSTATUS pdb_ads_enum_group_memberships(struct pdb_methods *m, struct dom_sid *group_sids; gid_t *gids; + priv = pdb_ads_get_samu_private(m, user); + if (priv == NULL) { + DEBUG(10, ("Could not get pdb_ads_samu_private\n")); + *pp_sids = NULL; + *pp_gids = NULL; + *p_num_groups = 0; + return NT_STATUS_OK; + } + rc = pdb_ads_search_fmt( state, state->domaindn, TLDAP_SCOPE_SUB, attrs, ARRAY_SIZE(attrs), 0, talloc_tos(), &groups, |