1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
Description: Debian specific changes
This patch is generated from revision 0.4.1-2.1 of Debian source.
Author: Debian poldi maintainers
Reviewed-By: NIIBE Yutaka
Last-Update: 2013-07-10
Index: poldi-0.4.1/configure.ac
===================================================================
--- poldi-0.4.1.orig/configure.ac 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/configure.ac 2013-07-10 12:22:44.384409856 +0000
@@ -215,7 +215,7 @@
if test "$have_ksba" = "no"; then
AC_MSG_NOTICE([[
***
-*** libksba not found, building with X.509 authentication support.
+*** libksba not found, building without X.509 authentication support.
*** libksba can be retrieved from:
*** URL FIXME
*** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
Index: poldi-0.4.1/MIGRATION
===================================================================
--- poldi-0.4.1.orig/MIGRATION 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/MIGRATION 2013-07-10 12:22:44.372409854 +0000
@@ -51,3 +51,5 @@
- "fake-wait-for-card"
- "require-card-switch"
- "wait-timeout"
+ - "try_pin"
+ - "quiet"
Index: poldi-0.4.1/TODO
===================================================================
--- poldi-0.4.1.orig/TODO 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/TODO 2013-07-10 12:22:44.372409854 +0000
@@ -2,6 +2,9 @@
* allow for Dirmngr to be started on demand (in pipe mode) (NO <- Why?!)
Low priority:
+* allow user to skip card authentication without submitting a wrong
+ PIN to the card, e.g. by entering an empty PIN? Return
+ PAM_CRED_INSUFFICIENT in that case? PAM_AUTHINFO_UNAVAIL? PAM_AUTH_ERR?
* figure out what exactly the dependencies on the OpenPGP smartcard are.
* improve doc
* work on MIGRATION text
Index: poldi-0.4.1/src/scd/scd.c
===================================================================
--- poldi-0.4.1.orig/src/scd/scd.c 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/src/scd/scd.c 2013-07-10 12:22:44.384409856 +0000
@@ -326,7 +326,7 @@
fallback: spawn a new scdaemon. */
const char *pgmname;
- const char *argv[3];
+ const char *argv[6];
int no_close_list[3];
int i;
@@ -352,7 +352,13 @@
argv[0] = pgmname;
argv[1] = "--server";
- argv[2] = NULL;
+ argv[2] = "--options";
+ argv[3] = "/etc/poldi/scdaemon.conf";
+ if (flags & SCD_FLAG_VERBOSE)
+ argv[4] = "-v";
+ else
+ argv[4] = NULL;
+ argv[5] = NULL;
i=0;
@@ -362,7 +368,8 @@
if (log_get_fd () != -1)
no_close_list[i++] = log_get_fd ();
#endif
- no_close_list[i++] = fileno (stderr);
+ if (flags & SCD_FLAG_VERBOSE)
+ no_close_list[i++] = fileno (stderr);
no_close_list[i] = -1;
/* connect to the agent and perform initial handshaking */
Index: poldi-0.4.1/src/pam/auth-support/getpin-cb.c
===================================================================
--- poldi-0.4.1.orig/src/pam/auth-support/getpin-cb.c 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/src/pam/auth-support/getpin-cb.c 2013-07-10 12:22:44.384409856 +0000
@@ -81,9 +81,15 @@
Shouldn't they be done in scdaemon itself? -mo */
if (strlen (buffer) < 6) /* FIXME? is it really minimum of 6 bytes? */
- log_msg_error (ctx->loghandle, _("invalid PIN"));
- else if (!all_digitsp (buffer))
- log_msg_error (ctx->loghandle, _("invalid characters in PIN"));
+ {
+ log_msg_error (ctx->loghandle, _("PIN too short"));
+ conv_tell(ctx->conv, "%s", _("PIN too short"));
+ }
+/* else if (!all_digitsp (buffer)) */
+/* { */
+/* log_msg_error (ctx->loghandle, _("invalid characters in PIN")); */
+/* conv_tell(ctx->conv, "%s", _("invalid characters in PIN")); */
+/* } */
else
break;
}
@@ -235,7 +241,7 @@
err = query_user (ctx, info_frobbed, buf, maxbuf);
else
/* Use string which is more user friendly. */
- err = query_user (ctx, _("||Please enter the PIN"), buf, maxbuf);
+ err = query_user (ctx, _("Please enter the PIN: "), buf, maxbuf);
}
else
{
@@ -254,7 +260,7 @@
if (info_frobbed)
err = keypad_mode_enter (ctx, info_frobbed);
else
- err = keypad_mode_enter (ctx, _("||Please enter the PIN"));
+ err = keypad_mode_enter (ctx, _("Please enter the PIN: "));
}
else
err = gpg_error (GPG_ERR_INV_VALUE); /* FIXME: must signal
Index: poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c
===================================================================
--- poldi-0.4.1.orig/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/src/pam/auth-method-localdb/auth-localdb.c 2013-07-10 12:22:44.384409856 +0000
@@ -128,12 +130,14 @@
if (err)
{
if (ctx->debug)
- log_msg_debug (ctx->loghandle,
- _("Serial number %s is not associated with user %s"),
- ctx->cardinfo.serialno, username);
- conv_tell (ctx->conv,
- _("Serial number %s is not associated with user %s"),
- ctx->cardinfo.serialno, username);
+ {
+ log_msg_debug (ctx->loghandle,
+ _("Serial number %s is not associated with user %s"),
+ ctx->cardinfo.serialno, username);
+ conv_tell (ctx->conv,
+ _("Serial number %s is not associated with user %s"),
+ ctx->cardinfo.serialno, username);
+ }
err = gcry_error (GPG_ERR_INV_NAME);
goto out;
}
Index: poldi-0.4.1/configure
===================================================================
--- poldi-0.4.1.orig/configure 2013-07-10 12:22:44.432409857 +0000
+++ poldi-0.4.1/configure 2013-07-10 12:22:44.380409854 +0000
@@ -9869,14 +9869,14 @@
if test "$have_ksba" = "no"; then
{ echo "$as_me:$LINENO:
***
-*** libksba not found, building with X.509 authentication support.
+*** libksba not found, building without X.509 authentication support.
*** libksba can be retrieved from:
*** URL FIXME
*** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
***" >&5
echo "$as_me:
***
-*** libksba not found, building with X.509 authentication support.
+*** libksba not found, building without X.509 authentication support.
*** libksba can be retrieved from:
*** URL FIXME
*** (at least version $NEED_KSBA_VERSION (API $NEED_KSBA_API) is required).
|