summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-18 16:34:39 +0100
committerMichael Adam <obnox@samba.org>2008-02-18 17:41:21 +0100
commitbb0bf5c902c4fbf51efaeab8548fae215caf40e3 (patch)
tree6a2dda3cb3210e97bccade5cecf379e5c0d4208d
parent7ba906634bc89a0a9180687402ecb52ccb5f13c4 (diff)
downloadsamba-bb0bf5c902c4fbf51efaeab8548fae215caf40e3.tar.gz
samba-bb0bf5c902c4fbf51efaeab8548fae215caf40e3.tar.bz2
samba-bb0bf5c902c4fbf51efaeab8548fae215caf40e3.zip
Remove (now) unused function make_default_reg_sd().
Michael (This used to be commit 2c66413de284fb4cb9dc7def0ee4eb07b986c9ca)
-rw-r--r--source3/registry/reg_api.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 25cf101aaf..e52aaacb4d 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -939,54 +939,6 @@ done:
return result;
}
-static const struct generic_mapping reg_generic_map =
- { REG_KEY_READ, REG_KEY_WRITE, REG_KEY_EXECUTE, REG_KEY_ALL };
-
-static WERROR make_default_reg_sd(TALLOC_CTX *ctx, SEC_DESC **psd)
-{
- DOM_SID adm_sid, owner_sid;
- SEC_ACE ace[2]; /* at most 2 entries */
- SEC_ACCESS mask;
- SEC_ACL *psa = NULL;
- size_t sd_size;
-
- /* set the owner to BUILTIN\Administrator */
-
- sid_copy(&owner_sid, &global_sid_Builtin);
- sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN );
-
-
- /* basic access for Everyone */
-
- init_sec_access(&mask, reg_generic_map.generic_execute
- | reg_generic_map.generic_read);
- init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED,
- mask, 0);
-
- /* add Full Access 'BUILTIN\Administrators' */
-
- init_sec_access(&mask, reg_generic_map.generic_all);
- sid_copy(&adm_sid, &global_sid_Builtin);
- sid_append_rid(&adm_sid, BUILTIN_ALIAS_RID_ADMINS);
- init_sec_ace(&ace[1], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
-
- /* create the security descriptor */
-
- psa = make_sec_acl(ctx, NT4_ACL_REVISION, 2, ace);
- if (psa == NULL) {
- return WERR_NOMEM;
- }
-
- *psd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
- SEC_DESC_SELF_RELATIVE, &owner_sid, NULL,
- NULL, psa, &sd_size);
- if (*psd == NULL) {
- return WERR_NOMEM;
- }
-
- return WERR_OK;
-}
-
static WERROR backup_registry_key(REGISTRY_KEY *krecord, const char *fname)
{
REGF_FILE *regfile;