Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
Fedora Release Engineering
d173f7d087 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:13:33 +00:00
Björn Esser
1599677c3e
Add explicit BR: libxcrypt-devel
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2025-02-01 19:58:25 +01:00
Fedora Release Engineering
9a0de25a59 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:36:30 +00:00
Ales Nezbeda
b50a79d5df Fix uninitialized int causing different ports for IPv4 and IPv6 2025-01-14 16:51:02 +01:00
Fedora Release Engineering
5f37301e89 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:43:58 +00:00
Ondřej Sloup
1294f444fe Don't hard code _FORTIFY_SOURCE=2, Update URL, Change license to the SPDX format (GPL-2.0-only) 2024-01-30 19:42:07 +01:00
Fedora Release Engineering
b961bf2136 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 10:50:56 +00:00
Fedora Release Engineering
dc139dbe63 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:32:53 +00:00
Fedora Release Engineering
5810959a67 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:07:34 +00:00
Timm Bäder
2b97b96277 Fix an implicit int during configure time
Just provide an explicit int instead.

See https://fedoraproject.org/wiki/Changes/PortingToModernC and
https://fedoraproject.org/wiki/Toolchain/PortingToModernC

Upstream PR:
https://github.com/thkukuk/ypserv/pull/16
2022-12-01 13:27:26 +01:00
Fedora Release Engineering
166e379e88 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:46:54 +00:00
Marek Kulik
a519c16944 Fix gcc12 compilation issues
Resolves: #2047138
2022-02-01 12:03:03 +01:00
Fedora Release Engineering
9336317c39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:43:49 +00:00
Björn Esser
3cef81fce2
Rebuild(libnsl2)
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2021-11-12 22:26:59 +01:00
Marek Kulik
dc06fc32c3 Update to new upstream version 4.2 2021-09-30 11:07:38 +02:00
6 changed files with 156 additions and 21 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ ypserv-2.23.tar.bz2
/ypserv-5bfba76.tar.gz
/ypserv-326857e.tar.gz
/v4.1.tar.gz
/v4.2.tar.gz

View file

@ -1 +1 @@
SHA512 (v4.1.tar.gz) = bdf8e6f70771478b591f6b3bcb530263406c2580a0bf41b3afd317d93f1781c0b2eb806ff86b5625f6c512f481882f5bb784b5159aa90c16320ebf9e7a78a66e
SHA512 (v4.2.tar.gz) = dd25170de44294d6556db1f757468d4db4484965230cad11295137c6546443a2e4e0303ac417783d0308b2af0d40201955bf3db675c43db33ad87f6f9bc90246

View file

@ -1,5 +1,5 @@
--- makedbm/makedbm.c.headers 2017-02-21 13:57:23.933293831 +0100
+++ makedbm/makedbm.c 2017-02-21 13:57:48.141286207 +0100
--- ypserv-4.2/makedbm/makedbm.c.headers 2017-02-21 13:57:23.933293831 +0100
+++ ypserv-4.2/makedbm/makedbm.c 2017-02-21 13:57:48.141286207 +0100
@@ -30,6 +30,7 @@
#include <netdb.h>
#include <rpc/rpc.h>

View file

@ -0,0 +1,12 @@
diff -ruN ypserv-4.2/configure.ac ypserv-4.2.orig/configure.ac
--- ypserv-4.2/configure.ac 2022-12-01 13:22:38.493164313 +0100
+++ ypserv-4.2.orig/configure.ac 2022-12-01 13:13:06.411943797 +0100
@@ -99,7 +99,7 @@
AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
cat > conftest.c <<EOF
int foo;
-main () { return 0;}
+int main () { return 0;}
EOF
if test "$USE_PIE" = "yes" &&
AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fpie

View file

@ -0,0 +1,80 @@
From 2bc35f9592c8abc850fc6d3343a29227b45eb054 Mon Sep 17 00:00:00 2001
From: Ales Nezbeda <anezbeda@redhat.com>
Date: Tue, 1 Oct 2024 14:40:26 +0200
Subject: [PATCH] Fix use of uninitialized variable as an value for sock opt
Since it is possible to listen to IPv4 via IPv6 socket by default, we
have to disable this feature due to 'Disallow v4-in-v6 to allow
host-based access checks'. This also allows us to use the same port for
IPv4 and IPv6 socket.
Disabling this feature is done via `setsockopt()` function where we pass
flag that we want to set - `IPV6_V6ONLY` and value. For value, we should
pass pointer to value and size of the value. We were passing pointer to
uninitialized integer as a value. This resulted in undefined behavior.
Most likely, this undefined behavior resulted in the flag being set to
false. This also resulted in IPv4 and IPv6 not being able to share
the same port. This caused use of two neighboring ports instead of one.
When user then tried to set port in config file and then use port one
above it was not possible as it was already used.
---
rpc.yppasswdd/yppasswdd.c | 2 +-
rpc.ypxfrd/ypxfrd.c | 2 +-
yppush/yppush.c | 3 ++-
ypserv/ypserv.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/rpc.yppasswdd/yppasswdd.c b/rpc.yppasswdd/yppasswdd.c
index f9609eb..d7f6050 100644
--- a/rpc.yppasswdd/yppasswdd.c
+++ b/rpc.yppasswdd/yppasswdd.c
@@ -476,7 +476,7 @@ main (int argc, char **argv)
{
/* Disallow v4-in-v6 to allow host-based access checks */
- int i;
+ int i = 1;
if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY,
&i, sizeof(i)) == -1)
diff --git a/rpc.ypxfrd/ypxfrd.c b/rpc.ypxfrd/ypxfrd.c
index f605c84..469e0e5 100644
--- a/rpc.ypxfrd/ypxfrd.c
+++ b/rpc.ypxfrd/ypxfrd.c
@@ -385,7 +385,7 @@ main (int argc, char **argv)
{
/* Disallow v4-in-v6 to allow host-based access checks */
- int i;
+ int i = 1;
if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY,
&i, sizeof(i)) == -1)
diff --git a/yppush/yppush.c b/yppush/yppush.c
index d937b84..a5916be 100644
--- a/yppush/yppush.c
+++ b/yppush/yppush.c
@@ -430,7 +430,8 @@ yppush_foreach (const char *host)
struct timeval tv = {10, 0};
u_int transid;
char server[YPMAXPEER + 2];
- int i, sock;
+ int i = 1;
+ int sock;
struct sigaction sig;
struct netconfig *nconf;
struct sockaddr *sa;
diff --git a/ypserv/ypserv.c b/ypserv/ypserv.c
index d8876e9..e27c2a4 100644
--- a/ypserv/ypserv.c
+++ b/ypserv/ypserv.c
@@ -497,7 +497,7 @@ main (int argc, char **argv)
if (family == AF_INET6)
{
/* Disallow v4-in-v6 to allow host-based access checks */
- int i;
+ int i = 1;
if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY,
&i, sizeof(i)) == -1)

View file

@ -1,9 +1,11 @@
Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv
Version: 4.1
Release: 7%{?dist}
License: GPLv2
Version: 4.2
Release: 15%{?dist}
License: GPL-2.0-only
URL: https://www.thkukuk.de/nis/nis/ypserv/
Source0: https://github.com/thkukuk/%{name}/archive/v%{version}.tar.gz
Source1: ypserv.service
Source2: yppasswdd.service
@ -30,8 +32,11 @@ Patch8: ypserv-2.27-confpost.patch
Patch10: ypserv-2.31-netgrprecur.patch
Patch12: ypserv-4.0-headers.patch
Patch14: ypserv-4.0-selinux-context.patch
Patch15: ypserv-4.2-implicit-int.patch
Patch16: ypserv-4.2-uninitialized-int.patch
BuildRequires: make
BuildRequires: libxcrypt-devel
BuildRequires: gcc
BuildRequires: tokyocabinet-devel
BuildRequires: systemd
@ -60,20 +65,7 @@ need to install the yp-tools and ypbind packages on any NIS client
machines.
%prep
%setup -q
%patch0 -p1 -b .redhat
%patch2 -p1 -b .nfsnobody
%patch3 -p1 -b .respzero
%patch4 -p1 -b .nonedomain
%patch5 -p1 -b .slp-warning
%patch6 -p1 -b .manfix
%patch7 -p1 -b .aliases
%patch8 -p1 -b .confpost
%patch10 -p1 -b .netgrprecur
%patch12 -b .headers
%patch14 -p1 -b .selinux-context
%autosetup -n %{name}-%{version} -p1
# Delete generated man pages. They will be generated later from source.
rm makedbm/makedbm.8
@ -91,6 +83,8 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CFLAGS="$RPM_OPT_FLAGS -fpic"
%endif
# Fix gcc12 issues (#2047138)
export CFLAGS="$CFLAGS -Wno-format-overflow"
%configure \
--enable-checkroot \
@ -173,6 +167,54 @@ install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/rpc.yppasswdd.env
%{_includedir}/rpcsvc
%changelog
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Feb 01 2025 Björn Esser <besser82@fedoraproject.org> - 4.2-14
- Add explicit BR: libxcrypt-devel
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Jan 14 2025 Ales Nezbeda <anezbeda@redhat.com> - 4.2-12
- Fix uninitialized int causing different ports for IPv4 and IPv6
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jan 30 2024 Ondrej Sloup <osloup@redhat.com> - 4.2-10
- Don't hard code _FORTIFY_SOURCE=2
- Update license tag to the SPDX format (GPL-2.0-only)
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 01 2022 Timm Bäder <tbaeder@redhat.com> - 4.2-6
- Get rid of an implicit int during configure time
- See https://fedoraproject.org/wiki/Changes/PortingToModernC
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Feb 01 2022 Marek Kulik <mkulik@redhat.com> - 4.2-4
- Fix gcc12 compilation issues
- Resolves: #2047138
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Nov 12 2021 Björn Esser <besser82@fedoraproject.org> - 4.2-2
- Rebuild(libnsl2)
* Tue Sep 28 2021 Marek Kulik <mkulik@redhat.com> - 4.2-1
- Update to new upstream version 4.2
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild