Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/640791848ee2
branches:  netbsd-3
changeset: 576527:640791848ee2
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Jul 09 22:56:05 2005 +0000

description:
Pull up revision 1.7 (requested by lukem in ticket #536):
Use getpwnam_r. From john nemeth.

diffstat:

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

diffs (32 lines):

diff -r 78a042c1104c -r 640791848ee2 lib/libtelnet/krb4encpwd.c
--- a/lib/libtelnet/krb4encpwd.c        Sat Jul 09 22:55:59 2005 +0000
+++ b/lib/libtelnet/krb4encpwd.c        Sat Jul 09 22:56:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: krb4encpwd.c,v 1.6 2005/02/06 05:53:07 perry Exp $     */
+/*     $NetBSD: krb4encpwd.c,v 1.6.2.1 2005/07/09 22:56:05 tron Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)krb4encpwd.c       8.3 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: krb4encpwd.c,v 1.6 2005/02/06 05:53:07 perry Exp $");
+__RCSID("$NetBSD: krb4encpwd.c,v 1.6.2.1 2005/07/09 22:56:05 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -418,10 +418,11 @@
 {
   char *crypt();
   char *salt, *p;
-  struct passwd *pwd;
+  struct passwd pws, *pwd;
+  char pwbuf[1024];
   int   passwdok_status = 0;
 
-  if (pwd = getpwnam(name))
+  if (getpwnam_r(name, &pws, pwbuf, sizeof(pwbuf), &pwd) == 0)
     salt = pwd->pw_passwd;
   else salt = "xx";
 



Home | Main Index | Thread Index | Old Index