summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-08 16:45:24 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-08 16:45:24 +0000
commit791312e7259153e1235f14a9a9e5cc6055ce8dfc (patch)
tree81f07808e6af9d42e92a4bba911b3b425f589516 /include
parentbfb8f8f6ea438e632e808868c44af2bff196cc18 (diff)
Reworked the password stuff to be reentrant. Group stuff is
still needing to be reworked. -Erik
Diffstat (limited to 'include')
-rw-r--r--include/pwd.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/include/pwd.h b/include/pwd.h
index 1b48c6a6e..6cadcf38a 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -22,18 +22,38 @@ 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 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 * getpwuid __P ((const uid_t));
+extern struct passwd * getpwnam __P ((const char *));
+
+
+extern int getpwent_r __P ((struct passwd *__restrict __resultbuf,
+ char *__restrict __buffer, size_t __buflen,
+ struct passwd **__restrict __result));
+extern int getpwuid_r __P ((uid_t __uid,
+ struct passwd *__restrict __resultbuf,
+ char *__restrict __buffer, size_t __buflen,
+ struct passwd **__restrict __result));
+extern int getpwnam_r __P ((const char *__restrict __name,
+ struct passwd *__restrict __resultbuf,
+ char *__restrict __buffer, size_t __buflen,
+ struct passwd **__restrict __result));
+extern int fgetpwent_r __P ((FILE *__restrict __stream,
+ struct passwd *__restrict __resultbuf,
+ char *__restrict __buffer, size_t __buflen,
+ struct passwd **__restrict __result));
#ifdef __LIBC__
-extern struct passwd * __getpwent __P ((__const int passwd_fd));
+/* This is used internally to uClibc */
+extern int __getpwent_r(struct passwd * passwd, char * line_buff,
+ size_t buflen, int pwd_fd);
#endif
+
#endif /* pwd.h */