diff options
author | Damien Miller <djm@mindrot.org> | 2010-02-12 10:06:28 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-02-12 10:06:28 +1100 |
commit | dfa4156dbd4aa45464b2ea6b867bcaa483bed134 (patch) | |
tree | 394b46c6292cf1b8cdc598c160a29fc4f755e1cc | |
parent | 8ad0fbd98e5ffd98c25f88881981336508ae90d7 (diff) | |
download | openssh-git-dfa4156dbd4aa45464b2ea6b867bcaa483bed134.tar.gz |
- (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
Use ssh_get_progname to fill __progname
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | ssh-pkcs11-client.c | 4 | ||||
-rw-r--r-- | ssh-pkcs11-helper.c | 15 | ||||
-rw-r--r-- | ssh-pkcs11.c | 4 |
4 files changed, 25 insertions, 0 deletions
@@ -42,6 +42,8 @@ Remove obsolete smartcard support - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c] Make it compile on OSX + - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c] + Use ssh_get_progname to fill __progname 20100210 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c index d376153f..37050e04 100644 --- a/ssh-pkcs11-client.c +++ b/ssh-pkcs11-client.c @@ -16,6 +16,8 @@ #include "includes.h" +#ifdef ENABLE_PKCS11 + #include <sys/types.h> #ifdef HAVE_SYS_TIME_H # include <sys/time.h> @@ -231,3 +233,5 @@ pkcs11_del_provider(char *name) buffer_free(&msg); return (ret); } + +#endif /* ENABLE_PKCS11 */ 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 */ diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index 2f6c9cec..821e9f84 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c @@ -16,6 +16,8 @@ #include "includes.h" +#ifdef ENABLE_PKCS11 + #include <sys/types.h> #ifdef HAVE_SYS_TIME_H # include <sys/time.h> @@ -548,3 +550,5 @@ fail: dlclose(handle); return (-1); } + +#endif /* ENABLE_PKCS11 */ |