Rebase against 4f1b297a14bbd304fb20da7c4b64266c14d110e5.

This commit is contained in:
Zebediah Figura
2021-02-05 18:01:09 -06:00
parent a2f82c5c85
commit 677b445b0d
24 changed files with 105 additions and 1969 deletions

View File

@@ -1,19 +1,19 @@
From 6b6b0104bb50897030fef3e9f49321f1ac33edae Mon Sep 17 00:00:00 2001
From 2964ee0ea43ead52e9b34da5f9cc97792c41010b 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: server: Inherit security attributes from parent directories on
creation. (try 7)
Subject: [PATCH] server: Inherit security attributes from parent directories
on creation. (try 7)
---
dlls/advapi32/tests/security.c | 8 +-
server/file.c | 137 +++++++++++++++++++++++++++++++++
2 files changed, 141 insertions(+), 4 deletions(-)
server/file.c | 138 +++++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 53bea200..fbde5213 100644
index 9b2193f6232..21cd746fd2a 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3654,7 +3654,7 @@ static void test_CreateDirectoryA(void)
@@ -3661,7 +3661,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 53bea200..fbde5213 100644
LocalFree(pSD);
CloseHandle(hTemp);
@@ -3722,7 +3722,7 @@ static void test_CreateDirectoryA(void)
@@ -3728,7 +3728,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 53bea200..fbde5213 100644
LocalFree(pSD);
CloseHandle(hTemp);
@@ -3787,7 +3787,7 @@ static void test_CreateDirectoryA(void)
@@ -3793,7 +3793,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 53bea200..fbde5213 100644
LocalFree(pSD);
bret = RemoveDirectoryA(tmpfile);
ok(bret == TRUE, "RemoveDirectoryA failed with error %u\n", GetLastError());
@@ -3868,7 +3868,7 @@ static void test_CreateDirectoryA(void)
@@ -3873,7 +3873,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,18 +50,19 @@ index 53bea200..fbde5213 100644
CloseHandle(hTemp);
diff --git a/server/file.c b/server/file.c
index 107fea65..7d80a003 100644
index fce2ab0a5b6..85940727347 100644
--- a/server/file.c
+++ b/server/file.c
@@ -71,6 +71,7 @@ struct file
@@ -105,6 +105,8 @@ struct file
struct list kernel_object; /* list of kernel object pointers */
};
static unsigned int generic_file_map_access( unsigned int access );
+static struct security_descriptor *get_xattr_sd( int fd );
+
static void file_dump( struct object *obj, int verbose );
static struct fd *file_get_fd( struct object *obj );
@@ -223,11 +224,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
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 )
xattr_fset( fd, WINE_XATTR_SD, buffer, len );
}
@@ -204,7 +205,7 @@ index 107fea65..7d80a003 100644
struct object *obj = NULL;
struct fd *fd;
int flags;
@@ -256,6 +388,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -344,6 +477,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
}
@@ -215,7 +216,7 @@ index 107fea65..7d80a003 100644
if (sd)
{
const SID *owner = sd_get_owner( sd );
@@ -295,6 +431,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -382,6 +519,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
release_object( fd );
done: