summaryrefslogtreecommitdiff
path: root/modules/pam_securetty/pam_securetty.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-04-28 10:10:08 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-04-28 10:10:08 +0000
commitea951fdc8682146f7f03216a7839441678d45657 (patch)
tree1c270ce5309d39976c61297109b31212bb43a562 /modules/pam_securetty/pam_securetty.c
parentaa8e2399ead6c8e87c3fd878fcb4f0f1d008abf7 (diff)
build: rework vendordir substitution
Since Make.xml.rules is the only place where XSLTPROC_CUSTOM was used, remove stereotypic definitions from other Makefiles, this way we no longer have to worry about vendordir being used somewhere else in documentation files. Likewise, define VENDORDIR in config.h and remove stereotypic -DVENDORDIR= additions from other Makefiles, this way we no longer have to worry about VENDORDIR being used somewhere else in the code. * configure.ac (AM_CONDITIONAL): Remove HAVE_VENDORDIR. (AC_DEFINE_UNQUOTED): Add VENDORDIR. (AC_SUBST): Remove VENDORDIR, add STRINGPARAM_VENDORDIR. * Make.xml.rules.in: Replace $(XSLTPROC_CUSTOM) with @STRINGPARAM_VENDORDIR@. * doc/man/Makefile.am (XSLTPROC_CUSTOM): Remove. * libpam/Makefile.am [HAVE_VENDORDIR]: Remove. * modules/pam_securetty/Makefile.am [HAVE_VENDORDIR]: Remove. (XSLTPROC_CUSTOM): Remove. * modules/pam_securetty/pam_securetty.c: Move definitions of local macros after config.h to benefit from macros defined there.
Diffstat (limited to 'modules/pam_securetty/pam_securetty.c')
-rw-r--r--modules/pam_securetty/pam_securetty.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
index 51249a9c..e594fb6a 100644
--- a/modules/pam_securetty/pam_securetty.c
+++ b/modules/pam_securetty/pam_securetty.c
@@ -1,13 +1,5 @@
/* pam_securetty module */
-#define SECURETTY_FILE "/etc/securetty"
-#ifdef VENDORDIR
-#define SECURETTY2_FILE VENDORDIR"/securetty"
-#endif
-#define TTY_PREFIX "/dev/"
-#define CMDLINE_FILE "/proc/cmdline"
-#define CONSOLEACTIVE_FILE "/sys/class/tty/console/active"
-
/*
* by Elliot Lee <sopwith@redhat.com>, Red Hat Software.
* July 25, 1996.
@@ -48,6 +40,14 @@
#define PAM_DEBUG_ARG 0x0001
#define PAM_NOCONSOLE_ARG 0x0002
+#define SECURETTY_FILE "/etc/securetty"
+#ifdef VENDORDIR
+#define SECURETTY2_FILE VENDORDIR"/securetty"
+#endif
+#define TTY_PREFIX "/dev/"
+#define CMDLINE_FILE "/proc/cmdline"
+#define CONSOLEACTIVE_FILE "/sys/class/tty/console/active"
+
static int
_pam_parse (const pam_handle_t *pamh, int argc, const char **argv)
{