(1) Don't perror() when at.deny doesn't exist, that's an accepted behavior.

(2) Die when there is a problem opening at.allow other then it not existing.
    An error other then it not existing might be a trick to somehow
    circumvent system security.

Mostly Reviewed By:	msmith
This commit is contained in:
Bill Fumerola 1999-07-01 01:07:30 +00:00
parent 5f792a2cd3
commit 4d294cadd5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48386

View File

@ -48,7 +48,7 @@
/* File scope variables */
static const char rcsid[] = "$Id: perm.c,v 1.5 1997/02/22 19:54:08 peter Exp $";
static const char rcsid[] = "$Id: perm.c,v 1.6 1998/12/06 07:42:09 archie Exp $";
/* Function declarations */
@ -104,7 +104,7 @@ int check_permission()
{
return check_for_user(fp, pentry->pw_name);
}
else
else if (errno == ENOENT)
{
PRIV_START
@ -117,7 +117,10 @@ int check_permission()
{
return !check_for_user(fp, pentry->pw_name);
}
perror("at.deny");
else if (errno != ENOENT)
perror("at.deny");
}
else
perror("at.allow");
return 0;
}