Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package open-isns for openSUSE:Factory 
checked in at 2021-02-04 20:22:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/open-isns (Old)
 and      /work/SRC/openSUSE:Factory/.open-isns.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "open-isns"

Thu Feb  4 20:22:42 2021 rev:16 rq:868452 version:0.101

Changes:
--------
--- /work/SRC/openSUSE:Factory/open-isns/open-isns.changes      2020-12-13 
17:29:18.104322894 +0100
+++ /work/SRC/openSUSE:Factory/.open-isns.new.28504/open-isns.changes   
2021-02-04 20:23:28.094770909 +0100
@@ -1,0 +2,22 @@
+Mon Feb 01 18:23:30 UTC 2021 - [email protected]
+
+- Update to version 0.101:
+  * Updated ChangeLog for version v0.101
+  * Preparing for version 0.101
+  * Fix parsing of GetNextRsp
+  * Added TODO to test "isnsd --init"
+  * Add man page for isnssetup.
+  * Fix broken server authentication initialization.
+  * Update version string to "0.100".
+  * Added a TODO: 'make depend' not worrking
+  * libisns: remove sighold and sigrelse
+  * fix compilation without deprecated OpenSSL APIs
+  * socket.c: include poll.h instead of sys/poll.h for POSIX compatibility
+  * Fix 586 compile issue and remove -Werror
+  * Do not ignore write() return value.
+  * Fix compiler issue when not in security mode
+  * Ignore common build files
+  This removed the need for open-isns-updates.diff.bz2 (for now), since
+  those commits are in version v0.101.
+
+-------------------------------------------------------------------

Old:
----
  open-isns-0.100.tar.xz
  open-isns-updates.diff.bz2

New:
----
  open-isns-0.101.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ open-isns.spec ++++++
--- /var/tmp/diff_new_pack.iA5oHs/_old  2021-02-04 20:23:28.810771999 +0100
+++ /var/tmp/diff_new_pack.iA5oHs/_new  2021-02-04 20:23:28.814772004 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package open-isns
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,10 +20,9 @@
 Summary:        Partial Implementation of iSNS iSCSI registration
 License:        LGPL-2.1-or-later
 Group:          System/Kernel
-Version:        0.100
+Version:        0.101
 Release:        0
 Source:         %{name}-%{version}.tar.xz
-Patch1:         %{name}-updates.diff.bz2
 URL:            https://github.com/open-iscsi/%{name}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  autoconf
@@ -57,7 +56,6 @@
 
 %prep
 %setup -n %{name}-%{version}
-%patch1 -p1
 
 %build
 %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects

++++++ _service ++++++
--- /var/tmp/diff_new_pack.iA5oHs/_old  2021-02-04 20:23:28.850772059 +0100
+++ /var/tmp/diff_new_pack.iA5oHs/_new  2021-02-04 20:23:28.850772059 +0100
@@ -4,8 +4,8 @@
     <param name="url">https://github.com/open-iscsi/open-isns.git</param>
     <param name="subdir"></param>
     <param name="filename">open-isns</param>
-    <param name="versionformat">0.100</param>
-    <param name="revision">v0.100</param>
+    <param name="versionformat">0.101</param>
+    <param name="revision">v0.101</param>
     <param name="changesgenerate">enable</param>
   </service>
   <service name="recompress" mode="disabled">

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.iA5oHs/_old  2021-02-04 20:23:28.870772090 +0100
+++ /var/tmp/diff_new_pack.iA5oHs/_new  2021-02-04 20:23:28.874772096 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/open-iscsi/open-isns.git</param>
-              <param 
name="changesrevision">0ad95d07e4d272fed2af2c614b37c6e64c8945b2</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">0d86dc31fae2e2d77a082ccea5aba95426b40c3c</param></service></servicedata>
\ No newline at end of file

++++++ open-isns-0.100.tar.xz -> open-isns-0.101.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/ChangeLog 
new/open-isns-0.101/ChangeLog
--- old/open-isns-0.100/ChangeLog       2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/ChangeLog       2021-02-01 18:27:33.000000000 +0100
@@ -1,3 +1,28 @@
+* Changes v0.100 to v0.101:
+
+Dmitry Bogdanov (1):
+      Fix parsing of GetNextRsp
+
+Lee Duncan (10):
+      Ignore common build files
+      Fix compiler issue when not in security mode
+      Do not ignore write() return value.
+      Fix 586 compile issue and remove -Werror
+      Added a TODO: 'make depend' not worrking
+      Update version string to "0.100".
+      Fix broken server authentication initialization.
+      Add man page for isnssetup.
+      Added TODO to test "isnsd --init"
+      Preparing for version 0.101
+
+Leo (1):
+      socket.c: include poll.h instead of sys/poll.h for POSIX compatibility
+
+Rosen Penev (2):
+      fix compilation without deprecated OpenSSL APIs
+      libisns: remove sighold and sigrelse
+
+
 * Changes v0.99 to v0.100:
 
 Chris Leech (1):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/Makefile.in 
new/open-isns-0.101/Makefile.in
--- old/open-isns-0.100/Makefile.in     2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/Makefile.in     2021-02-01 18:27:33.000000000 +0100
@@ -118,6 +118,7 @@
        $(INSTALL) -m 644 $(srcdir)/doc/isnsd.8 $(MANDIR)/man8
        $(INSTALL) -m 644 $(srcdir)/doc/isnsdd.8 $(MANDIR)/man8
        $(INSTALL) -m 644 $(srcdir)/doc/isnsadm.8 $(MANDIR)/man8
+       $(INSTALL) -m 644 $(srcdir)/doc/isnssetup.8 $(MANDIR)/man8
        $(INSTALL) -m 644 $(srcdir)/doc/isns_config.5 $(MANDIR)/man5
        $(INSTALL) -m 644 $(srcdir)/isnsd.service $(SYSTEMDDIR)
        $(INSTALL) -m 644 $(srcdir)/isnsd.socket $(SYSTEMDDIR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/TODO new/open-isns-0.101/TODO
--- old/open-isns-0.100/TODO    2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/TODO    2021-02-01 18:27:33.000000000 +0100
@@ -7,6 +7,7 @@
  -     make PGs children of the iSCSI storage node they're associated
        with?
  -     Implement missing functions
+ -     Add test for "isnsd --init", to make sure it works correctly.
 
 isnsadm:
  -     support iSNS server discovery through DNS SRV
@@ -27,6 +28,10 @@
        we registered for ESI are seeing the server's
        ESI messages.
 
+isnssetup:
+-      Update to support systemd, and perhaps have
+       a few options?
+
 DevAttrReg:
  -     Refuse registration of nodes inside the CONTROL
        entity, unless it's a control node.
@@ -98,3 +103,6 @@
 
 Socket code:
  -     impose upper limit on the reassembly buffer
+
+Compilation:
+ -      'make depend' does not work
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/client.c new/open-isns-0.101/client.c
--- old/open-isns-0.100/client.c        2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/client.c        2021-02-01 18:27:33.000000000 +0100
@@ -122,22 +122,17 @@
 /*
  * Create a security context
  */
+#ifdef WITH_SECURITY
 static isns_security_t *
 __create_security_context(const char *name, const char *auth_key,
                const char *server_key)
 {
-#ifdef WITH_SECURITY
        isns_security_t         *ctx;
        isns_principal_t        *princ;
-#endif /* WITH_SECURITY */
 
        if (!isns_config.ic_security)
                return NULL;
 
-#ifndef WITH_SECURITY
-       isns_error("Cannot create security context: security disabled at build 
time\n");
-       return NULL;
-#else /* WITH_SECURITY */
        ctx = isns_create_dsa_context();
        if (ctx == NULL)
                isns_fatal("Unable to create security context\n");
@@ -174,8 +169,19 @@
        }
 
        return ctx;
-#endif /* WITH_SECURITY */
 }
+#else  /* WITH_SECURITY */
+static isns_security_t *
+__create_security_context(__attribute__((unused))const char *name,
+                         __attribute__((unused))const char *auth_key,
+                         __attribute__((unused))const char *server_key)
+{
+       if (!isns_config.ic_security)
+               return NULL;
+       isns_error("Cannot create security context: security disabled at build 
time\n");
+       return NULL;
+}
+#endif /* WITH_SECURITY */
 
 /*
  * Create the default security context
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/configure 
new/open-isns-0.101/configure
--- old/open-isns-0.100/configure       2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/configure       2021-02-01 18:27:33.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for open-isns 0.100.
+# Generated by GNU Autoconf 2.69 for open-isns 0.101.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='open-isns'
 PACKAGE_TARNAME='open-isns'
-PACKAGE_VERSION='0.100'
-PACKAGE_STRING='open-isns 0.100'
+PACKAGE_VERSION='0.101'
+PACKAGE_STRING='open-isns 0.101'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1250,7 +1250,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures open-isns 0.100 to adapt to many kinds of systems.
+\`configure' configures open-isns 0.101 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1315,7 +1315,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of open-isns 0.100:";;
+     short | recursive ) echo "Configuration of open-isns 0.101:";;
    esac
   cat <<\_ACEOF
 
@@ -1410,7 +1410,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-open-isns configure 0.100
+open-isns configure 0.101
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1775,7 +1775,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by open-isns $as_me 0.100, which was
+It was created by open-isns $as_me 0.101, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3996,7 +3996,7 @@
 esac
 
 if test "$GCC" = "yes"; then
-        CFLAGS="-Wall -Werror -Wextra $CFLAGS"
+        CFLAGS="-Wall -Wextra $CFLAGS"
        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 fi
 
@@ -4985,7 +4985,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by open-isns $as_me 0.100, which was
+This file was extended by open-isns $as_me 0.101, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5047,7 +5047,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-open-isns config.status 0.100
+open-isns config.status 0.101
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/configure.ac 
new/open-isns-0.101/configure.ac
--- old/open-isns-0.100/configure.ac    2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/configure.ac    2021-02-01 18:27:33.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT(open-isns, [0.100])
+AC_INIT(open-isns, [0.101])
 AC_CONFIG_SRCDIR([isnsd.c])
 AC_CONFIG_AUX_DIR([aclocal])
 
@@ -17,7 +17,7 @@
 dnl C Compiler features
 AC_C_INLINE
 if test "$GCC" = "yes"; then
-        CFLAGS="-Wall -Werror -Wextra $CFLAGS"
+        CFLAGS="-Wall -Wextra $CFLAGS"
        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/db-policy.c 
new/open-isns-0.101/db-policy.c
--- old/open-isns-0.100/db-policy.c     2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/db-policy.c     2021-02-01 18:27:33.000000000 +0100
@@ -52,11 +52,11 @@
 /*
  * Load a DSA key from the DB store
  */
+#ifdef WITH_SECURITY
 static EVP_PKEY *
 __isns_db_keystore_find(isns_keystore_t *store_base,
                const char *name, size_t namelen)
 {
-#ifdef WITH_SECURITY
        isns_db_keystore_t *store = (isns_db_keystore_t *) store_base;
        isns_object_t   *obj;
        const void      *key_data;
@@ -71,10 +71,16 @@
                return NULL;
 
        return isns_dsa_decode_public(key_data, key_size);
-#else
+}
+#else  /* WITH_SECURITY */
+static EVP_PKEY *
+__isns_db_keystore_find(__attribute__((unused))isns_keystore_t *store_base,
+                       __attribute__((unused))const char *name,
+                       __attribute__((unused))size_t namelen)
+{
        return NULL;
-#endif
 }
+#endif /* WITH_SECURITY */
 
 /*
  * Retrieve policy from database
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/doc/isnssetup.8 
new/open-isns-0.101/doc/isnssetup.8
--- old/open-isns-0.100/doc/isnssetup.8 1970-01-01 01:00:00.000000000 +0100
+++ new/open-isns-0.101/doc/isnssetup.8 2021-02-01 18:27:33.000000000 +0100
@@ -0,0 +1,64 @@
+'\" t
+.TH ISNSSETUP 8 "4 Dec 2020"
+.SH NAME
+isnssetup \- a simple script to bootstrap an iSNS server, including security
+.SH SYNOPSIS
+.B isnssetup
+.SH DESCRIPTION
+.B isnssetup
+is a command line utility for for bootstrapping your iSNS
+installation. It sets up the authentication credentials,
+sets up the
+.B ServerAddress
+to be
+.IR localhost ,
+and registers the appropriate values in the
+.B iSNS
+database. The
+.B isnssetup
+script does not take any options.
+.PP
+Running this script performs the following steps:
+.TP
+.B \(bu
+Set
+.B ServerAddress
+to
+.I localhost
+and
+.B Security
+to
+.I 1
+for
+.B isnsadmin.conf
+and
+.BR isnsdd.conf .
+.TP
+.B \(bu
+Initialize security files by running
+.BR "isnsd --init" ,
+copying the public key to the server key, then restarting
+the
+.B isnsd
+daemon, so that it sees the new authorization files.
+.TP
+.B \(bu
+Registering the control node policy, the control node itself, and
+lastly registering the server policy.
+.PP
+Note that this script is supplied as an example, although you should
+be able to use it directly if you wish. You have to be
+.B root
+to run this script successfully.
+.SH BUGS
+This script does not take
+.B systemd
+into account, so you may have to modify it to get it to work on
+a modern system.
+.SH SEE ALSO
+RFC 4171,
+.BR isnsadm (8),
+.BR isnsd (8),
+.BR isns_config (5).
+.SH AUTHORS
+Olaf Kirch <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/getnext.c 
new/open-isns-0.101/getnext.c
--- old/open-isns-0.100/getnext.c       2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/getnext.c       2021-02-01 18:27:33.000000000 +0100
@@ -244,7 +244,7 @@
 {
        isns_object_template_t *tmpl;
 
-       tmpl = isns_object_template_for_key_attrs(&qry->is_operating_attrs);
+       tmpl = isns_object_template_for_key_attrs(&qry->is_message_attrs);
        if (tmpl == NULL) {
                isns_error("Cannot determine object type in GetNext 
response\n");
                return ISNS_ATTRIBUTE_NOT_IMPLEMENTED;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/include/libisns/paths.h.in 
new/open-isns-0.101/include/libisns/paths.h.in
--- old/open-isns-0.100/include/libisns/paths.h.in      2020-01-23 
22:02:36.000000000 +0100
+++ new/open-isns-0.101/include/libisns/paths.h.in      2021-02-01 
18:27:33.000000000 +0100
@@ -9,8 +9,8 @@
 #define ISNS_CONFIG_H
 
 #define __OPENISNS_MKVERSION(maj, min) (((maj) << 8) + (min))
-#define OPENISNS_VERSION               __OPENISNS_MKVERSION(0, 99);
-#define OPENISNS_VERSION_STRING                "0.99"
+#define OPENISNS_VERSION               __OPENISNS_MKVERSION(0, 101);
+#define OPENISNS_VERSION_STRING                "0.101"
 
 #define ISNS_ETCDIR                    "/etc/isns"
 #define ISNS_RUNDIR                    "@RUNDIR@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/include/libisns/util.h 
new/open-isns-0.101/include/libisns/util.h
--- old/open-isns-0.100/include/libisns/util.h  2020-01-23 22:02:36.000000000 
+0100
+++ new/open-isns-0.101/include/libisns/util.h  2021-02-01 18:27:33.000000000 
+0100
@@ -14,6 +14,7 @@
 #include <string.h>    // for strdup
 #include <signal.h>
 #include <libisns/types.h>
+#include <stdlib.h>
 
 #define array_num_elements(a) (sizeof(a) / sizeof((a)[0]))
 
@@ -40,14 +41,22 @@
  */
 static inline void signals_hold(void)
 {
-       sighold(SIGTERM);
-       sighold(SIGINT);
+       sigset_t s;
+
+       sigemptyset(&s);
+       sigaddset(&s, SIGTERM);
+       sigaddset(&s, SIGINT);
+       sigprocmask(SIG_BLOCK, &s, 0);
 }
 
 static inline void signals_release(void)
 {
-       sigrelse(SIGTERM);
-       sigrelse(SIGINT);
+       sigset_t s;
+
+       sigemptyset(&s);
+       sigaddset(&s, SIGTERM);
+       sigaddset(&s, SIGINT);
+       sigprocmask(SIG_UNBLOCK, &s, 0);
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/isnsadm.c 
new/open-isns-0.101/isnsadm.c
--- old/open-isns-0.100/isnsadm.c       2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/isnsadm.c       2021-02-01 18:27:33.000000000 +0100
@@ -1162,7 +1162,7 @@
 }
 
 isns_attr_t *
-load_key_callback(const char *pathname)
+load_key_callback(__attribute__((unused))const char *pathname)
 {
        isns_fatal("Authentication disabled in this build\n");
        return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/isnsdd.c new/open-isns-0.101/isnsdd.c
--- old/open-isns-0.100/isnsdd.c        2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/isnsdd.c        2021-02-01 18:27:33.000000000 +0100
@@ -401,7 +401,7 @@
                        continue;
 
                last_modified = isns_object_last_modified(obj);
-               if (last_modified + 2 * interval > now) {
+               if ((time_t)(last_modified + 2 * interval) > now) {
                        good_portals++;
                        continue;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/pki.c new/open-isns-0.101/pki.c
--- old/open-isns-0.100/pki.c   2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/pki.c   2021-02-01 18:27:33.000000000 +0100
@@ -9,12 +9,15 @@
 #include <unistd.h>
 #include <limits.h>
 #include "config.h"
+#include <fcntl.h>
+#include <assert.h>
 #ifdef WITH_SECURITY
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
+#include <openssl/dsa.h>
+#include <openssl/bn.h>
 #endif
-#include <fcntl.h>
 #include <libisns/isns.h>
 #include "security.h"
 #include <libisns/util.h>
@@ -96,13 +99,11 @@
        isns_security_t *ctx;
 
        if (!isns_openssl_init) {
-               ERR_load_crypto_strings();
 #if OPENSSL_API_COMPAT < 0x10100000L
+               ERR_load_crypto_strings();
                OpenSSL_add_all_algorithms();
                OpenSSL_add_all_ciphers();
                OpenSSL_add_all_digests();
-#else
-               OPENSSL_init_crypto();
 #endif
                isns_openssl_init = 1;
        }
@@ -431,18 +432,41 @@
        return dsa;
 }
 
-static int
+/*
+ * write one 'status' character to stdout
+ */
+static void
+write_status_byte(int ch)
+{
+       static int      stdout_fd = 1;  /* fileno(stdout) */
+       char            buf[2];
+       int             res;
+
+       /*
+        * We don't actually care about the return value here, since
+        * we are just dumping a status byte to stdout, but
+        * some linux distrubutions set the warn_unused_result attribute
+        * for the write() API, so we might as well use the return value
+        * to make sure the write command isn't broken.
+        */
+       assert(ch);
+       buf[0] = ch;
+       buf[1] = '\0';
+       res = write(stdout_fd, buf, 1);
+       assert(res == 1);
+}
+
+static void
 isns_dsa_param_gen_callback(int stage,
                __attribute__((unused))int index,
                __attribute__((unused))void *dummy)
 {
        if (stage == 0)
-               write(1, "+", 1);
+               write_status_byte('+');
        else if (stage == 1)
-               write(1, ".", 1);
+               write_status_byte('.');
        else if (stage == 2)
-               write(1, "/", 1);
-       return 0;
+               write_status_byte('/');
 }
 
 int
@@ -467,7 +491,7 @@
        isns_notice("Generating DSA parameters; this may take a while\n");
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
        cb = BN_GENCB_new();
-       BN_GENCB_set(cb, (int (*)(int, int, BN_GENCB *)) 
isns_dsa_param_gen_callback, NULL);
+       BN_GENCB_set_old(cb, (void (*)(int, int, void *)) 
isns_dsa_param_gen_callback, NULL);
        dsa = DSA_new();
        if (!DSA_generate_parameters_ex(dsa, dsa_key_bits, NULL, 0, NULL, NULL, 
cb)) {
                DSA_free(dsa);
@@ -478,7 +502,7 @@
        dsa = DSA_generate_parameters(dsa_key_bits, NULL, 0,
                        NULL, NULL, isns_dsa_param_gen_callback, NULL);
 #endif
-       write(1, "\n", 1);
+       write_status_byte('\n');
 
        if (dsa == NULL) {
                isns_dsasig_report_errors("Error generating DSA parameters",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/security.c 
new/open-isns-0.101/security.c
--- old/open-isns-0.100/security.c      2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/security.c      2021-02-01 18:27:33.000000000 +0100
@@ -408,32 +408,34 @@
 }
 
 isns_keystore_t *
-isns_create_keystore(const char *spec)
+isns_create_keystore(__attribute__((unused))const char *spec)
 {
        isns_no_security();
        return NULL;
 }
 
 void
-isns_security_set_keystore(isns_security_t *ctx,
-                       isns_keystore_t *ks)
+isns_security_set_keystore(__attribute__((unused))isns_security_t *ctx,
+                          __attribute__((unused))isns_keystore_t *ks)
 {
        isns_no_security();
 }
 
 void
-isns_principal_free(isns_principal_t *peer)
+isns_principal_free(__attribute__((unused))isns_principal_t *peer)
 {
 }
 
 isns_principal_t *
-isns_get_principal(isns_security_t *ctx, const char *spi, size_t spi_len)
+isns_get_principal(__attribute__((unused))isns_security_t *ctx,
+                  __attribute__((unused))const char *spi,
+                  __attribute__((unused))size_t spi_len)
 {
        return NULL;
 }
 
 const char *
-isns_principal_name(const isns_principal_t *princ)
+isns_principal_name(__attribute__((unused))const isns_principal_t *princ)
 {
        return NULL;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-isns-0.100/socket.c new/open-isns-0.101/socket.c
--- old/open-isns-0.100/socket.c        2020-01-23 22:02:36.000000000 +0100
+++ new/open-isns-0.101/socket.c        2021-02-01 18:27:33.000000000 +0100
@@ -5,7 +5,7 @@
  */
 
 #include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/time.h>
 #include <sys/un.h>
 #include <string.h>
@@ -322,8 +322,9 @@
 }
 #else /* WITH_SECURITY */
 static int
-isns_pdu_authenticate(isns_security_t *sec,
-               struct isns_partial_msg *msg, buf_t *bp)
+isns_pdu_authenticate(__attribute__((unused))isns_security_t *sec,
+                     __attribute__((unused))struct isns_partial_msg *msg,
+                     __attribute__((unused))buf_t *bp)
 {
        return 0;
 }

Reply via email to