[NTOS:SE] Reorganize the security manager component 4531/head
authorGeorge Bișoc <george.bisoc@reactos.org>
Sat, 28 May 2022 19:14:04 +0000 (21:14 +0200)
committerGeorge Bișoc <george.bisoc@reactos.org>
Sun, 29 May 2022 18:22:19 +0000 (20:22 +0200)
commit9a2c62b544d6539f6c6719190d841731d81816d2
tree841bb6ec9def45eab09cc158e31dc7fafd428764
parent96eacfc352adb9d37ab2324a62518106eeb2bddc
[NTOS:SE] Reorganize the security manager component

The current state of Security manager's code is kind of a mess. Mainly, there's code scattered around places where they shouldn't belong and token implementation (token.c) is already of a bloat in itself as it is. The file has over 6k lines and it's subject to grow exponentially with improvements, features, whatever that is.

With that being said, the token implementation code in the kernel will be split accordingly and rest of the code moved to appropriate places. The new layout will look as follows (excluding the already existing files):

- client.c (Client security implementation code)
- objtype.c (Object type list implementation code -- more code related to object types will be put here when I'm going to implement object type access checks in the future)
- subject.c (Subject security context support)

The token implementation in the kernel will be split in 4 distinct files as shown:

- token.c (Base token support routines)
- tokenlif.c (Life management of a token object -- that is Duplication, Creation and Filtering)
- tokencls.c (Token Query/Set Information Classes support)
- tokenadj.c (Token privileges/groups adjusting support)

In addition to that, tidy up the internal header and reorganize it as well.
12 files changed:
ntoskrnl/include/internal/se.h
ntoskrnl/ntos.cmake
ntoskrnl/se/access.c
ntoskrnl/se/audit.c
ntoskrnl/se/client.c [new file with mode: 0644]
ntoskrnl/se/objtype.c [new file with mode: 0644]
ntoskrnl/se/sid.c
ntoskrnl/se/subject.c [new file with mode: 0644]
ntoskrnl/se/token.c
ntoskrnl/se/tokenadj.c [new file with mode: 0644]
ntoskrnl/se/tokencls.c [new file with mode: 0644]
ntoskrnl/se/tokenlif.c [new file with mode: 0644]