* next try at refpolicy-gentoo patches
@ 2006-01-19 20:33 Serge E. Hallyn
2006-01-19 21:11 ` Serge E. Hallyn
2006-01-19 22:48 ` Christopher J. PeBenito
0 siblings, 2 replies; 4+ messages in thread
From: Serge E. Hallyn @ 2006-01-19 20:33 UTC (permalink / raw)
To: SELinux
The following set of patches lets me log in locally on a
gentoo system in enforcing mode.
First, label the serial ports as tty devices:
Index: refpolicy/policy/modules/kernel/terminal.fc
===================================================================
--- refpolicy.orig/policy/modules/kernel/terminal.fc
+++ refpolicy/policy/modules/kernel/terminal.fc
@@ -24,3 +24,6 @@
/dev/vcs[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/usb/tty.* -c gen_context(system_u:object_r:usbtty_device_t,s0)
+ifdef(`distro_gentoo', `
+/dev/tts/[0-9]* -c gen_context(system_u:object_r:tty_device_t,s0)
+')
Second, unix_chkpwd is under /usr/sbin/ under gentoo:
Index: refpolicy/policy/modules/system/authlogin.fc
===================================================================
--- refpolicy.orig/policy/modules/system/authlogin.fc
+++ refpolicy/policy/modules/system/authlogin.fc
@@ -12,6 +12,11 @@
/sbin/pam_console_apply -- gen_context(system_u:object_r:pam_console_exec_t,s0)
/sbin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
/sbin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
+
+ifdef(`distro_gentoo', `
+/usr/sbin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
+')
+
/sbin/unix_verify -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
ifdef(`distro_suse', `
/sbin/unix2_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
Third, I need to send sighld from user_t to local_login_t on login,
else I get an endless series of error messages on console
(login: waitpid (6328, NULL, 0) failed: No child processes)
Is this really gentoo-specific?
Index: refpolicy/policy/modules/system/userdomain.if
===================================================================
--- refpolicy.orig/policy/modules/system/userdomain.if
+++ refpolicy/policy/modules/system/userdomain.if
@@ -33,6 +33,10 @@ template(`base_user_template',`
role $1_r types $1_t;
allow system_r $1_r;
+ ifdef(`distro_gentoo',`
+ allow $1_t local_login_t:process { sigchld };
+ ')
+
# user pseudoterminal
type $1_devpts_t;
term_user_pty($1_t,$1_devpts_t)
Lastly, like with redhat, /dev is tmpfs, so user terminals need to be
able to associate with tmpfs.
Index: refpolicy/policy/modules/kernel/terminal.if
===================================================================
--- refpolicy.orig/policy/modules/kernel/terminal.if
+++ refpolicy/policy/modules/kernel/terminal.if
@@ -88,6 +88,9 @@ interface(`term_tty',`
type_change $1 ttynode:chr_file $2;
')
+ ifdef(`distro_gentoo',`
+ fs_associate_tmpfs($2)
+ ')
ifdef(`distro_redhat',`
fs_associate_tmpfs($2)
')
thanks,
-serge
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: next try at refpolicy-gentoo patches
2006-01-19 20:33 next try at refpolicy-gentoo patches Serge E. Hallyn
@ 2006-01-19 21:11 ` Serge E. Hallyn
2006-01-19 22:48 ` Christopher J. PeBenito
2006-01-19 22:48 ` Christopher J. PeBenito
1 sibling, 1 reply; 4+ messages in thread
From: Serge E. Hallyn @ 2006-01-19 21:11 UTC (permalink / raw)
To: SELinux
Oops, I forgot one piece which was thrown in with a site-private
patch.
Under gentoo, syslog-ng is under /usr/sbin.
Index: refpolicy/policy/modules/system/logging.fc
===================================================================
--- refpolicy.orig/policy/modules/system/logging.fc
+++ refpolicy/policy/modules/system/logging.fc
@@ -10,6 +10,9 @@
/sbin/minilogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
/sbin/syslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
/sbin/syslog-ng -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+ifdef(`distro_gentoo', `
+/usr/sbin/syslog-ng -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+')
/usr/sbin/klogd -- gen_context(system_u:object_r:klogd_exec_t,s0)
/usr/sbin/metalog -- gen_context(system_u:object_r:syslogd_exec_t,s0)
thanks,
-serge
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next try at refpolicy-gentoo patches
2006-01-19 21:11 ` Serge E. Hallyn
@ 2006-01-19 22:48 ` Christopher J. PeBenito
0 siblings, 0 replies; 4+ messages in thread
From: Christopher J. PeBenito @ 2006-01-19 22:48 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: SELinux
On Thu, 2006-01-19 at 15:11 -0600, Serge E. Hallyn wrote:
> Oops, I forgot one piece which was thrown in with a site-private
> patch.
>
> Under gentoo, syslog-ng is under /usr/sbin.
Merged.
--
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next try at refpolicy-gentoo patches
2006-01-19 20:33 next try at refpolicy-gentoo patches Serge E. Hallyn
2006-01-19 21:11 ` Serge E. Hallyn
@ 2006-01-19 22:48 ` Christopher J. PeBenito
1 sibling, 0 replies; 4+ messages in thread
From: Christopher J. PeBenito @ 2006-01-19 22:48 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: SELinux
On Thu, 2006-01-19 at 14:33 -0600, Serge E. Hallyn wrote:
> The following set of patches lets me log in locally on a
> gentoo system in enforcing mode.
Merged, with one note,
> Third, I need to send sighld from user_t to local_login_t on login,
> else I get an endless series of error messages on console
> (login: waitpid (6328, NULL, 0) failed: No child processes)
> Is this really gentoo-specific?
With some digging, and discussion in the IRC channel, this one wasn't
Gentoo specific, and due to some missing IPC rules in the domain
transition to all user domains that local_login_t was using. I fixed
that, so this hunk isn't needed:
> Index: refpolicy/policy/modules/system/userdomain.if
> ===================================================================
> --- refpolicy.orig/policy/modules/system/userdomain.if
> +++ refpolicy/policy/modules/system/userdomain.if
> @@ -33,6 +33,10 @@ template(`base_user_template',`
> role $1_r types $1_t;
> allow system_r $1_r;
>
> + ifdef(`distro_gentoo',`
> + allow $1_t local_login_t:process { sigchld };
> + ')
> +
> # user pseudoterminal
> type $1_devpts_t;
> term_user_pty($1_t,$1_devpts_t)
--
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-19 22:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-19 20:33 next try at refpolicy-gentoo patches Serge E. Hallyn
2006-01-19 21:11 ` Serge E. Hallyn
2006-01-19 22:48 ` Christopher J. PeBenito
2006-01-19 22:48 ` Christopher J. PeBenito
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.