diff --git a/pam_usb/src/pam.c b/pam_usb/src/pam.c index 943ba40..9ce2dc1 100644 --- a/pam_usb/src/pam.c +++ b/pam_usb/src/pam.c @@ -69,7 +69,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, if (pam_get_item(pamh, PAM_TTY, (const void **)&tty) == PAM_SUCCESS) { - if (!strcmp(tty, "ssh")) + if (tty && !strcmp(tty, "ssh")) { log_debug("SSH Authentication, aborting.\n"); return (0);