Skip to contentSkip to conversation

building base targeted policy...

DISCUSSION Joy Latten 2 participants 2 messages Mar 2, 2006 SELinux security module

lore
Share & tools
lore

Joy Latten

author
#0 lore raw

I downloaded the policy-src rpm in order to build a base policy. I used the modules-targeted.conf. My goal is to simply add an interface in kernel's module for ipsec packets. I am running targeted policy on FC5 test3. My build.conf states I am building targeted, modular policy.

When I try to install my base policy, I received the following:

semodule -b base.pp
libsepol.link_modules: Tried to link in an MLS module with a
non-MLS base.
libsemanage.semanage_link_sandbox: Link packages failed
semodule: Failed!

The targeted modules.conf states "mls=base" is required. Just to see what would happen, I commented out "mls=base" and rebuilt my base policy. The compile fails though because there are references to mls_trusted_object() throughout several modules and this interface is defined in mls module.

For example:
Compiling refpolicy base module
/usr/bin/checkmodule base.conf -o tmp/base.mod /usr/bin/checkmodule: loading policy configuration from base.conf tmp/only_te_rules.conf:36:ERROR 'syntax error' at token 'mls_trusted_object' on line 40705:

mls_trusted_object(devtty_t)
/usr/bin/checkmodule: error(s) encountered while parsing configuration
make: *** [tmp/base.mod] Error 1

What am I doing wrong?

Regards,
Joy

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 5 lines · Joy Latten

I downloaded the policy-src rpm in order to build a base policy. I used the modules-targeted.conf. My goal is to simply add an interface in kernel's module for ipsec packets. I am running targeted policy on FC5 test3. My build.conf states I am building targeted, modular policy.

I'm currently using the following commands to rebuild the MLS policy, using steps copied from the spec file. Run this from the /usr/src/redhat/BUILD/serefpolicy-*/ directory which you get by installing the source RPM and running "rpmbuild -bp SPECS/selinux-policy.spec":

  RPM_SOURCE_DIR=/usr/src/redhat/SOURCES
  Args="NAME=mls TYPE=strict-mls DISTRO=redhat DIRECT_INITRC=n MONOLITHIC=n POLY=n"
  make $Args bare
  make $Args conf
  cp -f ${RPM_SOURCE_DIR}/modules-mls.conf  ./policy/modules.conf 
  cp -f ${RPM_SOURCE_DIR}/booleans-mls.conf ./policy/booleans.conf 
  make $Args base.pp
  make $Args modules
  make $Args install

-Klaus

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.