From d02882d65ccdd110a04a514fdc7f5f0e6d5a3533 Mon Sep 17 00:00:00 2001 From: thib Date: Mon, 14 Jul 2003 10:53:34 +0000 Subject: [PATCH] merged SE Linux support small bug fix in an error message --- save.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/save.c b/save.c index d753397..1cee144 100644 --- a/save.c +++ b/save.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: save.c,v 1.5 2002-11-17 13:13:55 thib Exp $ */ + /* $Id: save.c,v 1.6 2003-07-14 10:53:34 thib Exp $ */ #include "global.h" #include "save.h" @@ -298,6 +298,11 @@ save_one_file(cf_t *file, char *filename, uid_t own_uid, gid_t own_gid, time_t s int fd; /* open file */ +#ifdef CONFIG_FLASK + if ( is_flask_enabled() ) + fd = open_secure(filename, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, S_IRUSR | S_IWUSR, file->cf_file_sid); + else +#endif fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, S_IRUSR|S_IWUSR); if ( fd == -1 ) { error_e("Could not open %s", filename); @@ -353,7 +358,7 @@ save_file_safe(cf_t *file, char *final_path, char *prog_name, uid_t own_uid, } else { error("Since %s has not been able to save %s's file, it will keep " - "the previous version (if any) of %s.", prog_name, final_path); + "the previous version (if any) of %s.", prog_name, final_path, final_path); return ERR; } -- 2.40.0