Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/lib/libwrap Pull up revision 1.12 (requested by lukem in ...



details:   https://anonhg.NetBSD.org/src/rev/11f50de3a807
branches:  netbsd-3
changeset: 576544:11f50de3a807
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jul 11 11:12:47 2005 +0000

description:
Pull up revision 1.12 (requested by lukem in ticket #537):
Use getpwnam_r; from John Nemeth

diffstat:

 lib/libwrap/options.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 8911df24fbc6 -r 11f50de3a807 lib/libwrap/options.c
--- a/lib/libwrap/options.c     Sun Jul 10 20:57:34 2005 +0000
+++ b/lib/libwrap/options.c     Mon Jul 11 11:12:47 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: options.c,v 1.11 2002/05/24 05:38:20 itojun Exp $      */
+/*     $NetBSD: options.c,v 1.11.6.1 2005/07/11 11:12:47 tron Exp $    */
 
  /*
   * General skeleton for adding options to the access control language. The
@@ -35,7 +35,7 @@
 #if 0
 static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
 #else
-__RCSID("$NetBSD: options.c,v 1.11 2002/05/24 05:38:20 itojun Exp $");
+__RCSID("$NetBSD: options.c,v 1.11.6.1 2005/07/11 11:12:47 tron Exp $");
 #endif
 #endif
 
@@ -292,12 +292,13 @@
 char   *value;
 struct request_info *request;
 {
-    struct passwd *pwd;
+    struct passwd *pwd, pws;
     char   *group;
+    char   pwbuf[1024];
 
     if ((group = split_at(value, '.')) != 0)
        group_option(group, request);
-    if ((pwd = getpwnam(value)) == 0)
+    if (getpwnam_r(value, &pws, pwbuf, sizeof(pwbuf), &pwd) != 0)
        tcpd_jump("unknown user: \"%s\"", value);
     endpwent();
 



Home | Main Index | Thread Index | Old Index