All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominick Grift <dac.override@gmail.com>
To: kuangjiou <kuangjiou@huawei.com>
Cc: "'selinux@tycho.nsa.gov'" <selinux@tycho.nsa.gov>
Subject: Re: got some problems with the type_transition rules
Date: Mon, 7 Sep 2015 18:14:50 +0200	[thread overview]
Message-ID: <20150907161449.GA12835@x250> (raw)
In-Reply-To: <60ABE64B4BE4AC45964F1A967BA76CB201F75356@SZXEMI502-MBS.china.huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]

On Mon, Sep 07, 2015 at 11:22:26AM +0000, kuangjiou wrote:
> Hello,everyone!
> 
> I am trying to use the optional file name feature in type_transition rules , And I test it in my OS (with kernel 3.0.76 and selinux userspace 2.1.0 ),
> 
> 
> 1.       I add the type_tansition rule in my policy like this : filetrans_pattern(unconfined_t,tpm_dentry_t,stmfile_lst_t,file,"123"), It can be compiled and installed successfully
> 
> 
> 
> But , every files that I creat in the tpm_dentry_t dentry , I will get the stmfile_lst_t type, not just the file named 123
> 
> 
> 
> 2.       I add two type_tansition rules in my policy like this :
> filetrans_pattern(unconfined_t,tpm_dentry_t,stmfile_lst_t,file,"123")
> 
> filetrans_pattern(unconfined_t,tpm_dentry_t,trust_log_t,file,"456")
> 
> 
> 
> It can be conpiled successfully, But got some error when install
> 

I would have a look at applicable type_transition rules with sesearch to
see what is there.

sesearch -ASCT -s unconfined_t | grep type_transition | grep tpm_dentry_t

> 
> 
> 
> libsepol.expand_terule_helper: conflicting TE rule for (unconfined_t, tpm_dentry_t:file):  old was stmfile_lst_t, new is trust_log_t
> libsepol.expand_module: Error during expand
> libsemanage.semanage_expand_sandbox: Expand module failed
> 
> semodule:  Failed!
> 
> 
> 
> 
> Can anyone help me with this problem, Thank you!
> 
> 
> pS: I got the selinux userspace 2.1.0 from here
> 
> https://github.com/SELinuxProject/selinux/wiki/Releases
> 
> 

> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.


-- 
02DFF788
4D30 903A 1CF3 B756 FB48  1514 3148 83A2 02DF F788
http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788
Dominick Grift

[-- Attachment #2: Type: application/pgp-signature, Size: 648 bytes --]

  reply	other threads:[~2015-09-07 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 11:22 got some problems with the type_transition rules kuangjiou
2015-09-07 16:14 ` Dominick Grift [this message]
2015-09-08  2:07   ` kuangjiou
2015-09-08  7:14     ` Dominick Grift
2015-09-08  9:06       ` 答复: " kuangjiou
2015-09-08 14:58         ` 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=20150907161449.GA12835@x250 \
    --to=dac.override@gmail.com \
    --cc=kuangjiou@huawei.com \
    --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.