Rebase against 7371c44336b46ecc7eeafbc8368790bb60a18bc9.

This commit is contained in:
Sebastian Lackner 2016-01-29 06:06:03 +01:00
parent 74a1d8d0fb
commit 6d36eb2fdc
4 changed files with 46 additions and 41 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7afeec4bf2908d92be30220871fc70c0b981211f"
echo "7371c44336b46ecc7eeafbc8368790bb60a18bc9"
}
# Show version information

View File

@ -1,21 +1,21 @@
From e3abe63e7f3f1c3543e9bafb4b06ac41b4f4273f Mon Sep 17 00:00:00 2001
From 04bdbb48453d5575e42d6dc5b9caa89a141167c1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 30 Mar 2015 12:50:21 +0200
Subject: server: Temporarily store the full security descriptor for file
objects.
---
dlls/advapi32/tests/security.c | 15 +++----
dlls/advapi32/tests/security.c | 16 +++-----
server/change.c | 8 +++-
server/file.c | 88 ++++++++++++++++++++++++++++--------------
server/file.h | 3 +-
4 files changed, 74 insertions(+), 40 deletions(-)
4 files changed, 74 insertions(+), 41 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index eb9e816..77a1fcf 100644
index f34831d..b149ea4 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3318,7 +3318,6 @@ static void test_CreateDirectoryA(void)
@@ -3350,7 +3350,6 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
@ -23,7 +23,7 @@ index eb9e816..77a1fcf 100644
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
acl_size.AceCount);
LocalFree(pSD);
@@ -3394,7 +3393,6 @@ static void test_CreateDirectoryA(void)
@@ -3426,7 +3425,6 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
@ -31,7 +31,7 @@ index eb9e816..77a1fcf 100644
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
acl_size.AceCount);
LocalFree(pSD);
@@ -3540,7 +3538,6 @@ static void test_CreateDirectoryA(void)
@@ -3572,7 +3570,6 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
@ -39,12 +39,13 @@ index eb9e816..77a1fcf 100644
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
acl_size.AceCount);
LocalFree(pSD);
@@ -4517,22 +4514,22 @@ static void test_GetSecurityInfo(void)
@@ -4552,23 +4549,22 @@ static void test_GetSecurityInfo(void)
bret = pGetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get Current User ACE.\n");
bret = EqualSid(&ace->SidStart, user_sid);
- todo_wine ok(bret, "Current User ACE != Current User SID.\n");
+ ok(bret, "Current User ACE != Current User SID.\n");
- todo_wine ok(bret, "Current User ACE (%s) != Current User SID (%s).\n",
- debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
+ ok(bret, "Current User ACE (%s) != Current User SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
@ -57,8 +58,8 @@ index eb9e816..77a1fcf 100644
bret = pGetAce(pDacl, 1, (VOID **)&ace);
ok(bret, "Failed to get Administators Group ACE.\n");
bret = EqualSid(&ace->SidStart, admin_sid);
- todo_wine ok(bret, "Administators Group ACE != Administators Group SID.\n");
+ ok(bret, "Administators Group ACE != Administators Group SID.\n");
- todo_wine ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
+ ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n",
@ -95,7 +96,7 @@ index b3ee681..a631925 100644
return &dir->obj;
diff --git a/server/file.c b/server/file.c
index 5d1466b..7c5e02b 100644
index a684a77..fb78559 100644
--- a/server/file.c
+++ b/server/file.c
@@ -173,7 +173,8 @@ struct file *create_file_for_fd_obj( struct fd *fd, unsigned int access, unsigne
@ -227,7 +228,7 @@ index 5d1466b..7c5e02b 100644
}
static struct object *file_open_file( struct object *obj, unsigned int access,
@@ -741,7 +768,10 @@ DECL_HANDLER(create_file)
@@ -737,7 +764,10 @@ DECL_HANDLER(create_file)
if ((file = create_file( root_fd, name, name_len, req->access, req->sharing,
req->create, req->options, req->attrs, sd )))
{
@ -254,5 +255,5 @@ index b9e27e2..3274c5c 100644
/* completion */
--
2.6.4
2.7.0

View File

@ -1,4 +1,4 @@
From 5c19cb0685dd47e7eb36dce9729200b79da61b11 Mon Sep 17 00:00:00 2001
From 93fd1bb452f2d64ee0827b3d53221040cdb4b6b5 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:05:32 -0600
Subject: server: Convert return of file security masks with generic access
@ -10,11 +10,11 @@ Subject: server: Convert return of file security masks with generic access
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index f7ae089..0013c3c 100644
index b149ea4..f4238c7 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -4501,8 +4501,8 @@ static void test_GetSecurityInfo(void)
ok(bret, "Current User ACE != Current User SID.\n");
@@ -4552,8 +4552,8 @@ static void test_GetSecurityInfo(void)
ok(bret, "Current User ACE (%s) != Current User SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- todo_wine ok(ace->Mask == 0x1f01ff,
@ -24,8 +24,8 @@ index f7ae089..0013c3c 100644
}
if (acl_size.AceCount > 1)
{
@@ -4512,7 +4512,7 @@ static void test_GetSecurityInfo(void)
ok(bret, "Administators Group ACE != Administators Group SID.\n");
@@ -4563,7 +4563,7 @@ static void test_GetSecurityInfo(void)
ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- todo_wine ok(ace->Mask == 0x1f01ff,
@ -34,10 +34,10 @@ index f7ae089..0013c3c 100644
}
LocalFree(pSD);
diff --git a/server/file.c b/server/file.c
index ed7ddfc..6663927 100644
index 55551bc..703479f 100644
--- a/server/file.c
+++ b/server/file.c
@@ -466,6 +466,26 @@ struct security_descriptor *mode_to_sd( mode_t mode, const SID *user, const SID
@@ -479,6 +479,26 @@ struct security_descriptor *mode_to_sd( mode_t mode, const SID *user, const SID
return sd;
}
@ -64,7 +64,7 @@ index ed7ddfc..6663927 100644
struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode_t *mode,
uid_t *uid )
{
@@ -608,6 +628,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
@@ -621,6 +641,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
new_sd = set_sd_from_token_internal( sd, obj->sd, set_info, current->process->token );
if (new_sd)
{
@ -75,5 +75,5 @@ index ed7ddfc..6663927 100644
{
owner = sd_get_owner( new_sd );
--
2.3.5
2.7.0

View File

@ -1,19 +1,19 @@
From ea6969acf3f5e79a39bb461f78b4f0785a2b8843 Mon Sep 17 00:00:00 2001
From 212dc266153f4c782ad4855720cc5b377f35c0ad Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:01:35 -0600
Subject: server: Retrieve file security attributes with extended file
attributes. (try 7)
---
dlls/advapi32/tests/security.c | 15 +++++++--------
dlls/advapi32/tests/security.c | 19 +++++++++----------
server/file.c | 30 +++++++++++++++++++++++++++---
2 files changed, 34 insertions(+), 11 deletions(-)
2 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 0013c3c..945542e 100644
index f4238c7..79a9df4 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3264,7 +3264,7 @@ static void test_CreateDirectoryA(void)
@@ -3303,7 +3303,7 @@ static void test_CreateDirectoryA(void)
}
ok(!error, "GetNamedSecurityInfo failed with error %d\n", error);
test_inherited_dacl(pDacl, admin_sid, user_sid, OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE,
@ -22,12 +22,14 @@ index 0013c3c..945542e 100644
LocalFree(pSD);
/* Test inheritance of ACLs in CreateFile without security descriptor */
@@ -3719,19 +3719,18 @@ static void test_GetNamedSecurityInfoA(void)
@@ -3758,21 +3758,20 @@ static void test_GetNamedSecurityInfoA(void)
bret = pGetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get Current User ACE.\n");
bret = EqualSid(&ace->SidStart, user_sid);
- todo_wine ok(bret, "Current User ACE != Current User SID.\n");
+ ok(bret, "Current User ACE != Current User SID.\n");
- todo_wine ok(bret, "Current User ACE (%s) != Current User SID (%s).\n",
- debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
+ ok(bret, "Current User ACE (%s) != Current User SID (%s).\n",
+ debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
@ -41,12 +43,14 @@ index 0013c3c..945542e 100644
ok(bret, "Failed to get Administators Group ACE.\n");
bret = EqualSid(&ace->SidStart, admin_sid);
- todo_wine ok(bret || broken(!bret) /* win2k */,
- "Administators Group ACE != Administators Group SID.\n");
+ ok(bret || broken(!bret) /* win2k */, "Administators Group ACE != Administators Group SID.\n");
- "Administators Group ACE (%s) != Administators Group SID (%s).\n",
- debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
+ ok(bret || broken(!bret) /* win2k */, "Administators Group ACE (%s) != Administators Group SID (%s).\n",
+ debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
ok(ace->Mask == 0x1f01ff || broken(ace->Mask == GENERIC_ALL) /* win2k */,
@@ -3758,8 +3757,8 @@ static void test_GetNamedSecurityInfoA(void)
@@ -3799,8 +3798,8 @@ static void test_GetNamedSecurityInfoA(void)
{
bret = pGetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get ACE.\n");
@ -58,10 +62,10 @@ index 0013c3c..945542e 100644
LocalFree(pSD);
diff --git a/server/file.c b/server/file.c
index 6663927..8bcf6ee 100644
index 703479f..78eef58 100644
--- a/server/file.c
+++ b/server/file.c
@@ -486,6 +486,29 @@ static void convert_generic_sd( struct security_descriptor *sd )
@@ -499,6 +499,29 @@ static void convert_generic_sd( struct security_descriptor *sd )
}
}
@ -91,7 +95,7 @@ index 6663927..8bcf6ee 100644
struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode_t *mode,
uid_t *uid )
{
@@ -501,9 +524,10 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
@@ -514,9 +537,10 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
(st.st_uid == *uid))
return obj->sd;
@ -106,5 +110,5 @@ index 6663927..8bcf6ee 100644
*mode = st.st_mode;
--
2.3.5
2.7.0