]> granicus.if.org Git - cronie/commitdiff
Allow root's crontab (check with getuid).
authormmaslano <mmaslano@redhat.com>
Fri, 17 Aug 2007 13:02:07 +0000 (15:02 +0200)
committermmaslano <mmaslano@redhat.com>
Fri, 24 Aug 2007 12:53:49 +0000 (14:53 +0200)
misc.c

diff --git a/misc.c b/misc.c
index 8281f80c2f0be1093c0066a0209895afdcad8ee1..1a4dd9702a2100ca9c864ea8b85da03f1d59a15d 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -451,6 +451,8 @@ allowed(const char *username, const char *allow_file, const char *deny_file) {
        int     isallowed;
        char    buf[128];
 
+       if ( getuid() == 0 )
+           return TRUE;
        isallowed = FALSE;
        if ((fp = fopen(allow_file, "r")) != NULL) {
                isallowed = in_file(username, fp, FALSE);