From a6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 2 Nov 2011 14:34:41 +1100 Subject: dsdb: Handle the case when extended rights string is NULL Pair-Programmed-With: Andrew Tridgell Signed-off-by: Andrew Tridgell Autobuild-User: Andrew Tridgell Autobuild-Date: Wed Nov 2 07:03:40 CET 2011 on sn-devel-104 --- source4/dsdb/common/dsdb_access.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/common/dsdb_access.c b/source4/dsdb/common/dsdb_access.c index b8784fc62f..fd75e77541 100644 --- a/source4/dsdb/common/dsdb_access.c +++ b/source4/dsdb/common/dsdb_access.c @@ -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); } -- cgit