All of lore.kernel.org
 help / color / mirror / Atom feed
* gentoo diff for mysqld
@ 2004-10-05  8:29 petre rodan
  2004-10-05 17:19 ` Valdis.Kletnieks
  2004-10-05 18:30 ` Erich Schubert
  0 siblings, 2 replies; 7+ messages in thread
From: petre rodan @ 2004-10-05  8:29 UTC (permalink / raw)
  To: selinux


[-- Attachment #1.1: Type: text/plain, Size: 268 bytes --]

Hi!

attached you'll find a diff for the mysql policy.
you might want to use the tmp_domain() for other distros as well (see the reference)

reference:
http://bugs.gentoo.org/show_bug.cgi?id=48772

-- 
petre rodan
<kaiowas@gentoo.org>
Developer,
Hardened Gentoo Linux

[-- Attachment #1.2: mysql.diff --]
[-- Type: text/plain, Size: 1815 bytes --]

--- /root/public_html/policy/nsa/file_contexts/program/mysqld.fc	2004-08-22 16:20:06.000000000 +0300
+++ /etc/security/selinux/src/policy/file_contexts/program/mysqld.fc	2004-10-05 04:36:41.722539464 +0300
@@ -3,7 +3,7 @@
 /usr/libexec/mysqld	--	system_u:object_r:mysqld_exec_t
 /var/run/mysqld(/.*)?		system_u:object_r:mysqld_var_run_t
 /var/log/mysql.*	--	system_u:object_r:mysqld_log_t
-/var/lib/mysql(/.*)?		system_u:object_r:mysqld_db_t
+/var/lib(64)?/mysql(/.*)?	system_u:object_r:mysqld_db_t
 /var/lib/mysql/mysql.sock -s	system_u:object_r:mysqld_var_run_t
 /etc/my\.cnf		--	system_u:object_r:mysqld_etc_t
 /etc/mysql(/.*)?		system_u:object_r:mysqld_etc_t
--- /root/public_html/policy/nsa/domains/program/unused/mysqld.te	2004-08-30 23:35:32.000000000 +0300
+++ /etc/security/selinux/src/policy/domains/program/mysqld.te	2004-10-05 04:46:34.766383096 +0300
@@ -57,10 +57,6 @@
 
 can_unix_connect(sysadm_t, mysqld_t)
 
-# for /root/.my.cnf - should not be needed
-allow mysqld_t sysadm_home_dir_t:dir search;
-allow mysqld_t sysadm_home_t:file { read getattr };
-
 ifdef(`logrotate.te', `
 r_dir_file(logrotate_t, mysqld_etc_t)
 allow logrotate_t mysqld_db_t:dir search;
@@ -80,3 +76,20 @@
 # because Fedora has the sock_file in the database directory
 file_type_auto_trans(mysqld_t, mysqld_db_t, mysqld_var_run_t, sock_file)
 ')
+
+ifdef(`distro_gentoo', `
+# temporary tables (#sql prefix)
+tmp_domain(mysqld)
+
+# if controled by daemontools
+ifdef(`daemontools.te', `
+domain_auto_trans( svc_run_t, mysqld_exec_t, mysqld_t)
+allow svc_start_t mysqld_t:process signal;
+svc_ipc_domain(mysqld_t)
+')dnl end ifdef daemontools
+',`
+# for /root/.my.cnf - should not be needed
+allow mysqld_t sysadm_home_dir_t:dir search;
+allow mysqld_t sysadm_home_t:file { read getattr };
+')dnl end ifdef distro_gentoo
+ 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-08 17:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05  8:29 gentoo diff for mysqld petre rodan
2004-10-05 17:19 ` Valdis.Kletnieks
2004-10-05 17:35   ` petre rodan
2004-10-05 18:30 ` Erich Schubert
2004-10-06 10:55   ` petre rodan
2004-10-07  6:48     ` Russell Coker
2004-10-08 17:58       ` James Carter

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.