summaryrefslogtreecommitdiff
path: root/include/pwd_.h
diff options
context:
space:
mode:
authorEric Andersen2002-07-03 23:19:26 +0000
committerEric Andersen2002-07-03 23:19:26 +0000
commit887ca79f04cdf45874ed783c1fb9b950bf25a246 (patch)
tree25f08b2b2ea8b333aac91b6b75876f82a4cfef6f /include/pwd_.h
parent360e2549544b813dd805361d04744c5a4a630bb8 (diff)
downloadbusybox-887ca79f04cdf45874ed783c1fb9b950bf25a246.zip
busybox-887ca79f04cdf45874ed783c1fb9b950bf25a246.tar.gz
Scrub pwd.h and grp.h handling so we don't have to play any
silly games. -Erik
Diffstat (limited to 'include/pwd_.h')
-rw-r--r--include/pwd_.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/pwd_.h b/include/pwd_.h
new file mode 100644
index 0000000..3f081e8
--- /dev/null
+++ b/include/pwd_.h
@@ -0,0 +1,41 @@
+#ifndef __CONFIG_PWD_H
+#define __CONFIG_PWD_H
+
+#if !defined CONFIG_USE_BB_PWD_GRP
+#include <pwd.h>
+
+#else
+
+#include <sys/types.h>
+#include <features.h>
+#include <stdio.h>
+
+/* The passwd structure. */
+struct passwd
+{
+ char *pw_name; /* Username. */
+ char *pw_passwd; /* Password. */
+ uid_t pw_uid; /* User ID. */
+ gid_t pw_gid; /* Group ID. */
+ char *pw_gecos; /* Real name. */
+ char *pw_dir; /* Home directory. */
+ char *pw_shell; /* Shell program. */
+};
+
+extern void setpwent __P ((void));
+extern void endpwent __P ((void));
+extern struct passwd * getpwent __P ((void));
+
+extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
+extern int getpw __P ((uid_t uid, char *buf));
+
+extern struct passwd * fgetpwent __P ((FILE * file));
+
+extern struct passwd * getpwuid __P ((__const uid_t));
+extern struct passwd * getpwnam __P ((__const char *));
+
+extern struct passwd * __getpwent __P ((__const int passwd_fd));
+
+#endif /* USE_SYSTEM_PWD_GRP */
+#endif /* __CONFIG_PWD_H */
+