[X2Go-Commits] libpam-x2go.git - x2gosession (branch) updated: 09706973403a6ae0934f55780ac81159bf8d6200
X2Go dev team
git-admin at x2go.org
Wed Apr 24 18:47:21 CEST 2013
The branch, x2gosession has been updated
via 09706973403a6ae0934f55780ac81159bf8d6200 (commit)
from ec14991fdc6915a88cd213e37ab776b6e28ce738 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
src/pam-freerdp.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
The diff of changes is:
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index a1e2bfa..bf533c4 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -16,45 +16,48 @@ get_item (pam_handle_t * pamh, int type)
/* Check to see if we just have the value. If we do, great
let's dup it some we're consitently allocating memory */
if (type != PAM_TYPE_DOMAIN) {
- char * value;
- if (pam_get_item(pamh, type, (const void **)&value) == PAM_SUCCESS) {
+ char * value = NULL;
+ if (pam_get_item(pamh, type, (const void **)&value) == PAM_SUCCESS && value != NULL) {
return strdup(value);
}
}
/* Now we need to prompt */
/* Build up the message we're prompting for */
- struct pam_message message[1];
- message[0].msg_style = PAM_PROMPT_ECHO_ON;
+ struct pam_message message;
+ const struct pam_message * pmessage = &message;
+
+ message.msg = NULL;
+ message.msg_style = PAM_PROMPT_ECHO_ON;
switch (type) {
case PAM_USER:
- message[0].msg = "login:";
+ message.msg = "login:";
break;
case PAM_RUSER:
- message[0].msg = "remote login:";
+ message.msg = "remote login:";
break;
case PAM_RHOST:
- message[0].msg = "remote host:";
+ message.msg = "remote host:";
break;
case PAM_AUTHTOK:
- message[0].msg = "password:";
- message[0].msg_style = PAM_PROMPT_ECHO_OFF;
+ message.msg = "password:";
+ message.msg_style = PAM_PROMPT_ECHO_OFF;
break;
case PAM_TYPE_DOMAIN:
- message[0].msg = "domain:";
+ message.msg = "domain:";
break;
default:
return NULL;
}
- struct pam_conv * conv;
- if (pam_get_item(pamh, PAM_CONV, (const void **)&conv) != PAM_SUCCESS) {
+ struct pam_conv * conv = NULL;
+ if (pam_get_item(pamh, PAM_CONV, (const void **)&conv) != PAM_SUCCESS || conv == NULL || conv->conv == NULL) {
return NULL;
}
struct pam_response * responses = NULL;
- if (conv->conv(1, (const struct pam_message **)&message, &responses, conv->appdata_ptr) != PAM_SUCCESS) {
+ if (conv->conv(1, &pmessage, &responses, conv->appdata_ptr) != PAM_SUCCESS) {
return NULL;
}
@@ -166,7 +169,7 @@ pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv
#ifdef PAM_STATIC
-struct pam_module _pam_temp_account_modstruct = {
+struct pam_module _pam_freerdp_modstruct = {
"pam-freerdp",
pam_sm_authenticate,
NULL,
hooks/post-receive
--
libpam-x2go.git (Remote login session via X2Go (PAM module))
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libpam-x2go.git" (Remote login session via X2Go (PAM module)).
More information about the x2go-commits
mailing list