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.
This commit is contained in:
parent
2ef91ead3c
commit
b33a0c98e1
|
@ -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, int superuser, const char *ruser,
|
|||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue