summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-13 14:12:50 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-13 14:12:50 +1100
commit4a2ba0c047249fa6f7f4c78313b3b221d9a5bcc7 (patch)
treef5fc37f6ca92f6f991ed3f7b0ec110d1481e0fce
parente50d666bf9b2e5f18d19f6e1b9388d1ea7be0ff2 (diff)
downloadsamba-4a2ba0c047249fa6f7f4c78313b3b221d9a5bcc7.tar.gz
samba-4a2ba0c047249fa6f7f4c78313b3b221d9a5bcc7.tar.bz2
samba-4a2ba0c047249fa6f7f4c78313b3b221d9a5bcc7.zip
Bail out, rather than segfault on no domain sid.
Andrew Bartlett (This used to be commit 7e85f318b571d1a909dffad0ecd661468ed497ca)
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 537a56045d..4d4ef585cb 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -258,14 +258,15 @@ static DATA_BLOB *get_sd(struct ldb_module *module, TALLOC_CTX *mem_ctx,
struct auth_session_info *session_info
= ldb_get_opaque(module->ldb, "sessionInfo");
struct security_descriptor *sd;
+ struct dom_sid *domain_sid = samdb_domain_sid(module->ldb);
- if (!objectclass->defaultSecurityDescriptor) {
+ if (!objectclass->defaultSecurityDescriptor || !domain_sid) {
return NULL;
}
sd = sddl_decode(mem_ctx,
objectclass->defaultSecurityDescriptor,
- samdb_domain_sid(module->ldb));
+ domain_sid);
if (!sd || !session_info || !session_info->security_token) {
return NULL;