Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net botched strn* -> strl*
details: https://anonhg.NetBSD.org/src/rev/23fdca127ebf
branches: trunk
changeset: 525744:23fdca127ebf
user: groo <groo%NetBSD.org@localhost>
date: Tue Apr 16 19:16:22 2002 +0000
description:
botched strn* -> strl*
from xs%kittenz.org@localhost
diffstat:
lib/libc/net/rcmd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 325f29cda922 -r 23fdca127ebf lib/libc/net/rcmd.c
--- a/lib/libc/net/rcmd.c Tue Apr 16 19:12:40 2002 +0000
+++ b/lib/libc/net/rcmd.c Tue Apr 16 19:16:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rcmd.c,v 1.45 2001/11/04 13:57:30 lukem Exp $ */
+/* $NetBSD: rcmd.c,v 1.46 2002/04/16 19:16:22 groo 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.45 2001/11/04 13:57:30 lukem Exp $");
+__RCSID("$NetBSD: rcmd.c,v 1.46 2002/04/16 19:16:22 groo Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -691,8 +691,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