Re: sepgsql: label regression test failed - Mailing list pgsql-hackers

From Kohei KaiGai
Subject Re: sepgsql: label regression test failed
Date
Msg-id CADyhKSWEtrQgA-yT8jcx-ERBhELUs8GjRtkB2ZB56jrOL4_Byw@mail.gmail.com
Whole thread Raw
In response to Re: sepgsql: label regression test failed  (Sergey Muraviov <sergey.k.muraviov@gmail.com>)
Responses Re: sepgsql: label regression test failed
List pgsql-hackers
Hello,

It seems to me changes in the base security policy on Fedora affected to
the regression test. Our test cases for sepgsql_setcon() utilizes the MCS
rules, that prevents domain transition from narrow categories to wider ones,
to control the success cases and failure cases.

However, its coverage was changed. It was applied all the domains in the
system, thus "unconfined_t" domain had been enforced by MCS rules.
But now, it shall be applied only domains with "mcs_constrained_type"
attribute.

[kaigai@vmlinux tmp]$ diff -up old/policy/mcs new/policy/mcs     :<snip>     :mlsconstrain process { transition
dyntransition}
 
-       (( h1 dom h2 ) or ( t1 == mcssetcats ));
+       (( h1 dom h2 ) or ( t1 != mcs_constrained_type ));

Probably, we need to define a domain by ourselves for regression test to ensure
the test stability, not using the system "unconfined" domain that has different
meaning by release.

I'll make a patch. Please wait for a while.

Thanks for your test & reports.

2013/12/18 Sergey Muraviov <sergey.k.muraviov@gmail.com>:
> # semodule -l | grep sepgslq
> sepgsql-regtest 1.07
>
> Full list of modules is in attachment.
>
>
> 2013/12/18 Kohei KaiGai <kaigai@kaigai.gr.jp>
>>
>> Could you show me semodule -l on your environment?
>> I believe security policy has not been changed between F19 and F20...
>>
>> Thanks,
>>
>> 2013/12/18 Sergey Muraviov <sergey.k.muraviov@gmail.com>:
>> > Hi
>> >
>> > I've tried to test postgres 9.3.2 and 9.4devel with selinux on Fedora 20
>> > and
>> > met with a label regression test failure.
>> >
>> > PS
>> > I've got some warning during build process.
>> >
>> > --
>> > Best regards,
>> > Sergey Muraviov
>> >
>> >
>> > --
>> > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgsql-hackers
>> >
>>
>>
>>
>> --
>> KaiGai Kohei <kaigai@kaigai.gr.jp>
>
>
>
>
> --
> Best regards,
> Sergey Muraviov



-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: CREATE TABLESPACE SET
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: [bug fix] ECPG app crashes due to SIGBUS on SPARC Solaris