All of lore.kernel.org
 help / color / mirror / Atom feed
* Restorecon script
@ 2005-06-09 14:41 Ivan Gyurdiev
  2005-06-10  2:11 ` Joshua Brindle
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Ivan Gyurdiev @ 2005-06-09 14:41 UTC (permalink / raw)
  To: Daniel J Walsh, SELinux

Any comments on the following script?
It's a profile script, to be shipped with selinux-policy-strict, 
executed per login shell. It hardcodes the applications, 
unfortunately, but does what we want for right now 
(at least a temp. solution, unless someone has a better one?)
Also, user needs to start a login shell to get it to run.

#!/bin/bash

([ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled) || exit

DIRS=" \
/tmp/.ICE-unix \
/tmp/orbit-$USER \
$HOME/.fonts \
$HOME/.fonts/auto \
$HOME/.gnome2 \
$HOME/.gnome2/share/fonts \
$HOME/.gnome2/share/cursor-fonts \
$HOME/.gnome2_private \
$HOME/.mozilla \
$HOME/.evolution \
$HOME/.thunderbird \
"

UNIQUE_DIRS=" \
/tmp/.ICE-unix \
/tmp/orbit-$USER \
$HOME/.fonts \
$HOME/.gnome2 \
$HOME/.gnome2_private \
$HOME/.mozilla \
$HOME/.evolution \
$HOME/.thunderbird \
"

for DIR in $DIRS; do
[ -d $DIR ] || mkdir -p $DIR
done

RESTORED=`/sbin/restorecon -v $UNIQUE_DIRS 2>&1`
if [ ! -z "$RESTORED" ]; then
        /sbin/restorecon -R `echo "$RESTORED" | awk '{ print $3 }'`
fi



--
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.

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2005-06-11 18:35 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-09 14:41 Restorecon script Ivan Gyurdiev
2005-06-10  2:11 ` Joshua Brindle
2005-06-10  2:32   ` Ivan Gyurdiev
2005-06-10 13:52     ` Steve G
2005-06-10 18:04       ` Ivan Gyurdiev
2005-06-10 16:05     ` Joshua Brindle
2005-06-10 16:11       ` Stephen Smalley
2005-06-10 17:44         ` Karl MacMillan
2005-06-10 17:41           ` Stephen Smalley
2005-06-10 18:01             ` Ivan Gyurdiev
2005-06-10 18:06             ` Karl MacMillan
2005-06-10 18:04               ` Stephen Smalley
2005-06-10 18:59                 ` Karl MacMillan
2005-06-10 18:21               ` Ivan Gyurdiev
2005-06-10 19:58                 ` Karl MacMillan
2005-06-10 20:45                   ` Ivan Gyurdiev
2005-06-10 21:05                     ` Karl MacMillan
2005-06-10 21:47                       ` Ivan Gyurdiev
2005-06-11 17:45                         ` Karl MacMillan
2005-06-11 18:35                           ` Ivan Gyurdiev
2005-06-10 20:18                 ` Luke Kenneth Casson Leighton
2005-06-10 20:54                   ` Ivan Gyurdiev
2005-06-10 21:05                   ` Valdis.Kletnieks
2005-06-10 21:42                     ` Luke Kenneth Casson Leighton
2005-06-10 21:03                 ` Joshua Brindle
2005-06-10 21:30                   ` Ivan Gyurdiev
2005-06-11 18:00                     ` Karl MacMillan
2005-06-10 17:58       ` Ivan Gyurdiev
2005-06-10 18:19         ` Karl MacMillan
2005-06-10 18:31           ` Ivan Gyurdiev
2005-06-10 19:45             ` Karl MacMillan
2005-06-10 20:57               ` Ivan Gyurdiev
2005-06-10 21:09                 ` Karl MacMillan
2005-06-10 20:26             ` Luke Kenneth Casson Leighton
2005-06-10 21:57               ` Ivan Gyurdiev
2005-06-10 22:11                 ` Luke Kenneth Casson Leighton
2005-06-10 20:21           ` Luke Kenneth Casson Leighton
2005-06-11  0:09             ` Valdis.Kletnieks
2005-06-11  1:13               ` Casey Schaufler
2005-06-10 15:15 ` Stephen Smalley
2005-06-10 15:38   ` Stephen Smalley
2005-06-10 17:15     ` Ivan Gyurdiev
2005-06-10 17:12   ` Ivan Gyurdiev
2005-06-10 15:18 ` Stephen Smalley
2005-06-10 17:52   ` Ivan Gyurdiev
2005-06-10 20:23     ` Luke Kenneth Casson Leighton
2005-06-10 21:59       ` Ivan Gyurdiev

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.