From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>
Cc: Chris PeBenito <pebenito@gentoo.org>,
Eamon Walsh <ewalsh@tycho.nsa.gov>,
Stephen Smalley <sds@tycho.nsa.gov>,
selinux@tycho.nsa.gov
Subject: Re: [PATCH] libselinux: add support for /contexts/postgresql_contexts
Date: Fri, 13 Jun 2008 19:39:53 +0900 [thread overview]
Message-ID: <48524E79.6000508@ak.jp.nec.com> (raw)
In-Reply-To: <1213121355.27496.23.camel@gorn>
[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]
Christopher J. PeBenito wrote:
> I merged this, but I was thinking about some revisions that we should
> consider:
>
> 1. in the unpriv client interface, we have these type transitions:
> type_transition $1 sepgsql_database_type:db_table sepgsql_table_t;
> type_transition $1 sepgsql_database_type:db_procedure sepgsql_proc_t;
> type_transition $1 sepgsql_database_type:db_blob sepgsql_blob_t;
>
> The client can only access the system database, not all databases, so it
> seems that sepgsql_database_type should be replaced with sepgsql_db_t.
I agreed.
Currently, sepgsql_db_t is the only type of sepgsql_database_type
except for unlabeled_t, however, these type_transition can prevent
user to add new database type and new type_transition rules.
> 2. the stored procedure type names have been in the back of my mind for
> long time but I couldn't come up with a good naming scheme. This
> especially bugged me for the sepgsql_trusted_domain_t and
> sepgsql_trusted_proc_t. Why not just go with what we do with regular
> domains and executables: sepgsql_trusted_proc_t and
> sepgsql_trusted_proc_exec_t?
I don't have a clear reason for the naming of them.
sepgsql_trusted_proc_t and sepgsql_trusted_proc_exec_t are more suitable
for the purpose, I also think.
Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
[-- Attachment #2: sepgsql-policy-fixes.patch --]
[-- Type: text/x-patch, Size: 2386 bytes --]
Index: refpolicy/policy/modules/services/postgresql.if
===================================================================
--- refpolicy/policy/modules/services/postgresql.if (revision 2714)
+++ refpolicy/policy/modules/services/postgresql.if (working copy)
@@ -37,7 +37,7 @@
attribute sepgsql_client_type, sepgsql_database_type;
attribute sepgsql_sysobj_table_type;
- type sepgsql_trusted_proc_t, sepgsql_trusted_domain_t;
+ type sepgsql_trusted_proc_exec_t, sepgsql_trusted_proc_t;
')
########################################
@@ -59,7 +59,7 @@
type $1_sepgsql_table_t;
postgresql_table_object($1_sepgsql_table_t)
- role $3 types sepgsql_trusted_domain_t;
+ role $3 types sepgsql_trusted_proc_t;
##############################
#
@@ -87,8 +87,8 @@
allow $2 $1_sepgsql_blob_t : db_blob { create drop getattr setattr read write };
type_transition $2 sepgsql_database_type:db_blob $1_sepgsql_blob_t;
- allow $2 sepgsql_trusted_domain_t:process transition;
- type_transition $2 sepgsql_trusted_proc_t:process sepgsql_trusted_domain_t;
+ allow $2 sepgsql_trusted_proc_t:process transition;
+ type_transition $2 sepgsql_trusted_proc_exec_t:process sepgsql_trusted_proc_t;
')
########################################
@@ -340,21 +340,20 @@
class db_blob all_db_blob_perms;
attribute sepgsql_client_type;
- attribute sepgsql_database_type;
- type sepgsql_table_t, sepgsql_proc_t, sepgsql_blob_t;
+ type sepgsql_db_t, sepgsql_table_t, sepgsql_proc_t, sepgsql_blob_t;
- type sepgsql_trusted_proc_t, sepgsql_trusted_domain_t;
+ type sepgsql_trusted_proc_t, sepgsql_trusted_proc_exec_t;
')
typeattribute $1 sepgsql_client_type;
- type_transition $1 sepgsql_database_type:db_table sepgsql_table_t;
- type_transition $1 sepgsql_database_type:db_procedure sepgsql_proc_t;
- type_transition $1 sepgsql_database_type:db_blob sepgsql_blob_t;
+ type_transition $1 sepgsql_db_t:db_table sepgsql_table_t;
+ type_transition $1 sepgsql_db_t:db_procedure sepgsql_proc_t;
+ type_transition $1 sepgsql_db_t:db_blob sepgsql_blob_t;
- type_transition $1 sepgsql_trusted_proc_t:process sepgsql_trusted_domain_t;
- allow $1 sepgsql_trusted_domain_t:process transition;
+ type_transition $1 sepgsql_trusted_proc_exec_t:process sepgsql_trusted_proc_t;
+ allow $1 sepgsql_trusted_proc_t:process transition;
')
########################################
next prev parent reply other threads:[~2008-06-13 10:39 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 10:30 [PATCH] libselinux: add support for /contexts/postgresql_contexts KaiGai Kohei
2008-05-27 17:14 ` Stephen Smalley
2008-05-27 17:55 ` Christopher J. PeBenito
2008-05-27 18:34 ` Stephen Smalley
2008-05-27 18:55 ` Christopher J. PeBenito
2008-05-27 19:59 ` Stephen Smalley
2008-05-27 20:15 ` Eamon Walsh
2008-05-28 13:24 ` Christopher J. PeBenito
2008-05-29 18:05 ` Eamon Walsh
2008-05-29 18:20 ` Christopher J. PeBenito
2008-05-30 0:22 ` Eamon Walsh
2008-05-30 12:27 ` Christopher J. PeBenito
2008-06-02 10:27 ` KaiGai Kohei
2008-06-02 17:31 ` Eamon Walsh
2008-06-02 18:39 ` Christopher J. PeBenito
2008-06-03 10:25 ` KaiGai Kohei
2008-06-03 12:37 ` Christopher J. PeBenito
2008-06-04 4:03 ` KaiGai Kohei
2008-06-04 14:19 ` Joshua Brindle
2008-06-05 1:07 ` KaiGai Kohei
2008-06-05 18:09 ` Eamon Walsh
2008-06-06 5:32 ` KaiGai Kohei
2008-06-04 14:32 ` Christopher J. PeBenito
2008-06-05 1:18 ` KaiGai Kohei
2008-06-05 13:35 ` Chris PeBenito
2008-06-06 5:21 ` KaiGai Kohei
2008-06-09 3:07 ` KaiGai Kohei
2008-06-10 18:09 ` Christopher J. PeBenito
2008-06-13 10:39 ` KaiGai Kohei [this message]
2008-06-13 13:37 ` Christopher J. PeBenito
2008-06-18 6:53 ` KaiGai Kohei
2008-06-18 13:41 ` Christopher J. PeBenito
2008-06-20 6:48 ` KaiGai Kohei
2008-06-23 12:35 ` Christopher J. PeBenito
2008-06-23 12:48 ` KaiGai Kohei
2008-06-23 12:56 ` Christopher J. PeBenito
2008-06-24 2:35 ` KaiGai Kohei
2008-06-24 12:56 ` Christopher J. PeBenito
2008-05-28 1:49 ` KaiGai Kohei
2008-05-28 12:56 ` Christopher J. PeBenito
2008-05-28 16:12 ` KaiGai Kohei
2008-05-28 1:13 ` KaiGai Kohei
2008-05-28 15:12 ` Stephen Smalley
2008-05-28 16:18 ` KaiGai Kohei
2008-05-28 2:49 ` KaiGai Kohei
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=48524E79.6000508@ak.jp.nec.com \
--to=kaigai@ak.jp.nec.com \
--cc=cpebenito@tresys.com \
--cc=ewalsh@tycho.nsa.gov \
--cc=pebenito@gentoo.org \
--cc=sds@tycho.nsa.gov \
--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.