Re: Updates of SE-PostgreSQL 8.4devel patches (r1197)

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1197)
Date: 2008-11-26 00:45:13
Message-ID: 492C9C19.7040500@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Mon, 2008-11-24 at 22:09 +0900, KaiGai Kohei wrote:
>
>> I removed the two hooks at the r1244 patch set.
>> As you said, it is fundamentally danger to load uncertain binary modules.
>> Thus, what we should do is checks on module loading.
>>
>> The default security policy requires loadable modules to be labeled as
>> 'lib_t' type which means shared library files installed correctly.
>
> We definitely want to include add-in modules with high security systems,
> e.g. GIS and oracle compatibility functions.

Yes, it is possible.
SELinux assigns 'lib_t' type for modules stored in '/usr/lib/pgsql/' in default.

like:
[kaigai(at)saba ~]$ ls -Z /usr/lib/pgsql
-rwxr-xr-x root root system_u:object_r:lib_t ascii_and_mic.so
-rwxr-xr-x root root system_u:object_r:lib_t cyrillic_and_mic.so
-rwxr-xr-x root root system_u:object_r:lib_t dict_snowball.so
-rwxr-xr-x root root system_u:object_r:lib_t euc_cn_and_mic.so
-rwxr-xr-x root root system_u:object_r:lib_t euc_jis_2004_and_shift_jis_2004.so
-rwxr-xr-x root root system_u:object_r:lib_t euc_jp_and_sjis.so
-rwxr-xr-x root root system_u:object_r:lib_t euc_kr_and_mic.so
- snip -
(*) "-Z" option enables to show the security context of files.

SE-PostgreSQL does not prevent to load them. It means we want to allow to load library
files stored by database administrators properly, not a uncertain files.

Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-11-26 01:06:13 Re: Simple postgresql.conf wizard
Previous Message Tom Lane 2008-11-26 00:44:27 Re: Simple postgresql.conf wizard