Don't let setnetgrent() operate on a null or empty group name: it can
tickle a bug in ypserv and make a serious mess of things.
This commit is contained in:
parent
ec2490897f
commit
77a782d587
@ -96,6 +96,10 @@ void
|
||||
setnetgrent(group)
|
||||
char *group;
|
||||
{
|
||||
/* Sanity check: no null group names allowed! */
|
||||
|
||||
if (group == NULL || *group == '\0')
|
||||
return;
|
||||
if (grouphead.gr == (struct netgrp *)0 ||
|
||||
strcmp(group, grouphead.grname)) {
|
||||
endnetgrent();
|
||||
|
Loading…
Reference in New Issue
Block a user