Source-Changes-HG archive

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

[src/netbsd-1-5]: src/lib/libc/net Pull up revision 1.46 (requested by groo):



details:   https://anonhg.NetBSD.org/src/rev/f148e4202783
branches:  netbsd-1-5
changeset: 493067:f148e4202783
user:      he <he%NetBSD.org@localhost>
date:      Wed Apr 17 12:04:30 2002 +0000

description:
Pull up revision 1.46 (requested by groo):
  Replace two instances of strn* functions with strl* functions.

diffstat:

 lib/libc/net/rcmd.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 494b7f06786d -r f148e4202783 lib/libc/net/rcmd.c
--- a/lib/libc/net/rcmd.c       Wed Apr 17 12:00:56 2002 +0000
+++ b/lib/libc/net/rcmd.c       Wed Apr 17 12:04:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcmd.c,v 1.42 2000/05/30 01:07:44 itojun Exp $ */
+/*     $NetBSD: rcmd.c,v 1.42.2.1 2002/04/17 12:04:30 he Exp $ */
 
 /*
  * Copyright (c) 1997 Matthew R. Green.
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rcmd.c     8.3 (Berkeley) 3/26/94";
 #else
-__RCSID("$NetBSD: rcmd.c,v 1.42 2000/05/30 01:07:44 itojun Exp $");
+__RCSID("$NetBSD: rcmd.c,v 1.42.2.1 2002/04/17 12:04:30 he Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -688,8 +688,8 @@
                first = 0;
                if ((pwd = getpwnam(luser)) == NULL)
                        return (-1);
-               (void)strncpy(pbuf, pwd->pw_dir, sizeof(pbuf) - 1);
-               (void)strncat(pbuf, "/.rhosts", sizeof(pbuf) - strlen(pbuf) - 1);
+               (void)strlcpy(pbuf, pwd->pw_dir, sizeof(pbuf));
+               (void)strlcat(pbuf, "/.rhosts", sizeof(pbuf));
 
                /*
                 * Change effective uid while opening .rhosts.  If root and



Home | Main Index | Thread Index | Old Index