From 062161d15f153c07cf9757bf91cf0a32edbe89f7 Mon Sep 17 00:00:00 2001 From: thib Date: Tue, 5 Jun 2001 10:19:10 +0000 Subject: [PATCH] bug corrected : a "all" in allow file with no deny file was considered as an non allowed user --- allow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/allow.c b/allow.c index 5316563..b9b4305 100644 --- a/allow.c +++ b/allow.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: allow.c,v 1.6 2001-05-15 00:51:32 thib Exp $ */ + /* $Id: allow.c,v 1.7 2001-06-05 10:19:10 thib Exp $ */ #include "fcrontab.h" #include "allow.h" @@ -81,7 +81,7 @@ is_allowed(char *user) /* check if user is in passwd file */ if ( ! getpwnam(user) ) - return 1; + return 0; /* check if user is in fcron.allow and/or in fcron.deny files */ allow = in_file(user, ETC "/" FCRON_ALLOW); @@ -102,7 +102,7 @@ is_allowed(char *user) if ( deny != 1 ) return 1; if ( allow == 2 ) - if ( deny == 0 ) + if ( deny <= 0 ) return 1; /* if we gets here, user is not allowed */ -- 2.40.0