MIME-Version: 1.0 In-Reply-To: <1248702334.3465.45.camel@moss-pluto.epoch.ncsc.mil> References: <81092d890907251241k5ef56a87p2f6d6f763b25b70@mail.gmail.com> <1248702334.3465.45.camel@moss-pluto.epoch.ncsc.mil> Date: Mon, 27 Jul 2009 07:49:38 -0700 Message-ID: <81092d890907270749o7cdced5bw434454ec3f5c91a4@mail.gmail.com> Subject: Re: "Error! Unable to set executable context." From: Larry Ross To: Stephen Smalley Cc: selinux@tycho.nsa.gov Content-Type: multipart/alternative; boundary=0016364c7eeb37f410046fb11036 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov --0016364c7eeb37f410046fb11036 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Mon, Jul 27, 2009 at 6:45 AM, Stephen Smalley wrote: > On Sat, 2009-07-25 at 12:41 -0700, Larry Ross wrote: > > I am trying to create a custom selinux user for the strict policy on > > RHEL5.3 > > I want logins that are mapped to this user to be able to login via > > gdm, but when they do I get an error "Error! Unable to set executable > > context." > > > > What does this error message mean? > > > > I am able to login via gdm with logins that are mapped to user_u. I > > have run the AVCs generated when I login in permissive mode (which > > succeeds) through audit2allow and gotten to the point where it doesn't > > seem that I am getting any killer AVCs. What am I missing that is > > needed for a custom user to use X-Windows? Is there some place I can > > look to determine what is causing the error? > > I see that you've resolved the problem now, but could you describe what > you had to do to get it to work for future reference? That way the next > time someone comes along with the same issue, they can find the answer > in the mailing list archives. I think (and that is why I didn't say specifically) that it was calling: userdom_unpriv_user_template(app_user) I know I needed to add a default context to: /etc/selinux/strict/contexts/default_contexts but although I added more per Dominicks suggestion, I think I already had the ones that were needed. > > > BTW, "executable context" in the error message means that the attempts > by gdm to invoke setexeccon(3) failed. setexecon(3) is the libselinux > interface to set the security context to which the process will > transition upon the next execve(2) call. Usually a setexeccon(3) error > means that the security context was invalid under the current policy. This didn't seem to be well documented anywhere as to what the above actually means. My take is that there has to be an executable context (which is what I think the userdom_unpriv_user_template gave me) which is listed in the default contexts in the same row as the "current" context. But I could be wrong. -- Larry > > > -- > Stephen Smalley > National Security Agency > > --0016364c7eeb37f410046fb11036 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Jul 27, 2009 at 6:45 AM, Stephen Smalley= <sds@tycho.nsa.g= ov> wrote:
On Sat, 2009-07-25 at 12:41 -0700, Larry Ross wrote:
<= /div>
> I am trying to create a custom selinux user for the = strict policy on
> RHEL5.3
> I want logins that are mapped to t= his user to be able to login via
> gdm, but when they do I get an err= or "Error! Unable to set executable
> context."
>
> What does this error message mean?
&= gt;
> I am able to login via gdm with logins that are mapped to user_= u. =A0I
> have run the AVCs generated when I login in permissive mode= (which
> succeeds) through audit2allow and gotten to the point where it doesn&#= 39;t
> seem that I am getting any killer AVCs. =A0What am I missing t= hat is
> needed for a custom user to use X-Windows? =A0Is there some = place I can
> look to determine what is causing the error?

I see that y= ou've resolved the problem now, but could you describe what
you had = to do to get it to work for future reference? =A0That way the next
time = someone comes along with the same issue, they can find the answer
in the mailing list archives.
=A0
I think (and that is why I didn't say specifically) that it was ca= lling:
userdom_unpriv_user_template(app_user)
=A0
I know I needed to add=A0a default=A0context to:
/etc/selinux/strict/contexts/default_contexts
but although I added more per Dominicks suggestion, I think I already = had the ones that were needed.
=A0


BTW= , "executable context" in the error message means that the attemp= ts
by gdm to invoke setexeccon(3) failed. =A0setexecon(3) is the libselinuxinterface to set the security context to which the process will
transit= ion upon the next execve(2) call. =A0Usually a setexeccon(3) error
means= that the security context was invalid under the current policy.
=A0
This didn't seem to be well documented anywhere as to what the abo= ve actually means.
My take is that there has to be an executable context (which is what I= think the userdom_unpriv_user_template gave me) which is listed in the def= ault contexts in the same row as the "current" context.=A0 But I = could be wrong.
=A0
=A0 -- Larry
=A0


--
Stephen Smalley
National Security Agency
<= br>

--0016364c7eeb37f410046fb11036-- -- 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.