From 94e0bccbe01238972db1d2e68be15c45eaed87c1 Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Sat, 23 Dec 2000 20:17:17 +0000 Subject: [PATCH] log a warning message if runas field has been corrected --- conf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf.c b/conf.c index 702a874..8467866 100644 --- a/conf.c +++ b/conf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: conf.c,v 1.32 2000-12-15 17:51:49 thib Exp $ */ + /* $Id: conf.c,v 1.33 2000-12-23 20:17:17 thib Exp $ */ #include "fcron.h" @@ -407,9 +407,6 @@ read_file(const char *file_name, CF *cf) return 1; } (file_stat.st_uid != 0) ? runas = file_stat.st_uid : 0; - /* */ - debug("runas : %d", runas); - /* */ debug("User %s Entry", file_name); bzero(buf, sizeof(buf)); @@ -464,9 +461,12 @@ read_file(const char *file_name, CF *cf) continue; } - /* set runas field if necessary */ - if (runas > 0) + /* set runas field if necessary (to improve security) */ + if (runas > 0) { + if (cl->cl_runas != runas) + warn("warning : runas is not owner's uid : overridden."); cl->cl_runas = runas; + } if ( is_td(cl->cl_option) ) { -- 2.47.3