]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
authorDamien Miller <djm@mindrot.org>
Thu, 11 Feb 2010 23:06:28 +0000 (10:06 +1100)
committerDamien Miller <djm@mindrot.org>
Thu, 11 Feb 2010 23:06:28 +0000 (10:06 +1100)
   Use ssh_get_progname to fill __progname

ChangeLog
ssh-pkcs11-client.c
ssh-pkcs11-helper.c
ssh-pkcs11.c

index f56dad3cac5ef5b0e4d3ba865b12585867eb12c5..c5dc752626d5c0847eefdfaadab3dd246da1aa1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index d376153fa7e4555e632b969da17208f1ed2f80b0..37050e04df7c9d541788d097dd06c839f42d1a67 100644 (file)
@@ -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 */
index 464209641fb31c25d1bfc62465cdbbd5b8f8ade4..3b44f7c30cd2fcf2810e20199f36a7b3265343d6 100644 (file)
@@ -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 */
index 2f6c9cec8b0187545e36ed4dd6e51bbc6c130459..821e9f8407d9603e309937486038ebeb63250194 100644 (file)
@@ -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 */