summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/net_rpc_registry.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index 915ce5f9aa..e1d65fb06b 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -990,6 +990,9 @@ static NTSTATUS rpc_registry_getsd_internal(const DOM_SID *domain_sid,
uint32_t sec_info;
DATA_BLOB blob;
struct security_descriptor sec_desc;
+ uint32_t access_mask = REG_KEY_READ |
+ SEC_RIGHT_MAXIMUM_ALLOWED |
+ SEC_RIGHT_SYSTEM_SECURITY;
if (argc <1 || argc > 2) {
d_printf("Usage: net rpc registry getsd <path> <secinfo>\n");
@@ -997,7 +1000,8 @@ static NTSTATUS rpc_registry_getsd_internal(const DOM_SID *domain_sid,
return NT_STATUS_OK;
}
- status = registry_openkey(mem_ctx, pipe_hnd, argv[0], REG_KEY_READ,
+ status = registry_openkey(mem_ctx, pipe_hnd, argv[0],
+ access_mask,
&pol_hive, &pol_key);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "registry_openkey failed: %s\n",