Rebase against b3c5b7da9442af840431cd7f795da20989aad42a.

This commit is contained in:
Zebediah Figura
2019-02-22 22:45:29 -06:00
parent 38aa047cad
commit b74293fbfe
19 changed files with 283 additions and 681 deletions

View File

@@ -1,21 +1,21 @@
From 2ea454b0c058d14647bb55593d1021454a3c09a4 Mon Sep 17 00:00:00 2001
From 3bc077fcf2d73665b8838bf23e989ed248af823e Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 25 Jun 2014 11:49:12 -0600
Subject: [PATCH] server: Add default security descriptor ownership for
processes.
---
dlls/advapi32/tests/security.c | 35 +++++++++++++++++++++++++++++++++++
server/process.c | 26 +++++++++++++++++++++++++-
dlls/advapi32/tests/security.c | 35 ++++++++++++++++++++++++++++++++++
server/process.c | 26 ++++++++++++++++++++++++-
server/security.h | 1 +
server/token.c | 2 ++
4 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index c472491..6f7a7f1 100644
index d9cae64d..3097a64f 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -4665,11 +4665,15 @@ static void test_acls(void)
@@ -4682,11 +4682,15 @@ static void test_acls(void)
static void test_GetSecurityInfo(void)
{
@@ -31,7 +31,7 @@ index c472491..6f7a7f1 100644
ACL_SIZE_INFORMATION acl_size;
PSECURITY_DESCRIPTOR pSD;
ACCESS_ALLOWED_ACE *ace;
@@ -4796,6 +4800,37 @@ static void test_GetSecurityInfo(void)
@@ -4813,6 +4817,37 @@ static void test_GetSecurityInfo(void)
}
LocalFree(pSD);
CloseHandle(obj);
@@ -70,18 +70,18 @@ index c472491..6f7a7f1 100644
static void test_GetSidSubAuthority(void)
diff --git a/server/process.c b/server/process.c
index 651ecdf..9a11e0a 100644
index 77bd1e74..e3596942 100644
--- a/server/process.c
+++ b/server/process.c
@@ -62,6 +62,7 @@ static int shutdown_stage; /* current stage in the shutdown process */
static void process_dump( struct object *obj, int verbose );
@@ -63,6 +63,7 @@ static void process_dump( struct object *obj, int verbose );
static struct object_type *process_get_type( struct object *obj );
static int process_signaled( struct object *obj, struct wait_queue_entry *entry );
static unsigned int process_map_access( struct object *obj, unsigned int access );
+static struct security_descriptor *process_get_sd( struct object *obj );
static void process_poll_event( struct fd *fd, int event );
static void process_destroy( struct object *obj );
static void terminate_process( struct process *process, struct thread *skip, int exit_code );
@@ -78,7 +79,7 @@ static const struct object_ops process_ops =
@@ -79,7 +80,7 @@ static const struct object_ops process_ops =
no_signal, /* signal */
no_get_fd, /* get_fd */
process_map_access, /* map_access */
@@ -90,7 +90,7 @@ index 651ecdf..9a11e0a 100644
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
@@ -672,6 +673,29 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
@@ -658,6 +659,29 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
@@ -121,7 +121,7 @@ index 651ecdf..9a11e0a 100644
{
struct process *process = get_fd_user( fd );
diff --git a/server/security.h b/server/security.h
index bc4a8f6..6c33714 100644
index 873bbc6a..606dbb2a 100644
--- a/server/security.h
+++ b/server/security.h
@@ -47,6 +47,7 @@ extern const PSID security_local_user_sid;
@@ -133,7 +133,7 @@ index bc4a8f6..6c33714 100644
diff --git a/server/token.c b/server/token.c
index b0849ad..9228e46 100644
index e440d489..f236084b 100644
--- a/server/token.c
+++ b/server/token.c
@@ -83,6 +83,7 @@ static const SID_N(5) local_user_sid = { SID_REVISION, 5, { SECURITY_NT_AUTHORIT
@@ -153,5 +153,5 @@ index b0849ad..9228e46 100644
static luid_t prev_luid_value = { 1000, 0 };
--
1.9.1
2.20.1