/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 debian/mandos-client.postinst

  • Committer: Teddy Hogeborn
  • Date: 2016-03-19 04:21:00 UTC
  • Revision ID: teddy@recompile.se-20160319042100-i581cfv65r934dnl
Client: Make plugin helper override directory mode u=rwx,go=

Even though it currently is not used, a local administrator might use
setuid (or setcap) executables as plugin helpers.  Thus, the plugin
helper override directory (/etc/mandos/plugin-helpers) must be
secured, just as the plugin override directory (/etc/mandos/plugins.d)
is.

* Makefile (install-client-nokey): Install plugin-helper directory as
                                   mode u=rwx.
* debian/mandos-client.lintian-overrides: Do not warn about
                               permissions on plugin helper directory.
* debian/mandos-client.postinst (configure): Fix permissions on plugin
  helper local override directory (/etc/mandos/plugin-helpers), but
  only if not listed by "dpkg-statoverride".

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        create_key "$@"
91
91
        create_dh_params "$@" || :
92
92
        update_initramfs "$@"
 
93
        if dpkg --compare-versions "$2" lt-nl "1.7.7-1"; then
 
94
            PLUGINHELPERDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)/mandos/plugin-helpers
 
95
            if ! dpkg-statoverride --list "$PLUGINHELPERDIR" \
 
96
                 >/dev/null 2>&1; then
 
97
                chmod u=rwx,go= -- "$PLUGINHELPERDIR"
 
98
            fi
 
99
            if ! dpkg-statoverride --list /etc/mandos/plugin-helpers \
 
100
                 >/dev/null 2>&1; then
 
101
                chmod u=rwx,go= -- /etc/mandos/plugin-helpers
 
102
            fi
 
103
        fi
93
104
        ;;
94
105
    abort-upgrade|abort-deconfigure|abort-remove)
95
106
        ;;