SE Linux error in logwatch (sendmail)
Daniel J Walsh
dwalsh at redhat.com
Thu Jul 29 12:59:30 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/28/2010 05:29 PM, Christofer C. Bell wrote:
> When cron.daily runs, I get the following error related to sendmail
> and logwatch:
>
> /etc/cron.daily/0logwatch:
>
> Can't exec "sendmail": Permission denied at /usr/sbin/logwatch line
> 1032, <TESTFILE> line 2.
> Can't execute sendmail -t: Permission denied
>
> The SE Linux error is:
>
> type=SELINUX_ERR msg=audit(1280304906.187:42655):
> security_compute_sid: invalid context
> system_u:system_r:logwatch_mail_t:s0-s0:c0.c1023 for
> scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023
> tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=process
>
> Here is the relevant section of /usr/sbin/logwatch:
>
> #Use mailer = in logwatch.conf to set options. Default should
> be "sendmail -t"
> #In theory this should be able to handle many different
> mailers. I might need to add
> #some filter code on $Config{'mailer'} to make it more robust. -mgt
> open(OUTFILE,"|$Config{'mailer'}") or die "Can't execute
> $Config{'mailer'}: $!\n";
> my $mailto = $Config{"mailto_$Config{'hostname'}"};
> $mailto = $Config{'mailto'} unless $mailto;
> for my $to (split(/ /, $mailto)) {
> print OUTFILE "To: $to\n";
> }
> print OUTFILE "From: $Config{'mailfrom'}\n";
> print OUTFILE "Subject: Logwatch for $Config{'hostname'}
> (${OStitle})\n";
>
> The open statement (right under the comments) is line 1032.
>
> Is this something that a bug needs to be opened on or is there a
> context change on a file I can run to correct this? I'm not able to
> use the SE Linux Troubleshooter because it generates the following
> error (a bug to submit):
>
> "Error while checking policy version."
>
> Thanks.
>
There is an existing bug on this. You should update to the latest
selinux-policy in updates-testing.
This might fix your problem depending on the mailer you are using
yum update selinux-policy --enablerepo=updates-testing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkxRezIACgkQrlYvE4MpobPpLgCglT/NLRv55bT/32k9+pCNhIqj
QykAoK42V6oBny8XhdqvhxSmVsLC0vpA
=V7nB
-----END PGP SIGNATURE-----
More information about the users
mailing list