aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/pam_unix/pam_unix.c6
-rw-r--r--modules/pam_unix/pam_unix.c~15
2 files changed, 7 insertions, 14 deletions
diff --git a/modules/pam_unix/pam_unix.c b/modules/pam_unix/pam_unix.c
index 2be7e75..ae824f5 100644
--- a/modules/pam_unix/pam_unix.c
+++ b/modules/pam_unix/pam_unix.c
@@ -18,6 +18,7 @@
#ifndef __linux__
#include <login_cap.h> /* for BSD login classes */
+#include <util.h> /* libutil functions */
#else
#include <shadow.h> /* for linux boxes */
#endif
@@ -64,7 +65,6 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
PAM_LOG("Authenticating user: [%s]", user);
- puts("USER GOT");
/* get password */
if (pwd != NULL) {
@@ -73,7 +73,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
if (pass[0] == '\0') {
if (!(flags & PAM_DISALLOW_NULL_AUTHTOK) &&
openpam_get_option(pamh, PAM_OPT_NULLOK)){
- PAM_LOG("User [%s] has empty password. Authentication succesfull.");
+ PAM_LOG("User [%s] has empty password. \
+ Authentication succesfull.", user);
return (PAM_SUCCESS);
}
@@ -124,7 +125,6 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
pam_err = PAM_AUTH_ERR;
} else {
PAM_LOG("Authentication completed succesfully.");
- puts("SUCCESS!");
pam_err = PAM_SUCCESS;
}
diff --git a/modules/pam_unix/pam_unix.c~ b/modules/pam_unix/pam_unix.c~
index 601aa89..79e1131 100644
--- a/modules/pam_unix/pam_unix.c~
+++ b/modules/pam_unix/pam_unix.c~
@@ -64,7 +64,6 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
PAM_LOG("Authenticating user: [%s]", user);
- puts("USER GOT");
/* get password */
if (pwd != NULL) {
@@ -73,22 +72,17 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
if (pass[0] == '\0') {
if (!(flags & PAM_DISALLOW_NULL_AUTHTOK) &&
openpam_get_option(pamh, PAM_OPT_NULLOK)){
- PAM_LOG("User [%s] has empty password. Authentication succesfull.");
+ PAM_LOG("User [%s] has empty password. \
+ Authentication succesfull.", user);
return (PAM_SUCCESS);
}
real_hash = "*";
}
- /*
- * Dummy authentication is something that the freebsd-lib
- * people have implemented. Not sure whether it's needed on
- * Linux -or BSD- but it'll be left as is for compatibiity
- * issues. Need to be checked!
- */
-
+#ifndef __linux__
lc = login_getpwclass(pwd);
-
+#endif
} else {
PAM_LOG("Doing dummy authentication.");
real_hash = "*";
@@ -130,7 +124,6 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
pam_err = PAM_AUTH_ERR;
} else {
PAM_LOG("Authentication completed succesfully.");
- puts("SUCCESS!");
pam_err = PAM_SUCCESS;
}