public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/ulm:master commit in: patchsets/pam_skey/1.1.5/
Date: Fri,  4 Sep 2015 08:29:49 +0000 (UTC)	[thread overview]
Message-ID: <1283970698.8c73745ca7b76a04976116de9320f75e88654058.ulm@gentoo> (raw)
Message-ID: <20150904082949.mRomfhodhmKxKeTcYFMixHTUinwLxVa-TZTGSUc2wNg@z> (raw)

commit:     8c73745ca7b76a04976116de9320f75e88654058
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  8 18:31:38 2010 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> 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 */


             reply	other threads:[~2015-09-04  8:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04  8:33 Ulrich Müller [this message]
2015-09-04  8:29 ` [gentoo-commits] dev/ulm:master commit in: patchsets/pam_skey/1.1.5/ Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:motif-2.3.4-patches-1 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:openmotif-2.2.3-patches-4 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:openmotif-2.2.3-patches-5 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-2 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-3 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-4 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-5 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-6 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:skey-1.1.5-patches-1 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:skey-1.1.5-patches-3 " Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2015-09-04  8:33 Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:skey-1.1.5-patches-2 " Ulrich Müller
2015-09-04  8:33 [gentoo-commits] dev/ulm:pam_skey-1.1.5-patches-6 " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:skey-1.1.5-patches-2 " Ulrich Müller
2015-09-04  8:29 [gentoo-commits] dev/ulm:master " Ulrich Müller
2015-09-04  8:33 ` [gentoo-commits] dev/ulm:skey-1.1.5-patches-2 " Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283970698.8c73745ca7b76a04976116de9320f75e88654058.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox