From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: ²Ì¼ÎÓ <millerfor@gmail.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: help: 2 conditional expressions in refpolicy must match?
Date: Tue, 12 Dec 2006 09:55:10 -0500 [thread overview]
Message-ID: <457EC2CE.5040503@mentalrootkit.com> (raw)
In-Reply-To: <d032e8510612120128u7a1aa53ege2d5cdc849b3dad1@mail.gmail.com>
²Ì¼ÎÓ wrote:
> while i am testing refpolicy conditional expression by switching
> monolic and module compile mode, i found a strange thing. following is
> the steps i took:
>
> step 1: add a new boolean to policy
> in policy/global_tunables:
> gen_tunable(user_ping,false)
> gen_tunable(test_ping,false)
>
> step 2: modify conditional expression
> in policy/modules/admin/netutils.if:
>
> interface(`netutils_run_ping_cond',`
> gen_require(`
> type ping_t;
> bool user_ping;
> bool test_ping;
> ')
>
> role $2 types ping_t;
>
> if ( test_ping && user_ping ) {
> netutils_domtrans_ping($1)
> allow ping_t $3:chr_file rw_term_perms;
> }
> ')
>
> then i try to build policy in monolic and module mode, i use apol to
> check binary policy. monolinc is ok, it shows the conditional rules
> exactly, while modules building boolean test_ping is in the policy,
> but the rules are lost!!!!
>
How are you checking that the rules are lost? Linking and expanding the
module and then loading in Apol? Could you use the dismod and dispol
programs in the checkpolicy/test directory of the source distribution to
verify this? Also, what versions of the checkpolicy/checkmodule,
libsepol, are you using? Some very old versions exhibited this sort of
behavior, but it is not likely you are using those.
Thanks - Karl
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2006-12-12 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 9:28 help: 2 conditional expressions in refpolicy must match? 蔡嘉勇
2006-12-12 14:55 ` Karl MacMillan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=457EC2CE.5040503@mentalrootkit.com \
--to=kmacmillan@mentalrootkit.com \
--cc=SELinux@tycho.nsa.gov \
--cc=millerfor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.