summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-05-15 23:41:48 +0000
committermidipix <writeonce@midipix.org>2020-05-15 23:41:48 +0000
commitc2109af80e651aa6ea91004927f81028cf367dd1 (patch)
tree7c310b42418a1fed2ae470fd3121f788c9c35d9f /src/internal
parent3249ab33be33d96ea02811ce04ea5420d55bdde6 (diff)
downloadntapi-c2109af80e651aa6ea91004927f81028cf367dd1.tar.bz2
ntapi-c2109af80e651aa6ea91004927f81028cf367dd1.tar.xz
__ntapi_init_adjust_privileges(): also enable the debug and audit privileges.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/ntapi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c
index 817a21f..3af78c9 100644
--- a/src/internal/ntapi.c
+++ b/src/internal/ntapi.c
@@ -96,7 +96,7 @@ static void __ntapi_init_adjust_privileges(void)
/* token privileges */
tokprivs = (nt_token_privileges *)buffer;
- tokprivs->privilege_count = 4;
+ tokprivs->privilege_count = 6;
tokprivs->privileges[0].attributes = NT_SE_ENABLE_PRIVILEGE;
tokprivs->privileges[0].luid.low = NT_SE_CREATE_SYMBOLIC_LINK_PRIVILEGE;
@@ -114,6 +114,14 @@ static void __ntapi_init_adjust_privileges(void)
tokprivs->privileges[3].luid.low = NT_SE_RESTORE_PRIVILEGE;
tokprivs->privileges[3].luid.high = 0;
+ tokprivs->privileges[4].attributes = NT_SE_ENABLE_PRIVILEGE;
+ tokprivs->privileges[4].luid.low = NT_SE_AUDIT_PRIVILEGE;
+ tokprivs->privileges[4].luid.high = 0;
+
+ tokprivs->privileges[5].attributes = NT_SE_ENABLE_PRIVILEGE;
+ tokprivs->privileges[5].luid.low = NT_SE_DEBUG_PRIVILEGE;
+ tokprivs->privileges[5].luid.high = 0;
+
/* (attempt to) set any or all */
__ntapi->zw_adjust_privileges_token(
internals->htoken,0,tokprivs,