Package: python-pam
Version: 0.4.2-10.1
Severity: normal
Tags: patch
If one of the functions "setcred, acct_mgmt, chauthtok, close_session, putenv"
fails a PAM.error exception is raised with a message only. This way an
application has no chance to find out anything about the reason causing the
failure.
It would be fine if the exception carries the error code returned by the
corresponding pam_* function (see patch below).
--- PAMmodule-org.c 2005-07-13 15:49:59.756643472 +0200
+++ PAMmodule.c 2005-07-13 15:50:49.999005472 +0200
@@ -203,7 +203,7 @@
result = pam_setcred(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
@@ -225,7 +225,7 @@
result = pam_acct_mgmt(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
@@ -247,7 +247,7 @@
result = pam_chauthtok(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
@@ -269,7 +269,7 @@
result = pam_open_session(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
@@ -291,7 +291,7 @@
result = pam_close_session(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
@@ -384,7 +384,7 @@
result = pam_putenv(_self->pamh, val);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err (_self, result);
return NULL;
}
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27abi-0.1
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages python-pam depends on:
ii python 2.3.5-2 An interactive high-level object-o
ii python2.3-pam 0.4.2-10.1 A Python interface to the PAM libr
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]