Source-Changes-HG archive

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

[src/trunk]: src/dist/ntp/ntpd use correct group id if group was specified fo...



details:   https://anonhg.NetBSD.org/src/rev/e9680ecf3c01
branches:  trunk
changeset: 542821:e9680ecf3c01
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Feb 08 11:45:54 2003 +0000

description:
use correct group id if group was specified for -u; previously, it would
mistakely use user's primary group instead
problem reported and fix supplied in PR bin/20232 by KAMADA Ken'ichi

diffstat:

 dist/ntp/ntpd/ntpd.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b6468dfe0c1b -r e9680ecf3c01 dist/ntp/ntpd/ntpd.c
--- a/dist/ntp/ntpd/ntpd.c      Sat Feb 08 11:11:11 2003 +0000
+++ b/dist/ntp/ntpd/ntpd.c      Sat Feb 08 11:45:54 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntpd.c,v 1.3 2002/04/18 23:18:42 christos Exp $        */
+/*     $NetBSD: ntpd.c,v 1.4 2003/02/08 11:45:54 jdolecek Exp $        */
 
 /*
  * ntpd.c - main program for the fixed point NTP daemon
@@ -837,7 +837,7 @@
                } else {
 getgroup:      
                        if ((gr = getgrnam(group)) != NULL) {
-                               sw_gid = pw->pw_gid;
+                               sw_gid = gr->gr_gid;
                        } else {
                                errno = 0;
                                msyslog(LOG_ERR, "Cannot find group `%s'", group);



Home | Main Index | Thread Index | Old Index