From: Günther Deschner Date: Mon, 5 Nov 2007 01:33:58 +0000 (+0100) Subject: Make sure we can read SACLs from the registry. X-Git-Tag: samba-4.0.0alpha6~801^2~4490 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=fc22f295d06f243c86acc6a9ef042417007677e5;p=samba.git Make sure we can read SACLs from the registry. Guenther (This used to be commit 62d4cce4562b77403f9353d333b9553352bdf1d8) --- diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 915ce5f9aa9..e1d65fb06b0 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 \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",