diff options
Diffstat (limited to 'pam-ck-connector/test-pam.c')
-rw-r--r-- | pam-ck-connector/test-pam.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pam-ck-connector/test-pam.c b/pam-ck-connector/test-pam.c index b5619b9..310a15f 100644 --- a/pam-ck-connector/test-pam.c +++ b/pam-ck-connector/test-pam.c @@ -24,6 +24,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -31,6 +33,10 @@ #include <security/pam_appl.h> #include <security/pam_misc.h> +#ifdef HAVE_PATHS_H +#include <paths.h> +#endif /* HAVE_PATHS_H */ + #define PAM_MAX_LOGIN_TRIES 3 #define PAM_FAIL_CHECK if (retcode != PAM_SUCCESS) { \ fprintf (stderr, "\n%s\n", pam_strerror (pamh, retcode)); \ @@ -69,7 +75,7 @@ main (int argc, char *argv[]) ttyn = ttyname (0); - if (strncmp(ttyn, "/dev/", 5) == 0) { + if (strncmp (ttyn, _PATH_DEV, 5) == 0) { tty_name = ttyn + 5; } else { tty_name = ttyn; |