Accepting request 1289937 from network:utilities
OBS-URL: https://build.opensuse.org/request/show/1289937 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tcpd?expand=0&rev=41
This commit is contained in:
31
tcpd-check-finger-presence.patch
Normal file
31
tcpd-check-finger-presence.patch
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Index: tcp_wrappers_7.6/safe_finger.c
|
||||||
|
===================================================================
|
||||||
|
--- tcp_wrappers_7.6.orig/safe_finger.c
|
||||||
|
+++ tcp_wrappers_7.6/safe_finger.c
|
||||||
|
@@ -32,12 +32,10 @@ static char sccsid[] = "@(#) safe_finger
|
||||||
|
|
||||||
|
/* Local stuff */
|
||||||
|
|
||||||
|
-char path[] = "PATH=/bin:/usr/bin:/usr/sbin";
|
||||||
|
-
|
||||||
|
#define TIME_LIMIT 60 /* Do not keep listinging forever */
|
||||||
|
#define INPUT_LENGTH 100000 /* Do not keep listinging forever */
|
||||||
|
#define LINE_LENGTH 128 /* Editors can choke on long lines */
|
||||||
|
-#define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
|
||||||
|
+#define FINGER_PROGRAM "/usr/bin/finger" /* Most, if not all, UNIX systems */
|
||||||
|
#define UNPRIV_NAME "nobody" /* Preferred privilege level */
|
||||||
|
#define UNPRIV_UGID 32767 /* Default uid and gid */
|
||||||
|
|
||||||
|
@@ -76,9 +74,9 @@ int main(int argc, char **argv)
|
||||||
|
/*
|
||||||
|
* Redirect our standard input through the raw finger command.
|
||||||
|
*/
|
||||||
|
- if (putenv(path)) {
|
||||||
|
- fprintf(stderr, "%s: putenv: out of memory", argv[0]);
|
||||||
|
- exit(1);
|
||||||
|
+ if (access(FINGER_PROGRAM, X_OK) != 0) {
|
||||||
|
+ printf("Can not execute " FINGER_PROGRAM ". Please install 'finger' package.\n");
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
argv[0] = FINGER_PROGRAM;
|
||||||
|
finger_pid = pipe_stdin(argv);
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 30 09:17:56 UTC 2025 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- readd safe_finger [bsc#1241401]
|
||||||
|
- added patches
|
||||||
|
check whether finger is present
|
||||||
|
+ tcpd-check-finger-presence.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 22 11:20:12 UTC 2025 - pgajdos@suse.com
|
Tue Apr 22 11:20:12 UTC 2025 - pgajdos@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ Patch33: tcp_wrappers_%{version}-ipv6-mapped-v4.patch
|
|||||||
Patch34: tcp_wrappers_%{version}-ipv6.fix.fix3.diff
|
Patch34: tcp_wrappers_%{version}-ipv6.fix.fix3.diff
|
||||||
Patch35: tcp_wrappers_%{version}-gcc14.patch
|
Patch35: tcp_wrappers_%{version}-gcc14.patch
|
||||||
Patch36: tcp_wrappers_%{version}-gcc15.patch
|
Patch36: tcp_wrappers_%{version}-gcc15.patch
|
||||||
|
# check whether finger is present
|
||||||
|
Patch37: tcpd-check-finger-presence.patch
|
||||||
BuildRequires: linux-kernel-headers
|
BuildRequires: linux-kernel-headers
|
||||||
Provides: nkitb:%{_sbindir}/tcpd
|
Provides: nkitb:%{_sbindir}/tcpd
|
||||||
# bug437293
|
# bug437293
|
||||||
@@ -141,6 +143,7 @@ to compile and link programs against the TCP wrapper library.
|
|||||||
%patch -P 34
|
%patch -P 34
|
||||||
%patch -P 35 -p1
|
%patch -P 35 -p1
|
||||||
%patch -P 36 -p1
|
%patch -P 36 -p1
|
||||||
|
%patch -P 37 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||||
@@ -154,7 +157,7 @@ install -d -m 755 %{buildroot}%{_sbindir}
|
|||||||
install -d -m 755 %{buildroot}%{_mandir}/man{1,3,5,8}
|
install -d -m 755 %{buildroot}%{_mandir}/man{1,3,5,8}
|
||||||
install -m 644 ip6utils.h tcpd.h %{buildroot}%{_includedir}
|
install -m 644 ip6utils.h tcpd.h %{buildroot}%{_includedir}
|
||||||
install -m 644 libwrap.a %{buildroot}/%{_libdir}
|
install -m 644 libwrap.a %{buildroot}/%{_libdir}
|
||||||
install -m 755 tcpd tcpdchk tcpdmatch try-from %{buildroot}%{_sbindir}
|
install -m 755 safe_finger tcpd tcpdchk tcpdmatch try-from %{buildroot}%{_sbindir}
|
||||||
install -m 644 hosts_access.3 %{buildroot}%{_mandir}/man3
|
install -m 644 hosts_access.3 %{buildroot}%{_mandir}/man3
|
||||||
install -m 644 hosts_access.5 hosts_options.5 %{buildroot}%{_mandir}/man5
|
install -m 644 hosts_access.5 hosts_options.5 %{buildroot}%{_mandir}/man5
|
||||||
install -m 644 tcpd.8 tcpdchk.8 tcpdmatch.8 %{buildroot}%{_mandir}/man8
|
install -m 644 tcpd.8 tcpdchk.8 tcpdmatch.8 %{buildroot}%{_mandir}/man8
|
||||||
|
|||||||
Reference in New Issue
Block a user