Re: Error compiling sepgsql in PG9.1

From: Kohei Kaigai <Kohei(dot)Kaigai(at)EMEA(dot)NEC(dot)COM>
To: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Emanuel Calvo <postgres(dot)arg(at)gmail(dot)com>, postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error compiling sepgsql in PG9.1
Date: 2011-05-24 17:30:32
Message-ID: A9F5079BABDEE646AEBDB6831725762C55601F0ECC@EUEXCLU01.EU.NEC.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

The attached patch enables to abort configure script when we run it with '--with-selinux'
option, but libselinux is older than minimum requirement to SE-PostgreSQL.

As the documentation said, it needs libselinux-2.0.93 at least, because this or later
version support selabel_lookup(3) for database object classes; used to initial labeling.

The current configure script checks existence of libselinux, but no version checks.
(getpeercon_raw(3) has been a supported API for a long term.)
The selinux_sepgsql_context_path(3) is a good watermark of libselinux-2.0.93 instead.

Thanks,
--
NEC Europe Ltd, SAP Global Competence Center
KaiGai Kohei <kohei(dot)kaigai(at)emea(dot)nec(dot)com>

> -----Original Message-----
> From: Devrim GÜNDÜZ [mailto:devrim(at)gunduz(dot)org]
> Sent: 21. Mai 2011 07:46
> To: Kohei Kaigai
> Cc: Emanuel Calvo; postgresql Forums; KaiGai Kohei
> Subject: Re: [GENERAL] Error compiling sepgsql in PG9.1
>
> On Sat, 2011-05-21 at 02:50 +0100, Kohei Kaigai wrote:
> > As documentation said, it needs libselinux 2.0.93 or higher.
> > This version supports selabel_lookup(3) for database object classes.
>
> AFAICS, we are not checking it during configure. It might be worth to add libselinux version check
> in the configure phase.
> --
> Devrim GÜNDÜZ
> Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL
> Danışmanı/Consultant, Red Hat Certified Engineer
> Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter:
> http://twitter.com/devrimgunduz

Attachment Content-Type Size
sepgsql-fix-config-version.patch application/octet-stream 2.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Haas 2011-05-24 18:12:00 Re: [HACKERS] Error compiling sepgsql in PG9.1
Previous Message Reid Thompson 2011-05-24 17:15:48 Re: Postgresql CBT

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2011-05-24 17:31:45 Re: Pull up aggregate subquery
Previous Message Robert Haas 2011-05-24 17:29:59 Re: Proposal: Another attempt at vacuum improvements