mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:37:35 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/SecretString.h>
|
||||
|
@ -40,8 +40,8 @@ public:
|
|||
bool authenticate(SecretString const& password) const;
|
||||
ErrorOr<void> login() const;
|
||||
|
||||
DeprecatedString username() const { return m_username; }
|
||||
DeprecatedString password_hash() const { return m_password_hash.value_or(DeprecatedString::empty()); }
|
||||
ByteString username() const { return m_username; }
|
||||
ByteString password_hash() const { return m_password_hash.value_or(ByteString::empty()); }
|
||||
|
||||
// Setters only affect in-memory copy of password.
|
||||
// You must call sync to apply changes.
|
||||
|
@ -62,9 +62,9 @@ public:
|
|||
|
||||
uid_t uid() const { return m_uid; }
|
||||
gid_t gid() const { return m_gid; }
|
||||
DeprecatedString const& gecos() const { return m_gecos; }
|
||||
DeprecatedString const& home_directory() const { return m_home_directory; }
|
||||
DeprecatedString const& shell() const { return m_shell; }
|
||||
ByteString const& gecos() const { return m_gecos; }
|
||||
ByteString const& home_directory() const { return m_home_directory; }
|
||||
ByteString const& shell() const { return m_shell; }
|
||||
Vector<gid_t> const& extra_gids() const { return m_extra_gids; }
|
||||
|
||||
ErrorOr<void> sync();
|
||||
|
@ -74,20 +74,20 @@ private:
|
|||
|
||||
Account(passwd const& pwd, spwd const& spwd, Vector<gid_t> extra_gids);
|
||||
|
||||
ErrorOr<DeprecatedString> generate_passwd_file() const;
|
||||
ErrorOr<DeprecatedString> generate_group_file() const;
|
||||
ErrorOr<ByteString> generate_passwd_file() const;
|
||||
ErrorOr<ByteString> generate_group_file() const;
|
||||
#ifndef AK_OS_BSD_GENERIC
|
||||
ErrorOr<DeprecatedString> generate_shadow_file() const;
|
||||
ErrorOr<ByteString> generate_shadow_file() const;
|
||||
#endif
|
||||
|
||||
DeprecatedString m_username;
|
||||
ByteString m_username;
|
||||
|
||||
Optional<DeprecatedString> m_password_hash;
|
||||
Optional<ByteString> m_password_hash;
|
||||
uid_t m_uid { 0 };
|
||||
gid_t m_gid { 0 };
|
||||
DeprecatedString m_gecos;
|
||||
DeprecatedString m_home_directory;
|
||||
DeprecatedString m_shell;
|
||||
ByteString m_gecos;
|
||||
ByteString m_home_directory;
|
||||
ByteString m_shell;
|
||||
Vector<gid_t> m_extra_gids;
|
||||
bool m_deleted { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue