Ensure Everyone/All access is mapped correctly to file generic perms to allow
authorJeremy Allison <jra@samba.org>
Mon, 9 Apr 2001 07:03:28 +0000 (07:03 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 9 Apr 2001 07:03:28 +0000 (07:03 +0000)
anonymous IPC access.
Jeremy.
(This used to be commit 2f34e144c53d6be911de96298c55c34d08c4733f)

source3/rpc_server/srv_srvsvc_nt.c

index 4395a20e46de3d6cdb83241fc69bc0e53f276779..e78968a6bbb94b8b2e296ffa6e08d00f0896b186 100644 (file)
@@ -134,12 +134,16 @@ BOOL share_info_db_init(void)
 static SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, int snum, size_t *psize)
 {
        extern DOM_SID global_sid_World;
+       extern struct generic_mapping file_generic_mapping;
        SEC_ACCESS sa;
        SEC_ACE ace;
        SEC_ACL *psa = NULL;
        SEC_DESC *psd = NULL;
+       uint32 def_access = GENERIC_ALL_ACCESS;
 
-    init_sec_access(&sa, GENERIC_ALL_ACCESS );
+       se_map_generic(&def_access, &file_generic_mapping);
+
+    init_sec_access(&sa, GENERIC_ALL_ACCESS | def_access );
     init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0);
 
        if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, 1, &ace)) != NULL) {