diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-01 18:25:14 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-01 18:25:14 +0200 |
| commit | 86e291120d124dec7244202b1766901a59dfb2e6 (patch) | |
| tree | 1aa92d3b8a05216941986cf2724ff20ad01b3884 /Kernel/Sources/User.cxx | |
| parent | f9579f444b1791d2b73d4d841569728fb203cb29 (diff) | |
[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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources/User.cxx')
| -rw-r--r-- | Kernel/Sources/User.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
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 <KernelKit/Heap.hxx> -/// 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<Char*>(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"; |
