/mandos/trunk

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

« back to all changes in this revision

Viewing changes to initramfs-tools-hook

  • Committer: Teddy Hogeborn
  • Date: 2008-12-29 02:44:54 UTC
  • Revision ID: teddy@fukt.bsnet.se-20081229024454-nbsei556dwy5azr1
* mandos (Client.timeout, Client.interval): Changed from being a
                                            property to be a normal
                                            attribute.
  (Client._timeout, Client._interval): Removed.
  (Client._timeout_milliseconds): Changed from being an attribute to
                                  be a method "timeout_milliseconds".
                                  All users changed.
  (Client._interval_milliseconds): Changed from being an attribute to
                                   be method "interval_milliseconds".
                                   All users changed.
  (Client.__init__): Take additional "use_dbus" keyword argument.
                     Only provide D-Bus interface if "use_dbus" is
                     True.
  (Client.use_dbus): New attribute.
  (Client.dbus_object_path): Changed to only be set if "self.use_dbus"
                             is True.
  (Client.enable, Client.disable, Client.checker_callback,
  Client.bump_timeout, Client.start_checker, Client.stop_checker):
  Only emit D-Bus signals if "self.use_dbus".
  (Client.SetChecker, Client.SetHost, Client.Enable): Bug fix: Emit
                                                      D-Bus signals.
  (Client.SetInterval, Client.SetTimeout): Changed to emit D-Bus
                                           signals.

  (main): Remove deprecated "default" keyword argument to "--check"
          option.  Added new "--no-dbus" option.  Added corresponding
          "use_dbus" server configuration option.  Only provide D-Bus
          interface and emit D-Bus signals if "use_dbus".  Pass
          "use_dbus" on to Client constructor.

* mandos-options.xml ([@id="dbus"]): New option.

* mandos.conf (use_dbus): New option.

* mandos.conf.xml (OPTIONS): New option "use_dbus".
  (EXAMPLE): - '' -

* mandos.xml (SYNOPSIS): New option "--no-dbus".
  (D-BUS INTERFACE): New section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
                || getent passwd mandos \
56
56
                || getent passwd nobody \
57
57
                || echo ::65534::::; } \
58
 
        | cut --delimiter=: --fields=3 --only-delimited`"
 
58
        | awk --field-separator=: '{ print $3 }'`" 
59
59
mandos_group="`{ getent group _mandos \
60
60
                || getent group mandos \
61
61
                || getent group nogroup \
62
62
                || echo ::65534:; } \
63
 
        | cut --delimiter=: --fields=3 --only-delimited`"
 
63
        | awk --field-separator=: '{ print $3 }'`"
64
64
 
65
65
# The Mandos network client uses the network
66
66
auto_add_modules net
92
92
    fi
93
93
    case "$base" in
94
94
        *~|.*|\#*\#|*.dpkg-old|*.dpkg-bak|*.dpkg-new|*.dpkg-divert) : ;;
95
 
        "*") : ;;
96
 
        *) copy_exec "$file" "${PLUGINDIR}" ;;
 
95
        "*") :;;
 
96
        *) copy_exec "$file" "${PLUGINDIR}";;
97
97
    esac
98
98
done
99
99
 
102
102
    base="`basename \"$file\"`"
103
103
    case "$base" in
104
104
        *~|.*|\#*\#|*.dpkg-old|*.dpkg-bak|*.dpkg-new|*.dpkg-divert) : ;;
105
 
        "*") : ;;
106
 
        *) copy_exec "$file" "${PLUGINDIR}" ;;
 
105
        "*") :;;
 
106
        *) copy_exec "$file" "${PLUGINDIR}";;
107
107
    esac
108
108
done
109
109
 
124
124
 
125
125
if [ ${mandos_user} != 65534 ]; then
126
126
    PLUGINRUNNERCONF="${DESTDIR}${CONFDIR}/plugin-runner.conf"
127
 
    cat <<-EOF >> "$PLUGINRUNNERCONF"
128
 
        
129
 
        --userid=${mandos_user}
130
 
EOF
 
127
    echo "--userid=${mandos_user}" >> "$PLUGINRUNNERCONF"
131
128
fi
132
129
 
133
130
if [ ${mandos_group} != 65534 ]; then
134
131
    PLUGINRUNNERCONF="${DESTDIR}${CONFDIR}/plugin-runner.conf"
135
 
    cat <<-EOF >> "$PLUGINRUNNERCONF"
136
 
        
137
 
        --groupid=${mandos_group}
138
 
EOF
 
132
    echo "--groupid=${mandos_group}" >> "$PLUGINRUNNERCONF"
139
133
fi
140
134
 
141
135
# Key files 
142
 
for file in "$keydir"/*; do
 
136
for file in  "$keydir"/*; do
143
137
    if [ -d "$file" ]; then
144
138
        continue
145
139
    fi
174
168
        chmod a+rX "${DESTDIR}$dir"
175
169
    fi
176
170
done
177
 
for dir in "${DESTDIR}"/lib* "${DESTDIR}"/usr/lib*; do
178
 
    if [ -d "$dir" ]; then
179
 
        find "$dir" \! -perm -u+rw,g+r -prune -or -print0 \
180
 
            | xargs --null --no-run-if-empty chmod a+rX
181
 
    fi
 
171
for dir in /lib /usr/lib; do
 
172
    find "${DESTDIR}$dir" \! -perm -u+rw,g+r -prune -or -print0 \
 
173
        | xargs --null --no-run-if-empty chmod a+rX
182
174
done