summaryrefslogtreecommitdiff
path: root/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
authordjm <djm>2010-02-11 23:06:28 +0000
committerdjm <djm>2010-02-11 23:06:28 +0000
commit42c4532433ec3927667388732b592c99fb03501c (patch)
tree70a742f6eda2c2d69846fc31fa25364bf2c0f5ce /ssh-pkcs11-helper.c
parent2f1d060075330bf1cf7baa929914ff3439e46578 (diff)
downloadopenssh-42c4532433ec3927667388732b592c99fb03501c.tar.gz
- (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
Use ssh_get_progname to fill __progname
Diffstat (limited to 'ssh-pkcs11-helper.c')
-rw-r--r--ssh-pkcs11-helper.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index 46420964..3b44f7c3 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -16,6 +16,8 @@
#include "includes.h"
+#ifdef ENABLE_PKCS11
+
#include <sys/types.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@ -277,6 +279,8 @@ main(int argc, char **argv)
extern char *optarg;
extern char *__progname;
+ __progname = ssh_get_progname(argv[0]);
+
log_init(__progname, log_level, log_facility, log_stderr);
in = STDIN_FILENO;
@@ -352,3 +356,14 @@ main(int argc, char **argv)
process();
}
}
+#else /* ENABLE_PKCS11 */
+int
+main(int argc, char **argv)
+{
+ extern char *__progname;
+
+ __progname = ssh_get_progname(argv[0]);
+ log_init(__progname, SYSLOG_LEVEL_ERROR, SYSLOG_FACILITY_AUTH, 0);
+ fatal("PKCS#11 support disabled at compile time");
+}
+#endif /* ENABLE_PKCS11 */