diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-23 12:15:52 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-23 12:15:52 +0200 |
| commit | f5ed9f8a41b760a659e23f8c2a72d1ca73f3b826 (patch) | |
| tree | 87e8d51550a891f69cbad8d68c8cac96c49affed /dev/ZKA/KernelKit | |
| parent | 4cd60b0edc5dee45d6a0e31931f79dff4d611865 (diff) | |
[WIP] Adding Security system DLL for handling user logins and logoffs.
- Fixing local user API. This API is used by the objects in order to
gain authorization over another object.
- Refer to sec.dll for mutli-user experience.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/KernelKit')
| -rw-r--r-- | dev/ZKA/KernelKit/FileManager.hxx | 8 | ||||
| -rw-r--r-- | dev/ZKA/KernelKit/User.hxx | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/dev/ZKA/KernelKit/FileManager.hxx b/dev/ZKA/KernelKit/FileManager.hxx index 7f222c4a..3ac3fe3b 100644 --- a/dev/ZKA/KernelKit/FileManager.hxx +++ b/dev/ZKA/KernelKit/FileManager.hxx @@ -26,6 +26,7 @@ #include <KernelKit/DebugOutput.hxx> #include <NewKit/Stream.hxx> #include <NewKit/ErrorOr.hxx> +#include <KernelKit/Heap.hxx> #include <NewKit/Ref.hxx> /// @brief Filesystem manager, abstraction over mounted filesystem. @@ -362,14 +363,15 @@ namespace Kernel { static const auto cLength = 255; - struct StringMap final + /// @brief restrict information about the file descriptor. + struct RESTRICT_MAP final { Char fRestrict[cLength]; Int32 fMappedTo; }; const SizeT cRestrictCount = cRestrictMax; - const StringMap cRestrictList[] = { + const RESTRICT_MAP cRestrictList[] = { { .fRestrict = cRestrictR, .fMappedTo = eRestrictRead, @@ -408,6 +410,6 @@ namespace Kernel template <typename Encoding, typename Class> FileStream<Encoding, Class>::~FileStream() { - delete fFile; + mm_delete_ke_heap(fFile); } } // namespace Kernel diff --git a/dev/ZKA/KernelKit/User.hxx b/dev/ZKA/KernelKit/User.hxx index ac05b034..1b719f24 100644 --- a/dev/ZKA/KernelKit/User.hxx +++ b/dev/ZKA/KernelKit/User.hxx @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef _INC_PERMISSION_SEL_HXX_ -#define _INC_PERMISSION_SEL_HXX_ +#ifndef _INC_USER_HXX_ +#define _INC_USER_HXX_ #include <CompilerKit/CompilerKit.hxx> #include <KernelKit/LPC.hxx> @@ -73,6 +73,7 @@ namespace Kernel RingKind fRing{RingKind::kRingStdUser}; Char fUserName[kMaxUserNameLen] = { 0 }; Char fUserToken[kMaxUserTokenLen] = { 0 }; + VoidPtr fUserNodePtr{nullptr}; friend UserManager; }; @@ -91,10 +92,10 @@ namespace Kernel NEWOS_COPY_DELETE(UserManager); STATIC UserManager* The() noexcept; - Bool TryLogIn(User& user, const Char* password) noexcept; + Bool TryLogIn(User& user) noexcept; User* GetCurrent() noexcept; Void TryLogOff() noexcept; }; } // namespace Kernel -#endif /* ifndef _INC_PERMISSION_SEL_HXX_ */ +#endif /* ifndef _INC_USER_HXX_ */ |
