diff -Nbur gnome-keyring-2.22.0.old/pam/gkr-pam-module.c gnome-keyring-2.22.0/pam/gkr-pam-module.c
--- gnome-keyring-2.22.0.old/pam/gkr-pam-module.c	2008-02-13 22:07:21.000000000 +0100
+++ gnome-keyring-2.22.0/pam/gkr-pam-module.c	2008-03-17 20:39:30.000000000 +0100
@@ -55,7 +55,8 @@
 #include <unistd.h>
 
 enum {
-	ARG_AUTO_START          = 0x0010
+	ARG_AUTO_START          = 0x0010,
+	ARG_ALLOW_ASK_PASSWD    = 0x0020
 };
 
 #define LOGIN_KEYRING		"login"
@@ -740,6 +741,8 @@
 	for (; argc-- > 0; ++argv) {
 		if (strcmp (argv[0], "auto_start") == 0)
 			args |= ARG_AUTO_START;
+		else if (strcmp(argv[0],"allow_ask_password") == 0)
+			args |= ARG_ALLOW_ASK_PASSWD;
 		else
 			syslog (GKR_LOG_WARN, "gkr-pam: invalid option: %s", argv[0]);
 	}
@@ -776,6 +779,22 @@
 	/* Look up the password */
 	ret = pam_get_item (ph, PAM_AUTHTOK, (const void**)&password);
 	if (ret != PAM_SUCCESS || password == NULL) {
+		/* Are we allowed to request passwd ? */
+		if (args & ARG_ALLOW_ASK_PASSWD) {
+			ret = prompt_password (ph);
+			if (ret != PAM_SUCCESS) {
+				syslog (GKR_LOG_ERR, "gkr-pam: couldn't get the password from user: %s", 
+					pam_strerror (ph, ret));
+				return PAM_AUTH_ERR;
+			}
+			ret = pam_get_item (ph, PAM_AUTHTOK, (const void**)&password);
+			if (ret != PAM_SUCCESS || password == NULL) {
+				syslog (GKR_LOG_ERR, "gkr-pam: couldn't get the password from user: %s", 
+					ret == PAM_SUCCESS ? "password was null" : pam_strerror (ph, ret));
+				return PAM_AUTHTOK_RECOVER_ERR;
+			}
+		}
+		else {
 		if (ret == PAM_SUCCESS)
 			syslog (GKR_LOG_WARN, "gkr-pam: no password is available for user");
 		else
@@ -783,6 +802,7 @@
 			        pam_strerror (ph, ret));
 		return PAM_SUCCESS;
 	}
+	}
 
 	started_daemon = 0;
 
