summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-11-02 14:34:41 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-02 07:03:40 +0100
commita6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389 (patch)
tree309e9b30add438389dbe29e2ac8ff0a65087b516 /source4
parentc8ac3678ad98bc27cf08f3d14bae2aa52318c48d (diff)
downloadsamba-a6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389.tar.gz
samba-a6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389.tar.xz
samba-a6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389.zip
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
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/dsdb_access.c11
1 files changed, 7 insertions, 4 deletions
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);
}