From ea095a480d07f1b8380e9c8a2170a6f016b70720 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 19 Sep 2012 15:26:04 -0500 Subject: Adding in coverage build flags --- src/Makefile.am | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index e5b04b2..962ef29 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,14 +8,16 @@ pam_freerdp_la_SOURCES = \ pam_freerdp_la_LDFLAGS = \ -no-undefined \ -module \ - -avoid-version + -avoid-version \ + $(COVERAGE_LDFLAGS) pam_freerdp_la_LIBADD = \ -lpam pam_freerdp_la_CFLAGS = \ -Wall -Werror \ - -DAUTH_CHECK="\"$(pkglibexecdir)/freerdp-auth-check\"" + -DAUTH_CHECK="\"$(pkglibexecdir)/freerdp-auth-check\"" \ + $(COVERAGE_CFLAGS) pkglibexec_PROGRAMS = \ freerdp-auth-check @@ -23,6 +25,9 @@ pkglibexec_PROGRAMS = \ freerdp_auth_check_SOURCES = \ freerdp-auth-check.c freerdp_auth_check_CFLAGS = \ - $(FREERDP_CFLAGS) + $(FREERDP_CFLAGS) \ + $(COVERAGE_CFLAGS) freerdp_auth_check_LDADD = \ $(FREERDP_LIBS) +freerdp_auth_check_LDFLAGS = \ + $(COVERAGE_LDFLAGS) -- cgit v1.2.3 From 2c7ecf16c1df5de36e1dad477489a5d30133f1b0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 19 Sep 2012 16:42:55 -0500 Subject: Set everything up so that the auth check binary can be different in the tests --- src/Makefile.am | 18 ++++++++++++++---- src/auth-check-path.c | 3 +++ src/auth-check-path.h | 1 + src/pam-freerdp.c | 4 +++- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 src/auth-check-path.c create mode 100644 src/auth-check-path.h (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 962ef29..0fafb8a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ pamlibdir = $(PAMMODULEDIR) pamlib_LTLIBRARIES = pam_freerdp.la pam_freerdp_la_SOURCES = \ - pam-freerdp.c + auth-check-path.c auth-check-path.h pam_freerdp_la_LDFLAGS = \ -no-undefined \ @@ -11,14 +11,24 @@ pam_freerdp_la_LDFLAGS = \ -avoid-version \ $(COVERAGE_LDFLAGS) -pam_freerdp_la_LIBADD = \ - -lpam - pam_freerdp_la_CFLAGS = \ -Wall -Werror \ -DAUTH_CHECK="\"$(pkglibexecdir)/freerdp-auth-check\"" \ $(COVERAGE_CFLAGS) +noinst_LTLIBRARIES = \ + libfreerdpcore.la + +libfreerdpcore_la_SOURCES = \ + pam-freerdp.c +libfreerdpcore_la_CFLAGS = \ + -Wall -Werror \ + $(COVERAGE_CFLAGS) +libfreerdpcore_la_LIBADD = \ + -lpam +libfreerdpcore_la_LDFLAGS = \ + $(COVERAGE_LDFLAGS) + pkglibexec_PROGRAMS = \ freerdp-auth-check diff --git a/src/auth-check-path.c b/src/auth-check-path.c new file mode 100644 index 0000000..db311ea --- /dev/null +++ b/src/auth-check-path.c @@ -0,0 +1,3 @@ + +const char * auth_check_path = AUTH_CHECK; + diff --git a/src/auth-check-path.h b/src/auth-check-path.h new file mode 100644 index 0000000..82deca2 --- /dev/null +++ b/src/auth-check-path.h @@ -0,0 +1 @@ +extern const char * auth_check_path; diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c index ebc98af..4891846 100644 --- a/src/pam-freerdp.c +++ b/src/pam-freerdp.c @@ -34,6 +34,8 @@ #include #include +#include "auth-check-path.h" + #define PAM_TYPE_DOMAIN 1234 #define ALL_GOOD_SIGNAL "Ar, ready to authenticate cap'n" @@ -226,7 +228,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) char * args[5]; - args[0] = AUTH_CHECK; + args[0] = (char *)auth_check_path; args[1] = rhost; args[2] = ruser; args[3] = rdomain; -- cgit v1.2.3