Skip to contentSkip to conversation

rangetranstion in cil fails and doesn't produce explanatory output

DISCUSSION Denis Obrezkov 2 participants 2 messages Feb 3, 2020 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello,

I am trying to make rangetransition work, this is my cil file:
(type foo)
(type bar)
(allow foo bar (file (ioctl read write create getattr setattr lock relabelfrom relabelto append unlink link rename execute swapon quotaon mounton)))
(rangetransition foo bar process s0)

Now, I am trying to install it:
semodule -i lximage.cil

Failed to resolve rangetransition statement at /var/lib/selinux/refpolicy_mcs/tmp/modules/400/lximage/cil:4
semodule: Failed!

I use Debian Testing with refpolicy enforced. Policy type = mcs. What is wrong with my module? How can I get more explanatory output?

Signature · 1 line
Regards, Denis Obrezkov
#1 lore raw
Quoted 13 lines · Denis Obrezkov

Hello,

I am trying to make rangetransition work, this is my cil file:
(type foo)
(type bar)
(allow foo bar (file (ioctl read write create getattr setattr lock relabelfrom relabelto append unlink link rename execute swapon quotaon mounton)))
(rangetransition foo bar process s0)

Now, I am trying to install it:
semodule -i lximage.cil

Quoted 7 lines

Failed to resolve rangetransition statement at /var/lib/selinux/refpolicy_mcs/tmp/modules/400/lximage/cil:4
semodule: Failed!

I use Debian Testing with refpolicy enforced. Policy type = mcs. What is wrong with my module? How can I get more explanatory output?

For more information you can use semodule -v -i lximage.cil

In your case, CIL is particular in its syntax and wants:
(rangetransition foo bar process ((s0) (s0)))

Jim

Signature · 2 lines
James Carter <[email protected]>
National Security Agency