Browse Source

Add uid_from_user() and gid_from_group(), derived from pax's cache.c.

It replaces the existing pwcache.c functions user_from_uid(3) and
group_from_gid(3) with the pax equivalents.  Adapted from NetBSD
(mycroft) changes from our own pax's cache.c.  OK guenther@
OPENBSD_6_4
millert 6 years ago
parent
commit
15d698437f
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      src/include/grp.h
  2. +3
    -2
      src/include/pwd.h

+ 3
- 2
src/include/grp.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: grp.h,v 1.12 2014/08/31 04:04:38 guenther Exp $ */
/* $OpenBSD: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $ */
/* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */
/*-
@ -70,7 +70,8 @@ int getgrnam_r(const char *, struct group *, char *,
#endif
#if __BSD_VISIBLE
int setgroupent(int);
char *group_from_gid(gid_t, int);
int gid_from_group(const char *, gid_t *);
const char *group_from_gid(gid_t, int);
#endif
__END_DECLS


+ 3
- 2
src/include/pwd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: pwd.h,v 1.25 2017/03/09 10:13:03 fcambus Exp $ */
/* $OpenBSD: pwd.h,v 1.26 2018/09/13 12:31:15 millert Exp $ */
/* $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc Exp $ */
/*-
@ -106,7 +106,8 @@ void endpwent(void);
#endif
#if __BSD_VISIBLE
int setpassent(int);
char *user_from_uid(uid_t, int);
int uid_from_user(const char *, uid_t *);
const char *user_from_uid(uid_t, int);
char *bcrypt_gensalt(u_int8_t);
char *bcrypt(const char *, const char *);
int bcrypt_newhash(const char *, int, char *, size_t);


Loading…
Cancel
Save