summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--ssh-pkcs11-client.c4
-rw-r--r--ssh-pkcs11-helper.c15
-rw-r--r--ssh-pkcs11.c4
4 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f56dad3ca..c5dc75262 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,8 @@
42 Remove obsolete smartcard support 42 Remove obsolete smartcard support
43 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c] 43 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
44 Make it compile on OSX 44 Make it compile on OSX
45 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
46 Use ssh_get_progname to fill __progname
45 47
4620100210 4820100210
47 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for 49 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index d376153fa..37050e04d 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -16,6 +16,8 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19#ifdef ENABLE_PKCS11
20
19#include <sys/types.h> 21#include <sys/types.h>
20#ifdef HAVE_SYS_TIME_H 22#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h> 23# include <sys/time.h>
@@ -231,3 +233,5 @@ pkcs11_del_provider(char *name)
231 buffer_free(&msg); 233 buffer_free(&msg);
232 return (ret); 234 return (ret);
233} 235}
236
237#endif /* ENABLE_PKCS11 */
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index 464209641..3b44f7c30 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -16,6 +16,8 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19#ifdef ENABLE_PKCS11
20
19#include <sys/types.h> 21#include <sys/types.h>
20#ifdef HAVE_SYS_TIME_H 22#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h> 23# include <sys/time.h>
@@ -277,6 +279,8 @@ main(int argc, char **argv)
277 extern char *optarg; 279 extern char *optarg;
278 extern char *__progname; 280 extern char *__progname;
279 281
282 __progname = ssh_get_progname(argv[0]);
283
280 log_init(__progname, log_level, log_facility, log_stderr); 284 log_init(__progname, log_level, log_facility, log_stderr);
281 285
282 in = STDIN_FILENO; 286 in = STDIN_FILENO;
@@ -352,3 +356,14 @@ main(int argc, char **argv)
352 process(); 356 process();
353 } 357 }
354} 358}
359#else /* ENABLE_PKCS11 */
360int
361main(int argc, char **argv)
362{
363 extern char *__progname;
364
365 __progname = ssh_get_progname(argv[0]);
366 log_init(__progname, SYSLOG_LEVEL_ERROR, SYSLOG_FACILITY_AUTH, 0);
367 fatal("PKCS#11 support disabled at compile time");
368}
369#endif /* ENABLE_PKCS11 */
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 2f6c9cec8..821e9f840 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -16,6 +16,8 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19#ifdef ENABLE_PKCS11
20
19#include <sys/types.h> 21#include <sys/types.h>
20#ifdef HAVE_SYS_TIME_H 22#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h> 23# include <sys/time.h>
@@ -548,3 +550,5 @@ fail:
548 dlclose(handle); 550 dlclose(handle);
549 return (-1); 551 return (-1);
550} 552}
553
554#endif /* ENABLE_PKCS11 */