summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/ntapi.c1
-rw-r--r--src/internal/ntapi_fnapi.h1
-rw-r--r--src/object/ntapi_tt_sid.c23
3 files changed, 25 insertions, 0 deletions
diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c
index 1b06bcc..2b4a525 100644
--- a/src/internal/ntapi.c
+++ b/src/internal/ntapi.c
@@ -165,6 +165,7 @@ static int32_t __fastcall __ntapi_init_once(ntapi_vtbl ** pvtbl)
__ntapi->tt_create_keyed_object_directory = __ntapi_tt_create_keyed_object_directory;
__ntapi->tt_open_keyed_object_directory = __ntapi_tt_open_keyed_object_directory;
__ntapi->tt_create_keyed_object_directory_entry = __ntapi_tt_create_keyed_object_directory_entry;
+ __ntapi->tt_sid_copy = __ntapi_tt_sid_copy;
/* nt_crc32.h */
__ntapi->tt_buffer_crc32 = __ntapi_tt_buffer_crc32;
diff --git a/src/internal/ntapi_fnapi.h b/src/internal/ntapi_fnapi.h
index beb4fbb..901ecd6 100644
--- a/src/internal/ntapi_fnapi.h
+++ b/src/internal/ntapi_fnapi.h
@@ -28,6 +28,7 @@ ntapi_tt_create_ipc_object_directory_entry __ntapi_tt_create_ipc_object_director
ntapi_tt_create_keyed_object_directory __ntapi_tt_create_keyed_object_directory;
ntapi_tt_open_keyed_object_directory __ntapi_tt_open_keyed_object_directory;
ntapi_tt_create_keyed_object_directory_entry __ntapi_tt_create_keyed_object_directory_entry;
+ntapi_tt_sid_copy __ntapi_tt_sid_copy;
/* nt_crc32.h */
ntapi_tt_buffer_crc32 __ntapi_tt_buffer_crc32;
diff --git a/src/object/ntapi_tt_sid.c b/src/object/ntapi_tt_sid.c
new file mode 100644
index 0000000..d93775c
--- /dev/null
+++ b/src/object/ntapi_tt_sid.c
@@ -0,0 +1,23 @@
+/********************************************************/
+/* ntapi: Native API core library */
+/* Copyright (C) 2013--2017 Z. Gilboa */
+/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
+/********************************************************/
+
+#include <psxtypes/psxtypes.h>
+#include <ntapi/nt_object.h>
+#include "ntapi_impl.h"
+
+void __stdcall __ntapi_tt_sid_copy(
+ __out nt_sid * dst,
+ __in const nt_sid * src)
+{
+ int i;
+
+ dst->revision = src->revision;
+ dst->sub_authority_count = src->sub_authority_count;
+ dst->identifier_authority = src->identifier_authority;
+
+ for (i=0; i<src->sub_authority_count; i++)
+ dst->sub_authority[i] = src->sub_authority[i];
+}