1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

dsdb: Handle the case when extended rights string is NULL

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  2 07:03:40 CET 2011 on sn-devel-104
This commit is contained in:
Amitay Isaacs 2011-11-02 14:34:41 +11:00 committed by Andrew Tridgell
parent c8ac3678ad
commit a6ed9071b9

View File

@ -152,9 +152,12 @@ int dsdb_check_access_on_dn(struct ldb_context *ldb,
"objectSid",
NULL
};
NTSTATUS status = GUID_from_string(ext_right, &guid);
if (!NT_STATUS_IS_OK(status)) {
return LDB_ERR_OPERATIONS_ERROR;
if (ext_right != NULL) {
NTSTATUS status = GUID_from_string(ext_right, &guid);
if (!NT_STATUS_IS_OK(status)) {
return LDB_ERR_OPERATIONS_ERROR;
}
}
ret = dsdb_search_dn(ldb, mem_ctx, &acl_res, dn, acl_attrs, DSDB_SEARCH_SHOW_DELETED);
@ -168,6 +171,6 @@ int dsdb_check_access_on_dn(struct ldb_context *ldb,
token,
dn,
access_mask,
&guid);
ext_right ? &guid : NULL);
}