All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Ivan Gyurdiev <ivg2@cornell.edu>
Cc: SELinux List <SELinux@tycho.nsa.gov>
Subject: Re: Desktop integration
Date: Mon, 06 Mar 2006 12:14:10 -0500	[thread overview]
Message-ID: <440C6DE2.1070705@redhat.com> (raw)
In-Reply-To: <44047CFC.3040009@cornell.edu>

Ivan Gyurdiev wrote:
>
>>>>
>>>> 2. That the only types he can relabel to are customizable.
>>>> For  example user_home_t is not necessarily customizable but a user 
>>>> could change a context to it.
>>>>
>>> I don't understand this one. Why is the user allowed to relabel to a 
>>> non-customizable type.
>>>
>>> Something's wrong with this - it appears to carry a risk that the 
>>> file will be automatically relabeled later, even after the user has 
>>> made an explicit request that it must be labeled user_home_t - that 
>>> certainly seems like a bad thing.
>> Usually the user would be changing a badly labeled file back to 
>> user_home_t in his home directory.  So if a user changes a context to 
>> a customizable type, he might want to later change the context back.   
> Customizable types won't prevent you from changing the context back - 
> they'll just prevent restorecon from changing its type.
>> user_home_t should not be a customizable type, because a user could 
>> create a file in his home dir and then mv it to /var/www/html for 
>> example.  We would not want that context to remain user_home_t.
> Why not? I don't like it when restorecon tries to be extra smart.
> The user should make an explicit request to expose his files to the 
> web (via chcon), rather than  relying on automated relabeling with 
> restorecon, which seems like it should be used for a completely 
> different purpose.
Because the user does not understand.  He creates a cgi script in his 
home directory or /tmp and then mv's it to /var/www/cgi-bin or 
/var/www/html.  In his mind the act of moving it to /var/www/html is the 
act of sharing it.  So
having him figure out that the context should be httpd_sys_content_t is 
just a burden.  Similarly if he moves a local copy of
resolv.conf from his homedir to /etc. and runs restorecon it will not work.


I guess having the list of customizable types plus "Default" would 
work.  Default running or executing the equivalent of restorecon.

Dan

--
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:[~2006-03-06 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 19:00 Desktop integration Ivan Gyurdiev
2006-01-30 19:14 ` Daniel J Walsh
2006-01-30 21:46   ` Ivan Gyurdiev
2006-02-01 13:08   ` Thomas Bleher
2006-02-01 14:00     ` Joshua Brindle
2006-02-28  5:57   ` Ivan Gyurdiev
2006-02-28 11:14     ` Daniel J Walsh
2006-02-28 16:40       ` Ivan Gyurdiev
2006-03-06 17:14         ` Daniel J Walsh [this message]
2006-03-06 21:58           ` Erich Schubert

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=440C6DE2.1070705@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=ivg2@cornell.edu \
    /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.