Bug 19335 - Fix msec warning about enforced permissions on files the cron create itself.
Summary: Fix msec warning about enforced permissions on files the cron create itself.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 11:05 CEST by Raphael Gertz
Modified: 2016-09-27 21:01 CEST (History)
3 users (show)

See Also:
Source RPM: msec-2.1-1.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Raphael Gertz 2016-09-12 11:05:43 CEST
Description of problem:
Hi, the /etc/cron.daily/msec -> /usr/share/msec/security.sh create at line 124 the file /var/log/security/mail.${CURRENT_CHECK_TYPE}.today.

On the next run of the script msecperms will complain about this file not being owned by adm group and not in 0640 mode.

Could you please insert at line 125 this line :
/usr/sbin/msecperms -q ${MAIL_LOG_TODAY}

That way the perms are fixed silently for the file msec just went to create and we avoid a useless warning + mail.

Version-Release number of selected component (if applicable):
msec-2.1-1.mga6

How reproducible:
Daily, weekly, monthly

Steps to Reproduce:
1. Enable msec in webserver runlevel with configured email
2. Let daily cron run : "/etc/cron.daily/msec"
3. Watch your mailbox about useless mail titled "Cron <root@localhost> nice -n 19 run-parts --report /etc/cron.daily" with content :
/etc/cron.daily/msec:
WARNING: Groupe de /var/log/security/mail.daily.today forcé à adm
WARNING: Application des permissions de /var/log/security/mail.daily.today à 640
Marja Van Waes 2016-09-20 18:33:56 CEST

CC: (none) => marja11
Assignee: bugsquad => mageiatools

Comment 1 Mageia Robot 2016-09-25 20:53:31 CEST
commit 92cb687deaf06ab79dfb3e6ff7ea921e4696bcd3
Author: Papoteur <papoteur@...>
Date:   Sun Sep 25 20:16:02 2016 +0200

    set permission on just created MAIL_LOG_TODAY mga#19335
---
 Commit Link:
   http://gitweb.mageia.org/software/msec/commit/?id=92cb687deaf06ab79dfb3e6ff7ea921e4696bcd3
Comment 2 David GEIGER 2016-09-25 21:13:18 CEST
Thanks for your report!

So should be fixed in next msec update.

- msec-2.2-1.mga6

CC: (none) => geiger.david68210

Comment 3 papoteur 2016-09-27 21:01:33 CEST
Msec 2.2-1 is pushed.

Status: NEW => RESOLVED
CC: (none) => yves.brungard_mageia
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.