Revision 23192,
1.2 KB
checked in by rbasch, 16 years ago
(diff) |
Add new gconfd-2 wrapper script package to ensure that newly-created
.gconf and .gconfd directories are made private.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | # Wrapper script for gconfd-2 to create the gconf and gconfd |
---|
4 | # directories in an AFS home directory and make them private. |
---|
5 | |
---|
6 | # We parse this file to find the gconf directory to use in the |
---|
7 | # home directory. |
---|
8 | gconf_config=/usr/share/debathena-gconf2-config/gconf.afs |
---|
9 | |
---|
10 | gconfd_dir=".gconfd" |
---|
11 | |
---|
12 | # Create the given directory name as a subdirectory of $HOME, if it |
---|
13 | # does not yet exist, and set its ACL so as to make it private. |
---|
14 | create_private_dir () { |
---|
15 | dir="$HOME/$1" |
---|
16 | if [ ! -e "$dir" ]; then |
---|
17 | mkdir -m 700 "$dir" 2>/dev/null && \ |
---|
18 | fs sa "$dir" system:anyuser none > /dev/null 2>&1 |
---|
19 | fi |
---|
20 | } |
---|
21 | |
---|
22 | # Only create directories when the home directory is in AFS. |
---|
23 | if [ "$DEBATHENA_HOME_TYPE" = afs ]; then |
---|
24 | # Use the Debathena gconf config file to determine the name of the |
---|
25 | # gconf directory to use. |
---|
26 | gconf_dir= |
---|
27 | if [ -f "$gconf_config" ]; then |
---|
28 | gconf_dir=`sed -n -e 's|^xml:readwrite:$(HOME)/\(.*$\)|\1|p' \ |
---|
29 | "$gconf_config"` |
---|
30 | fi |
---|
31 | # If we cannot determine the gconf directory name; fall back to |
---|
32 | # .gconf. |
---|
33 | if [ -z "$gconf_dir" ]; then |
---|
34 | gconf_dir=".gconf" |
---|
35 | fi |
---|
36 | # Create the directories as needed. |
---|
37 | create_private_dir "$gconf_dir" |
---|
38 | create_private_dir "$gconfd_dir" |
---|
39 | fi |
---|
40 | |
---|
41 | exec /usr/lib/libgconf2-4/gconfd-2.debathena-orig "$@" |
---|
Note: See
TracBrowser
for help on using the repository browser.