/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
1
WARN=-O -Wall -Wformat=2 -Winit-self -Wmissing-include-dirs \
2
	-Wswitch-default -Wswitch-enum -Wunused-parameter \
3
	-Wstrict-aliasing=2 -Wextra -Wfloat-equal -Wundef -Wshadow \
4
	-Wunsafe-loop-optimizations -Wpointer-arith \
5
	-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings \
6
	-Wconversion -Wstrict-prototypes -Wold-style-definition \
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
7
	-Wpacked -Wnested-externs -Winline -Wvolatile-register-var
8
#	-Wunreachable-code 
9
#DEBUG=-ggdb3
28 by Teddy Hogeborn
* server.conf: New file.
10
# For info about _FORTIFY_SOURCE, see
11
# <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>
223 by Teddy Hogeborn
* .bzrignore (plugins.d/askpass-fifo): Added.
12
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all
24.1.90 by Björn Påhlsson
fixed two bugs:
13
#COVERAGE=--coverage
24.1.51 by Björn Påhlsson
Added configuration files support for mandos-client
14
OPTIMIZE=-Os
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
15
LANGUAGE=-std=gnu99
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
16
htmldir=man
17
version=1.0
18
SED=sed
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
19
20
## Use these settings for a traditional /usr/local install
21
# PREFIX=$(DESTDIR)/usr/local
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
22
# CONFDIR=$(DESTDIR)/etc/mandos
23
# KEYDIR=$(DESTDIR)/etc/mandos/keys
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
24
# MANDIR=$(PREFIX)/man
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
25
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
26
##
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
27
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
28
## These settings are for a package-type install
96 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR, MANDIR): Use $(DESTDIR).
29
PREFIX=$(DESTDIR)/usr
30
CONFDIR=$(DESTDIR)/etc/mandos
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
31
KEYDIR=$(DESTDIR)/etc/keys/mandos
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
32
MANDIR=$(PREFIX)/share/man
33
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
34
##
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
35
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
36
GNUTLS_CFLAGS=$(shell libgnutls-config --cflags)
37
GNUTLS_LIBS=$(shell libgnutls-config --libs)
38
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
39
AVAHI_LIBS=$(shell pkg-config --libs avahi-core)
40
GPGME_CFLAGS=$(shell gpgme-config --cflags)
41
GPGME_LIBS=$(shell gpgme-config --libs)
42
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
43
# Do not change these two
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
44
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
45
	$(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
46
	-DVERSION='"$(version)"'
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
47
LDFLAGS=$(COVERAGE)
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
48
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
49
# Commands to format a DocBook <refentry> document into a manual page
105 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Only cd to one directory.
50
DOCBOOKTOMAN=cd $(dir $<); xsltproc --nonet --xinclude \
62 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Do not generate AUTHORS section.
51
	--param man.charmap.use.subset		0 \
52
	--param make.year.ranges		1 \
53
	--param make.single.year.ranges		1 \
54
	--param man.output.quietly		1 \
84 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Use the local manpages/docbook.xsl file, do
55
	--param man.authors.section.enabled	0 \
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
56
	 /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
57
	$(notdir $<); \
58
	$(MANPOST) $(notdir $@)
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
59
# DocBook-to-man post-processing to fix a '\n' escape bug
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
60
MANPOST=$(SED) --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
61
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
62
DOCBOOKTOHTML=xsltproc --nonet --xinclude \
63
	--param make.year.ranges		1 \
64
	--param make.single.year.ranges		1 \
65
	--param man.output.quietly		1 \
66
	--param man.authors.section.enabled	0 \
67
	--param citerefentry.link		1 \
68
	--output $@ \
69
	/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
70
	$<; $(HTMLPOST) $@
71
# Fix citerefentry links
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
72
HTMLPOST=$(SED) --in-place --expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
73
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
74
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
75
	plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
76
CPROGS=plugin-runner $(PLUGINS)
77
PROGS=mandos mandos-keygen $(CPROGS)
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
78
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
79
	plugins.d/mandos-client.8mandos \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
80
	plugins.d/password-prompt.8mandos mandos.conf.5 \
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
81
	plugins.d/usplash.8mandos plugins.d/splashy.8mandos \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
82
	plugins.d/askpass-fifo.8mandos mandos-clients.conf.5
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
83
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
84
htmldocs=$(addsuffix .xhtml,$(DOCS))
85
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
86
objects=$(addsuffix .o,$(CPROGS))
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
87
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
88
all: $(PROGS)
89
90
doc: $(DOCS)
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
91
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
92
html: $(htmldocs)
93
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
94
%.5: %.xml common.ent legalnotice.xml
95
	$(DOCBOOKTOMAN)
96
%.5.xhtml: %.xml common.ent legalnotice.xml
97
	$(DOCBOOKTOHTML)
98
99
%.8: %.xml common.ent legalnotice.xml
100
	$(DOCBOOKTOMAN)
101
%.8.xhtml: %.xml common.ent legalnotice.xml
102
	$(DOCBOOKTOHTML)
103
104
%.8mandos: %.xml common.ent legalnotice.xml
105
	$(DOCBOOKTOMAN)
106
%.8mandos.xhtml: %.xml common.ent legalnotice.xml
107
	$(DOCBOOKTOHTML)
108
109
mandos.8: mandos.xml common.ent mandos-options.xml overview.xml \
110
		legalnotice.xml
111
	$(DOCBOOKTOMAN)
112
mandos.8.xhtml: mandos.xml common.ent mandos-options.xml \
113
		overview.xml legalnotice.xml
114
	$(DOCBOOKTOHTML)
115
116
mandos-keygen.8: mandos-keygen.xml common.ent overview.xml \
117
		legalnotice.xml
118
	$(DOCBOOKTOMAN)
119
mandos-keygen.8.xhtml: mandos-keygen.xml common.ent overview.xml \
120
		 legalnotice.xml
121
	$(DOCBOOKTOHTML)
122
123
mandos.conf.5: mandos.conf.xml common.ent mandos-options.xml \
124
		legalnotice.xml
125
	$(DOCBOOKTOMAN)
126
mandos.conf.5.xhtml: mandos.conf.xml common.ent mandos-options.xml \
127
		legalnotice.xml
128
	$(DOCBOOKTOHTML)
129
130
plugin-runner.8mandos: plugin-runner.xml common.ent overview.xml \
131
		legalnotice.xml
132
	$(DOCBOOKTOMAN)
133
plugin-runner.8mandos.xhtml: plugin-runner.xml common.ent \
134
		overview.xml legalnotice.xml
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
135
	$(DOCBOOKTOHTML)
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
136
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
137
plugins.d/mandos-client.8mandos: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
138
					common.ent \
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
139
					mandos-options.xml \
140
					overview.xml legalnotice.xml
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
141
	$(DOCBOOKTOMAN)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
142
plugins.d/mandos-client.8mandos.xhtml: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
143
					common.ent \
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
144
					mandos-options.xml \
145
					overview.xml legalnotice.xml
146
	$(DOCBOOKTOHTML)
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
147
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
148
# Update all these files with version number $(version)
149
common.ent: Makefile
150
	$(SED) --in-place --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' $@
151
152
mandos: Makefile
223 by Teddy Hogeborn
* .bzrignore (plugins.d/askpass-fifo): Added.
153
	$(SED) --in-place --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' $@
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
154
155
mandos-keygen: Makefile
223 by Teddy Hogeborn
* .bzrignore (plugins.d/askpass-fifo): Added.
156
	$(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' $@
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
157
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
158
plugins.d/mandos-client: plugins.d/mandos-client.o
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
159
	$(LINK.o) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) \
160
		$(COMMON) $^ $(LOADLIBES) $(LDLIBS) -o $@
161
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
162
.PHONY : all doc html clean distclean run-client run-server install \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
163
	install-server install-client uninstall uninstall-server \
164
	uninstall-client purge purge-server purge-client
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
165
1 by Björn Påhlsson
First working version with: IPv6, GnuTLS, X.509 certificates, DN
166
clean:
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
167
	-rm --force $(CPROGS) $(objects) $(htmldocs) $(DOCS) core
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
168
169
distclean: clean
170
mostlyclean: clean
171
maintainer-clean: clean
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
172
	-rm --force --recursive keydir confdir
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
173
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
174
check:	all
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
175
	./mandos --check
176
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
177
# Run the client with a local config and key
159 by Teddy Hogeborn
* Makefile (run-client): Do not depend on the key ring files.
178
run-client: all keydir/seckey.txt keydir/pubkey.txt
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
179
	./plugin-runner --plugin-dir=plugins.d \
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
180
		--config-file=plugin-runner.conf \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
181
		--options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
182
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
183
# Used by run-client
184
keydir/seckey.txt keydir/pubkey.txt: mandos-keygen
185
	install --directory keydir
186
	./mandos-keygen --dir keydir --force
187
188
# Run the server with a local config
189
run-server: confdir/mandos.conf confdir/clients.conf
190
	./mandos --debug --configdir=confdir
191
192
# Used by run-server
193
confdir/mandos.conf: mandos.conf
194
	install --directory confdir
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
195
	install --mode=u=rw,go=r $^ $@
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
196
confdir/clients.conf: clients.conf keydir/seckey.txt
197
	install --directory confdir
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
198
	install --mode=u=rw $< $@
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
199
# Add a client password
200
	./mandos-keygen --dir keydir --password >> $@
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
201
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
202
install: install-server install-client-nokey
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
203
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
204
install-html: $(htmldocs)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
205
	install --directory $(htmldir)
206
	install --mode=u=rw,go=r --target-directory=$(htmldir) \
207
		$(htmldocs)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
208
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
209
install-server: doc
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
210
	install --directory $(CONFDIR)
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
211
	install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
212
	install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
213
		mandos.conf
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
214
	install --mode=u=rw --target-directory=$(CONFDIR) \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
215
		clients.conf
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
216
	install --mode=u=rwx,go=rx init.d-mandos \
217
		$(DESTDIR)/etc/init.d/mandos
218
	install --mode=u=rw,go=r default-mandos \
219
		$(DESTDIR)/etc/default/mandos
200 by Teddy Hogeborn
* Makefile: Put the init script before avahi-daemon.
220
	if [ -z $(DESTDIR) ]; then \
221
		update-rc.d mandos defaults 25 15;\
222
	fi
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
223
	gzip --best --to-stdout mandos.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
224
		> $(MANDIR)/man8/mandos.8.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
225
	gzip --best --to-stdout mandos.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
226
		> $(MANDIR)/man5/mandos.conf.5.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
227
	gzip --best --to-stdout mandos-clients.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
228
		> $(MANDIR)/man5/mandos-clients.conf.5.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
229
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
230
install-client-nokey: all doc
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
231
	install --directory $(PREFIX)/lib/mandos $(CONFDIR)
232
	install --directory --mode=u=rwx $(KEYDIR) \
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
233
		$(PREFIX)/lib/mandos/plugins.d
170 by Teddy Hogeborn
* Makefile (install-client): Add "/etc/plugins.d/README".
234
	if [ "$(CONFDIR)" != "$(PREFIX)/lib/mandos" ]; then \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
235
		install --mode=u=rwx \
199 by Teddy Hogeborn
* Makefile: Bug fix: fix syntax error.
236
			--directory "$(CONFDIR)/plugins.d"; \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
237
	fi
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
238
	install --mode=u=rwx,go=rx \
239
		--target-directory=$(PREFIX)/lib/mandos plugin-runner
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
240
	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
241
		mandos-keygen
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
242
	install --mode=u=rwx,go=rx \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
243
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
244
		plugins.d/password-prompt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
245
	install --mode=u=rwxs,go=rx \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
246
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
247
		plugins.d/mandos-client
208 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/usplash".
248
	install --mode=u=rwxs,go=rx \
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
249
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
250
		plugins.d/usplash
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
251
	install --mode=u=rwxs,go=rx \
252
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
253
		plugins.d/splashy
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
254
	install --mode=u=rwxs,go=rx \
255
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
256
		plugins.d/askpass-fifo
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
257
	install initramfs-tools-hook \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
258
		$(INITRAMFSTOOLS)/hooks/mandos
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
259
	install --mode=u=rw,go=r initramfs-tools-hook-conf \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
260
		$(INITRAMFSTOOLS)/conf-hooks.d/mandos
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
261
	install initramfs-tools-script \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
262
		$(INITRAMFSTOOLS)/scripts/local-top/mandos
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
263
	install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
264
	gzip --best --to-stdout mandos-keygen.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
265
		> $(MANDIR)/man8/mandos-keygen.8.gz
266
	gzip --best --to-stdout plugin-runner.8mandos \
267
		> $(MANDIR)/man8/plugin-runner.8mandos.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
268
	gzip --best --to-stdout plugins.d/password-prompt.8mandos \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
269
		> $(MANDIR)/man8/password-prompt.8mandos.gz
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
270
	gzip --best --to-stdout plugins.d/mandos-client.8mandos \
271
		> $(MANDIR)/man8/mandos-client.8mandos.gz
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
272
	gzip --best --to-stdout plugins.d/usplash.8mandos \
273
		> $(MANDIR)/man8/usplash.8mandos.gz
274
	gzip --best --to-stdout plugins.d/splashy.8mandos \
275
		> $(MANDIR)/man8/splashy.8mandos.gz
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
276
	gzip --best --to-stdout plugins.d/askpass-fifo.8mandos \
277
		> $(MANDIR)/man8/askpass-fifo.8mandos.gz
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
278
279
install-client: install-client-nokey
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
280
# Post-installation stuff
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
281
	-$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
282
	update-initramfs -k all -u
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
283
	echo "Now run mandos-keygen --password --dir $(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
284
285
uninstall: uninstall-server uninstall-client
286
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
287
uninstall-server:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
288
	-rm --force $(PREFIX)/sbin/mandos \
289
		$(MANDIR)/man8/mandos.8.gz \
290
		$(MANDIR)/man5/mandos.conf.5.gz \
291
		$(MANDIR)/man5/mandos-clients.conf.5.gz
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
292
	update-rc.d -f mandos remove
163 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): Removed.
293
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
294
295
uninstall-client:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
296
# Refuse to uninstall client if /etc/crypttab is explicitly configured
297
# to use it.
298
	! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
299
		$(DESTDIR)/etc/crypttab
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
300
	-rm --force $(PREFIX)/sbin/mandos-keygen \
301
		$(PREFIX)/lib/mandos/plugin-runner \
302
		$(PREFIX)/lib/mandos/plugins.d/password-prompt \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
303
		$(PREFIX)/lib/mandos/plugins.d/mandos-client \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
304
		$(PREFIX)/lib/mandos/plugins.d/usplash \
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
305
		$(PREFIX)/lib/mandos/plugins.d/splashy \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
306
		$(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
307
		$(INITRAMFSTOOLS)/hooks/mandos \
308
		$(INITRAMFSTOOLS)/conf-hooks.d/mandos \
309
		$(INITRAMFSTOOLS)/scripts/local-top/mandos \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
310
		$(MANDIR)/man8/plugin-runner.8mandos.gz \
311
		$(MANDIR)/man8/mandos-keygen.8.gz \
312
		$(MANDIR)/man8/password-prompt.8mandos.gz \
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
313
		$(MANDIR)/man8/usplash.8mandos.gz \
314
		$(MANDIR)/man8/splashy.8mandos.gz \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
315
		$(MANDIR)/man8/askpass-fifo.8mandos.gz \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
316
		$(MANDIR)/man8/mandos-client.8mandos.gz
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
317
	-rmdir $(PREFIX)/lib/mandos/plugins.d $(CONFDIR)/plugins.d \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
318
		 $(PREFIX)/lib/mandos $(CONFDIR) $(KEYDIR)
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
319
	update-initramfs -k all -u
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
320
321
purge: purge-server purge-client
322
323
purge-server: uninstall-server
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
324
	-rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
325
		$(DESTDIR)/etc/default/mandos \
326
		$(DESTDIR)/etc/init.d/mandos \
327
		$(DESTDIR)/var/run/mandos.pid
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
328
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
329
330
purge-client: uninstall-client
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
331
	-shred --remove $(KEYDIR)/seckey.txt
161 by Teddy Hogeborn
* Makefile (purge-client): Also remove "plugin-runner.conf".
332
	-rm --force $(CONFDIR)/plugin-runner.conf \
333
		$(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
334
	-rmdir $(KEYDIR) $(CONFDIR)/plugins.d $(CONFDIR)