Subject: Re: Separating libselinux/libsepol (Was: Re: BusyBox: load_policy applet) From: Karl MacMillan To: Stephen Smalley Cc: "Christopher J. PeBenito" , Yuichi Nakamura , busybox@kaigai.gr.jp, selinux@tycho.nsa.gov, Chad Sellers In-Reply-To: <1175010498.3864.370.camel@moss-spartans.epoch.ncsc.mil> References: <20070323151513.395798cf.ynakam@hitachisoft.jp> <1174654177.31436.188.camel@moss-spartans.epoch.ncsc.mil> <20070326102809.e4f80126.ynakam@hitachisoft.jp> <1174918097.3864.83.camel@moss-spartans.epoch.ncsc.mil> <1174925566.28830.61.camel@sgc> <1174927054.12204.45.camel@localhost.localdomain> <1174939981.28830.84.camel@sgc> <1174999512.3864.278.camel@moss-spartans.epoch.ncsc.mil> <1175010151.29300.39.camel@sgc> <1175010498.3864.370.camel@moss-spartans.epoch.ncsc.mil> Content-Type: text/plain Date: Tue, 27 Mar 2007 12:02:13 -0400 Message-Id: <1175011333.19343.33.camel@localhost.localdomain> Mime-Version: 1.0 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov On Tue, 2007-03-27 at 11:48 -0400, Stephen Smalley wrote: > On Tue, 2007-03-27 at 11:42 -0400, Christopher J. PeBenito wrote: > > On Tue, 2007-03-27 at 08:45 -0400, Stephen Smalley wrote: > > > On Mon, 2007-03-26 at 20:13 +0000, Christopher J. PeBenito wrote: > > > > On Mon, 2007-03-26 at 12:37 -0400, Karl MacMillan wrote: > > > > > On Mon, 2007-03-26 at 12:12 -0400, Christopher J. PeBenito wrote: > > > > > > In my personal opinion, if you are really going tiny, that means its a > > > > > > customized system, which includes customized policy. That means you > > > > > > should be setting the correct initial boolean values when you build the > > > > > > policy, which also means monolithic instead of modular. > > > > > > > > > > What if the booleans are used to represent runtime state, for example > > > > > different security settings when a PDA is docked as opposed to undocked? > > > > > In that case there is no reasonable default and not preserving the > > > > > current values could cause serious problems. > > > > > > > > I disagree. The correct answer is whichever state the device assumes > > > > when it powers up. PDAs already have to determine that type of state > > > > when they power up after the initial setup, so at that time when it > > > > determines the state, it can also set the boolean. > > > > > > The state might be set by the user, e.g. knowing that I am about to take > > > my PDA out of the building, I set or clear a boolean to lock it down, > > > and I don't want that to be unlocked until I take explicit action to do > > > so - reboot shouldn't reset it. > > > > Using the power button on a PDA doesn't shut it down, it does something > > more like putting it into standby mode so it can still pop up calendar > > reminders. Thus, when it "turns on" it still has the same boolean > > states. The only time it boots is because the battery was just dead, or > > you force it because the system is locked up (or some similar reason). > > Both reset the device state too, and then falling back to the defaults > > would be the anticipated behavior. If a lock down is supposed to > > survive even that, I would argue that its not a state, its a > > configuration and that the tunables are the way to go. > > Ok, so what I'm hearing is that we don't need to preserve support for > local boolean and user definitions apart from managed policy. If anyone > disagrees, speak up please. > I still disagree. * As Steve mentioned, some of this state could be user defined. Currently booleans are the means to express this type of configuration data. The policy developer cannot choose at compile time (using default booleans or tunables) because multiple states are valid. We can't assume modular policy at all times for space reasons, so tunables as part of modules won't work there. That leaves booleans with persistent state. * We are not just talking about reboots, we are also talking about policy updates. I wouldn't expect installing an app to turn off a lockdown mode, but that would happen if it installed policy. So, not every device will need this, but it seems like a reasonable solution to a set of problems. In the context of enabling configuration options for embedded devices this seems like a useful option. Why impose this limit for no reason? 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.