Re: sepgsql installation troubles in Postgresql 9.1 alpha4

From: Vinicius Abrahao <vinnix(dot)bsd(at)gmail(dot)com>
To: H S <aras_h1988(at)yahoo(dot)com>
Cc: admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: sepgsql installation troubles in Postgresql 9.1 alpha4
Date: 2011-09-21 13:24:34
Message-ID: CAM9BftxmhfNz-i3DYim=jjaR-jO71A5C9CfkNURW1AGMm0mSrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Mar 28, 2011 at 7:10 AM, H S <aras_h1988(at)yahoo(dot)com> wrote:

> Dear Sirs,
>
> I have just read your manual about implementing module sepgsql on
> Postgresql. But I do not have any idea that where and how I sould insert the
> below commands, that you've mentioned in manual.
>
> >In terminal?
> > When I type initdb, normally it requires at least an option to be
> followed; but here it has been typed "initdb".
> > And also about $PGDATA: Should I type my path instead $PGDATA?
> > And by the way the for command until end of done. Should I insert/type it
> in my linux(fedora 14) terminal?
>
> Regards,
>
> Sara
>
> ==============================**==============================**
> ==============================**==============================**
> ===========================
> (MANUAL) The following instructions that assume your installation is under
> the /usr/local/pgsql directory. Adjust the paths shown below as appropriate
> for your installaton.
>
> $ initdb
> $ vi $PGDATA/postgresql.conf
> $ for DBNAME in template0 template1 postgres; do
> postgres --single -F -O -c exit_on_error=true $DBNAME \
> < /usr/local/pgsql/share/**contrib/sepgsql.sql > /dev/null
> done
> ------------------------------**------------
> ---my commands in terminal:
>
> [postgres(at)localhost bin]$ for DBNAME in test; do ./postgres --single -D
> /usr/local/pgsql/data -F -O -c exit_on_error=true $DBNAME <
> /usr/local/pgsql/share/
> contrib/sepgsql.sql > /dev/null; done
> ------------------------------**-------------
> ----result:
>
> FATAL: SELinux: failed to initialize labeling handle: No such file or
> directory
> STATEMENT: SELECT sepgsql_restorecon(NULL);
> ------------------------------**-------------
>
> *My System has the selinux-policy version is selinux-policy-3.9.7-37.fc14.
> I would like to know whether the versions 3.9.13 in fedora15 and 3.9.7-37
> for fedora 14 is equivalent or not.
>
>
>
>

Dear Sara, dear All,

I am expecting the same problem here...
Digging a little bit more into the code I saw what is the line that is
failling, at label.c line 528.

sehnd = selabel_open(SELABEL_CTX_DB, &seopts, 1);

From the block,

if (PG_ARGISNULL(0))
{
seopts.type = SELABEL_OPT_UNUSED;
seopts.value = NULL;
}
else
{
seopts.type = SELABEL_OPT_PATH;
seopts.value = TextDatumGetCString(PG_GETARG_DATUM(0));
}
sehnd = selabel_open(SELABEL_CTX_DB, &seopts, 1);
if (!sehnd)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("SELinux: failed to initialize labeling
handle: %m")));

Do you guys, have success when installing sepgsql? how we can solve this
problem?

I am at CentOS 6, with this packages installed:
libselinux-utils-2.0.94-2.el6.x86_64
selinux-policy-targeted-3.7.19-54.el6_0.5.noarch
libselinux-devel-2.0.94-2.el6.x86_64
libselinux-2.0.94-2.el6.x86_64
libselinux-python-2.0.94-2.el6.x86_64
selinux-policy-3.7.19-54.el6_0.5.noarch

Thanks in advance for any help.

Cheers,
Vinícius

--

Vinícius Abrahão Bazana Schmidt
Desenvolvimento
Dextra Sistemas
www.dextra.com.br

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Daniel Vázquez 2011-09-21 13:29:00 Unaccent contrib module for PostgreSQL 8
Previous Message Loles 2011-09-21 12:56:18 pgpool II cancel the current transaction if one node falls