From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: SELinux on Android From: Stephen Smalley To: Bhargava Shastry Cc: Eric Paris , SELinux@tycho.nsa.gov, James Morris In-Reply-To: References: <1320409924.1015.7.camel@moss-pluto> <1320425998.1015.31.camel@moss-pluto> <1320930750.13691.5.camel@moss-pluto> <1320942368.13691.7.camel@moss-pluto> Content-Type: text/plain; charset="UTF-8" Date: Thu, 17 Nov 2011 08:39:44 -0500 Message-ID: <1321537184.4836.9.camel@moss-pluto> Mime-Version: 1.0 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov On Thu, 2011-11-17 at 11:15 +0100, Bhargava Shastry wrote: > Sounds to me like you never loaded a policy. I'd bet you are > getting > inside the if (!ss_initialized) section of > security_sid_to_context_core. You have to load a policy > before you > can properly set and retrieve labels. > > Thanks, loading policy fixed the problem although I wonder why one > shouldn't be able to set xattr in the absence of a policy. Because SELinux has no way to interpret the xattr value if there is no policy loaded. -- Stephen Smalley National Security Agency -- 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.