From: Joshua Brindle <jbrindle@tresys.com>
To: Karl MacMillan <kmacmillan@mentalrootkit.com>
Cc: Yuichi Nakamura <ynakam@gwu.edu>, selinux@tycho.nsa.gov
Subject: Re: Question about setsebool.c
Date: Mon, 20 Nov 2006 13:39:36 -0500 [thread overview]
Message-ID: <4561F668.8070207@tresys.com> (raw)
In-Reply-To: <4561D175.6050309@mentalrootkit.com>
Karl MacMillan wrote:
> Yuichi Nakamura wrote:
>> Hi, I looked at the latest policycoreutils code.
>> (policycoreutils-1.33.1-9.fc7.src.rpm)
>>
>> And found strange code, in setsebool.c.
>>
>> 94 /* Apply (permanent) boolean changes to policy via
>> libsemanage */
>> 95 static int semanage_set_boolean_list(size_t boolcnt,
>> 96 SELboolean * boollist,
>> int perm)
>> 97 {
>> <snip>
>> 117 } else if (managed == 0) {
>> 118 if (selinux_set_boolean_list(boolcnt,
>> boollist, 1) < 0)
>> 119 goto err;
>> 120 goto out;
>> 121 }
>>
>> Why 3rd arg for selinux_set_boolean_list is "1"?
>> Should it be "perm"?
>>
>
> Looks that way to me. Additionally, is it even possible to make
> non-permanent change to a boolean via semanage? If not, then this code
> path should check for that. Josh?
>
libsemanage is only responsible for the persistent changes, sesetbool
sets the non-persistent directly, in fact demonstrated by the code
snippet above. This does look like a bug and if someone uses setsebool
to set a non-persistent boolean on an unmanaged system it appears that
it will indeed make it permanent.
--
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.
next prev parent reply other threads:[~2006-11-20 18:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 9:02 Question about setsebool.c Yuichi Nakamura
2006-11-20 16:01 ` Karl MacMillan
2006-11-20 18:39 ` Joshua Brindle [this message]
2006-11-20 19:59 ` Stephen Smalley
2006-11-20 20:04 ` Karl MacMillan
2006-11-20 20:10 ` Stephen Smalley
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=4561F668.8070207@tresys.com \
--to=jbrindle@tresys.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=selinux@tycho.nsa.gov \
--cc=ynakam@gwu.edu \
/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.