Skip to contentSkip to conversation

minilogd.te

DISCUSSION Brad Chapman 2 participants 2 messages Jul 11, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Everyone,

Here is a domain setup for minilogd, borrowed from klogd.te.

Status: It Works For Me (tm)

Brad

<snip>

#
# Author: Brad Chapman
#
# Taken from klogd.te, by Stephen Smalley <[email protected]> and # Timothy Fraser <[email protected]> (NAI Labs)
#

#################################
#
# Rules for the minilogd_t domain.
#
type minilogd_t, domain, privlog, privmem; role system_r types minilogd_t; every_domain(minilogd_t)
type minilogd_exec_t, file_type, sysadmfile, exec_type;

domain_auto_trans(initrc_t, minilogd_exec_t, minilogd_t)

type_transition init_t minilogd_exec_t:process minilogd_t;

type minilogd_tmp_t, file_type, sysadmfile, tmpfile; file_type_auto_trans(minilogd_t, tmp_t, minilogd_tmp_t) type minilogd_var_run_t, file_type, sysadmfile, pidfile; file_type_auto_trans(minilogd_t, var_run_t, minilogd_var_run_t)

# Use the sys_admin and sys_rawio capabilities.
allow minilogd_t minilogd_t:capability { sys_admin sys_rawio };

# Inherit and use descriptors from init.
allow minilogd_t init_t:fd inherit_fd_perms;

# Write to the console.
allow minilogd_t console_device_t:chr_file rw_file_perms;

# Control syslog and console logging
allow minilogd_t kernel_t:system { syslog_mod syslog_console };

# Allow access to character files and directories
allow { minilogd_t initrc_t } devfs_t:{ chr_file sock_file } { read write create getattr unlink };
allow { minilogd_t initrc_t } devfs_t:dir { read remove_name };

# Allow minilogd to make sockets and destroy them
allow { minilogd_t initrc_t } devlog_t:unix_stream_socket { create getattr };

</snip>

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

#1 lore raw
Quoted 5 lines · Brad Chapman

Everyone,

Here is a domain setup for minilogd, borrowed from klogd.te.

Status: It Works For Me (tm)

Use "fd use" not "fd inherit_fd_perms", the latter is obsolete.

Allowing any domain other than devfsd access to devfs_t chr_file devices is wrong. The correct thing to do is to use genfs for anything that needs a label before devfsd starts.

What does minilogd do anyway? Why not give it the same domain as klogd?

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.