Module Name:    src
Committed By:   christos
Date:           Wed May 28 14:39:02 UTC 2014

Modified Files:
        src/lib/libc/net: rcmd.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libc/net/rcmd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/net/rcmd.c
diff -u src/lib/libc/net/rcmd.c:1.68 src/lib/libc/net/rcmd.c:1.69
--- src/lib/libc/net/rcmd.c:1.68	Sat Jul 14 11:06:26 2012
+++ src/lib/libc/net/rcmd.c	Wed May 28 10:39:02 2014
@@ -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 @@ iruserok_sa(const void *raddr, int rlen,
 		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");
 

Reply via email to