1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:37:45 +00:00

LibCore+passwd+usermod: Make Core::Account::sync() return ErrorOr<void>

This commit is contained in:
Andreas Kling 2021-12-16 21:41:57 +01:00
parent ead9c36c92
commit b38f8902d2
4 changed files with 25 additions and 61 deletions

View file

@ -64,16 +64,16 @@ public:
const String& shell() const { return m_shell; }
const Vector<gid_t>& extra_gids() const { return m_extra_gids; }
bool sync();
ErrorOr<void> sync();
private:
static ErrorOr<Account> from_passwd(passwd const&, spwd const&);
Account(const passwd& pwd, const spwd& spwd, Vector<gid_t> extra_gids);
String generate_passwd_file() const;
ErrorOr<String> generate_passwd_file() const;
#ifndef AK_OS_BSD_GENERIC
String generate_shadow_file() const;
ErrorOr<String> generate_shadow_file() const;
#endif
String m_username;