diff options
Diffstat (limited to 'src/pam_unix/pam_unix.c')
-rw-r--r-- | src/pam_unix/pam_unix.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/pam_unix/pam_unix.c b/src/pam_unix/pam_unix.c index 50e305d..c246fd7 100644 --- a/src/pam_unix/pam_unix.c +++ b/src/pam_unix/pam_unix.c @@ -10,15 +10,18 @@ # define MAXHOSTNAMELEN 256 #endif +#define PAM_SM_AUTH +#define PAM_SM_ACCOUNT +#define PAM_PASSWORD #ifndef __linux__ #include <login_cap.h> #endif + #include <security/pam_modules.h> -#include <pam_mod_misc.h> #include <security/pam_appl.h> - +#include <pam_mod_misc.h> PAM_EXTERN int @@ -35,16 +38,19 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, /* identify user */ if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) { + puts("POULOS1"); PAM_LOG("Authenticating as self"); pwd = getspnam(getlogin()); } else { - if ((pam_err = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS) - PAM_LOG("Authenticating with uname %s", user); + if ((pam_err = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS) { + puts("POULOS2"); + PAM_LOG("Authenticating with uname failed"); return (pam_err); + } pwd = getspnam(user); } - + puts("POULOS3"); /* get password */ if (pwd != NULL) { |