Rebase against 2d6b0b67d91b6433744ec859b10b8ee8eb4a37b3.

This commit is contained in:
Zebediah Figura
2021-02-10 19:09:42 -06:00
parent 6347bdd1fc
commit 41e15516bd
36 changed files with 318 additions and 1419 deletions

View File

@@ -1,4 +1,4 @@
From 2964ee0ea43ead52e9b34da5f9cc97792c41010b Mon Sep 17 00:00:00 2001
From 88c10b2fa313a63dcfbe54ba687e89e1ed5c1b02 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:08:36 -0600
Subject: [PATCH] server: Inherit security attributes from parent directories
@@ -10,10 +10,10 @@ Subject: [PATCH] server: Inherit security attributes from parent directories
2 files changed, 142 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 9b2193f6232..21cd746fd2a 100644
index d2ce3803bf6..7794e6735f3 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3661,7 +3661,7 @@ static void test_CreateDirectoryA(void)
@@ -3647,7 +3647,7 @@ static void test_CreateDirectoryA(void)
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE,
@@ -22,7 +22,7 @@ index 9b2193f6232..21cd746fd2a 100644
LocalFree(pSD);
CloseHandle(hTemp);
@@ -3728,7 +3728,7 @@ static void test_CreateDirectoryA(void)
@@ -3714,7 +3714,7 @@ static void test_CreateDirectoryA(void)
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE,
@@ -31,7 +31,7 @@ index 9b2193f6232..21cd746fd2a 100644
LocalFree(pSD);
CloseHandle(hTemp);
@@ -3793,7 +3793,7 @@ static void test_CreateDirectoryA(void)
@@ -3779,7 +3779,7 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
test_inherited_dacl(pDacl, admin_sid, user_sid,
OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERITED_ACE,
@@ -40,7 +40,7 @@ index 9b2193f6232..21cd746fd2a 100644
LocalFree(pSD);
bret = RemoveDirectoryA(tmpfile);
ok(bret == TRUE, "RemoveDirectoryA failed with error %u\n", GetLastError());
@@ -3873,7 +3873,7 @@ static void test_CreateDirectoryA(void)
@@ -3859,7 +3859,7 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
test_inherited_dacl(pDacl, admin_sid, user_sid,
OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERITED_ACE,
@@ -50,7 +50,7 @@ index 9b2193f6232..21cd746fd2a 100644
CloseHandle(hTemp);
diff --git a/server/file.c b/server/file.c
index fce2ab0a5b6..85940727347 100644
index 3911a2c9baf..cb8cd2bc398 100644
--- a/server/file.c
+++ b/server/file.c
@@ -105,6 +105,8 @@ struct file
@@ -62,7 +62,7 @@ index fce2ab0a5b6..85940727347 100644
static void file_dump( struct object *obj, int verbose );
static struct fd *file_get_fd( struct object *obj );
static struct security_descriptor *file_get_sd( struct object *obj );
@@ -311,11 +313,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
@@ -311,12 +313,143 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
xattr_fset( fd, WINE_XATTR_SD, buffer, len );
}
@@ -197,6 +197,7 @@ index fce2ab0a5b6..85940727347 100644
+}
+
static struct object *create_file( struct fd *root, const char *nameptr, data_size_t len,
struct unicode_str nt_name,
unsigned int access, unsigned int sharing, int create,
unsigned int options, unsigned int attrs,
const struct security_descriptor *sd )
@@ -205,7 +206,7 @@ index fce2ab0a5b6..85940727347 100644
struct object *obj = NULL;
struct fd *fd;
int flags;
@@ -344,6 +477,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -345,6 +478,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
}
@@ -216,7 +217,7 @@ index fce2ab0a5b6..85940727347 100644
if (sd)
{
const SID *owner = sd_get_owner( sd );
@@ -382,6 +519,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -383,6 +520,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
release_object( fd );
done:

View File

@@ -1,2 +1,4 @@
Depends: server-Stored_ACLs
Fixes: Support for inherited file ACLs
#Badly broken by bb00942671.
Disabled: true