Skip to contentSkip to conversation

Signal problem

DISCUSSION Steve G 3 participants 3 messages Apr 26, 2005 – Apr 27, 2005 SELinux security module

lore
Share & tools
lore

Steve G

author
#0 lore raw
Quoted 3 lines

Isn't this unreliable anyway, e.g. your hook might queue up the audit message for processing by auditd, but auditd gets the signal before it handles the message and exits without emptying the queue?

The message would be in syslog in that scenario. It isn't there either.

-Steve

__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

--
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.

#1 lore raw
Quoted 5 lines · * Steve G ([email protected]) wrote:
Quoted 3 lines

Isn't this unreliable anyway, e.g. your hook might queue up the audit message for processing by auditd, but auditd gets the signal before it handles the message and exits without emptying the queue?

The message would be in syslog in that scenario. It isn't there either.

Upon termination, what's queued to the netlink socket but not yet received is going to be lost, right? Perhaps you need to be able to set pid == 0, and still drain the fd when you recieve a TERM?

thanks,
-chris

Signature · 6 lines
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

--
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.
#2 lore raw
In reply to Steve G
Quoted 5 lines · Steve G
Quoted 3 lines

Isn't this unreliable anyway, e.g. your hook might queue up the audit message for processing by auditd, but auditd gets the signal before it handles the message and exits without emptying the queue?

The message would be in syslog in that scenario. It isn't there either.

Not necessarily; it could be queued on the netlink socket while audit_pid was still non-zero, and then the signal is received and auditd doesn't drain it properly.

Trivial test for you would be to make your original hook call printk() instead of audit_log*, and see if you get the message
in /var/log/messages or dmesg as expected. In any event, I definitely get SELinux permission denials and audit messages via the existing security hook there for signal delivery.

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.