summaryrefslogtreecommitdiffstats
path: root/include/grp.h
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-04-17 14:15:26 +0000
committernectar <nectar@FreeBSD.org>2003-04-17 14:15:26 +0000
commitcd021cdb21c56ef20cd0d905c99c29cf24bd9773 (patch)
tree194a658195371c8a28e5f3ecbd1d1b1e2dfe5588 /include/grp.h
parent1b1f6bb4f50d42bbbb1291be0c60741c12f8201a (diff)
downloadFreeBSD-src-cd021cdb21c56ef20cd0d905c99c29cf24bd9773.zip
FreeBSD-src-cd021cdb21c56ef20cd0d905c99c29cf24bd9773.tar.gz
= Implement thread-safe versions of the getpwent(3) and getgrent(3)
family of functions using the new nsdispatch(3) core. Remove arbitrary size limits when using the thread-safe versions. = Re-implement the traditional getpwent(3)/getgrent(3) functions on top of the thread-safe versions. = Update the on-disk format of the hashed version of the passwd(5) databases to allow for versioned entries. The legacy version is `3'. (Don't ask.) = Add support for version `4' entries in the passwd(5) database. Entries in this format are identical to version 3 entries except that all integers are stored as 32-bit integers in network byte order (big endian). = pwd_mkdb is updated to generate both version 3 and version 4 entries. Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'include/grp.h')
-rw-r--r--include/grp.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/grp.h b/include/grp.h
index db34ff2..70b4a8a24 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -52,6 +52,11 @@ typedef __gid_t gid_t;
#define _GID_T_DECLARED
#endif
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
+#endif
+
struct group {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
@@ -70,15 +75,17 @@ struct group *getgrnam(const char *);
const char *group_from_gid(gid_t, int);
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
+/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */
int setgrent(void);
+int getgrgid_r(gid_t, struct group *, char *, size_t,
+ struct group **);
+int getgrnam_r(const char *, struct group *, char *, size_t,
+ struct group **);
#endif
#if __BSD_VISIBLE
-void setgrfile(const char *);
+int getgrent_r(struct group *, char *, size_t, struct group **);
int setgroupent(int);
#endif
-/*
- * XXX missing getgrgid_r(), getgrnam_r().
- */
__END_DECLS
#endif /* !_GRP_H_ */
OpenPOWER on IntegriCloud