mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Bail out, rather than segfault on no domain sid.
Andrew Bartlett
This commit is contained in:
parent
7c80cd18d5
commit
7e85f318b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user