From 518931599f4eb2c74a6a1cf53bfbd4febe9e553d Mon Sep 17 00:00:00 2001 From: millert <> Date: Tue, 21 Nov 2000 00:49:59 +0000 Subject: [PATCH] Add pw_dup(3), a function to copy 'struct passwd'. It is allocated as a single chunk with the strings pointing elsewhere in the buffer so a simple free() of the struct passwd * is all that is needed to decallocate. --- src/include/pwd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/pwd.h b/src/include/pwd.h index 5d2f33b3..3aa7ae9c 100644 --- a/src/include/pwd.h +++ b/src/include/pwd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd.h,v 1.8 1999/09/03 18:13:37 deraadt Exp $ */ +/* $OpenBSD: pwd.h,v 1.9 2000/11/21 00:49:59 millert Exp $ */ /* $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc Exp $ */ /*- @@ -99,6 +99,7 @@ struct passwd *getpwent __P((void)); int setpassent __P((int)); char *user_from_uid __P((uid_t, int)); char *bcrypt_gensalt __P((u_int8_t)); +struct passwd *pw_dup __P((const struct passwd *)); #endif void setpwent __P((void)); void endpwent __P((void));