From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D56191399E6 for ; Fri, 4 Sep 2015 08:34:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 612019587B; Fri, 4 Sep 2015 08:33:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6D19795856 for ; Fri, 4 Sep 2015 08:33:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3152734099A for ; Fri, 4 Sep 2015 08:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8979B1B0 for ; Fri, 4 Sep 2015 08:33:24 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1283970698.8c73745ca7b76a04976116de9320f75e88654058.ulm@gentoo> Subject: [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-4 commit in: patchsets/pam_skey/1.1.5/ X-VCS-Repository: dev/ulm X-VCS-Files: patchsets/pam_skey/1.1.5/01_all_gentoo.patch X-VCS-Directories: patchsets/pam_skey/1.1.5/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 8c73745ca7b76a04976116de9320f75e88654058 X-VCS-Branch: pam_skey-1.1.5-patches-4 Date: Fri, 4 Sep 2015 08:33:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 252f3493-c539-4cc3-b394-90494ca33df2 X-Archives-Hash: 4a5f9a347cae6ac966d7e1585318e4aa Message-ID: <20150904083324.gkyDClR1JkD_jfeen26X2PYO16cZR47EW08mOcB-LMI@z> commit: 8c73745ca7b76a04976116de9320f75e88654058 Author: Ulrich Müller gentoo org> AuthorDate: Wed Sep 8 18:31:38 2010 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Sep 8 18:31:38 2010 +0000 URL: https://gitweb.gentoo.org/dev/ulm.git/commit/?id=8c73745c Patchset corresponding to pam_skey-1.1.5-gentoo-1.patch.bz2. patchsets/pam_skey/1.1.5/01_all_gentoo.patch | 40 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/patchsets/pam_skey/1.1.5/01_all_gentoo.patch b/patchsets/pam_skey/1.1.5/01_all_gentoo.patch index 117fb94..d9562c8 100644 --- a/patchsets/pam_skey/1.1.5/01_all_gentoo.patch +++ b/patchsets/pam_skey/1.1.5/01_all_gentoo.patch @@ -231,8 +231,9 @@ --- pam_skey-1.1.5/pam_skey.c +++ pam_skey/pam_skey.c @@ -1,5 +1,6 @@ - /* +-/* - * (c) 2001 Dinko Korunic, kreator@srce.hr ++/* + * Rewrite (c) 2005 Dani Church, dani.church@gmail.com + * Original (c) 2001 Dinko Korunic, kreator@srce.hr * @@ -264,7 +265,7 @@ +#define LOGDEBUG(x) if (mod_opt & _MOD_DEBUG) { syslog x ;} +#define QUERY_USERNAME NULL /* Use default username prompt */ +#define QUERY_PASSWORD "Password: " -+#define QUERY_RESPONSE_OR_PASSWORD "S/Key response or system password: " ++#define QUERY_RESPONSE_OR_PASSWORD "S/Key response or password: " +#define QUERY_RESPONSE "S/Key response: " PAM_EXTERN int pam_sm_setcred (pam_handle_t *pamh, int flags, @@ -600,14 +601,15 @@ } /* Get module optional parameters */ -@@ -328,13 +207,13 @@ +@@ -328,13 +207,15 @@ } /* This will talk to user through PAM_CONV */ -static int mod_talk_touser(pam_handle_t *pamh, unsigned *mod_opt, - char *msg_text, char **response) +static int mod_talk_touser(pam_handle_t *pamh, unsigned mod_opt, -+ const char *info_text, const char *prompt_text, int echo_on, char **response) ++ const char *info_text, const char *prompt_text, int echo_on, ++ char **response) { - struct pam_message message; - const struct pam_message *pmessage = &message; @@ -615,10 +617,11 @@ struct pam_conv *conv = NULL; struct pam_response *presponse = NULL; + int i=0; ++ int status; /* Better safe than sorry */ *response = NULL; -@@ -342,26 +221,30 @@ +@@ -342,40 +223,45 @@ /* Be paranoid */ memset(&message, 0, sizeof(message)); @@ -632,7 +635,9 @@ - message.msg = msg_text; + pmessage[0] = &message[0]; + pmessage[1] = &message[1]; -+ + +- /* Do conversation and see if all is OK */ +- if (pam_get_item(pamh, PAM_CONV, (_PAM_CONST void **)&conv) + /* Set info text, if any */ + if (info_text) { + message[i].msg = info_text; @@ -644,9 +649,8 @@ + message[i].msg = prompt_text; + message[i].msg_style = echo_on ? PAM_PROMPT_ECHO_ON : PAM_PROMPT_ECHO_OFF; + i++; - - /* Do conversation and see if all is OK */ -- if (pam_get_item(pamh, PAM_CONV, (_PAM_CONST void **)&conv) ++ ++ /* Get conversation function */ + if (pam_get_item(pamh, PAM_CONV, (const void **)(void *)&conv) != PAM_SUCCESS) { @@ -658,12 +662,20 @@ - - /* Convert into pam_response - only 1 reply expected */ - if (conv->conv(1, _PAM_MSG_CAST &pmessage, &presponse, -+ /* Convert into pam_response */ -+ if (conv->conv(i, (const struct pam_message **)pmessage, &presponse, - conv->appdata_ptr) - != PAM_SUCCESS) +- conv->appdata_ptr) +- != PAM_SUCCESS) ++ /* Do conversation and see if all is OK */ ++ status = conv->conv(i, (const struct pam_message **)pmessage, ++ &presponse, conv->appdata_ptr); ++ if (status != PAM_SUCCESS) { -@@ -372,10 +255,10 @@ +- _pam_delete(presponse->resp); +- return PAM_SERVICE_ERR; ++ if (presponse != NULL) ++ _pam_delete(presponse->resp); ++ return status; + } + if (presponse != NULL) { /* Save address */