/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to initramfs-tools-hook

* network-hooks.d/bridge: Use "/usr/sbin/brctl" explicitly.
* plugins.d/mandos-client.c (run_network_hooks): Raise priviliges in
                                                 child process.
  (main): Do not use getuid() to check if running setuid root.  Do not
          raise privileges for run_network_hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
    esac
108
108
done
109
109
 
110
 
# Get DEVICE from initramfs.conf and other files
111
 
. /etc/initramfs-tools/initramfs.conf
112
 
for conf in /etc/initramfs-tools/conf.d/*; do
113
 
    if [ -n `basename \"$conf\" | grep '^[[:alnum:]][[:alnum:]\._-]*$' \
114
 
        | grep -v '\.dpkg-.*$'` ]; then
115
 
        [ -f ${conf} ] && . ${conf}
116
 
    fi
117
 
done
118
 
export DEVICE
119
 
 
120
110
# Copy network hooks
121
111
for hook in /etc/mandos/network-hooks.d/*; do
122
112
    case "`basename \"$hook\"`" in
128
118
        # Copy any files needed by the network hook
129
119
        MANDOSNETHOOKDIR=/etc/mandos/network-hooks.d MODE=files \
130
120
            VERBOSITY=0 "$hook" files | while read file target; do
131
 
            if [ ! -e "${file}" ]; then
132
 
                echo "WARNING: file ${file} not found, requested by Mandos network hook '${hook##*/}'" >&2
133
 
            fi
134
121
            if [ -z "${target}" ]; then
135
122
                copy_exec "$file"
136
123
            else