Source-Changes-HG archive

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

[src/netbsd-1-5]: src/usr.bin/skeyinit Pull up revision 1.15 (requested by mjl):



details:   https://anonhg.NetBSD.org/src/rev/9d967b0facf1
branches:  netbsd-1-5
changeset: 491388:9d967b0facf1
user:      he <he%NetBSD.org@localhost>
date:      Wed Apr 25 12:26:53 2001 +0000

description:
Pull up revision 1.15 (requested by mjl):
  Fix spurious error message when run by non-root.  Fixes PR#12465.

diffstat:

 usr.bin/skeyinit/skeyinit.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 2cc898e1ef28 -r 9d967b0facf1 usr.bin/skeyinit/skeyinit.c
--- a/usr.bin/skeyinit/skeyinit.c       Wed Apr 25 09:53:48 2001 +0000
+++ b/usr.bin/skeyinit/skeyinit.c       Wed Apr 25 12:26:53 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: skeyinit.c,v 1.12.10.1 2000/07/17 19:55:54 mjl Exp $   */
+/*     $NetBSD: skeyinit.c,v 1.12.10.2 2001/04/25 12:26:53 he Exp $    */
 
 /* S/KEY v1.1b (skeyinit.c)
  *
@@ -67,6 +67,7 @@
        if ((pp = getpwuid(getuid())) == NULL)
                err(1, "no user with uid %ld", (u_long)getuid());
        (void)strncpy(me, pp->pw_name, sizeof(me) - 1);
+       me[sizeof(me) - 1] = '\0';
 
        if ((pp = getpwnam(me)) == NULL)
                err(1, "Who are you?");



Home | Main Index | Thread Index | Old Index