[packages/whoson] Rel 4
arekm
arekm at pld-linux.org
Sun Aug 23 16:24:01 CEST 2026
commit 127ae4ac83eef9fa9746e3260e6b888adc7857b5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Aug 23 16:23:51 2026 +0200
Rel 4
whoson-cfgstr.patch | 21 +++++++++++++++++++++
whoson-grp.patch | 10 ++++++++++
whoson-link.patch | 11 +++++++++++
whoson-privdrop.patch | 37 +++++++++++++++++++++++++++++++++++++
whoson.spec | 22 ++++++++++++++++------
5 files changed, 95 insertions(+), 6 deletions(-)
---
diff --git a/whoson.spec b/whoson.spec
index 92fa877..2d98881 100644
--- a/whoson.spec
+++ b/whoson.spec
@@ -2,14 +2,18 @@ Summary: Protocol for Keeping Track of Dynamically Allocated IP
Summary(pl.UTF-8): Protokołu śledzenia dynamicznie przydzielanych adresów IP
Name: whoson
Version: 2.05
-Release: 3
+Release: 4
License: Public Domain
Group: Networking
-Source0: http://downloads.sourceforge.net/whoson/%{name}-%{version}.tar.gz
+Source0: https://downloads.sourceforge.net/whoson/%{name}-%{version}.tar.gz
# Source0-md5: 5c36fbaca0f8a618af2433fc92b3e5b2
Source1: %{name}.init
Source2: %{name}.conf
-URL: http://whoson.sourceforge.net/
+Patch0: %{name}-grp.patch
+Patch1: %{name}-privdrop.patch
+Patch2: %{name}-link.patch
+Patch3: %{name}-cfgstr.patch
+URL: https://whoson.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@@ -43,14 +47,14 @@ Whoson server binary and scripts.
Plik binarny i skrypty serwera whoson.
%package devel
-Summary: Header files and development docomentation for whoson
-Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja dla dla programistów do whosona
+Summary: Header files and development documentation for whoson
+Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja dla programistów do whosona
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This is whoson development package. It includes files and development
-docomentation for whoson.
+documentation for whoson.
%description devel -l pl.UTF-8
To jest pakiet dla programistów. Zawiera pliki nagłówkowe i
@@ -70,6 +74,10 @@ Biblioteka statyczna whosona.
%prep
%setup -q
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
%build
%{__libtoolize}
@@ -77,6 +85,8 @@ Biblioteka statyczna whosona.
%{__autoconf}
%{__autoheader}
%{__automake}
+# K&R-era lhash.c: calls through unprototyped function pointers are errors under the C23 default
+CFLAGS="%{rpmcflags} -std=gnu17"
%configure
%{__make} -j1
diff --git a/whoson-cfgstr.patch b/whoson-cfgstr.patch
new file mode 100644
index 0000000..1058e64
--- /dev/null
+++ b/whoson-cfgstr.patch
@@ -0,0 +1,21 @@
+--- orig/serv_common.c 2006-11-26 13:33:33.000000000 +0100
++++ new/serv_common.c 2026-08-23 15:21:27.999695198 +0200
+@@ -321,15 +321,15 @@
+ if (ttl == 0) ttl=TTL;
+ cachesize=rec->cachesize;
+ if (cachesize == 0) cachesize=CACHESIZE;
+- if (rec->chroot) newroot=rec->chroot;
+- if ((rec->user) && ((pw=getpwnam(rec->user)))) {
++ if (rec->chroot[0]) newroot=rec->chroot;
++ if ((rec->user[0]) && ((pw=getpwnam(rec->user)))) {
+ runuid=pw->pw_uid;
+ if (!rungid) rungid=pw->pw_gid;
+ } else {
+ ERRLOG((LOG_ERR,"bad user name \"%s\"",
+ rec->user?rec->user:"(null)"))
+ }
+- if ((rec->group) && ((gr=getgrnam(rec->group)))) {
++ if ((rec->group[0]) && ((gr=getgrnam(rec->group)))) {
+ rungid=gr->gr_gid;
+ } else {
+ ERRLOG((LOG_ERR,"bad group name \"%s\"",
diff --git a/whoson-grp.patch b/whoson-grp.patch
new file mode 100644
index 0000000..a335d42
--- /dev/null
+++ b/whoson-grp.patch
@@ -0,0 +1,10 @@
+--- orig/whosond.c 2003-08-21 17:50:00.000000000 +0200
++++ new/whosond.c 2026-08-23 15:16:46.282794193 +0200
+@@ -92,6 +92,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <grp.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <signal.h>
diff --git a/whoson-link.patch b/whoson-link.patch
new file mode 100644
index 0000000..10675f4
--- /dev/null
+++ b/whoson-link.patch
@@ -0,0 +1,11 @@
+--- orig/Makefile.am 2006-11-26 00:10:17.000000000 +0100
++++ new/Makefile.am 2026-08-23 15:19:31.980876108 +0200
+@@ -100,7 +100,7 @@
+ ## Documentation says that dependencies are created automatically from
+ ## LDADD but this is not true. So we have to specify then explicitely.
+ ## The same for LIBADD below.
+-whosond_DEPENDENCIES = @SERV_CONN_OBJ@
++whosond_DEPENDENCIES = $(lib_LTLIBRARIES) @LIBOBJS@ @SERV_CONN_OBJ@
+
+ libwhoson_la_SOURCES = clnt_common.c rtconfig.c checkperm.c
+ nodist_libwhoson_la_SOURCES = clntlist.c
diff --git a/whoson-privdrop.patch b/whoson-privdrop.patch
new file mode 100644
index 0000000..62c07bc
--- /dev/null
+++ b/whoson-privdrop.patch
@@ -0,0 +1,37 @@
+--- orig/whosond.c 2026-08-23 15:16:46.282794193 +0200
++++ new/whosond.c 2026-08-23 15:16:59.312412635 +0200
+@@ -262,18 +262,28 @@
+ }
+ #endif
+ #ifdef HAVE_SETREUID
+- setregid(rungid,rungid);
++ if (setregid(rungid,rungid) == -1) {
++ ERRLOG((LOG_ERR,"setregid() failed: %m\n"))
++ return 1;
++ }
+ #else
+- setegid(rungid);
+- setgid(rungid);
++ if (setegid(rungid) == -1 || setgid(rungid) == -1) {
++ ERRLOG((LOG_ERR,"setgid() failed: %m\n"))
++ return 1;
++ }
+ #endif
+ }
+ if (runuid) {
+ #ifdef HAVE_SETREUID
+- setreuid(runuid,runuid);
++ if (setreuid(runuid,runuid) == -1) {
++ ERRLOG((LOG_ERR,"setreuid() failed: %m\n"))
++ return 1;
++ }
+ #else
+- seteuid(runuid);
+- setuid(runuid);
++ if (seteuid(runuid) == -1 || setuid(runuid) == -1) {
++ ERRLOG((LOG_ERR,"setuid() failed: %m\n"))
++ return 1;
++ }
+ #endif
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/whoson.git/commitdiff/127ae4ac83eef9fa9746e3260e6b888adc7857b5
More information about the pld-cvs-commit
mailing list