All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: SE Linux <selinux@tycho.nsa.gov>,
	"Christopher J. PeBenito" <cpebenito@tresys.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Trying to get XAce policy straightened out but our tool chain is too broken to handle it.
Date: Fri, 06 Jun 2008 19:51:10 -0400	[thread overview]
Message-ID: <4849CD6E.9080405@tycho.nsa.gov> (raw)
In-Reply-To: <48480210.60309@redhat.com>

Daniel J Walsh wrote:
> The interfaces I want to add are something like
>
> template - xserver_common_domain_template(staff)
> 	Used to generate types for $1_xserver_t and $1_xrootwindow_t
>
> interface - xserver_use(staff, staff, staff_nsplugin_t)
> 	    xserver_use(xdm, staff, staff_nsplugin_t)
> 	All interaction between application and X Server
>
> template - xserver_common_user_template(staff, staff_r, staff_t)
>
> 	This generates all of the user types/rules for a user X Sessionps
> started by the user, Calls out to xserver_common_template
>
> interface - xserver_common_app(staff, staff_nsplugin_t)
>
> 	This defines all the common rules for a confined application like
> nsplugin running in the user domain
> 	
> Then we can begin to write communications between staff and unconfined_t
> or other user domains.
>   

After some discussion, it's been decided that the desktop effort here 
should continue devoting time to X policy development.  My earlier 
statements notwithstanding.

What's your current policy patch for the above?

> The problem I have is the compiler is too stupid to understand the
> differences between a gen_requires block defining the required types and
> the actual type definition.
>
> So I end up in a catch 22 where the compiler tells me I need to require
> $1_rootwindow_t, but if I gen_require type $1_rootwindow_t, it tells me
> I have a duplicate definition.
>   

I encountered a bug where the "get_type_attr_decl.sed" script that 
reorders declarations wasn't matching properly, because it depends on a 
_comment_ at the end of the block to work (I forgot to use gen_require).

This sounds like a different bug but it might be related.


> So if you have a derived type in a gen_requires block the compiler can
> not handle it.
>
>
> /usr/bin/checkmodule -M -m tmp/staff.tmp -o tmp/staff.mod
> /usr/bin/checkmodule:  loading policy configuration from tmp/staff.tmp
> policy/modules/roles/staff.te":11:ERROR 'duplicate declaration of
> type/attribute' at token 'staff_input_xevent_t' on line 66981:
> #line 11
> 		type staff_input_xevent_t;
> /usr/bin/checkmodule:  error(s) encountered while parsing configuration
> make: *** [tmp/staff.mod] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.86849 (%install)
>
>
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.86849 (%install)
>
>
> Which is complaining about:
>
> interface(`xserver_use',`
> 	gen_require(`
> 		type $1_rootwindow_t;
> 		attribute $1_x_domain, $1_input_xevent_type;
> 		type $1_xserver_t, $1_xserver_tmpfs_t;
> 		type $2_input_xevent_t;
> 	')
>
> 	typeattribute $2_input_xevent_t $1_input_xevent_type;
>
> ...
>
>
> --
> 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.
>
>   


-- 
Eamon Walsh <ewalsh@tycho.nsa.gov>
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.

  reply	other threads:[~2008-06-06 23:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 15:11 Trying to get XAce policy straightened out but our tool chain is too broken to handle it Daniel J Walsh
2008-06-06 23:51 ` Eamon Walsh [this message]
2008-06-08 19:36   ` Ted X Toth
2008-06-16 14:10 ` Stephen Smalley
2008-06-23 11:17   ` Daniel J Walsh
2008-06-23 13:22     ` Christopher J. PeBenito
2008-06-25 18:28       ` Eamon Walsh
2008-06-30 14:40         ` Stephen Smalley
2008-06-30 20:09           ` Joshua Brindle
2008-07-03 15:18             ` Joshua Brindle
2008-07-03 16:12               ` 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=4849CD6E.9080405@tycho.nsa.gov \
    --to=ewalsh@tycho.nsa.gov \
    --cc=cpebenito@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /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.