lib: Update pam_wrapper to 1.0.4
authorAndreas Schneider <asn@samba.org>
Mon, 15 May 2017 15:25:27 +0000 (17:25 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 May 2017 21:02:09 +0000 (23:02 +0200)
* Fix build on OpenBSD
* Fix a resource leak

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/pam_wrapper/pam_wrapper.c
lib/pam_wrapper/wscript

index d1ae07582d89e00d477dec32d291f5c0ca92a484..4be81460a5b02939e6af2cab6484f3c109b6765b 100644 (file)
@@ -513,12 +513,14 @@ static void libpam_pam_vsyslog(const pam_handle_t *pamh,
                               const char *fmt,
                               va_list args)
 {
+#ifdef HAVE_PAM_VSYSLOG
        pwrap_bind_symbol_libpam(pam_vsyslog);
 
        pwrap.libpam.symbols._libpam_pam_vsyslog.f(pamh,
                                                   priority,
                                                   fmt,
                                                   args);
+#endif
 }
 
 /*********************************************************
@@ -551,7 +553,8 @@ static int p_copy(const char *src, const char *dst, const char *pdir, mode_t mod
        if (mode == 0) {
                rc = fstat(srcfd, &sb);
                if (rc != 0) {
-                       return -1;
+                       rc = -1;
+                       goto out;
                }
                mode = sb.st_mode;
        }
index aacd1d76149fec137d06f4984fa2499f8105aace..cfd8b4f9baf778c42ab7509c20dc474963d482a8 100644 (file)
@@ -2,7 +2,7 @@
 
 import os
 
-VERSION="1.0.3"
+VERSION="1.0.4"
 
 def find_library(library_names, lookup_paths):
     for directory in lookup_paths: