Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/ntp/ntpd Fixed a small bug in -u option parsing (it onl...
details: https://anonhg.NetBSD.org/src/rev/77226da669f5
branches: trunk
changeset: 517210:77226da669f5
user: manu <manu%NetBSD.org@localhost>
date: Thu Nov 08 20:06:22 2001 +0000
description:
Fixed a small bug in -u option parsing (it only worked if you supplied a
user *and* a group)
diffstat:
dist/ntp/ntpd/ntp_config.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 365d77f2dd4b -r 77226da669f5 dist/ntp/ntpd/ntp_config.c
--- a/dist/ntp/ntpd/ntp_config.c Thu Nov 08 19:52:51 2001 +0000
+++ b/dist/ntp/ntpd/ntp_config.c Thu Nov 08 20:06:22 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_config.c,v 1.3 2001/09/16 07:51:54 manu Exp $ */
+/* $NetBSD: ntp_config.c,v 1.4 2001/11/08 20:06:22 manu Exp $ */
/*
* ntp_config.c - read and apply configuration information
@@ -911,8 +911,8 @@
user = malloc(strlen(ntp_optarg) + 1);
if ((user == NULL) || (ntp_optarg == NULL))
errflg++;
- (void) strncpy (user, ntp_optarg, strlen(ntp_optarg));
- group = rindex (user, ':');
+ (void)strncpy(user, ntp_optarg, strlen(ntp_optarg) + 1);
+ group = rindex(user, ':');
if (group)
*group++ = '\0'; /* get rid of the ':' */
break;
Home |
Main Index |
Thread Index |
Old Index