Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net CID 975111: Ignore return value from initgroups...



details:   https://anonhg.NetBSD.org/src/rev/442d17d5e170
branches:  trunk
changeset: 796302:442d17d5e170
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 28 14:39:02 2014 +0000

description:
CID 975111: Ignore return value from initgroups(). If we failed, then
the failure would be that we could not open the .rhosts file so we fail
closed.

diffstat:

 lib/libc/net/rcmd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ccaf71a885d2 -r 442d17d5e170 lib/libc/net/rcmd.c
--- a/lib/libc/net/rcmd.c       Wed May 28 14:36:41 2014 +0000
+++ b/lib/libc/net/rcmd.c       Wed May 28 14:39:02 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcmd.c,v 1.68 2012/07/14 15:06:26 darrenr Exp $        */
+/*     $NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $       */
 
 /*
  * Copyright (c) 1983, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)rcmd.c     8.3 (Berkeley) 3/26/94";
 #else
-__RCSID("$NetBSD: rcmd.c,v 1.68 2012/07/14 15:06:26 darrenr Exp $");
+__RCSID("$NetBSD: rcmd.c,v 1.69 2014/05/28 14:39:02 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -698,7 +698,7 @@
                uid = geteuid();
                gid = getegid();
                (void)setegid(pwd->pw_gid);
-               initgroups(pwd->pw_name, pwd->pw_gid);
+               (void)initgroups(pwd->pw_name, pwd->pw_gid);
                (void)seteuid(pwd->pw_uid);
                hostf = fopen(pbuf, "r");
 



Home | Main Index | Thread Index | Old Index