summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-03-23 23:24:49 +0000
committermidipix <writeonce@midipix.org>2018-03-29 21:56:06 -0400
commit808392f1ac4bbd56563f655a099b6870fdeb377b (patch)
tree4683d9f5c587d5ceb00608b44424d9525364a602 /src
parent498a44092ac4d00fdbf4c3a431889fba891ca7c7 (diff)
downloadntapi-808392f1ac4bbd56563f655a099b6870fdeb377b.tar.bz2
ntapi-808392f1ac4bbd56563f655a099b6870fdeb377b.tar.xz
__ntapi_acl_init_common_descriptor(): assign owner perms. via OWNER_RIGHTS sid.
Diffstat (limited to 'src')
-rw-r--r--src/acl/ntapi_acl_helper.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/acl/ntapi_acl_helper.c b/src/acl/ntapi_acl_helper.c
index c1a8dc8..72444fe 100644
--- a/src/acl/ntapi_acl_helper.c
+++ b/src/acl/ntapi_acl_helper.c
@@ -66,7 +66,7 @@ void __stdcall __ntapi_acl_init_common_descriptor(
/* owner, group, other: default sid's */
owner = owner ? owner : __ntapi_internals()->sid;
- group = group ? group : &sid_owner_rights;
+ group = group ? group : owner;
other = other ? other : &sid_auth_users;
/* owner sid */
@@ -77,7 +77,7 @@ void __stdcall __ntapi_acl_init_common_descriptor(
/* ace's */
ace = (nt_access_allowed_ace *)&sd->buffer;
ace = __acl_ace_init(ace,system_access,&sid_system,&ace_count);
- ace = __acl_ace_init(ace,owner_access,owner,&ace_count);
+ ace = __acl_ace_init(ace,owner_access,&sid_owner_rights,&ace_count);
ace = __acl_ace_init(ace,group_access,group,&ace_count);
ace = __acl_ace_init(ace,other_access,other,&ace_count);
@@ -87,5 +87,4 @@ void __stdcall __ntapi_acl_init_common_descriptor(
sd->dacl.acl_size = (uint16_t)((char *)ace - (char *)&sd->dacl);
sd->dacl.ace_count = ace_count;
sd->dacl.sbz_2nd = 0;
-
}