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