syslog()
Hello,
I have a ‘mod’ that makes a syslog() call, in permissive mode it works fine. In enforcing mode it does not log nor does it display an avc message. I’m not clear on where I need to look for the policy change that’s needed. Also do I need to make any extra calls for this?
Ed
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.548 / Virus Database: 341 - Release Date: 12/05/2003
Quoted 4 lines · Ed Street
I have a ‘mod’ that makes a
syslog()call, in permissive mode it works fine. In enforcing mode it does not log nor does it display an avc message. I’m not clear on where I need to look for the policy change that’s needed. Also do I need to make any extra calls for this?
The unprivileged user domains aren't allowed to read or generate log messages. There are dontaudit rules to suppress the auditing of these denials (look in macros/user_macros.te). You need to put your program into a domain and authorize it to log messages.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hello,
I should have said this is a bash mod. Logs keyboard activity to syslog()for testing purposes. All I need is to append to the syslog and disallow any thing else. Question is, is there anyway to allow an append but not allow the user access to the file?
Ed
-----Original Message-----
From: Stephen Smalley [mailto:[email protected]]
Sent: Friday, December 12, 2003 10:01 AM
To: Ed Street
Cc: Selinux
Subject: Re: syslog()
Quoted 4 lines · Ed Street
I have a ‘mod’ that makes a
syslog()call, in permissive mode it works fine. In enforcing mode it does not log nor does it display an avc message. I’m not clear on where I need to look for the policy change that’s needed. Also do I need to make any extra calls for this?
The unprivileged user domains aren't allowed to read or generate log messages. There are dontaudit rules to suppress the auditing of these denials (look in macros/user_macros.te). You need to put your program into a domain and authorize it to log messages.
Signature · 21 lines
Stephen Smalley <[email protected]> National Security Agency --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.548 / Virus Database: 341 - Release Date: 12/05/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.548 / Virus Database: 341 - Release Date: 12/05/2003 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 3 lines · Ed Street
I should have said this is a bash mod. Logs keyboard activity to syslog()for testing purposes. All I need is to append to the syslog and disallow any thing else. Question is, is there anyway to allow an append
The log files aren't directly modified by the user; the message is sent to syslogd via /dev/log. Domains that have the 'privlog' attribute are allowed to communicate with syslogd via /dev/log; see the corresponding allow rules in syslogd.te.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 2 lines
Question is, is there anyway to allow an append
but not allow the user access to the file?
Sure, but it's not the same concept as writing -vs- reading.
It's not really file access per se. The files created by SYSLOG
only get written IFF and after the traffic is routed to them. (see /etc/syslog.conf)
SYSLOG is a service.
You *could* route the traffic off-host (which I like) in which case there would BE NO FILE for the user to read, regardless of the security rules in place locally.
Stephen or someone else would have to clarify (beyond me), but it sounds like what you're after if you do it with SElinux
is a rule that allows logging. As he said in one recent note:
Quoted 2 lines
You need to put your
program into a domain and authorize it to log messages.
-- R;
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.