1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:57:44 +00:00

LibCore: Add a deleted state for Account

As other setters, this only affect the in-memory copy, you need to call
`sync()` to apply changes.
This commit is contained in:
Lucas CHOLLET 2022-12-07 00:42:49 +01:00 committed by Andrew Kaster
parent f000193ee5
commit 945d2079b4
2 changed files with 8 additions and 2 deletions

View file

@ -52,6 +52,7 @@ public:
void set_gid(gid_t gid) { m_gid = gid; }
void set_shell(StringView shell) { m_shell = shell; }
void set_gecos(StringView gecos) { m_gecos = gecos; }
void set_deleted() { m_deleted = true; };
void delete_password();
// A null password means that this account was missing from /etc/shadow.
@ -86,6 +87,7 @@ private:
DeprecatedString m_home_directory;
DeprecatedString m_shell;
Vector<gid_t> m_extra_gids;
bool m_deleted { false };
};
}