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

  • Committer: Teddy Hogeborn
  • Date: 2018-02-22 09:20:19 UTC
  • Revision ID: teddy@recompile.se-20180222092019-ehyz79hzti9dnk2g
Client bug fix: Don't use leak sanitizer with leaking libraries

* Makefile (plugin-helpers/mandos-client): Remove "-fsanitize=leak"
  from CFLAGS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
OPTIMIZE:=-Os -fno-strict-aliasing
41
41
LANGUAGE:=-std=gnu11
42
42
htmldir:=man
43
 
version:=1.7.20
 
43
version:=1.7.18
44
44
SED:=sed
45
45
 
46
46
USER:=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
89
89
 
90
90
# Do not change these two
91
91
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(SANITIZE) $(COVERAGE) \
92
 
        $(OPTIMIZE) $(LANGUAGE) -DVERSION='"$(version)"'
 
92
        $(OPTIMIZE) $(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) \
 
93
        $(GPGME_CFLAGS) -DVERSION='"$(version)"'
93
94
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
94
95
 
95
96
# Commands to format a DocBook <refentry> document into a manual page
256
257
# -fsanitize=leak because GnuTLS and GPGME both leak memory.
257
258
plugins.d/mandos-client: plugins.d/mandos-client.c
258
259
        $(CC) $(filter-out -fsanitize=leak,$(CFLAGS)) $(strip\
259
 
        ) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) $(strip\
260
260
                ) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(strip\
261
261
                ) -lrt $(GNUTLS_LIBS) $(AVAHI_LIBS) $(strip\
262
262
                ) $(GPGME_LIBS) $(LOADLIBES) $(LDLIBS) -o $@
284
284
        ./mandos-ctl --check
285
285
 
286
286
# Run the client with a local config and key
287
 
run-client: all keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem
 
287
run-client: all keydir/seckey.txt keydir/pubkey.txt
288
288
        @echo "###################################################################"
289
289
        @echo "# The following error messages are harmless and can be safely     #"
290
290
        @echo "# ignored:                                                        #"
303
303
        ./plugin-runner --plugin-dir=plugins.d \
304
304
                --plugin-helper-dir=plugin-helpers \
305
305
                --config-file=plugin-runner.conf \
306
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--tls-privkey=keydir/tls-privkey.pem,--tls-pubkey=keydir/tls-pubkey.pem,--network-hook-dir=network-hooks.d \
 
306
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
307
307
                --env-for=mandos-client:GNOME_KEYRING_CONTROL= \
308
308
                $(CLIENTARGS)
309
309
 
310
310
# Used by run-client
311
 
keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem: mandos-keygen
 
311
keydir/seckey.txt keydir/pubkey.txt: mandos-keygen
312
312
        install --directory keydir
313
313
        ./mandos-keygen --dir keydir --force
314
314
 
321
321
confdir/mandos.conf: mandos.conf
322
322
        install --directory confdir
323
323
        install --mode=u=rw,go=r $^ $@
324
 
confdir/clients.conf: clients.conf keydir/seckey.txt keydir/tls-pubkey.pem
 
324
confdir/clients.conf: clients.conf keydir/seckey.txt
325
325
        install --directory confdir
326
326
        install --mode=u=rw $< $@
327
327
# Add a client password
396
396
                "$(CONFDIR)/network-hooks.d"
397
397
        install --mode=u=rwx,go=rx \
398
398
                --target-directory=$(LIBDIR)/mandos plugin-runner
399
 
        install --mode=u=rwx,go=rx \
400
 
                --target-directory=$(LIBDIR)/mandos mandos-to-cryptroot-unlock
401
399
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
402
400
                mandos-keygen
403
401
        install --mode=u=rwx,go=rx \
423
421
                plugin-helpers/mandos-client-iprouteadddel
424
422
        install initramfs-tools-hook \
425
423
                $(INITRAMFSTOOLS)/hooks/mandos
426
 
        install --mode=u=rw,go=r initramfs-tools-conf \
427
 
                $(INITRAMFSTOOLS)/conf.d/mandos-conf
 
424
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
 
425
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
428
426
        install initramfs-tools-script \
429
427
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
430
 
        install initramfs-tools-script-stop \
431
 
                $(INITRAMFSTOOLS)/scripts/local-premount/mandos
432
428
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
433
429
        gzip --best --to-stdout mandos-keygen.8 \
434
430
                > $(MANDIR)/man8/mandos-keygen.8.gz
508
504
        -rmdir $(CONFDIR)
509
505
 
510
506
purge-client: uninstall-client
511
 
        -shred --remove $(KEYDIR)/seckey.txt $(KEYDIR)/tls-privkey.pem
 
507
        -shred --remove $(KEYDIR)/seckey.txt
512
508
        -rm --force $(CONFDIR)/plugin-runner.conf \
513
 
                $(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt \
514
 
                $(KEYDIR)/tls-pubkey.txt $(KEYDIR)/tls-privkey.txt
 
509
                $(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt
515
510
        -rmdir $(KEYDIR) $(CONFDIR)/plugins.d $(CONFDIR)