diff options
| author | lukem <lukem@NetBSD.org> | 2004-10-05 04:45:54 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 2004-10-05 04:45:54 +0000 |
| commit | 45a7a69275d882cb57e4cedabf4f0843775f9cd3 (patch) | |
| tree | 3a238f8a1fc2ef73104291c543329ca3d28c2686 /include | |
| parent | 557877d02431935863682904906a18d42b71beba (diff) | |
Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getpwent(3).
Per my proposal on tech-userlevel.
Implement getpwgid_r() and getpwnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getpwent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETPW_R_SIZE_MAX to sysconf(3).
Fix the compat `+' prototype override so getpwnam(3) and getpwuid(3) DTRT.
Improve the description of pw_class and pw_gecos.
Diffstat (limited to 'include')
| -rw-r--r-- | include/pwd.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/pwd.h b/include/pwd.h index 3cce0524142..2fb0e0f9bb5 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -1,4 +1,4 @@ -/* $NetBSD: pwd.h,v 1.33 2004/06/20 22:20:14 jmc Exp $ */ +/* $NetBSD: pwd.h,v 1.34 2004/10/05 04:45:54 lukem Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -110,8 +110,8 @@ struct passwd { uid_t pw_uid; /* user uid */ gid_t pw_gid; /* user gid */ time_t pw_change; /* password change time */ - __aconst char *pw_class; /* user access class */ - __aconst char *pw_gecos; /* Honeywell login info */ + __aconst char *pw_class; /* user login class */ + __aconst char *pw_gecos; /* general information */ __aconst char *pw_dir; /* home directory */ __aconst char *pw_shell; /* default shell */ time_t pw_expire; /* account expiration */ @@ -124,6 +124,10 @@ struct passwd *getpwnam __P((const char *)); struct passwd *getpwent __P((void)); void setpwent __P((void)); void endpwent __P((void)); +int getpwnam_r __P((const char *, struct passwd *, char *, size_t, + struct passwd **)); +int getpwuid_r __P((uid_t, struct passwd *, char *, size_t, + struct passwd **)); #endif #if defined(_NETBSD_SOURCE) char *bcrypt_gensalt(u_int8_t); |
