summaryrefslogtreecommitdiff
path: root/include/pwd.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
commitfc00c656c96528112d05cf0edf8631bd5eaea446 (patch)
treea6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/pwd.h
Add build system scaffolding and libc headers
Diffstat (limited to 'include/pwd.h')
-rw-r--r--include/pwd.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/pwd.h b/include/pwd.h
new file mode 100644
index 00000000..f60dd81b
--- /dev/null
+++ b/include/pwd.h
@@ -0,0 +1,24 @@
+#ifndef __PWD_H
+#define __PWD_H
+
+typedef __SIZE_TYPE__ size_t;
+typedef __UINT32_TYPE__ gid_t;
+typedef __UINT32_TYPE__ uid_t;
+
+struct passwd {
+ char *pw_name;
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char *pw_dir;
+ char *pw_shell;
+};
+
+void endpwent(void);
+struct passwd *getpwent(void);
+struct passwd *getpwnam(const char *);
+int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
+struct passwd *getpwuid(uid_t);
+int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
+void setpwent(void);
+
+#endif