summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/src/User.cc
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2025-02-22 08:45:43 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2025-02-22 08:45:43 +0100
commit34f62ae2dd8c77cee1f0f3680caf407b1be6b350 (patch)
tree0985426a5d3baf2ae398a3f27ee4faca5d879f2e /dev/Kernel/src/User.cc
parent917938db87fee3a905a78c499d2fe1dc2f0b5ca5 (diff)
New DeviceMgr, other APIs have been reworked as a result.
AHCI becomes the first module to be available in StorageKit. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src/User.cc')
-rw-r--r--dev/Kernel/src/User.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/dev/Kernel/src/User.cc b/dev/Kernel/src/User.cc
index 0dfc410e..5bf6ec79 100644
--- a/dev/Kernel/src/User.cc
+++ b/dev/Kernel/src/User.cc
@@ -57,20 +57,20 @@ namespace NeOS
////////////////////////////////////////////////////////////
/// @brief User ring constructor.
////////////////////////////////////////////////////////////
- User::User(const Int32& sel, const Char* userName)
+ User::User(const Int32& sel, const Char* user_name)
: mUserRing((UserRingKind)sel)
{
MUST_PASS(sel >= 0);
- rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName));
+ rt_copy_memory((VoidPtr)user_name, this->mUserName, rt_string_len(user_name));
}
////////////////////////////////////////////////////////////
/// @brief User ring constructor.
////////////////////////////////////////////////////////////
- User::User(const UserRingKind& ringKind, const Char* userName)
- : mUserRing(ringKind)
+ User::User(const UserRingKind& ring_kind, const Char* user_name)
+ : mUserRing(ring_kind)
{
- rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName));
+ rt_copy_memory((VoidPtr)user_name, this->mUserName, rt_string_len(user_name));
}
////////////////////////////////////////////////////////////
@@ -86,9 +86,12 @@ namespace NeOS
SizeT len = rt_string_len(password_to_fill);
- Char* password = new Char[len];
+ UserPublicKey password = new UserPublicKeyType[len];
+
MUST_PASS(password);
+ rt_set_memory(password, 0, len);
+
// fill data first, generate hash.
// return false on error.
@@ -161,7 +164,9 @@ namespace NeOS
return lhs.mUserRing != this->mUserRing;
}
+ ////////////////////////////////////////////////////////////
/// @brief Returns the user's name.
+ ////////////////////////////////////////////////////////////
Char* User::Name() noexcept
{