diff --git a/ypbind-mt-1.19-log-binds.patch b/ypbind-mt-1.20.4-log-binds.patch
similarity index 66%
rename from ypbind-mt-1.19-log-binds.patch
rename to ypbind-mt-1.20.4-log-binds.patch
index 9d24cf3..7ca312e 100644
--- a/ypbind-mt-1.19-log-binds.patch
+++ b/ypbind-mt-1.20.4-log-binds.patch
@@ -1,5 +1,30 @@
---- ypbind-mt-1.20.4/src/serv_list.c.orig 2007-05-02 11:27:10.505406000 -0400
-+++ ypbind-mt-1.20.4/src/serv_list.c 2007-05-02 11:28:27.659681000 -0400
+diff -up ypbind-mt-1.20.4/man/ypbind.8.log-binds ypbind-mt-1.20.4/man/ypbind.8
+--- ypbind-mt-1.20.4/man/ypbind.8.log-binds 2006-10-04 17:26:33.000000000 +0200
++++ ypbind-mt-1.20.4/man/ypbind.8 2008-12-03 13:59:23.000000000 +0100
+@@ -14,7 +14,7 @@
+ ypbind \- NIS binding process
+ .SH "SYNOPSIS"
+ .HP 7
+-\fBypbind\fR [\-c] [\-d | \-debug] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
++\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
+ .HP 7
+ \fBypbind\fR \-\-version
+ .SH "DESCRIPTION"
+@@ -122,6 +122,11 @@ in debug mode.
+ \fBypbind\fR
+ will not put itself into background, and error messages and debug output are written to standard error.
+ .TP 3n
++\fB\-verbose\fR
++Causes
++\fBypbind\fR
++to syslog(2) any and all changes in the server its bound to.
++.TP 3n
+ \fB\-broken\-server\fR
+ lets
+ \fBypbind\fR
+diff -up ypbind-mt-1.20.4/src/serv_list.c.log-binds ypbind-mt-1.20.4/src/serv_list.c
+--- ypbind-mt-1.20.4/src/serv_list.c.log-binds 2008-12-03 13:51:05.000000000 +0100
++++ ypbind-mt-1.20.4/src/serv_list.c 2008-12-03 13:51:05.000000000 +0100
@@ -50,6 +50,8 @@
#include "local.h"
#include "pthread_np.h"
@@ -9,7 +34,7 @@
#if (defined(__sun__) || defined(sun)) && defined(__svr4__)
typedef uint32_t u_int32_t;
#endif
-@@ -80,6 +82,22 @@
+@@ -80,6 +82,22 @@ struct binding
struct bound_server ypset;
CLIENT *client_handle;
};
@@ -32,7 +57,7 @@
static struct binding *domainlist = NULL;
static int max_domains = 0;
-@@ -224,6 +242,12 @@
+@@ -224,6 +242,12 @@ change_binding (const char *domain, ypbi
pthread_rdwr_rlock_np (&domainlock);
update_bindingfile (&domainlist[i]);
pthread_rdwr_runlock_np (&domainlock);
@@ -45,7 +70,7 @@
return;
}
-@@ -797,6 +821,10 @@
+@@ -797,6 +821,10 @@ ping_all (struct binding *list)
list->server[i].port = s_in.sin_port;
if (s_in.sin_port == 0)
{
@@ -56,7 +81,7 @@
if (debug_flag)
log_msg (LOG_DEBUG, _("host '%s' doesn't answer."),
list->server[i].host);
-@@ -1001,13 +1029,21 @@
+@@ -1001,13 +1029,21 @@ ping_all (struct binding *list)
void
do_binding (void)
{
@@ -79,7 +104,7 @@
}
pthread_mutex_unlock (&search_lock);
}
-@@ -1038,7 +1074,8 @@
+@@ -1038,7 +1074,8 @@ test_bindings (void *param __attribute__
pthread_exit (&success);
lastcheck += ping_interval;
@@ -89,7 +114,7 @@
lastcheck = 0;
#if USE_DBUS_NM
-@@ -1091,6 +1128,7 @@
+@@ -1091,6 +1128,7 @@ retry:
domainlist[i].active = -1;
}
@@ -97,7 +122,7 @@
if (domainlist[i].active != -1)
{
/* The binding is in use, check if it is still valid and
-@@ -1107,6 +1145,10 @@
+@@ -1107,6 +1145,10 @@ retry:
YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname,
(caddr_t) &domain, (xdrproc_t) xdr_bool,
(caddr_t) &out, time_out);
@@ -108,7 +133,7 @@
}
/* time to search a new fastest server, but only if the current
-@@ -1196,6 +1238,12 @@
+@@ -1196,6 +1238,12 @@ retry:
pthread_mutex_unlock (&search_lock);
pthread_rdwr_wlock_np (&domainlock);
}
@@ -121,9 +146,10 @@
} /* end for () all domains */
pthread_rdwr_wunlock_np (&domainlock);
---- ypbind-mt-1.20.4/src/ypbind-mt.c.orig 2007-05-02 11:27:10.482429000 -0400
-+++ ypbind-mt-1.20.4/src/ypbind-mt.c 2007-05-02 11:30:00.067633000 -0400
-@@ -466,6 +466,7 @@
+diff -up ypbind-mt-1.20.4/src/ypbind-mt.c.log-binds ypbind-mt-1.20.4/src/ypbind-mt.c
+--- ypbind-mt-1.20.4/src/ypbind-mt.c.log-binds 2008-12-03 13:51:05.000000000 +0100
++++ ypbind-mt-1.20.4/src/ypbind-mt.c 2008-12-03 13:51:05.000000000 +0100
+@@ -466,6 +466,7 @@ sig_handler (void *v_param __attribute_
}
}
}
@@ -131,7 +157,7 @@
static void
usage (int ret)
-@@ -478,7 +479,7 @@
+@@ -478,7 +479,7 @@ usage (int ret)
output = stdout;
fputs (_("Usage:\n"), output);
@@ -140,7 +166,7 @@
#ifdef USE_DBUS_NM
fputs (_("\t [-no-dbus]\n"), output);
#endif
-@@ -656,6 +657,9 @@
+@@ -656,6 +657,9 @@ main (int argc, char **argv)
else if (strcmp ("-d", argv[i]) == 0 ||
strcmp ("-debug", argv[i]) == 0)
debug_flag = 1;
@@ -150,28 +176,3 @@
else if (strcmp ("-broken-server", argv[i]) == 0 ||
strcmp ("-broken_server", argv[i]) == 0)
broken_server = 1;
---- ypbind-mt-1.20.4/man/ypbind.8.xml.orig 2006-10-04 11:26:24.000000000 -0400
-+++ ypbind-mt-1.20.4/man/ypbind.8.xml 2007-05-02 11:33:11.128479000 -0400
-@@ -41,6 +41,7 @@
- ypbind
- -c
- -d -debug
-+ -verbose
- -broadcast
- -broken-server
- -ypset
-@@ -208,6 +209,14 @@
-
-
-
-+
-+
-+Causes
-+ypbind
-+to syslog(2) any and all changes in the server its bound to.
-+
-+
-+
-
-
- lets
diff --git a/ypbind-mt-1.20.4-man-port.patch b/ypbind-mt-1.20.4-man-port.patch
new file mode 100644
index 0000000..b4d2b1f
--- /dev/null
+++ b/ypbind-mt-1.20.4-man-port.patch
@@ -0,0 +1,26 @@
+diff -up ypbind-mt-1.20.4/man/ypbind.8_old ypbind-mt-1.20.4/man/ypbind.8
+--- ypbind-mt-1.20.4/man/ypbind.8_old 2008-12-03 14:13:46.000000000 +0100
++++ ypbind-mt-1.20.4/man/ypbind.8 2008-12-03 14:15:56.000000000 +0100
+@@ -14,7 +14,7 @@
+ ypbind \- NIS binding process
+ .SH "SYNOPSIS"
+ .HP 7
+-\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
++\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-p \fIport\fR] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-no\-dbus]
+ .HP 7
+ \fBypbind\fR \-\-version
+ .SH "DESCRIPTION"
+@@ -140,6 +140,13 @@ will not check if the binding is alive.
+ \fBypbind\fR
+ from keeping the connection unnessecarily open or causing autodials.
+ .TP 3n
++\fB\-p\fR port
++\fBypbind\fR
++will bind itself to this port.
++This makes it possible to have a router filter packets
++to the NIS ports, so that access to this service from
++hosts on the Internet can be restricted.
++.TP 3n
+ \fB\-f\fR configfile
+ \fBypbind\fR
+ will use
diff --git a/ypbind.spec b/ypbind.spec
index d3216e3..451f712 100644
--- a/ypbind.spec
+++ b/ypbind.spec
@@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Version: 1.20.4
-Release: 10%{?dist}
+Release: 11%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@@ -10,8 +10,9 @@ Source1: ypbind.init
Patch1: ypbind-1.11-broadcast.patch
Patch2: ypbind-1.11-gettextdomain.patch
Patch3: ypbind-mt-1.19-port-leak.patch
-Patch4: ypbind-mt-1.19-log-binds.patch
+Patch4: ypbind-mt-1.20.4-log-binds.patch
Patch5: ypbind-mt-1.20.4-smartwrite.patch
+Patch6: ypbind-mt-1.20.4-man-port.patch
Requires(post): chkconfig
Requires(preun): chkconfig
@@ -48,6 +49,7 @@ also need to install the ypserv package to a machine on your network.
%patch3 -p1 -b .port-leak
%patch4 -p1 -b .log-binds
%patch5 -p1 -b .smartwrite
+%patch6 -p1 -b .man-port
%build
%configure --sbindir=/sbin
@@ -90,6 +92,11 @@ fi
%doc README NEWS
%changelog
+* Wed Dec 3 2008 Vitezslav Crhonek - 3:1.20.4-11
+- Fix verbose option man page entry
+- Add description of port option to man page
+ Resolves: #474184
+
* Mon Nov 24 2008 Vitezslav Crhonek - 3:1.20.4-10
- Last few Merge Review related changes
- Fix init script arguments and return values