From 8eaf5570cf011148a0b55c53570df5edaafebdb0 Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Wed, 21 Nov 2018 02:46:02 -0500 Subject: pam_motd: Fix segmentation fault when no motd_dir specified (#76) This fixes a regression introduced by #69, where motd_path was set to NULL and passed into strdup() if the motd_dir argument was not specified in the configuration file. This caused a segmentation fault. * modules/pam_motd/pam_motd.c: fix checks for NULL in arguments * xtests/Makefile.am: add test scripts and config file * xtests/tst-pam_motd.sh: add running tst-pam_motd4.sh * xtests/tst-pam_motd4.pamd: create * xtests/tst-pam_motd4.sh: create --- xtests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xtests/Makefile.am') diff --git a/xtests/Makefile.am b/xtests/Makefile.am index 555d5e33..4d5aba3d 100644 --- a/xtests/Makefile.am +++ b/xtests/Makefile.am @@ -34,8 +34,8 @@ EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh \ tst-pam_time1.pamd time.conf \ tst-pam_motd.sh tst-pam_motd1.sh tst-pam_motd2.sh \ - tst-pam_motd3.sh tst-pam_motd1.pamd \ - tst-pam_motd2.pamd tst-pam_motd3.pamd + tst-pam_motd3.sh tst-pam_motd4.sh tst-pam_motd1.pamd \ + tst-pam_motd2.pamd tst-pam_motd3.pamd tst-pam_motd4.pamd XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \ tst-pam_dispatch4 tst-pam_dispatch5 \ -- cgit v1.2.3