/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 at recompile
  • Date: 2020-11-29 22:54:26 UTC
  • mto: This revision was merged to the branch mainline in revision 402.
  • Revision ID: teddy@recompile.se-20201129225426-6ud4hwj36zo67igi
Fix flaky test in password-agent

The test_send_password_to_socket_EMSGSIZE function should not use a
hard-coded constant to trigger an EMSGSIZE error from send().

* dracut-module/password-agent.c (send_password_to_socket): Only save
  errno from send() if it returned < 0.  Show strerror(errno) if
  send() does return EMSGSIZE.  Show number of bytes sent if send()
  sends less than all bytes.
  (test_send_password_to_socket_EMSGSIZE): Do not skip this test on
  non-AMD64 platforms.  Try to find a suitable message size to trigger
  EMSGSIZE before testing send_password_to_socket(), and only skip
  this test if such a triggering message size is not found.

Reported-By: Simon McVittie <smcv@debian.org>
Closes: #975457

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
# For info about _FORTIFY_SOURCE, see feature_test_macros(7)
31
31
# and <https://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>.
32
 
FORTIFY:=-D_FORTIFY_SOURCE=3 -fstack-protector-all -fPIC
 
32
FORTIFY:=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
33
33
LINK_FORTIFY_LD:=-z relro -z now
34
34
LINK_FORTIFY:=
35
35
 
43
43
LANGUAGE:=-std=gnu11
44
44
FEATURES:=-D_FILE_OFFSET_BITS=64
45
45
htmldir:=man
46
 
version:=1.8.15
 
46
version:=1.8.12
47
47
SED:=sed
48
48
PKG_CONFIG?=pkg-config
49
49
 
96
96
GNUTLS_LIBS:=$(shell $(PKG_CONFIG) --libs gnutls)
97
97
AVAHI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I avahi-core)
98
98
AVAHI_LIBS:=$(shell $(PKG_CONFIG) --libs avahi-core)
99
 
GPGME_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I gpgme 2>/dev/null \
100
 
        || gpgme-config --cflags; getconf LFS_CFLAGS)
101
 
GPGME_LIBS:=$(shell $(PKG_CONFIG) --libs gpgme 2>/dev/null \
102
 
        || gpgme-config --libs; getconf LFS_LIBS; \
 
99
GPGME_CFLAGS:=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
 
100
GPGME_LIBS:=$(shell gpgme-config --libs; getconf LFS_LIBS; \
103
101
        getconf LFS_LDFLAGS)
104
102
LIBNL3_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I libnl-route-3.0)
105
103
LIBNL3_LIBS:=$(shell $(PKG_CONFIG) --libs libnl-route-3.0)
298
296
 
299
297
# Need to add the GLib and pthread libraries
300
298
dracut-module/password-agent: CFLAGS += $(GLIB_CFLAGS)
301
 
# Note: -lpthread is unnecessary with the GNU C library 2.34 or later
302
299
dracut-module/password-agent: LDLIBS += $(GLIB_LIBS) -lpthread
303
300
 
304
301
.PHONY: clean