From: Dennis Wronka <linuxweb@gmx.net>
To: "zheyeung" <zheyeung@gmail.com>
Cc: "fedora-selinux-list" <fedora-selinux-list@redhat.com>,
"selinux" <selinux@tycho.nsa.gov>
Subject: Re: I cannot change my shell context
Date: Wed, 2 Sep 2009 21:59:06 +0800 [thread overview]
Message-ID: <200909022159.10594.linuxweb@gmx.net> (raw)
In-Reply-To: <200909021107080933047@gmail.com>
[-- Attachment #1: Type: Text/Plain, Size: 1916 bytes --]
In Fedora users run unconfined, which, from my understand, means more or less
without restrictions imposed by SELinux.
Thus changing to sysadm_r shouldn't be necessary in the first place.
That you cannot change the context probably is because that context isn't
defined by the policy.
> hi , every body ,I install selinux-policy-targeted in my F11,and run in
> enforce mode. now I want to change selinux context of /tmp/test,but
> failed.I thought current shell domain was unconfined_t. then I intend to
> change my shell context to root:sysadm_r: sysadm_t ,but also failed. my
> project team plan to develop selinux policy for our system based on
> selinux-policy.src.rpm. I guess is this package have not been developed?
> If it has been developed ,why I cannot change to sysadm_r: sysadm_t?
>
> ---------------------------------------------------------------------------
>-
>
> [root@localhost ~]# ls -lZ /tmp/testselinux
> root root unconfined_u:object_r:user_t:user_tmp_t: s0 /tmp/testselinux
>
> [root@localhost ~]#chcon unconfined_u:object_r:mytest_t /tmp/testselinux
> chcon:failed to change context of '/tmp/testselinux' to
> 'unconfined_u:object_r:testselinux: s0 : permission denied
>
> ## here mytest_t defined in myapp.pp,which has successfully loaded by
> "semodule -i myapp.pp"
>
> [root@localhost ~]# newrole -r sysadm_r -t sysadm_t
> unconfined_u:unconfined_r:unconfined_t: s0 is not valid context
>
> [root@localhost ~]# semanage login -m -s root -r s0-s0:c0.c1023 root
>
> after reboot, graphic terminal cannot run. audit says that
> system_u:system_r: xdm_t require "read" permission for
> system_u:object_r:httpd_sys_content_t.
>
> [root@localhost ~]# id
> context= root:unconfined_r:unconfined_t: s0-s0:c0-c1023
>
> [root@localhost ~]# newrole -r sysadm_r -t sysadm_t
> failed to exec shell: permission denied
> 2009-09-02
>
>
>
> zheyeung
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-09-02 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 3:07 I cannot change my shell context zheyeung
2009-09-02 13:59 ` Dennis Wronka [this message]
[not found] <CIEOKAFOMGPNJIPMMMAHAEDJCCAA.remmolt@zwartsenberg.eu>
2009-09-03 14:59 ` Dennis Wronka
2009-09-04 13:02 ` Daniel J Walsh
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=200909022159.10594.linuxweb@gmx.net \
--to=linuxweb@gmx.net \
--cc=fedora-selinux-list@redhat.com \
--cc=selinux@tycho.nsa.gov \
--cc=zheyeung@gmail.com \
/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.