components/pam_pkcs11/patches/04-message_error_fix.patch
author Ivo Raisr <ivo.raisr@oracle.com>
Sat, 26 Nov 2016 14:44:47 -0800
branchs11u3-sru
changeset 7455 cefc5b17cc4b
permissions -rw-r--r--
24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit 24897765 err_display_time and quiet options are placed incorrectly in pam_pkcs11.conf 24790022 Fix spelling and grammar errors in pam_pkcs11.c messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7455
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     1
#
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     2
# This patch is to fix one spelling error and some message problems in PAM
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     3
# prompt, so that they will comply to the Solaris message style.
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     4
# 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     5
# The authentication spelling error has been already fixed in the latest
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     6
# upstream source, so there is no need to contribute back this spelling error
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     7
# fix. We will remove the spelling error change from this patch, when we 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     8
# upgrade this module to a new release that contains the spelling error fix.
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     9
#
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    10
# Changes from smartcard to "smart card" in pam_prompt messages are for
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    11
# Solaris message style compliance and they are Solaris specific. 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    12
#
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    13
--- pam_pkcs11-0.6.8_ORIG/src/pam_pkcs11/pam_pkcs11.c	Tue Oct  4 12:22:18 2016
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    14
+++ pam_pkcs11-0.6.8_NEW/src/pam_pkcs11/pam_pkcs11.c	Thu Oct 27 15:56:06 2016
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    15
@@ -199,7 +199,7 @@
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    16
   char **issuer, **serial;
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    17
   const char *login_token_name = NULL;
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    18
 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    19
-  pam_prompt(pamh, PAM_TEXT_INFO , NULL, _("Smartcard authentification starts"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    20
+  pam_prompt(pamh, PAM_TEXT_INFO , NULL, _("Smart card authentication starts"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    21
 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    22
   /* first of all check whether debugging should be enabled */
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    23
   for (i = 0; i < argc; i++)
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    24
@@ -392,7 +392,7 @@
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    25
       }
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    26
     } else if (user) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    27
 		if (!configuration->quiet) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    28
-			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2308: No smartcard found"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    29
+			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2308: No smart card found"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    30
 			sleep(configuration->err_display_time);
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    31
 		}
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    32
 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    33
@@ -419,7 +419,7 @@
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    34
       if (rv != 0) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    35
         /* user gave us a user id and no smart card go to next module */
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    36
 		if (!configuration->quiet) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    37
-			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2310: No smartcard found"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    38
+			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2310: No smart card found"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    39
 			sleep(configuration->err_display_time);
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    40
 		}
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    41
 
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    42
@@ -495,7 +495,7 @@
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    43
 			pam_syslog(pamh, LOG_ERR,
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    44
 					"password length is zero but the 'nullok' argument was not defined.");
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    45
 			if (!configuration->quiet) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    46
-				pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2318: Empty smartcard PIN not allowed."));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    47
+				pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2318: Empty smart card PIN not allowed."));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    48
 				sleep(configuration->err_display_time);
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    49
 			}
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    50
 			return PAM_AUTH_ERR;
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    51
@@ -523,7 +523,7 @@
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    52
       ERR1("open_pkcs11_login() failed: %s", get_error());
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    53
 		if (!configuration->quiet) {
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    54
 			pam_syslog(pamh, LOG_ERR, "open_pkcs11_login() failed: %s", get_error());
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    55
-			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2320: Wrong smartcard PIN"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    56
+			pam_prompt(pamh, PAM_ERROR_MSG , NULL, _("Error 2320: Wrong smart card PIN"));
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    57
 			sleep(configuration->err_display_time);
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    58
 		}
cefc5b17cc4b 24766235 Change to build PAM_PKCS11 with the pcsclite=yes option for 32 bit
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    59
       goto auth_failed_nopw;