diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-31 19:49:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-31 19:54:25 +0100 |
commit | 9886b27d9cc67221efc8ee7e277570d146ee9992 (patch) | |
tree | 5021bcfb8c68c0f7a7bc371240fbc35c514329bc /LibC/pwd.h | |
parent | 819ce91395804d4ae9ac07d0080d3cfbed4ea258 (diff) | |
download | serenity-9886b27d9cc67221efc8ee7e277570d146ee9992.zip |
Add getpwent() family of functions to LibC.
Also add a little /etc/passwd database. There's just me in there.
Diffstat (limited to 'LibC/pwd.h')
-rw-r--r-- | LibC/pwd.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/LibC/pwd.h b/LibC/pwd.h new file mode 100644 index 0000000000..81f1053305 --- /dev/null +++ b/LibC/pwd.h @@ -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 |