From: Joshua Brindle <method@manicmethod.com>
To: Hasan Rezaul-CHR010 <CHR010@motorola.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: file_contexts & labelling...
Date: Thu, 28 Jun 2007 14:35:22 -0400 [thread overview]
Message-ID: <4683FF6A.7070409@manicmethod.com> (raw)
In-Reply-To: <D06FE0A2807BC145B0D38744789D4F5D03B138D9@de01exm68.ds.mot.com>
Hasan Rezaul-CHR010 wrote:
> Hi All,
>
> Suppose I use the Fedora Core 6 *strict* policy as my base...
>
> I get the following file_context files as part of it:
>
> /etc/selinux/strict/modules/active/file_contexts
> /etc/selinux/strict/modules/active/file_contexts.template
> /etc/selinux/strict/contexts/files/file_contexts
>
>
you should never modify files in the modules directory, these are a
private resource of libsemanage and are subject to change/go away/etc.
the contexts/files/file_contexts file is regenerated when any
semanage/semodule command is run. You need to use semanage fcontext to
add new file contexts to the system (or put them in a modules
file_context section)
> Lets say on my Linux machine I have a few additional directories under /
> e.g. /data , /download
>
> And I want to label these directories a particular way... e.g. I want
> to label /data as var_t for example...
>
> I modified the above three file_context files to achieve this, such that
>
> When I do "restorecon -rF /data" , the /data directory gets labeled as
> var_t .
>
> The problem I have is that:
>
> Any time I execute commands (e.g. semanage or semodule) to modify the
> running selinux policy, ... the above three files automatically revert
> back to their original version, and the changes I made to them get lost
> !
>
> How can I create modified file_context files or any other appropriate
> file(s), such that, my changes are retained and stay permanent... So
> that anytime I later need to relabel my /data directory, the directory
> gets labeled the way I want, and doesn't get assigned default_t or
> file_t or unlabeled_t, etc.
>
> Question #2
> ------------
>
> If I have setup my Linux <-> SELinux login mappings such that a regular
> Linux user ssh into the box and gets context user:user_u:user_t and
> it generally works...
> But sometimes something in my policy is getting corrupted ?!? such that
> the login mappings remain exactly the same as before, but for some
> strange reason, that regular Linux user ssh into the Linux box, but gets
> context
> system_u:system_r:kernel_t
>
>
need more info, what does the seusers file look like after this happens,
what seems to trigger it, etc.
> Where should I look to see whats breaking to cause this anomaly ?
>
>
> Thanks as always for your great help :-)
>
> - Reza.
>
>
>
> --
> 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.
>
>
--
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.
next prev parent reply other threads:[~2007-06-28 18:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 15:41 regarding privilege granting Steve G
2007-06-15 18:30 ` Stephen Smalley
2007-06-25 15:22 ` Steve G
2007-06-25 16:07 ` Karl MacMillan
2007-06-25 16:26 ` Steve G
2007-06-25 17:03 ` Stephen Smalley
2007-06-25 17:45 ` Karl MacMillan
2007-06-25 18:37 ` Steve G
2007-06-27 22:56 ` file_contexts & labelling Hasan Rezaul-CHR010
2007-06-28 18:35 ` Joshua Brindle [this message]
2007-06-25 16:44 ` regarding privilege granting 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=4683FF6A.7070409@manicmethod.com \
--to=method@manicmethod.com \
--cc=CHR010@motorola.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.