From e4dc10c8b9808db199f61e6f4ffeaadb3d334f85 Mon Sep 17 00:00:00 2001 From: Jordy Dickinson Date: Mon, 2 Apr 2018 17:40:56 -0400 Subject: [PATCH] Fix problem with PPASSFILE having the literal '${prefix}' prefix --- .gitignore | 3 +++ Makefile.am | 2 ++ configure.ac | 21 ++++++++++++--------- src/pam_panic/config.h.in | 9 --------- src/pam_panic_pw/config.h.in | 6 ------ 5 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 src/pam_panic/config.h.in delete mode 100644 src/pam_panic_pw/config.h.in diff --git a/.gitignore b/.gitignore index 761632a..7ab8f0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,14 @@ *.la *.lo *.o +*~ .deps .libs aclocal.m4 autom4te.cache/ build-aux/ config.h +config.h.in config.log config.status configure @@ -14,3 +16,4 @@ libtool Makefile Makefile.in src/pam_panic_pw/pam_panic_pw +stamp-h1 diff --git a/Makefile.am b/Makefile.am index 68757c4..0a8be1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = -I src + SUBDIRS = src/pam_panic src/pam_panic_pw diff --git a/configure.ac b/configure.ac index 1c28bea..f076b5a 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,7 @@ AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wall]) AC_PREREQ([2.69]) AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADER([src/config.h]) AC_CANONICAL_HOST AC_SUBST(PACKAGE) @@ -13,23 +14,27 @@ AC_PROG_CC AM_PROG_AR AC_PATH_PROG([REBOOT], [reboot]) -AC_SUBST(REBOOT) +AC_DEFINE_UNQUOTED([REBOOT], "$REBOOT", + [path to the reboot command]) AC_PATH_PROG([POWEROFF], [poweroff]) -AC_SUBST(POWEROFF) +AC_DEFINE_UNQUOTED([POWEROFF], "$POWEROFF", + [path to the poweroff command]) AC_PATH_PROG([CRYPTSETUP], [cryptsetup]) -AC_SUBST(CRYPTSETUP) +AC_DEFINE_UNQUOTED([CRYPTSETUP], "$CRYPTSETUP", + [path to the cryptsetup command]) AC_ARG_ENABLE(securedir, AS_HELP_STRING([--enable-securedir=DIR], - [path to location of PAMs @<:@default=$libdir/security@:>@]), + [path to location of PAMs @<:@default=LIBDIR/security@:>@]), SECUREDIR=$enableval, SECUREDIR=$libdir/security) AC_SUBST(SECUREDIR) AC_ARG_ENABLE(ppassfile, AS_HELP_STRING([--enable-ppassfile=FILE], - [path to file to be used for storing passwords @<:@default=$sysconfdir/pam_panic/auth@:>@]), - PPASSFILE=$enableval, PPASSFILE=$sysconfdir/pam_panic/auth) -AC_SUBST(PPASSFILE) + [path to file to be used for storing passwords @<:@default=/etc/pam_panic/auth@:>@]), + PPASSFILE=$enableval, PPASSFILE=/var/lib/pam_panic/auth) +AC_DEFINE_UNQUOTED([PPASSFILE], "$PPASSFILE", + [path to file to be used for storing passwords]) LT_INIT([disable-static]) AC_ENABLE_STATIC([no]) @@ -37,10 +42,8 @@ AC_ENABLE_SHARED([yes]) AC_CONFIG_FILES([ Makefile - src/pam_panic/config.h src/pam_panic/Makefile src/pam_panic/man/Makefile - src/pam_panic_pw/config.h src/pam_panic_pw/Makefile src/pam_panic_pw/man/Makefile ]) diff --git a/src/pam_panic/config.h.in b/src/pam_panic/config.h.in deleted file mode 100644 index 4a888b8..0000000 --- a/src/pam_panic/config.h.in +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef PAM_PANIC_CONFIG_H -#define PAM_PANIC_CONFIG_H - -#define REBOOT "@REBOOT@" -#define POWEROFF "@POWEROFF@" -#define CRYPTSETUP "@CRYPTSETUP@" -#define PPASSFILE "@PPASSFILE@" - -#endif diff --git a/src/pam_panic_pw/config.h.in b/src/pam_panic_pw/config.h.in deleted file mode 100644 index c9bdaaa..0000000 --- a/src/pam_panic_pw/config.h.in +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef PAM_PANIC_PW_CONFIG_H -#define PAM_PANIC_PW_CONFIG_H - -#define PPASSFILE "@PPASSFILE@" - -#endif