summaryrefslogtreecommitdiff
path: root/source4/auth/sam.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-14 19:55:30 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-18 09:50:45 +1000
commit2ceb3d8d35b87926d0ffc933782321598457fc11 (patch)
tree9fda8ada9a4c2513d0c97d747077840a876b6025 /source4/auth/sam.c
parentba52834dd97d4c855ab98c2cbab1d6ed8d189de8 (diff)
downloadsamba-2ceb3d8d35b87926d0ffc933782321598457fc11.tar.gz
samba-2ceb3d8d35b87926d0ffc933782321598457fc11.tar.bz2
samba-2ceb3d8d35b87926d0ffc933782321598457fc11.zip
s4:auth Avoid doing database lookups for NT AUTHORITY users
Diffstat (limited to 'source4/auth/sam.c')
-rw-r--r--source4/auth/sam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 7a776b9b74..0bb6bd89a1 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -330,6 +330,12 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+ 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);