Description: define PATH_MAX for compatibility when it's not already set Some platforms, such as the Hurd, don't set PATH_MAX. Set a reasonable default value in this case. Authors: Steve Langasek , Svante Signell Bug-Debian: http://bugs.debian.org/ Index: pam-1.5.3/libpam/include/path_max.h =================================================================== --- /dev/null +++ pam-1.5.3/libpam/include/path_max.h @@ -0,0 +1,7 @@ +/* + * Define PATH_MAX if not available + */ + +#ifndef PAH_MAX +#define PATH_MAX 4096 +#endif Index: pam-1.5.3/tests/tst-dlopen.c =================================================================== --- pam-1.5.3.orig/tests/tst-dlopen.c +++ pam-1.5.3/tests/tst-dlopen.c @@ -16,6 +16,9 @@ #include #include +/* Hurd compatibility */ +#include "path_max.h" + /* Simple program to see if dlopen() would succeed. */ int main(int argc, char **argv) { Index: pam-1.5.3/modules/pam_debug/tst-pam_debug-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_debug/tst-pam_debug-retval.c +++ pam-1.5.3/modules/pam_debug/tst-pam_debug-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_debug" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_deny/tst-pam_deny-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_deny/tst-pam_deny-retval.c +++ pam-1.5.3/modules/pam_deny/tst-pam_deny-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_deny" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_echo/tst-pam_echo-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_echo/tst-pam_echo-retval.c +++ pam-1.5.3/modules/pam_echo/tst-pam_echo-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_echo" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_faildelay/tst-pam_faildelay-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_faildelay/tst-pam_faildelay-retval.c +++ pam-1.5.3/modules/pam_faildelay/tst-pam_faildelay-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_faildelay" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_localuser/tst-pam_localuser-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_localuser/tst-pam_localuser-retval.c +++ pam-1.5.3/modules/pam_localuser/tst-pam_localuser-retval.c @@ -12,6 +12,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_localuser" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c +++ pam-1.5.3/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c @@ -14,6 +14,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_mkhomedir" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_nologin/tst-pam_nologin-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_nologin/tst-pam_nologin-retval.c +++ pam-1.5.3/modules/pam_nologin/tst-pam_nologin-retval.c @@ -12,6 +12,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_nologin" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_permit/tst-pam_permit-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_permit/tst-pam_permit-retval.c +++ pam-1.5.3/modules/pam_permit/tst-pam_permit-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_permit" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_rootok/tst-pam_rootok-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_rootok/tst-pam_rootok-retval.c +++ pam-1.5.3/modules/pam_rootok/tst-pam_rootok-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_rootok" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_warn/tst-pam_warn-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_warn/tst-pam_warn-retval.c +++ pam-1.5.3/modules/pam_warn/tst-pam_warn-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_warn" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_pwhistory/opasswd.c =================================================================== --- pam-1.5.3.orig/modules/pam_pwhistory/opasswd.c +++ pam-1.5.3/modules/pam_pwhistory/opasswd.c @@ -71,6 +71,7 @@ #include "pam_inline.h" #include "opasswd.h" +#include "path_max.h" #ifndef RANDOM_DEVICE #define RANDOM_DEVICE "/dev/urandom" Index: pam-1.5.3/modules/pam_env/tst-pam_env-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_env/tst-pam_env-retval.c +++ pam-1.5.3/modules/pam_env/tst-pam_env-retval.c @@ -16,6 +16,7 @@ #include #include #include +#include #define MODULE_NAME "pam_env" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_faillock/tst-pam_faillock-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_faillock/tst-pam_faillock-retval.c +++ pam-1.5.3/modules/pam_faillock/tst-pam_faillock-retval.c @@ -9,6 +9,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_faillock" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_pwhistory/tst-pam_pwhistory-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_pwhistory/tst-pam_pwhistory-retval.c +++ pam-1.5.3/modules/pam_pwhistory/tst-pam_pwhistory-retval.c @@ -11,6 +11,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_pwhistory" #define TEST_NAME "tst-" MODULE_NAME "-retval" Index: pam-1.5.3/modules/pam_time/tst-pam_time-retval.c =================================================================== --- pam-1.5.3.orig/modules/pam_time/tst-pam_time-retval.c +++ pam-1.5.3/modules/pam_time/tst-pam_time-retval.c @@ -12,6 +12,7 @@ #include #include #include +#include "path_max.h" #define MODULE_NAME "pam_time" #define TEST_NAME "tst-" MODULE_NAME "-retval"