mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +00:00
LibCore: Add ability to not read shadow data for Account
This stops spamming the kernel logs with unveil violations if the program didn't unveil /etc/shadow.
This commit is contained in:
parent
fdf638dde0
commit
16983dbe8e
2 changed files with 23 additions and 9 deletions
|
@ -27,9 +27,14 @@ struct spwd {
|
|||
|
||||
class Account {
|
||||
public:
|
||||
static Account self();
|
||||
static Result<Account, String> from_name(const char* username);
|
||||
static Result<Account, String> from_uid(uid_t uid);
|
||||
enum class Read {
|
||||
All,
|
||||
PasswdOnly
|
||||
};
|
||||
|
||||
static Account self(Read options = Read::All);
|
||||
static Result<Account, String> from_name(const char* username, Read options = Read::All);
|
||||
static Result<Account, String> from_uid(uid_t uid, Read options = Read::All);
|
||||
|
||||
bool authenticate(const char* password) const;
|
||||
bool login() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue