Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/user Revert previous change, since maintenance acro...



details:   https://anonhg.NetBSD.org/src/rev/9686f9e63dab
branches:  trunk
changeset: 485946:9686f9e63dab
user:      agc <agc%NetBSD.org@localhost>
date:      Tue May 09 09:25:21 2000 +0000

description:
Revert previous change, since maintenance across -current, pkgsrc and the
1.4 branch requires one set of sources.

diffstat:

 usr.sbin/user/user.c |  22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r a3ceb34a9d4a -r 9686f9e63dab usr.sbin/user/user.c
--- a/usr.sbin/user/user.c      Tue May 09 07:30:14 2000 +0000
+++ b/usr.sbin/user/user.c      Tue May 09 09:25:21 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.18 2000/05/05 01:27:47 hubertf Exp $ */
+/* $NetBSD: user.c,v 1.19 2000/05/09 09:25:21 agc Exp $ */
 
 /*
  * Copyright (c) 1999 Alistair G. Crooks.  All rights reserved.
@@ -36,7 +36,7 @@
 __COPYRIGHT(
        "@(#) Copyright (c) 1999 \
                The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.18 2000/05/05 01:27:47 hubertf Exp $");
+__RCSID("$NetBSD: user.c,v 1.19 2000/05/09 09:25:21 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -202,6 +202,24 @@
        return ret;
 }
 
+#define NetBSD_1_4_K   104110000
+
+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ < NetBSD_1_4_K)
+/* bounds checking strncpy */
+static int
+strlcpy(char *to, char *from, size_t tosize)
+{
+       size_t  n;
+       int     fromsize;
+
+       fromsize = strlen(from);
+       n = MIN(tosize - 1, fromsize);
+       (void) memcpy(to, from, n);
+       to[n] = '\0';
+       return fromsize;
+}
+#endif
+
 #ifdef EXTENSIONS
 /* return 1 if all of `s' is numeric */
 static int



Home | Main Index | Thread Index | Old Index