sepgsql contrib module

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: sepgsql contrib module
Date: 2010-12-24 02:53:25
Message-ID: 4D140B25.90103@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The attached patch is the modular version of SE-PostgreSQL.

Since I reduced the caching mechanism for access control decision,
its code scale became about 2.6KL.

[kaigai(at)saba sepgsql]$ wc -l *.[ch]
353 dml.c
366 hooks.c
477 label.c
158 proc.c
267 relation.c
98 schema.c
617 selinux.c
287 sepgsql.h
2623 total

In addition, *.sgml file uses about 300 lines.

There is one another issue to be discussed.
We need a special form of regression test. Because SE-PostgreSQL
makes access control decision based on security label of the peer
process, we need to switch psql process during regression test.
(So, I don't include test cases yet.)

We have 'runcon' command to launch a child process with specified
security label as long as the security policy allows. If we could
launch 'psql' by 'runcon' with specified label, we can describe
test-cases on the existing framework on 'make installcheck'.

An idea is to add an option to pg_regress to launch psql command
with a specified wrapper program (like 'runcon').
In this case, each contrib modules kicks with REGRESS_OPTS setting.
One thing to be considered is the security label to be given to
the 'runcon' is flexible for each *.sql files.

Thanks,
--
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

Attachment Content-Type Size
sepgsql-v9.1-lite.1.patch application/octect-stream 94.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-24 03:16:18 Re: Streaming replication as a separate permissions
Previous Message Florian Pflug 2010-12-24 02:37:30 Re: Streaming replication as a separate permissions