/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-09-05 23:39:07 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080905233907-3rz7kuwyjwma0pjx
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
  (install-server): Set mode of "/etc/mandos/clients.conf" to
                             "u=rw".
  (install-client): Set mode of "/etc/mandos/plugins.d" to "u=rwx".
  (uninstall-client): Also remove "/usr/lib/mandos/plugins.d/usplash",
                "/usr/share/initramfs-tools/scripts/local-top/mandos",
                      and "/etc/keys/mandos".
  (purge-server): Also remove "/var/run/mandos.pid".

* initramfs-tools-hook: Use "install" instead of "mkdir".  Change
                        owner of "/lib/mandos/plugins.d" and key
                        files.  Bug fix: do not repair permissions of
                        "/lib/mandos/plugins.d".  Bug fix: Really
                        avoid deliberately unreadable files and/or
                        directories.

* mandos-keygen (umask): Changed to "077".

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
fi
53
53
 
54
54
mandos_user="`{ getent passwd mandos \
55
 
                || getent passwd nobody \
56
 
                || echo ::65534::::; } \
57
 
        | awk --field-separator=: '{ print $3 }'`" 
 
55
        || getent passwd nobody \
 
56
        || echo ::65534::::; } | awk -F: '{ print $3 }'`" 
58
57
mandos_group="`{ getent group mandos \
59
 
                || getent group nogroup \
60
 
                || echo ::65534:; } \
61
 
        | awk --field-separator=: '{ print $3 }'`"
 
58
        || getent group nogroup \
 
59
        || echo ::65534:; } | awk -F: '{ print $3 }'`"
62
60
 
63
61
# The Mandos network client uses the network
64
62
auto_add_modules net
106
104
done
107
105
 
108
106
# GPGME needs /usr/bin/gpg
109
 
if [ ! -e "${DESTDIR}/usr/bin/gpg" \
110
 
    -a -n "`ls \"${DESTDIR}\"/usr/lib/libgpgme.so* \
111
 
                2>/dev/null`" ]; then
 
107
if ! [ -e "${DESTDIR}/usr/bin/gpg" ] \
 
108
    && [ -n "`ls \"${DESTDIR}\"/usr/lib/libgpgme.so* 2>/dev/null`" ]; then
112
109
    copy_exec /usr/bin/gpg
113
110
fi
114
111
 
157
154
    fi
158
155
done
159
156
for dir in /lib /usr/lib; do
160
 
    find "${DESTDIR}$dir" \! -perm -u+rw,g+r -prune -or -print0 \
 
157
    find "${DESTDIR}$dir" \! -perm -u+rw,g+r -prune -o -print0 \
161
158
        | xargs --null --no-run-if-empty chmod a+rX
162
159
done