rpms/pam_ssh/devel pam_ssh-1.92-prompt.patch,1.1,1.2
Dmitry Butskoy
buc at fedoraproject.org
Thu Mar 26 15:00:30 UTC 2009
Author: buc
Update of /cvs/extras/rpms/pam_ssh/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16961
Modified Files:
pam_ssh-1.92-prompt.patch
Log Message:
Always use standard "Password:" prompt for the first password's inquire
in a PAM chain (#492153)
pam_ssh-1.92-prompt.patch:
Index: pam_ssh-1.92-prompt.patch
===================================================================
RCS file: /cvs/extras/rpms/pam_ssh/devel/pam_ssh-1.92-prompt.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pam_ssh-1.92-prompt.patch 26 Mar 2009 14:34:35 -0000 1.1
+++ pam_ssh-1.92-prompt.patch 26 Mar 2009 15:00:30 -0000 1.2
@@ -1,12 +1,26 @@
-diff -Nrbu pam_ssh-1.92/pam_ssh.c pam_ssh-1.92-OK/pam_ssh.c
---- pam_ssh-1.92/pam_ssh.c 2009-03-26 17:24:20.000000000 +0300
-+++ pam_ssh-1.92-OK/pam_ssh.c 2009-03-26 17:23:48.000000000 +0300
-@@ -102,7 +102,7 @@
- #endif
+diff -Nrbu pam_ssh-1.92/pam_get_pass.c pam_ssh-1.92-OK/pam_get_pass.c
+--- pam_ssh-1.92/pam_get_pass.c 2004-02-19 21:59:05.000000000 +0300
++++ pam_ssh-1.92-OK/pam_get_pass.c 2009-03-26 17:52:57.000000000 +0300
+@@ -80,13 +80,20 @@
+ const void *item = NULL;
- #define MODULE_NAME "pam_ssh"
--#define NEED_PASSPHRASE "SSH passphrase: "
-+#define NEED_PASSPHRASE "Password: "
- #define DEF_KEYFILES "id_dsa,id_rsa,identity"
- #define ENV_PID_SUFFIX "_AGENT_PID"
- #define ENV_SOCKET_SUFFIX "_AUTH_SOCK"
+ /*
+- * Grab the already-entered password if we might want to use it.
++ * Grab the already-entered password.
+ */
++ retval = pam_get_item(pamh, PAM_AUTHTOK, &item);
++ /*
++ * Always use standard prompt for the first time.
++ */
++ if (item == NULL)
++ prompt = "Password: ";
+ if (pam_test_option(options, PAM_OPT_TRY_FIRST_PASS, NULL) ||
+ pam_test_option(options, PAM_OPT_USE_FIRST_PASS, NULL)) {
+- retval = pam_get_item(pamh, PAM_AUTHTOK, &item);
+ if (retval != PAM_SUCCESS)
+ return retval;
++ } else {
++ item = NULL; /* Need own password. */
+ }
+
+ if (item == NULL) {
More information about the fedora-extras-commits
mailing list