diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-03 09:19:42 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-03 09:19:42 +0100 |
commit | 4ae9aec17cc75685381fff86e1b90f99b4ae51c8 (patch) | |
tree | a70a9ec51bca4b144aec2a938b6733d15ed652c4 /source4 | |
parent | 5e1c9b562c4bf89d0d2e9a423a6fa0bf48b6da6b (diff) | |
download | samba-4ae9aec17cc75685381fff86e1b90f99b4ae51c8.tar.gz samba-4ae9aec17cc75685381fff86e1b90f99b4ae51c8.tar.bz2 samba-4ae9aec17cc75685381fff86e1b90f99b4ae51c8.zip |
s4:auth/sam.c - the check for the SAMDB needs to be on the top of the call
Otherwise it's really useless.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/sam.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c index bd9278036e..675c37682d 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -314,6 +314,11 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx, *num_res_sids = 0; } + if (!sam_ctx) { + DEBUG(0, ("No SAM available, cannot determine local groups\n")); + return NT_STATUS_INVALID_SYSTEM_SERVICE; + } + tmp_ctx = talloc_new(res_sids_ctx); dn = ldb_dn_from_ldb_val(tmp_ctx, sam_ctx, dn_val); @@ -339,12 +344,6 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx, return status; } - if (!sam_ctx) { - DEBUG(0, ("No SAM available, cannot determine local groups\n")); - talloc_free(tmp_ctx); - return NT_STATUS_INVALID_SYSTEM_SERVICE; - } - if (only_childs) { ret = dsdb_search_dn(sam_ctx, tmp_ctx, &res, dn, attrs, DSDB_SEARCH_SHOW_EXTENDED_DN); |