summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-05-14 06:21:12 +0000
committermidipix <writeonce@midipix.org>2020-05-14 06:21:12 +0000
commit3249ab33be33d96ea02811ce04ea5420d55bdde6 (patch)
treec0615289b3dbf3336ec1668b12c2755d789e480d
parent9d1d3b24b316d6ee042238c3a87b2808a4f1e76c (diff)
downloadntapi-3249ab33be33d96ea02811ce04ea5420d55bdde6.tar.bz2
ntapi-3249ab33be33d96ea02811ce04ea5420d55bdde6.tar.xz
__ntapi_acl_init_common_descriptor_meta(): tweak support of Admins privileges.
-rw-r--r--src/acl/ntapi_acl_helper.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/acl/ntapi_acl_helper.c b/src/acl/ntapi_acl_helper.c
index 92f5b4d..927e661 100644
--- a/src/acl/ntapi_acl_helper.c
+++ b/src/acl/ntapi_acl_helper.c
@@ -192,6 +192,11 @@ static int32_t __acl_init_common_meta_impl(
meta->other_sid = sid;
}
+ else if (!meta->admin_ace && !(__ntapi->tt_sid_compare(sid,(nt_sid *)&sid_admins))) {
+ meta->admin_ace = ace;
+ meta->admin_sid = sid;
+ }
+
else if (!(__ntapi->tt_sid_compare(sid,meta->owner))) {
if (meta->group_ace)
return NT_STATUS_INVALID_ACL;
@@ -201,14 +206,6 @@ static int32_t __acl_init_common_meta_impl(
meta->group = sid;
}
- else if (!(__ntapi->tt_sid_compare(sid,(nt_sid *)&sid_admins))) {
- if (meta->admin_ace)
- return NT_STATUS_INVALID_ACL;
-
- meta->admin_ace = ace;
- meta->admin_sid = sid;
- }
-
else if ((value[0] == 0) && (value[1] == 0)
&& (value[2] == 0) && (value[3] == 0)
&& (value[4] == 0) && (value[5] == 5)