All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Eamon Walsh <ewalsh@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH] libselinux: selabel_*() support for database objects
Date: Tue, 09 Mar 2010 10:42:24 +0900	[thread overview]
Message-ID: <4B95A780.8050300@ak.jp.nec.com> (raw)
In-Reply-To: <4B95A2D2.3080101@tycho.nsa.gov>

[-- Attachment #1: Type: text/plain, Size: 2347 bytes --]

(2010/03/09 10:22), Eamon Walsh wrote:
> On 03/08/2010 07:40 PM, KaiGai Kohei wrote:
>> (2010/03/09 8:13), Eamon Walsh wrote:
>>
>>> On 03/01/2010 09:53 PM, KaiGai Kohei wrote:
>>>
>>>> What is the current status of the patch?
>>>>
>>>> Thanks,
>>>>
>>>>
>>>
>>> Can you send me a sample sepgsql_contexts file so I can test this?
>>>
>>>
>> The attached selabel-test.conf is an example specfile, and the selabel-test.c
>> is a sample program to lookup an expected security context for the given name.
>>
>>    $ gcc selabel-test.c -o selabel-test -lselinux \
>>          -I repo/selinux/libselinux/include/ \
>>          -L repo/selinux/libselinux/src/
>>    $ ./selabel-test selabel-test.conf db_table postgres.pg_catalog.pg_class
>>    "postgres.pg_catalog.pg_class" =>  "system_u:object_r:sepgsql_sysobj_t:s0"
>>    $ ./selabel-test selabel-test.conf db_table postgres.pg_public.my_table
>>    "postgres.pg_public.my_table" =>  "system_u:object_r:sepgsql_table_t:s0"
>>    $ ./selabel-test selabel-test.conf db_table foovarbaz
>>    failed to lookup : "foovarbaz" (No such file or directory)
>>
>> In PostgreSQL, its namespace has the following structure:
>>    <database>.<schema>.(<table>|<view>|<procedure>|...)
>>
>> So, the example specfile defines the following lines:
>>    db_table    *.pg_catalog.*     system_u:object_r:sepgsql_sysobj_t:s0
>>
>> It informs all tables under the "pg_catalog" schema should be labeled as
>> "system_u:object_r:sepgsql_sysobj_t:s0".
>>
>> Andy, in rubix, the specfile should be described as follows:
>>    db_table    *.*.*.*            system_u:object_r:rubix_table_t:s0
>>
>> The library just does pattern matching without any assumption of database
>> architecture.
>>
>>
>> I also noticed the previous patch allows to lookup an expected security
>> context for the db_tuple object class, but tuples don't have their name
>> basically, so I removed it.
>> And, it didn't support an upcoming db_view object class, I added it instead.
>>
>> Thanks,
>>
> 
> 
> This patch is missing the new files label_db.c and selabel_db.5.
> 
> Also, in the previous patch, the file selabel_db.c had two instances of
> trailing whitespace: lines 20 and 55. Please fix those up and re-send.
> 

Oops, sorry for the stupid misses.

The attached one is the revised patch.

Thanks,
-- 
KaiGai Kohei <kaigai@ak.jp.nec.com>

[-- Attachment #2: libselinux-selabel-sepgsql.3.patch --]
[-- Type: application/octect-stream, Size: 18445 bytes --]

  reply	other threads:[~2010-03-09  1:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19  8:21 [PATCH] libselinux: selabel_*() support for database objects KaiGai Kohei
2009-11-21  3:01 ` Eamon Walsh
2009-11-21 14:16   ` KaiGai Kohei
2009-11-25 23:29     ` KaiGai Kohei
2009-11-30 21:30       ` Eamon Walsh
2010-03-02  2:53         ` KaiGai Kohei
2010-03-08 23:13           ` Eamon Walsh
2010-03-08 23:26             ` Andy Warner
2010-03-08 23:34               ` KaiGai Kohei
2010-03-09  0:40             ` KaiGai Kohei
2010-03-09  1:22               ` Eamon Walsh
2010-03-09  1:42                 ` KaiGai Kohei [this message]
2010-03-09 20:08                   ` Eamon Walsh
2010-03-09 22:16                     ` KaiGai Kohei
2010-03-10 17:11                       ` Eamon Walsh
2010-03-10 18:04                         ` Andy Warner
2010-03-11  4:28                           ` KaiGai Kohei
2010-03-12  1:05                             ` KaiGai Kohei
2010-03-15 23:13                               ` Eamon Walsh
2010-03-16  0:01                                 ` 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=4B95A780.8050300@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=ewalsh@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.