From: petre rodan <kaiowas@gentoo.org>
To: selinux@tycho.nsa.gov
Subject: gentoo diff for mysqld
Date: Tue, 05 Oct 2004 11:29:40 +0300 [thread overview]
Message-ID: <41625B74.2090503@gentoo.org> (raw)
[-- 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 --]
next reply other threads:[~2004-10-05 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-05 8:29 petre rodan [this message]
2004-10-05 17:19 ` gentoo diff for mysqld 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41625B74.2090503@gentoo.org \
--to=kaiowas@gentoo.org \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.