summaryrefslogtreecommitdiff
path: root/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-02-12 10:06:28 +1100
committerDamien Miller <djm@mindrot.org>2010-02-12 10:06:28 +1100
commitdfa4156dbd4aa45464b2ea6b867bcaa483bed134 (patch)
tree394b46c6292cf1b8cdc598c160a29fc4f755e1cc /ssh-pkcs11-helper.c
parent8ad0fbd98e5ffd98c25f88881981336508ae90d7 (diff)
- (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 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 */