/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 Makefile

  • 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:
126
126
        install --mode=u=rw,go=r $^ $@
127
127
confdir/clients.conf: clients.conf keydir/seckey.txt
128
128
        install --directory confdir
129
 
        install --mode=u=rw,g=r $< $@
 
129
        install --mode=u=rw $< $@
130
130
# Add a client password
131
131
        ./mandos-keygen --dir keydir --password >> $@
132
132
 
138
138
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
139
139
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
140
140
                mandos.conf
141
 
        install --mode=u=rw,g=r --target-directory=$(CONFDIR) \
 
141
        install --mode=u=rw --target-directory=$(CONFDIR) \
142
142
                clients.conf
143
143
        install --mode=u=rwx,go=rx init.d-mandos /etc/init.d/mandos
144
144
        install --mode=u=rw,go=r default-mandos /etc/default/mandos
158
158
                $(PREFIX)/lib/mandos/plugins.d
159
159
        if [ "$(CONFDIR)/plugins.d" \
160
160
                        != "$(PREFIX)/lib/mandos/plugins.d" ]; then \
161
 
                        install --directory "$(CONFDIR)/plugins.d"; \
162
 
                fi
 
161
                install --mode=u=rwx \
 
162
                        --directory "$(CONFDIR)/plugins.d"; \
 
163
        fi
163
164
        install --mode=u=rwx,go=rx \
164
165
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
165
166
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
188
189
                > $(MANDIR)/man8/password-prompt.8mandos.gz
189
190
        gzip --best --to-stdout plugins.d/password-request.8mandos \
190
191
                > $(MANDIR)/man8/password-request.8mandos.gz
 
192
# Post-installation stuff
191
193
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
192
194
        update-initramfs -k all -u
193
195
        echo "Now run mandos-keygen --password --dir $(KEYDIR)"
211
213
                $(PREFIX)/lib/mandos/plugin-runner \
212
214
                $(PREFIX)/lib/mandos/plugins.d/password-prompt \
213
215
                $(PREFIX)/lib/mandos/plugins.d/password-request \
 
216
                $(PREFIX)/lib/mandos/plugins.d/usplash \
214
217
                /usr/share/initramfs-tools/hooks/mandos \
215
218
                /usr/share/initramfs-tools/conf-hooks.d/mandos \
 
219
                /usr/share/initramfs-tools/scripts/local-top/mandos \
216
220
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
217
221
                $(MANDIR)/man8/mandos-keygen.8.gz \
218
222
                $(MANDIR)/man8/password-prompt.8mandos.gz \
219
223
                $(MANDIR)/man8/password-request.8mandos.gz
220
224
        -rmdir $(PREFIX)/lib/mandos/plugins.d $(CONFDIR)/plugins.d \
221
 
                 $(PREFIX)/lib/mandos $(CONFDIR)
 
225
                 $(PREFIX)/lib/mandos $(CONFDIR) $(KEYDIR)
222
226
        update-initramfs -k all -u
223
227
 
224
228
purge: purge-server purge-client
225
229
 
226
230
purge-server: uninstall-server
227
231
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
228
 
                /etc/default/mandos /etc/init.d/mandos
 
232
                /etc/default/mandos /etc/init.d/mandos \
 
233
                /var/run/mandos.pid
229
234
        -rmdir $(CONFDIR)
230
235
 
231
236
purge-client: uninstall-client