From 86e291120d124dec7244202b1766901a59dfb2e6 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 1 Aug 2024 18:25:14 +0200 Subject: [IMP] newoskrnl: Add symbol for cred_construct_token, reworked ProcessHeap, new SCI.hxx for SCI and SCM. [IMP] newosldr: Loads the kernel correctly and can launch it, improved erorr handling. [META] newoskrnl, newosldr: Improved code and refactors. Signed-off-by: Amlal EL Mahrouss --- Kernel/Sources/User.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Kernel/Sources/User.cxx') diff --git a/Kernel/Sources/User.cxx b/Kernel/Sources/User.cxx index e546dd81..40723f27 100644 --- a/Kernel/Sources/User.cxx +++ b/Kernel/Sources/User.cxx @@ -17,10 +17,21 @@ #include -/// bugs 0 +/// BUGS: 0 namespace Kernel { + namespace Detail + { + /// \brief Constructs a token by hashing the password. + /// \param password password to hash. + /// \return the hashed password + const Char* cred_construct_token(const Char* password) + { + return nullptr; + } + } + User::User(const Int32& sel, const Char* userName) : fRing((RingKind)sel) { @@ -108,7 +119,9 @@ namespace Kernel } else { - if (rt_string_cmp((Char*)token, const_cast(password), rt_string_len(password))) + auto tok = Detail::cred_construct_token(password); + + if (rt_string_cmp((Char*)token, tok, rt_string_len(tok))) { kcout << "newoskrnl: Incorrect credentials.\r"; -- cgit v1.2.3