mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
Add getpwent() family of functions to LibC.
Also add a little /etc/passwd database. There's just me in there.
This commit is contained in:
parent
819ce91395
commit
9886b27d9c
17 changed files with 175 additions and 25 deletions
24
LibC/pwd.h
Normal file
24
LibC/pwd.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct passwd {
|
||||
char* pw_name;
|
||||
char* pw_passwd;
|
||||
uid_t pw_uid;
|
||||
gid_t pw_gid;
|
||||
char* pw_gecos;
|
||||
char* pw_dir;
|
||||
char* pw_shell;
|
||||
};
|
||||
|
||||
struct passwd* getpwent();
|
||||
void setpwent();
|
||||
void endpwent();
|
||||
struct passwd* getpwnam(const char* name);
|
||||
struct passwd* getpwuid(uid_t);
|
||||
|
||||
__END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue