Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ell for openSUSE:Factory checked in 
at 2023-08-30 10:18:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ell (Old)
 and      /work/SRC/openSUSE:Factory/.ell.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ell"

Wed Aug 30 10:18:50 2023 rev:36 rq:1107949 version:0.58

Changes:
--------
--- /work/SRC/openSUSE:Factory/ell/ell.changes  2023-06-20 16:40:17.380451968 
+0200
+++ /work/SRC/openSUSE:Factory/.ell.new.1766/ell.changes        2023-08-30 
10:20:52.216976665 +0200
@@ -1,0 +2,6 @@
+Tue Aug 29 12:31:50 UTC 2023 - Luigi Baldoni <aloi...@gmx.com>
+
+- Update to version 0.58
+  * Add support for handling sysctl settings.
+
+-------------------------------------------------------------------

Old:
----
  ell-0.57.tar.sign
  ell-0.57.tar.xz

New:
----
  ell-0.58.tar.sign
  ell-0.58.tar.xz

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

Other differences:
------------------
++++++ ell.spec ++++++
--- /var/tmp/diff_new_pack.Zij4uv/_old  2023-08-30 10:20:54.117044486 +0200
+++ /var/tmp/diff_new_pack.Zij4uv/_new  2023-08-30 10:20:54.141045342 +0200
@@ -18,7 +18,7 @@
 
 %define lname   libell0
 Name:           ell
-Version:        0.57
+Version:        0.58
 Release:        0
 Summary:        Wireless setup and cryptography library
 License:        LGPL-2.1-or-later

++++++ ell-0.57.tar.xz -> ell-0.58.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ChangeLog new/ell-0.58/ChangeLog
--- old/ell-0.57/ChangeLog      2023-05-24 16:13:48.000000000 +0200
+++ new/ell-0.58/ChangeLog      2023-08-24 12:39:48.000000000 +0200
@@ -1,3 +1,6 @@
+ver 0.58:
+       Add support for handling sysctl settings.
+
 ver 0.57:
        Fix issue with handling Generic Netlink cancel requests.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/Makefile.am new/ell-0.58/Makefile.am
--- old/ell-0.57/Makefile.am    2023-05-24 16:13:48.000000000 +0200
+++ new/ell-0.58/Makefile.am    2023-08-24 12:39:48.000000000 +0200
@@ -61,7 +61,8 @@
                        ell/acd.h \
                        ell/tester.h \
                        ell/cleanup.h \
-                       ell/netconfig.h
+                       ell/netconfig.h \
+                       ell/sysctl.h
 
 lib_LTLIBRARIES = ell/libell.la
 
@@ -149,7 +150,8 @@
                        ell/icmp6-private.h \
                        ell/acd.c \
                        ell/tester.c \
-                       ell/netconfig.c
+                       ell/netconfig.c \
+                       ell/sysctl.c
 
 ell_libell_la_LDFLAGS = -Wl,--no-undefined \
                        -Wl,--version-script=$(top_srcdir)/ell/ell.sym \
@@ -199,7 +201,8 @@
                        unit/test-ecdh \
                        unit/test-time \
                        unit/test-path \
-                       unit/test-net
+                       unit/test-net \
+                       unit/test-sysctl
 
 dbus_tests = unit/test-hwdb \
                        unit/test-dbus \
@@ -348,6 +351,8 @@
 
 unit_test_net_LDADD = ell/libell-private.la
 
+unit_test_sysctl_LDADD = ell/libell-private.la
+
 unit_test_data_files = unit/settings.test unit/dbus.conf
 
 if EXAMPLES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/Makefile.in new/ell-0.58/Makefile.in
--- old/ell-0.57/Makefile.in    2023-05-24 16:15:32.000000000 +0200
+++ new/ell-0.58/Makefile.in    2023-08-24 12:41:41.000000000 +0200
@@ -139,7 +139,8 @@
        unit/test-dhcp$(EXEEXT) unit/test-dhcp6$(EXEEXT) \
        unit/test-dir-watch$(EXEEXT) unit/test-ecc$(EXEEXT) \
        unit/test-ecdh$(EXEEXT) unit/test-time$(EXEEXT) \
-       unit/test-path$(EXEEXT) unit/test-net$(EXEEXT)
+       unit/test-path$(EXEEXT) unit/test-net$(EXEEXT) \
+       unit/test-sysctl$(EXEEXT)
 am__EXEEXT_2 = unit/test-hwdb$(EXEEXT) unit/test-dbus$(EXEEXT) \
        unit/test-dbus-util$(EXEEXT) unit/test-dbus-message$(EXEEXT) \
        unit/test-dbus-message-fds$(EXEEXT) \
@@ -217,7 +218,7 @@
        ell/dhcp-util.lo ell/dhcp-server.lo ell/cert.lo \
        ell/cert-crypto.lo ell/ecc-external.lo ell/ecc.lo ell/ecdh.lo \
        ell/time.lo ell/gpio.lo ell/path.lo ell/icmp6.lo ell/acd.lo \
-       ell/tester.lo ell/netconfig.lo
+       ell/tester.lo ell/netconfig.lo ell/sysctl.lo
 am_ell_libell_private_la_OBJECTS = $(am__objects_2)
 ell_libell_private_la_OBJECTS = $(am_ell_libell_private_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -242,7 +243,7 @@
        ell/dhcp-util.lo ell/dhcp-server.lo ell/cert.lo \
        ell/cert-crypto.lo ell/ecc-external.lo ell/ecc.lo ell/ecdh.lo \
        ell/time.lo ell/gpio.lo ell/path.lo ell/icmp6.lo ell/acd.lo \
-       ell/tester.lo ell/netconfig.lo
+       ell/tester.lo ell/netconfig.lo ell/sysctl.lo
 ell_libell_la_OBJECTS = $(am_ell_libell_la_OBJECTS)
 ell_libell_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -412,6 +413,9 @@
 unit_test_string_SOURCES = unit/test-string.c
 unit_test_string_OBJECTS = unit/test-string.$(OBJEXT)
 unit_test_string_DEPENDENCIES = ell/libell-private.la
+unit_test_sysctl_SOURCES = unit/test-sysctl.c
+unit_test_sysctl_OBJECTS = unit/test-sysctl.$(OBJEXT)
+unit_test_sysctl_DEPENDENCIES = ell/libell-private.la
 unit_test_time_SOURCES = unit/test-time.c
 unit_test_time_OBJECTS = unit/test-time.$(OBJEXT)
 unit_test_time_DEPENDENCIES = ell/libell-private.la
@@ -474,13 +478,13 @@
        ell/$(DEPDIR)/rtnl.Plo ell/$(DEPDIR)/settings.Plo \
        ell/$(DEPDIR)/signal.Plo ell/$(DEPDIR)/siphash.Plo \
        ell/$(DEPDIR)/string.Plo ell/$(DEPDIR)/strv.Plo \
-       ell/$(DEPDIR)/test.Plo ell/$(DEPDIR)/tester.Plo \
-       ell/$(DEPDIR)/time.Plo ell/$(DEPDIR)/timeout.Plo \
-       ell/$(DEPDIR)/tls-extensions.Plo ell/$(DEPDIR)/tls-record.Plo \
-       ell/$(DEPDIR)/tls-suites.Plo ell/$(DEPDIR)/tls.Plo \
-       ell/$(DEPDIR)/uintset.Plo ell/$(DEPDIR)/utf8.Plo \
-       ell/$(DEPDIR)/util.Plo ell/$(DEPDIR)/uuid.Plo \
-       examples/$(DEPDIR)/acd-client.Po \
+       ell/$(DEPDIR)/sysctl.Plo ell/$(DEPDIR)/test.Plo \
+       ell/$(DEPDIR)/tester.Plo ell/$(DEPDIR)/time.Plo \
+       ell/$(DEPDIR)/timeout.Plo ell/$(DEPDIR)/tls-extensions.Plo \
+       ell/$(DEPDIR)/tls-record.Plo ell/$(DEPDIR)/tls-suites.Plo \
+       ell/$(DEPDIR)/tls.Plo ell/$(DEPDIR)/uintset.Plo \
+       ell/$(DEPDIR)/utf8.Plo ell/$(DEPDIR)/util.Plo \
+       ell/$(DEPDIR)/uuid.Plo examples/$(DEPDIR)/acd-client.Po \
        examples/$(DEPDIR)/dbus-client.Po \
        examples/$(DEPDIR)/dbus-service.Po \
        examples/$(DEPDIR)/dhcp-client.Po \
@@ -515,10 +519,11 @@
        unit/$(DEPDIR)/test-queue.Po unit/$(DEPDIR)/test-random.Po \
        unit/$(DEPDIR)/test-ringbuf.Po unit/$(DEPDIR)/test-rtnl.Po \
        unit/$(DEPDIR)/test-settings.Po unit/$(DEPDIR)/test-siphash.Po \
-       unit/$(DEPDIR)/test-string.Po unit/$(DEPDIR)/test-time.Po \
-       unit/$(DEPDIR)/test-tls.Po unit/$(DEPDIR)/test-uintset.Po \
-       unit/$(DEPDIR)/test-unit.Po unit/$(DEPDIR)/test-utf8.Po \
-       unit/$(DEPDIR)/test-util.Po unit/$(DEPDIR)/test-uuid.Po
+       unit/$(DEPDIR)/test-string.Po unit/$(DEPDIR)/test-sysctl.Po \
+       unit/$(DEPDIR)/test-time.Po unit/$(DEPDIR)/test-tls.Po \
+       unit/$(DEPDIR)/test-uintset.Po unit/$(DEPDIR)/test-unit.Po \
+       unit/$(DEPDIR)/test-utf8.Po unit/$(DEPDIR)/test-util.Po \
+       unit/$(DEPDIR)/test-uuid.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -560,9 +565,10 @@
        unit/test-netlink.c unit/test-path.c unit/test-pbkdf2.c \
        unit/test-pem.c unit/test-queue.c unit/test-random.c \
        unit/test-ringbuf.c unit/test-rtnl.c unit/test-settings.c \
-       unit/test-siphash.c unit/test-string.c unit/test-time.c \
-       unit/test-tls.c unit/test-uintset.c unit/test-unit.c \
-       unit/test-utf8.c unit/test-util.c unit/test-uuid.c
+       unit/test-siphash.c unit/test-string.c unit/test-sysctl.c \
+       unit/test-time.c unit/test-tls.c unit/test-uintset.c \
+       unit/test-unit.c unit/test-utf8.c unit/test-util.c \
+       unit/test-uuid.c
 DIST_SOURCES = $(ell_libell_private_la_SOURCES) \
        $(ell_libell_la_SOURCES) examples/acd-client.c \
        examples/dbus-client.c examples/dbus-service.c \
@@ -585,9 +591,10 @@
        unit/test-netlink.c unit/test-path.c unit/test-pbkdf2.c \
        unit/test-pem.c unit/test-queue.c unit/test-random.c \
        unit/test-ringbuf.c unit/test-rtnl.c unit/test-settings.c \
-       unit/test-siphash.c unit/test-string.c unit/test-time.c \
-       unit/test-tls.c unit/test-uintset.c unit/test-unit.c \
-       unit/test-utf8.c unit/test-util.c unit/test-uuid.c
+       unit/test-siphash.c unit/test-string.c unit/test-sysctl.c \
+       unit/test-time.c unit/test-tls.c unit/test-uintset.c \
+       unit/test-unit.c unit/test-utf8.c unit/test-util.c \
+       unit/test-uuid.c
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -1011,7 +1018,8 @@
                        ell/acd.h \
                        ell/tester.h \
                        ell/cleanup.h \
-                       ell/netconfig.h
+                       ell/netconfig.h \
+                       ell/sysctl.h
 
 lib_LTLIBRARIES = ell/libell.la
 ell_libell_la_SOURCES = $(linux_headers) \
@@ -1098,7 +1106,8 @@
                        ell/icmp6-private.h \
                        ell/acd.c \
                        ell/tester.c \
-                       ell/netconfig.c
+                       ell/netconfig.c \
+                       ell/sysctl.c
 
 ell_libell_la_LDFLAGS = -Wl,--no-undefined \
                        -Wl,--version-script=$(top_srcdir)/ell/ell.sym \
@@ -1141,7 +1150,8 @@
                        unit/test-ecdh \
                        unit/test-time \
                        unit/test-path \
-                       unit/test-net
+                       unit/test-net \
+                       unit/test-sysctl
 
 dbus_tests = unit/test-hwdb \
                        unit/test-dbus \
@@ -1241,6 +1251,7 @@
 unit_test_time_LDADD = ell/libell-private.la
 unit_test_path_LDADD = ell/libell-private.la
 unit_test_net_LDADD = ell/libell-private.la
+unit_test_sysctl_LDADD = ell/libell-private.la
 unit_test_data_files = unit/settings.test unit/dbus.conf
 examples_dbus_service_LDADD = ell/libell-private.la
 examples_https_client_test_LDADD = ell/libell-private.la
@@ -1457,6 +1468,7 @@
 ell/acd.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
 ell/tester.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
 ell/netconfig.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
+ell/sysctl.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
 
 ell/libell-private.la: $(ell_libell_private_la_OBJECTS) 
$(ell_libell_private_la_DEPENDENCIES) 
$(EXTRA_ell_libell_private_la_DEPENDENCIES) ell/$(am__dirstamp)
        $(AM_V_CCLD)$(LINK)  $(ell_libell_private_la_OBJECTS) 
$(ell_libell_private_la_LIBADD) $(LIBS)
@@ -1787,6 +1799,12 @@
 unit/test-string$(EXEEXT): $(unit_test_string_OBJECTS) 
$(unit_test_string_DEPENDENCIES) $(EXTRA_unit_test_string_DEPENDENCIES) 
unit/$(am__dirstamp)
        @rm -f unit/test-string$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(unit_test_string_OBJECTS) 
$(unit_test_string_LDADD) $(LIBS)
+unit/test-sysctl.$(OBJEXT): unit/$(am__dirstamp) \
+       unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/test-sysctl$(EXEEXT): $(unit_test_sysctl_OBJECTS) 
$(unit_test_sysctl_DEPENDENCIES) $(EXTRA_unit_test_sysctl_DEPENDENCIES) 
unit/$(am__dirstamp)
+       @rm -f unit/test-sysctl$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit_test_sysctl_OBJECTS) 
$(unit_test_sysctl_LDADD) $(LIBS)
 unit/test-time.$(OBJEXT): unit/$(am__dirstamp) \
        unit/$(DEPDIR)/$(am__dirstamp)
 
@@ -1892,6 +1910,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/siphash.Plo@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/string.Plo@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/strv.Plo@am__quote@ # 
am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/sysctl.Plo@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/test.Plo@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/tester.Plo@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/time.Plo@am__quote@ # 
am--include-marker
@@ -1955,6 +1974,7 @@
 @AMDEP_TRUE@@am__include@ 
@am__quote@unit/$(DEPDIR)/test-settings.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-siphash.Po@am__quote@ 
# am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-string.Po@am__quote@ 
# am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-sysctl.Po@am__quote@ 
# am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-time.Po@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-tls.Po@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-uintset.Po@am__quote@ 
# am--include-marker
@@ -2472,6 +2492,13 @@
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) 
-- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/test-sysctl.log: unit/test-sysctl$(EXEEXT)
+       @p='unit/test-sysctl$(EXEEXT)'; \
+       b='unit/test-sysctl'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) 
-- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 unit/test-hwdb.log: unit/test-hwdb$(EXEEXT)
        @p='unit/test-hwdb$(EXEEXT)'; \
        b='unit/test-hwdb'; \
@@ -2864,6 +2891,7 @@
        -rm -f ell/$(DEPDIR)/siphash.Plo
        -rm -f ell/$(DEPDIR)/string.Plo
        -rm -f ell/$(DEPDIR)/strv.Plo
+       -rm -f ell/$(DEPDIR)/sysctl.Plo
        -rm -f ell/$(DEPDIR)/test.Plo
        -rm -f ell/$(DEPDIR)/tester.Plo
        -rm -f ell/$(DEPDIR)/time.Plo
@@ -2927,6 +2955,7 @@
        -rm -f unit/$(DEPDIR)/test-settings.Po
        -rm -f unit/$(DEPDIR)/test-siphash.Po
        -rm -f unit/$(DEPDIR)/test-string.Po
+       -rm -f unit/$(DEPDIR)/test-sysctl.Po
        -rm -f unit/$(DEPDIR)/test-time.Po
        -rm -f unit/$(DEPDIR)/test-tls.Po
        -rm -f unit/$(DEPDIR)/test-uintset.Po
@@ -3032,6 +3061,7 @@
        -rm -f ell/$(DEPDIR)/siphash.Plo
        -rm -f ell/$(DEPDIR)/string.Plo
        -rm -f ell/$(DEPDIR)/strv.Plo
+       -rm -f ell/$(DEPDIR)/sysctl.Plo
        -rm -f ell/$(DEPDIR)/test.Plo
        -rm -f ell/$(DEPDIR)/tester.Plo
        -rm -f ell/$(DEPDIR)/time.Plo
@@ -3095,6 +3125,7 @@
        -rm -f unit/$(DEPDIR)/test-settings.Po
        -rm -f unit/$(DEPDIR)/test-siphash.Po
        -rm -f unit/$(DEPDIR)/test-string.Po
+       -rm -f unit/$(DEPDIR)/test-sysctl.Po
        -rm -f unit/$(DEPDIR)/test-time.Po
        -rm -f unit/$(DEPDIR)/test-tls.Po
        -rm -f unit/$(DEPDIR)/test-uintset.Po
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/build-aux/ltmain.sh 
new/ell-0.58/build-aux/ltmain.sh
--- old/ell-0.57/build-aux/ltmain.sh    2022-11-23 12:34:12.000000000 +0100
+++ new/ell-0.58/build-aux/ltmain.sh    2023-07-17 17:03:58.000000000 +0200
@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.7 Debian-2.4.7-5"
+VERSION="2.4.7 Debian-2.4.7-7"
 package_revision=2.4.7
 
 
@@ -572,27 +572,15 @@
 # ---------------------
 # Append VALUE onto the existing contents of VAR.
 
-  # We should try to minimise forks, especially on Windows where they are
-  # unreasonably slow, so skip the feature probes when bash or zsh are
-  # being used:
-  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
-    : ${_G_HAVE_ARITH_OP="yes"}
-    : ${_G_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0*) ;;
-      *)
-        : ${_G_HAVE_PLUSEQ_OP="yes"}
-        ;;
-    esac
-  fi
-
   # _G_HAVE_PLUSEQ_OP
   # Can be empty, in which case the shell is probed, "yes" if += is
   # useable or anything else if it does not work.
-  test -z "$_G_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && _G_HAVE_PLUSEQ_OP=yes
+  if test -z "$_G_HAVE_PLUSEQ_OP" &&  \
+      __PLUSEQ_TEST="a" &&  \
+      __PLUSEQ_TEST+=" b" 2>/dev/null &&  \
+      test "a b" = "$__PLUSEQ_TEST"; then
+    _G_HAVE_PLUSEQ_OP=yes
+  fi
 
 if test yes = "$_G_HAVE_PLUSEQ_OP"
 then
@@ -2308,7 +2296,7 @@
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion Debian-2.4.7-5
+       version:        $progname $scriptversion Debian-2.4.7-7
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/configure new/ell-0.58/configure
--- old/ell-0.57/configure      2023-05-24 16:15:26.000000000 +0200
+++ new/ell-0.58/configure      2023-08-24 12:41:36.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for ell 0.57.
+# Generated by GNU Autoconf 2.71 for ell 0.58.
 #
 #
 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -618,8 +618,8 @@
 # Identity of this package.
 PACKAGE_NAME='ell'
 PACKAGE_TARNAME='ell'
-PACKAGE_VERSION='0.57'
-PACKAGE_STRING='ell 0.57'
+PACKAGE_VERSION='0.58'
+PACKAGE_STRING='ell 0.58'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1389,7 +1389,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 ell 0.57 to adapt to many kinds of systems.
+\`configure' configures ell 0.58 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1460,7 +1460,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ell 0.57:";;
+     short | recursive ) echo "Configuration of ell 0.58:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ell configure 0.57
+ell configure 0.58
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1851,7 +1851,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ell $as_me 0.57, which was
+It was created by ell $as_me 0.58, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3126,7 +3126,7 @@
 
 # Define the identity of the package.
  PACKAGE='ell'
- VERSION='0.57'
+ VERSION='0.58'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -14419,7 +14419,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ell $as_me 0.57, which was
+This file was extended by ell $as_me 0.58, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14487,7 +14487,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-ell config.status 0.57
+ell config.status 0.58
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/configure.ac new/ell-0.58/configure.ac
--- old/ell-0.57/configure.ac   2023-05-24 16:13:48.000000000 +0200
+++ new/ell-0.58/configure.ac   2023-08-24 12:39:48.000000000 +0200
@@ -1,5 +1,5 @@
 AC_PREREQ([2.69])
-AC_INIT([ell],[0.57])
+AC_INIT([ell],[0.58])
 
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_AUX_DIR(build-aux)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/ell.h new/ell-0.58/ell/ell.h
--- old/ell-0.57/ell/ell.h      2022-04-21 16:47:16.000000000 +0200
+++ new/ell-0.58/ell/ell.h      2023-08-24 12:39:48.000000000 +0200
@@ -66,3 +66,4 @@
 #include <ell/acd.h>
 #include <ell/tester.h>
 #include <ell/netconfig.h>
+#include <ell/sysctl.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/netconfig.c new/ell-0.58/ell/netconfig.c
--- old/ell-0.57/ell/netconfig.c        2022-11-18 10:08:38.000000000 +0100
+++ new/ell-0.58/ell/netconfig.c        2023-08-24 12:39:48.000000000 +0200
@@ -58,6 +58,7 @@
 #include "net-private.h"
 #include "acd.h"
 #include "timeout.h"
+#include "sysctl.h"
 #include "netconfig.h"
 
 struct l_netconfig {
@@ -89,8 +90,8 @@
        unsigned int ifaddr6_dump_cmd_id;
        struct l_queue *icmp_route_data;
        struct l_acd *acd;
-       unsigned int orig_disable_ipv6;
-       long orig_optimistic_dad;
+       uint32_t orig_disable_ipv6;
+       uint32_t orig_optimistic_dad;
        uint8_t mac[ETH_ALEN];
        struct l_timeout *ra_timeout;
        bool have_lla;
@@ -1325,59 +1326,25 @@
                                                        unsigned int value)
 {
        char ifname[IF_NAMESIZE];
-       _auto_(l_free) char *filename = NULL;
-       _auto_(close) int fd = -1;
-       int r;
-       char valuestr[20];
 
        if (unlikely(!if_indextoname(nc->ifindex, ifname)))
                return -errno;
 
-       filename = l_strdup_printf("/proc/sys/net/ipv6/conf/%s/%s",
+       return l_sysctl_set_u32(value, "/proc/sys/net/ipv6/conf/%s/%s",
                                        ifname, setting);
-
-       fd = L_TFR(open(filename, O_WRONLY));
-       if (unlikely(fd < 0))
-               return -errno;
-
-       snprintf(valuestr, sizeof(valuestr), "%u", value);
-       r = L_TFR(write(fd, valuestr, strlen(valuestr)));
-       return r > 0 ? 0 : -errno;
 }
 
-static long netconfig_proc_read_ipv6_uint_setting(struct l_netconfig *nc,
-                                                       const char *setting)
+static int netconfig_proc_read_ipv6_uint_setting(struct l_netconfig *nc,
+                                                       const char *setting,
+                                                       uint32_t *out_v)
 {
        char ifname[IF_NAMESIZE];
-       _auto_(l_free) char *filename = NULL;
-       _auto_(close) int fd = -1;
-       int r;
-       char valuestr[20];
-       long value;
-       char *endp;
 
        if (unlikely(!if_indextoname(nc->ifindex, ifname)))
                return -errno;
 
-       filename = l_strdup_printf("/proc/sys/net/ipv6/conf/%s/%s",
+       return l_sysctl_get_u32(out_v, "/proc/sys/net/ipv6/conf/%s/%s",
                                        ifname, setting);
-
-       fd = L_TFR(open(filename, O_RDONLY));
-       if (unlikely(fd < 0))
-               return -errno;
-
-       r = L_TFR(read(fd, valuestr, sizeof(valuestr) - 1));
-       if (unlikely(r < 1))
-               return r == 0 ? -EINVAL : -errno;
-
-       valuestr[r - 1] = '\0';
-       errno = 0;
-       value = strtoul(valuestr, &endp, 10);
-
-       if (unlikely(errno || !L_IN_SET(*endp, '\n', '\0')))
-               return -EINVAL;
-
-       return value;
 }
 
 LIB_EXPORT struct l_netconfig *l_netconfig_new(uint32_t ifindex)
@@ -1972,6 +1939,7 @@
 static void netconfig_ifaddr_ipv6_dump_done_cb(void *user_data)
 {
        struct l_netconfig *nc = user_data;
+       int r;
 
        /*
         * Handle the case of no link-local address having been found during
@@ -1993,14 +1961,18 @@
        netconfig_proc_write_ipv6_uint_setting(nc, "addr_gen_mode", 0);
 
        /* "enable IPv6 operation" */
-       nc->orig_disable_ipv6 =
-               netconfig_proc_read_ipv6_uint_setting(nc, "disable_ipv6");
+       r = netconfig_proc_read_ipv6_uint_setting(nc, "disable_ipv6",
+                                               &nc->orig_disable_ipv6);
+       if (r < 0) /* TODO: Log error? */
+               nc->orig_disable_ipv6 = 0;
+
        if (nc->orig_disable_ipv6)
                netconfig_proc_write_ipv6_uint_setting(nc, "disable_ipv6", 0);
 }
 
 LIB_EXPORT bool l_netconfig_start(struct l_netconfig *netconfig)
 {
+       int r;
        bool optimistic_dad;
 
        if (unlikely(!netconfig || netconfig->started))
@@ -2043,12 +2015,13 @@
         */
        optimistic_dad = netconfig->optimistic_dad_enabled &&
                !netconfig->v6_static_addr;
-       netconfig->orig_optimistic_dad =
-               netconfig_proc_read_ipv6_uint_setting(netconfig,
-                                                       "optimistic_dad");
 
-       if (netconfig->orig_optimistic_dad >= 0 &&
-                       !!netconfig->orig_optimistic_dad != optimistic_dad)
+       r = netconfig_proc_read_ipv6_uint_setting(netconfig, "optimistic_dad",
+                               &netconfig->orig_optimistic_dad);
+       if (r < 0) /* TODO: Log error? */
+               netconfig->orig_optimistic_dad = optimistic_dad;
+
+       if (!r && !!netconfig->orig_optimistic_dad != optimistic_dad)
                netconfig_proc_write_ipv6_uint_setting(netconfig,
                                                        "optimistic_dad",
                                                        optimistic_dad ? 1 : 0);
@@ -2198,8 +2171,7 @@
 
        optimistic_dad = netconfig->optimistic_dad_enabled &&
                !netconfig->v6_static_addr;
-       if (netconfig->orig_optimistic_dad >= 0 &&
-                       !!netconfig->orig_optimistic_dad != optimistic_dad)
+       if (!!netconfig->orig_optimistic_dad != optimistic_dad)
                netconfig_proc_write_ipv6_uint_setting(netconfig,
                                                "optimistic_dad",
                                                netconfig->orig_optimistic_dad);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/settings.c new/ell-0.58/ell/settings.c
--- old/ell-0.57/ell/settings.c 2023-05-24 16:13:48.000000000 +0200
+++ new/ell-0.58/ell/settings.c 2023-08-24 12:39:48.000000000 +0200
@@ -1123,29 +1123,13 @@
                                        unsigned int *out)
 {
        const char *value = l_settings_get_value(settings, group_name, key);
-       unsigned long int r;
-       unsigned int t;
-       char *endp;
 
        if (!value)
                return false;
 
-       /* Do not allow '+' or '-' or empty string */
-       if (!l_ascii_isdigit(*value))
+       if (l_safe_atou32(value, out) < 0)
                goto error;
 
-       errno = 0;
-
-       t = r = strtoul(value, &endp, 0);
-       if (*endp != '\0')
-               goto error;
-
-       if (unlikely(errno == ERANGE || r != t))
-               goto error;
-
-       if (out)
-               *out = r;
-
        return true;
 
 error:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/sysctl.c new/ell-0.58/ell/sysctl.c
--- old/ell-0.57/ell/sysctl.c   1970-01-01 01:00:00.000000000 +0100
+++ new/ell-0.58/ell/sysctl.c   2023-08-24 12:39:48.000000000 +0200
@@ -0,0 +1,112 @@
+/*
+ *
+ *  Embedded Linux library
+ *
+ *  Copyright (C) 2022  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2023  Cruise LLC. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+#include <errno.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "sysctl.h"
+#include "useful.h"
+#include "util.h"
+#include "private.h"
+
+static int sysctl_write(const char *file, const void *value, size_t len)
+{
+       int fd;
+       ssize_t r;
+
+       fd = L_TFR(open(file, O_WRONLY));
+       if (unlikely(fd < 0))
+               return -errno;
+
+       r = L_TFR(write(fd, value, len));
+       if (r < 0)
+               r = -errno;
+       else
+               r = 0;
+
+       close(fd);
+       return r;
+}
+
+static int sysctl_read(const char *file, void *dest, size_t len)
+{
+       int fd;
+       ssize_t r;
+
+       fd = L_TFR(open(file, O_RDONLY));
+       if (unlikely(fd < 0))
+               return -errno;
+
+       r = L_TFR(read(fd, dest, len));
+       if (unlikely(r < 0))
+               r = -errno;
+
+       close(fd);
+       return r;
+}
+
+LIB_EXPORT int l_sysctl_get_u32(uint32_t *out_v, const char *format, ...)
+{
+       _auto_(l_free) char *filename = NULL;
+       va_list ap;
+       char valuestr[64];
+       int r;
+
+       va_start(ap, format);
+       filename = l_strdup_vprintf(format, ap);
+       va_end(ap);
+
+       r = sysctl_read(filename, valuestr, sizeof(valuestr) - 1);
+       if (r < 0)
+               return r;
+
+       while (r > 0 && L_IN_SET(valuestr[r - 1], '\n', '\r', '\t', ' '))
+               r--;
+
+       valuestr[r] = '\0';
+
+       return l_safe_atou32(valuestr, out_v);
+}
+
+LIB_EXPORT int l_sysctl_set_u32(uint32_t v, const char *format, ...)
+{
+       _auto_(l_free) char *filename = NULL;
+       va_list ap;
+       char valuestr[64];
+       size_t len;
+
+       va_start(ap, format);
+       filename = l_strdup_vprintf(format, ap);
+       va_end(ap);
+
+       len = snprintf(valuestr, sizeof(valuestr), "%u", v);
+
+       return sysctl_write(filename, valuestr, len);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/sysctl.h new/ell-0.58/ell/sysctl.h
--- old/ell-0.57/ell/sysctl.h   1970-01-01 01:00:00.000000000 +0100
+++ new/ell-0.58/ell/sysctl.h   2023-08-24 12:39:48.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ *
+ *  Embedded Linux library
+ *
+ *  Copyright (C) 2022  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2023  Cruise LLC. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+int l_sysctl_get_u32(uint32_t *out_v, const char *format, ...)
+                       __attribute__((format(printf, 2, 3)));
+int l_sysctl_set_u32(uint32_t v, const char *format, ...)
+                       __attribute__((format(printf, 2, 3)));
+
+#ifdef __cplusplus
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/util.c new/ell-0.58/ell/util.c
--- old/ell-0.57/ell/util.c     2023-01-23 19:26:15.000000000 +0100
+++ new/ell-0.58/ell/util.c     2023-08-24 12:39:48.000000000 +0200
@@ -28,6 +28,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <stdint.h>
+#include <errno.h>
 
 #include "utf8.h"
 #include "util.h"
@@ -745,3 +747,83 @@
 {
        return __secure_memeq(field, size, byte) == 0 ? true : false;
 }
+
+static int safe_atou(const char *s, int base, unsigned int *out_u)
+{
+       unsigned long int r;
+       unsigned int t;
+       char *endp;
+
+       errno = 0;
+
+       t = r = strtoul(s, &endp, base);
+       if (unlikely(errno > 0))
+               return -errno;
+
+       if (endp == s || *endp != '\0')
+               return -EINVAL;
+
+       if (unlikely(r != t))
+               return -ERANGE;
+
+       if (out_u)
+               *out_u = t;
+
+       return 0;
+}
+
+LIB_EXPORT int l_safe_atou32(const char *s, uint32_t *out_u)
+{
+       if (!l_ascii_isdigit(s[0]))
+               return -EINVAL;
+
+       /* Don't allow leading zeros */
+       if (s[0] == '0' && s[1] != '\0')
+               return -EINVAL;
+
+       return safe_atou(s, 10, out_u);
+}
+
+LIB_EXPORT int l_safe_atox8(const char *s, uint8_t *out_x)
+{
+       uint32_t x;
+       int r;
+
+       r = l_safe_atox32(s, &x);
+       if (r < 0)
+               return r;
+
+       if (x > UINT8_MAX)
+               return -ERANGE;
+
+       if (out_x)
+               *out_x = x;
+
+       return 0;
+}
+
+LIB_EXPORT int l_safe_atox16(const char *s, uint16_t *out_x)
+{
+       uint32_t x;
+       int r;
+
+       r = l_safe_atox32(s, &x);
+       if (r < 0)
+               return r;
+
+       if (x > UINT16_MAX)
+               return -ERANGE;
+
+       if (out_x)
+               *out_x = x;
+
+       return 0;
+}
+
+LIB_EXPORT int l_safe_atox32(const char *s, uint32_t *out_x)
+{
+       if (!l_ascii_isxdigit(s[0]))
+               return -EINVAL;
+
+       return safe_atou(s, 16, out_x);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/ell/util.h new/ell-0.58/ell/util.h
--- old/ell-0.57/ell/util.h     2023-01-23 19:26:15.000000000 +0100
+++ new/ell-0.58/ell/util.h     2023-08-24 12:39:48.000000000 +0200
@@ -427,6 +427,11 @@
                o[i] = r[i] ^ ((l[i] ^ r[i]) & mask);
 }
 
+int l_safe_atou32(const char *s, uint32_t *out_u);
+int l_safe_atox32(const char *s, uint32_t *out_u);
+int l_safe_atox16(const char *s, uint16_t *out_u);
+int l_safe_atox8(const char *s, uint8_t *out_u);
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/unit/test-settings.c 
new/ell-0.58/unit/test-settings.c
--- old/ell-0.57/unit/test-settings.c   2022-02-24 21:20:21.000000000 +0100
+++ new/ell-0.58/unit/test-settings.c   2023-08-24 12:39:48.000000000 +0200
@@ -152,6 +152,7 @@
                "IntegerG=2247483647\nIntegerH=4294967296\n"
                "IntegerI=9223372036854775808\n"
                "IntegerJ=18446744073709551616\n"
+               "IntegerEmpty=\n"
                "String=\\tFoobar\\s\n"
                "StringEmpty=\n"
                "StringBad1=Foobar\\\n"
@@ -214,6 +215,10 @@
        assert(!l_settings_get_uint(settings, "Foobar", "FoobarH", &uint32));
        assert(!l_settings_get_int64(settings, "Foobar", "IntegerI", &int64));
        assert(!l_settings_get_uint64(settings, "Foobar", "IntegerJ", &uint64));
+       assert(!l_settings_get_int(settings, "Foobar",
+                                       "IntegerEmpty", &int32));
+       assert(!l_settings_get_uint(settings, "Foobar",
+                                       "IntegerEmpty", &uint32));
 
        str = l_settings_get_string(settings, "Foobar", "String");
        assert(str);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/unit/test-sysctl.c 
new/ell-0.58/unit/test-sysctl.c
--- old/ell-0.57/unit/test-sysctl.c     1970-01-01 01:00:00.000000000 +0100
+++ new/ell-0.58/unit/test-sysctl.c     2023-08-24 12:39:48.000000000 +0200
@@ -0,0 +1,78 @@
+/*
+ *
+ *  Embedded Linux library
+ *
+ *  Copyright (C) 2023  Cruise LLC. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include <ell/ell.h>
+
+static void test_sysctl_get_set(const void *data)
+{
+       FILE *f;
+       uint32_t n;
+       uint32_t expected;
+       int r;
+
+       /* Grab the setting via sysctl */
+       f = popen("sysctl -n net.core.somaxconn", "r");
+       assert(f);
+
+       assert(fscanf(f, "%u", &expected) == 1);
+       pclose(f);
+
+       /* Now check against what we get */
+       assert(l_sysctl_get_u32(&n, "/proc/sys/%s/%s/%s",
+                                       "net", "core", "somaxconn") == 0);
+       assert(n == expected);
+
+       /*
+        * Attempt to change the setting, if we get an -EPERM, then we're
+        * most likely not running as root, so succeed silently.  Any other
+        * error is treated as a unit test failure
+        */
+
+       r = l_sysctl_set_u32(5000, "/proc/sys/net/core/%s", "somaxconn");
+       if (r == -EACCES)
+               return;
+
+       assert(!r);
+       assert(!l_sysctl_get_u32(&n, "/proc/sys/net/core/somaxconn"));
+       assert(n == 5000);
+
+       /* Set it back to original */
+       assert(!l_sysctl_set_u32(expected, "/proc/sys/net/core/somaxconn"));
+}
+
+int main(int argc, char *argv[])
+{
+       l_test_init(&argc, &argv);
+
+       l_test_add("sysctl/get_set", test_sysctl_get_set, NULL);
+
+       return l_test_run();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/unit/test-tls.c new/ell-0.58/unit/test-tls.c
--- old/ell-0.57/unit/test-tls.c        2022-11-18 10:08:38.000000000 +0100
+++ new/ell-0.58/unit/test-tls.c        2023-08-24 12:39:48.000000000 +0200
@@ -941,26 +941,11 @@
        test_tls_with_ver(&test, 0, 0);
 }
 
-static int read_int_from_file(const char *path)
-{
-       int ret;
-       FILE *file;
-
-       file = fopen(path, "r");
-       if (!file)
-               return 0;
-
-       if (fscanf(file, "%i", &ret) < 1)
-               ret = 0;
-
-       fclose(file);
-       return ret;
-}
-
 int main(int argc, char *argv[])
 {
        unsigned int i;
-       int maxkeys;
+       uint32_t maxkeys;
+       int r;
 
        l_test_init(&argc, &argv);
 
@@ -1008,10 +993,9 @@
                goto done;
        }
 
-       maxkeys = read_int_from_file(getuid() > 0 ?
-                                       "/proc/sys/kernel/keys/maxkeys" :
-                                       "/proc/sys/kernel/keys/root_maxkeys");
-       if (maxkeys && maxkeys < 2000)
+       r = l_sysctl_get_u32(&maxkeys, "/proc/sys/kernel/keys/%s",
+                               getuid() > 0 ? "maxkeys" : "root_maxkeys");
+       if (!r && maxkeys < 2000)
                printf("Running sysctl kernel.keys.%s=2000 is recommended\n",
                        getuid() > 0 ? "maxkeys" : "root_maxkeys");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ell-0.57/unit/test-util.c 
new/ell-0.58/unit/test-util.c
--- old/ell-0.57/unit/test-util.c       2023-01-23 19:26:15.000000000 +0100
+++ new/ell-0.58/unit/test-util.c       2023-08-24 12:39:48.000000000 +0200
@@ -25,6 +25,9 @@
 #endif
 
 #include <assert.h>
+#include <limits.h>
+#include <stdio.h>
+#include <errno.h>
 
 #include <ell/ell.h>
 
@@ -163,6 +166,50 @@
        assert(!L_IN_STRSET("a"));
 }
 
+static void test_safe_atoux(const void *test_data)
+{
+       uint32_t r;
+       uint16_t h;
+       uint8_t c;
+       char s[64];
+
+       assert(!l_safe_atou32("234233", &r) && r == 234233);
+       assert(!l_safe_atou32("0", &r) && r == 0);
+
+       assert(!l_safe_atox32("a34", &r) && r == 0xa34);
+       assert(!l_safe_atox32("0xa34", &r) && r == 0xa34);
+       assert(l_safe_atou32("a34", NULL) == -EINVAL);
+
+       sprintf(s, "%u", UINT_MAX);
+       assert(!l_safe_atou32(s, &r) && r == UINT_MAX);
+
+       sprintf(s, "%x", UINT_MAX);
+       assert(!l_safe_atox32(s, &r) && r == UINT_MAX);
+
+       assert(l_safe_atou32("", NULL) == -EINVAL);
+       assert(l_safe_atox32("", NULL) == -EINVAL);
+
+       sprintf(s, "%llu", ULLONG_MAX);
+       assert(l_safe_atou32(s, NULL) == -ERANGE);
+
+       sprintf(s, "%llx", ULLONG_MAX);
+       assert(l_safe_atox32(s, NULL) == -ERANGE);
+
+       assert(l_safe_atou32("    3", NULL) == -EINVAL);
+       assert(l_safe_atou32("+3434", NULL) == -EINVAL);
+       assert(l_safe_atou32("-3434", NULL) == -EINVAL);
+       assert(l_safe_atou32("00000", &r) == -EINVAL);
+       assert(!l_safe_atox32("0002", &r) && r == 0x2);
+       assert(!l_safe_atox32("0x02", &r) && r == 0x2);
+
+       assert(l_safe_atox32("+0x3434", NULL) == -EINVAL);
+       assert(l_safe_atox32("-0x3434", NULL) == -EINVAL);
+
+       assert(!l_safe_atox16("0xffff", &h) && h == 0xffff);
+       assert(!l_safe_atox8("0xff", &c) && c == 0xff);
+       assert(l_safe_atox8("0xffff", &c) == -ERANGE);
+}
+
 int main(int argc, char *argv[])
 {
        l_test_init(&argc, &argv);
@@ -178,5 +225,7 @@
 
        l_test_add("L_IN_SET", test_in_set, NULL);
 
+       l_test_add("l_safe_atoux", test_safe_atoux, NULL);
+
        return l_test_run();
 }

Reply via email to