Hello community,
here is the log from the commit of package yp-tools for openSUSE:Factory checked in at 2015-04-06 00:24:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yp-tools (Old)
and /work/SRC/openSUSE:Factory/.yp-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yp-tools"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yp-tools/yp-tools.changes 2014-12-21 12:03:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yp-tools.new/yp-tools.changes 2015-04-06 00:24:56.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Mar 26 15:48:11 CET 2015 - kukuk@suse.de
+
+- Revert changes from Dec 4th and 6th, most of them were wrong.
+
+- Update to version 3.3:
+ - fix some linking issues
+ - add yp_dump_binding
+ - Fix file descriptor leak in libnis
+ - Fix wrong fallback for binding files in libnis
+ - Fix link order
+ - Implement locking for multithreaded applications
+
+-------------------------------------------------------------------
Old:
----
yp-tools-3.0.1.tar.bz2
New:
----
yp-tools-3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yp-tools.spec ++++++
--- /var/tmp/diff_new_pack.P0MGC7/_old 2015-04-06 00:24:57.000000000 +0200
+++ /var/tmp/diff_new_pack.P0MGC7/_new 2015-04-06 00:24:57.000000000 +0200
@@ -21,15 +21,15 @@
%global __requires_exclude libc.so.6\\(GLIBC_PRIVATE\\)
Name: yp-tools
-Version: 3.0.1
+Version: 3.3
Release: 0
Summary: Network Information Service (YP) client utilities
License: GPL-2.0 and LGPL-2.1
Group: Productivity/Networking/NIS
-Source: http://linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2
-Url: http://linux-nis.org/
+Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2
+Url: http://www.linux-nis.org/
BuildRequires: fdupes
-BuildRequires: pkg-config
+BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1310
BuildRequires: pkgconfig(libtirpc)
%else
@@ -43,12 +43,12 @@
test NIS configurations.
%package -n libnis1
-Summary: Library with IPv6-enabled NIS functions
+Summary: Library with IPv6 enabled NIS functions
License: LGPL-2.1
Group: System/Libraries
%description -n libnis1
-This library provides the NIS functions in a IPv6-enabled version.
+This library provides IPv6 enabled NIS functions.
%package -n libnss_nis6-2
Summary: NSS plugin for glibc replacing nss_nis
@@ -70,7 +70,7 @@
%description -n libnis-devel
This package contains the include files and libraries needed to
-develop applications using the IPv6-ready NIS functions. This
+develop applications using the IPv6 ready NIS functions. This
includes support for the ypbind v3 protocol, too.
%prep
@@ -108,12 +108,30 @@
%dir %{_localstatedir}/yp
%config(noreplace) %{_localstatedir}/yp/nicknames
%{_bindir}/nisdomainname
-%{_bindir}/yp*
-%{_prefix}/lib/yp/
-%{_mandir}/man1/*.1*
-%{_mandir}/man5/*.5*
-%{_mandir}/man8/*.8*
-%{_sbindir}/yp*
+%{_bindir}/ypcat
+%{_bindir}/ypchfn
+%{_bindir}/ypchsh
+%{_bindir}/ypdomainname
+%{_bindir}/ypmatch
+%{_bindir}/yppasswd
+%{_bindir}/ypwhich
+%dir %{_prefix}/lib/yp
+%{_prefix}/lib/yp/match_printcap
+%doc %{_mandir}/man1/ypcat.1.gz
+%doc %{_mandir}/man1/ypchfn.1.gz
+%doc %{_mandir}/man1/ypchsh.1.gz
+%doc %{_mandir}/man1/ypmatch.1.gz
+%doc %{_mandir}/man1/yppasswd.1.gz
+%doc %{_mandir}/man1/ypwhich.1.gz
+%doc %{_mandir}/man5/nicknames.5.gz
+%doc %{_mandir}/man8/yppoll.8.gz
+%doc %{_mandir}/man8/ypset.8.gz
+%doc %{_mandir}/man8/ypdomainname.8.gz
+%doc %{_mandir}/man8/nisdomainname.8.gz
+%doc %{_mandir}/man8/yp_dump_binding.8.gz
+%{_sbindir}/yppoll
+%{_sbindir}/ypset
+%{_sbindir}/yp_dump_binding
%files -n libnis1
%defattr(-,root,root)
@@ -125,7 +143,10 @@
%files -n libnis-devel
%defattr(-,root,root)
-%{_includedir}/libnis/
+%dir %{_includedir}/libnis
+%dir %{_includedir}/libnis/rpcsvc
+%{_includedir}/libnis/rpcsvc/*.h
+%{_includedir}/libnis/rpcsvc/*.x
%{_libdir}/pkgconfig/libnis.pc
%{_libdir}/libnis.so
++++++ yp-tools-3.0.1.tar.bz2 -> yp-tools-3.3.tar.bz2 ++++++
++++ 1900 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/ChangeLog new/yp-tools-3.3/ChangeLog
--- old/yp-tools-3.0.1/ChangeLog 2014-11-03 16:23:19.000000000 +0100
+++ new/yp-tools-3.3/ChangeLog 2014-12-05 16:10:54.000000000 +0100
@@ -1,3 +1,41 @@
+2014-12-05 Thorsten Kukuk
+
+ * release version 3.3
+
+ * nss_nis6/Makefile.am: link nss_nis6 against tirpc
+ * src/Makefile.am: link everything against tirpc
+
+ * src/yp_dump_binding.c: Add -p and -v parameters
+ * man/yp_dump_binding.8.in: Document -p and -v parameters
+
+ * lib/do_ypcall.c: Use clnt_create_timed
+ * lib/yp_all_host.c: Likewise.
+
+2014-12-03 Thorsten Kukuk
+
+ * man/yppoll.8.in: Add missing description.
+
+ * man/yp_dump_binding.8.in: New.
+
+ * src/yp_dump_binding.c: New program to show binding information.
+
+ * lib/do_ypcall.c (yp_bind_file): Fix file descriptor leak,
+ fix path for ypbind v2 binding file.
+
+ * src/Makefile.am (sbin_PROGRAMS): Add yp_dump_binding.
+
+2014-12-02 Thorsten Kukuk
+
+ * release version 3.1
+
+ * lib/Makefile.am: Bump minor version number.
+ * lib/do_ypcall.c: Use pthread functions for locks.
+ * lib/yp_get_default_domain.c: Likewise.
+
+ * nss_nis6/libc-lock.h: Add defines to use standard pthread functions.
+
+ * src/Makefile.am: Change order of libraries for linking.
+
2014-11-03 Thorsten Kukuk
* release version 3.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/NEWS new/yp-tools-3.3/NEWS
--- old/yp-tools-3.0.1/NEWS 2014-11-03 16:23:49.000000000 +0100
+++ new/yp-tools-3.3/NEWS 2014-12-05 12:44:32.000000000 +0100
@@ -4,6 +4,20 @@
Please send bug reports, questions and suggestions to .
+Version 3.3
+* Extend yp_dump_binding
+* Fix some link issues
+
+Version 3.2
+* Add yp_dump_binding application
+* Fix file descriptor leak in libnis
+* Fix reading fallback binding files in libnis
+* Adjust/add manual pages
+
+Version 3.1
+* Fix link order
+* Implement locking for multithreaded applications
+
Version 3.0.1
* libnis: use a much short timeout for initial RPC calls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/configure.ac new/yp-tools-3.3/configure.ac
--- old/yp-tools-3.0.1/configure.ac 2014-11-03 16:23:06.000000000 +0100
+++ new/yp-tools-3.3/configure.ac 2014-12-05 12:44:16.000000000 +0100
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(yp-tools, 3.0.1, kukuk@linux-nis.org)
+AC_INIT(yp-tools, 3.3, kukuk@linux-nis.org)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/ypcat.c])
AM_CONFIG_HEADER(config.h)
@@ -98,6 +98,6 @@
AC_OUTPUT([Makefile lib/Makefile src/Makefile man/Makefile
etc/Makefile po/Makefile.in nss_nis6/Makefile libnis.pc
- man/domainname.8 man/nicknames.5
+ man/domainname.8 man/nicknames.5 man/yp_dump_binding.8
man/ypcat.1 man/ypmatch.1 man/yppasswd.1 man/yppoll.8
man/ypset.8 man/yptest.8 man/ypwhich.1])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/lib/Makefile.am new/yp-tools-3.3/lib/Makefile.am
--- old/yp-tools-3.0.1/lib/Makefile.am 2014-11-03 16:25:43.000000000 +0100
+++ new/yp-tools-3.3/lib/Makefile.am 2014-12-03 14:24:03.000000000 +0100
@@ -24,7 +24,7 @@
noinst_LIBRARIES = libyptools.a
lib_LTLIBRARIES = libnis.la
-libnis_la_LDFLAGS = -version-info 1:1:0 \
+libnis_la_LDFLAGS = -version-info 2:1:1 \
-Wl,--version-script=$(srcdir)/libnis.map
libnis_la_LIBADD = @TIRPC_LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/lib/do_ypcall.c new/yp-tools-3.3/lib/do_ypcall.c
--- old/yp-tools-3.0.1/lib/do_ypcall.c 2014-10-29 15:28:02.000000000 +0100
+++ new/yp-tools-3.3/lib/do_ypcall.c 2014-12-05 16:08:34.000000000 +0100
@@ -17,11 +17,13 @@
#include "config.h"
#endif
-#include
#include
+#include
+#include
#include
#include
-#include
+#include
+#include
#include
#include
@@ -44,7 +46,7 @@
static const struct timeval RPCTIMEOUT = {25, 0};
static const struct timeval UDPTIMEOUT = {5, 0};
static int const MAXTRIES = 2;
-// XXX __libc_lock_define_initialized (static, ypbindlist_lock)
+static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
static dom_binding *ypbindlist = NULL;
static const char *
@@ -69,7 +71,10 @@
strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
ysd->dom_domain[YPMAXDOMAIN] = '\0';
- ysd->dom_client = clnt_create (ysd->server, YPPROG, YPVERS, "udp");
+ ysd->dom_client = clnt_create_timed (ysd->server, YPPROG, YPVERS,
+ "udp", NULL);
+ if (ysd->dom_client == NULL)
+ clnt_pcreateerror ("yp_bind_client_create_v3");
}
static void
@@ -80,7 +85,10 @@
strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
ysd->dom_domain[YPMAXDOMAIN] = '\0';
- ysd->dom_client = clnt_create (ysd->server, YPPROG, YPVERS, "udp");
+ ysd->dom_client = clnt_create_timed (ysd->server, YPPROG, YPVERS,
+ "udp", NULL);
+ if (ysd->dom_client == NULL)
+ clnt_pcreateerror ("yp_bind_client_create_v2");
}
static void
@@ -105,16 +113,19 @@
if (!status)
{
xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
goto version2;
}
yp_bind_client_create_v3 (domain, ysd, &ypb3);
xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
}
else
{
int fd;
version2:
+ snprintf (path, sizeof (path), "%s/%s.%u", BINDINGDIR, domain, 2);
fd = open (path, O_RDONLY);
if (fd >= 0)
{
@@ -136,7 +147,7 @@
{
CLIENT *client;
- client = clnt_create ("localhost", YPBINDPROG, YPBINDVERS, "tcp");
+ client = clnt_create_timed ("localhost", YPBINDPROG, YPBINDVERS, "tcp", NULL);
if (client != NULL)
{
enum clnt_stat ret;
@@ -175,6 +186,8 @@
ysd->server = NULL;
yp_bind_client_create_v3 (domain, ysd, ypbr.ypbind_respbody.ypbind_bindinfo);
+ if (ysd->dom_client == NULL)
+ return YPERR_YPSERV;
}
else
{
@@ -182,7 +195,8 @@
try_v2:
/* Fallback to protocol v2 in error case */
- client = clnt_create ("localhost", YPBINDPROG, YPBINDVERS_2, "tcp");
+ client = clnt_create_timed ("localhost", YPBINDPROG, YPBINDVERS_2,
+ "tcp", NULL);
if (client == NULL)
return YPERR_YPBIND;
@@ -218,6 +232,8 @@
ysd->server = NULL;
yp_bind_client_create_v2 (domain, ysd, &ypbr);
+ if (ysd->dom_client == NULL)
+ return YPERR_YPSERV;
}
return YPERR_SUCCESS;
@@ -294,11 +310,9 @@
{
int status;
- // XXX __libc_lock_lock (ypbindlist_lock);
-
+ pthread_mutex_lock (&ypbindlist_lock);
status = __yp_bind (indomain, &ypbindlist);
-
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
return status;
}
@@ -333,11 +347,9 @@
void
yp_unbind (const char *indomain)
{
- // XXX __libc_lock_lock (ypbindlist_lock);
-
+ pthread_mutex_lock (&ypbindlist_lock);
yp_unbind_locked (indomain);
-
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
return;
}
@@ -349,6 +361,8 @@
{
enum clnt_stat result;
+ assert ((*ydb)->dom_client != NULL);
+
result = clnt_call ((*ydb)->dom_client, prog,
xargs, req, xres, resp, RPCTIMEOUT);
@@ -375,7 +389,7 @@
status = YPERR_YPERR;
- // XXX __libc_lock_lock (ypbindlist_lock);
+ pthread_mutex_lock (&ypbindlist_lock);
ydb = ypbindlist;
while (ydb != NULL)
{
@@ -388,7 +402,7 @@
resp, &ydb, 0);
if (status == YPERR_SUCCESS)
{
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
errno = saved_errno;
return status;
}
@@ -401,7 +415,7 @@
}
ydb = ydb->dom_pnext;
}
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
/* First try with cached data failed. Now try to get
current data from the system. */
@@ -536,10 +550,10 @@
try = 0;
res = YPERR_YPERR;
- // XXX __libc_lock_lock (ypbindlist_lock);
+ pthread_mutex_lock (&ypbindlist_lock);
while (try < MAXTRIES && res != YPERR_SUCCESS)
- {
+ {
if (__yp_bind (indomain, &ydb) != 0)
{
res = YPERR_DOMAIN;
@@ -552,7 +566,7 @@
__yp_unbind (ydb);
ydb = NULL;
- clnt = clnt_create (server, YPPROG, YPVERS, "tcp");
+ clnt = clnt_create_timed (server, YPPROG, YPVERS, "tcp", NULL);
if (clnt == NULL)
{
res = YPERR_PMAP;
@@ -589,7 +603,7 @@
}
out:
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
if (server)
free (server);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/lib/yp_all_host.c new/yp-tools-3.3/lib/yp_all_host.c
--- old/yp-tools-3.0.1/lib/yp_all_host.c 2014-10-25 00:20:42.000000000 +0200
+++ new/yp-tools-3.3/lib/yp_all_host.c 2014-12-05 16:07:56.000000000 +0100
@@ -111,7 +111,7 @@
res = YPERR_YPERR;
- clnt = clnt_create (hostname, YPPROG, YPVERS, "tcp");
+ clnt = clnt_create_timed (hostname, YPPROG, YPVERS, "tcp", NULL);
if (clnt == NULL)
return YPERR_PMAP;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/lib/yp_get_default_domain.c new/yp-tools-3.3/lib/yp_get_default_domain.c
--- old/yp-tools-3.0.1/lib/yp_get_default_domain.c 2014-10-23 14:09:34.000000000 +0200
+++ new/yp-tools-3.3/lib/yp_get_default_domain.c 2014-12-02 14:18:32.000000000 +0100
@@ -19,11 +19,11 @@
#endif
#include
+#include
#include
#include
-#define NIS_LOCK() /* XXX */
-#define NIS_UNLOCK() /* XXX */
+static pthread_mutex_t ypdomainname_lock = PTHREAD_MUTEX_INITIALIZER;
static char ypdomainname[NIS_MAXNAMELEN + 1];
@@ -33,7 +33,7 @@
int result = YPERR_SUCCESS;;
*outdomain = NULL;
- NIS_LOCK();
+ pthread_mutex_lock (&ypdomainname_lock);
if (ypdomainname[0] == '\0')
{
@@ -51,7 +51,7 @@
else
*outdomain = ypdomainname;
- NIS_UNLOCK();
+ pthread_mutex_unlock (&ypdomainname_lock);
return result;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/man/Makefile.am new/yp-tools-3.3/man/Makefile.am
--- old/yp-tools-3.0.1/man/Makefile.am 2014-10-21 14:54:25.000000000 +0200
+++ new/yp-tools-3.3/man/Makefile.am 2014-12-03 13:44:34.000000000 +0100
@@ -1,14 +1,15 @@
#
-# Copyright (c) 1997, 1998, 1999, 2001, 2006, 2010 Thorsten Kukuk, Germany
+# Copyright (c) 1997-2014 Thorsten Kukuk, Germany
#
# Author: Thorsten Kukuk
#
CLEANFILES = *~ sedscript domainname.8 ypcat.1 ypmatch.1 yppasswd.1\
- yppoll.8 ypset.8 yptest.8 ypwhich.1 nicknames.5
+ yppoll.8 ypset.8 yptest.8 ypwhich.1 nicknames.5 yp_dump_binding.8
EXTRA_DIST = domainname.8.in nisdomainname.8 ypdomainname.8\
ypcat.1.in ypchfn.1 ypchsh.1 ypmatch.1.in yppasswd.1.in\
- yppoll.8.in ypset.8.in yptest.8.in ypwhich.1.in nicknames.5.in
+ yppoll.8.in ypset.8.in yptest.8.in ypwhich.1.in nicknames.5.in \
+ yp_dump_binding.8.in
man_MANS = ypcat.1 ypchfn.1 ypchsh.1 ypmatch.1 yppasswd.1 yppoll.8 ypset.8\
- ypwhich.1 nicknames.5 @MAN_DOMAINNAME@
+ ypwhich.1 nicknames.5 yp_dump_binding.8 @MAN_DOMAINNAME@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/man/yp_dump_binding.8.in new/yp-tools-3.3/man/yp_dump_binding.8.in
--- old/yp-tools-3.0.1/man/yp_dump_binding.8.in 1970-01-01 01:00:00.000000000 +0100
+++ new/yp-tools-3.3/man/yp_dump_binding.8.in 2014-12-05 12:43:31.000000000 +0100
@@ -0,0 +1,65 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 2014 Thorsten Kukuk
+.\" This file is part of the yp-tools.
+.\" Author: Thorsten Kukuk
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License version 2 as
+.\" published by the Free Software Foundation.
+.\"
+.\" This program 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 General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.TH yp_dump_binding 8 "April 2014" "YP Tools @VERSION@"
+.SH NAME
+yp_dump_binding - dump binding files
+.SH SYNOPSIS
+.B yp_dump+binding
+[
+.BI \-d " domain"
+][
+.BI \-p " path"
+][
+.BI \-v " version"
+]
+.LP
+.SH DESCRIPTION
+.B yp_dump_binding
+prints the content of the binding files in
+.B /var/yp/binding
+for the corresponding
+.BR domainname (8).
+This tool is for debugging purpose.
+
+.SH OPTIONS
+.TP
+.BI \-d " domain"
+Specify a domain other than the default domainname as returned by
+.BR domainname (8).
+.TP
+.BI \-p " path"
+Specify an alternate path to the binding files.
+.TP
+.BI \-v " version"
+Display only the binding file of a specific protocol version. By
+default the files of all versions are shown.
+.SH "SEE ALSO"
+.BR domainname (8),
+.BR ypbind (8),
+.BR ypcat (8),
+.BR ypmatch (1),
+.BR ypserv (8),
+.BR ypset (8),
+.BR ypwhich (1)
+.LP
+.SH AUTHOR
+.B yp_dump_binding
+is part of the
+.B yp-tools
+package, which was written by Thorsten Kukuk .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/man/yppoll.8.in new/yp-tools-3.3/man/yppoll.8.in
--- old/yp-tools-3.0.1/man/yppoll.8.in 2010-04-21 11:43:21.000000000 +0200
+++ new/yp-tools-3.3/man/yppoll.8.in 2014-12-03 14:12:03.000000000 +0100
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.\" Copyright (C) 1998, 1999, 2001, 2007, 2010 Thorsten Kukuk
+.\" Copyright (C) 1998, 1999, 2001, 2007, 2010, 2014 Thorsten Kukuk
.\" This file is part of the yp-tools.
.\" Author: Thorsten Kukuk
.\"
@@ -31,6 +31,10 @@
.LP
.SH DESCRIPTION
.B yppoll
+queries
+.BR ypserv (8)
+which host the NIS master server for a named map is and what the order
+number of this map is.
.SH OPTIONS
.TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/nss_nis6/Makefile.am new/yp-tools-3.3/nss_nis6/Makefile.am
--- old/yp-tools-3.0.1/nss_nis6/Makefile.am 2014-10-30 10:31:35.000000000 +0100
+++ new/yp-tools-3.3/nss_nis6/Makefile.am 2014-12-05 11:53:37.000000000 +0100
@@ -21,7 +21,7 @@
libnss_nis6_la_LDFLAGS = -version-info 2:0:0 \
-Wl,--version-script=$(srcdir)/libnss_nis6.map
-libnss_nis6_la_LIBADD = ../lib/libnis.la
+libnss_nis6_la_LIBADD = ../lib/libnis.la @TIRPC_LIBS@
libnss_nis6_la_SOURCES = nis-alias.c nis-ethers.c nis-grp.c nis-hosts.c \
nis-initgroups.c nis-netgrp.c nis-network.c \
nis-proto.c nis-publickey.c nis-pwd.c nis-rpc.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/nss_nis6/libc-lock.h new/yp-tools-3.3/nss_nis6/libc-lock.h
--- old/yp-tools-3.0.1/nss_nis6/libc-lock.h 2014-10-29 15:22:12.000000000 +0100
+++ new/yp-tools-3.3/nss_nis6/libc-lock.h 2014-12-02 15:36:03.000000000 +0100
@@ -1,140 +1,22 @@
-/* libc-internal interface for mutex locks. Stub version.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C 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.
-
- The GNU C 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 the GNU C Library; if not, see
- http://www.gnu.org/licenses/. */
-
#ifndef _LIBC_LOCK_H
#define _LIBC_LOCK_H 1
+#include
+
+#define __libc_lock_define_initialized(CLASS,NAME) \
+ CLASS pthread_mutex_t NAME = PTHREAD_MUTEX_INITIALIZER;
-/* Define a lock variable NAME with storage class CLASS. The lock must be
- initialized with __libc_lock_init before it can be used (or define it
- with __libc_lock_define_initialized, below). Use `extern' for CLASS to
- declare a lock defined in another module. In public structure
- definitions you must use a pointer to the lock structure (i.e., NAME
- begins with a `*'), because its storage size will not be known outside
- of libc. */
-#define __libc_lock_define(CLASS,NAME)
-#define __libc_lock_define_recursive(CLASS,NAME)
-#define __rtld_lock_define_recursive(CLASS,NAME)
-#define __libc_rwlock_define(CLASS,NAME)
-
-/* Define an initialized lock variable NAME with storage class CLASS. */
-#define __libc_lock_define_initialized(CLASS,NAME)
-#define __libc_rwlock_define_initialized(CLASS,NAME)
-
-/* Define an initialized recursive lock variable NAME with storage
- class CLASS. */
-#define __libc_lock_define_initialized_recursive(CLASS,NAME)
-#define __rtld_lock_define_initialized_recursive(CLASS,NAME)
-
-/* Initialize the named lock variable, leaving it in a consistent, unlocked
- state. */
-#define __libc_lock_init(NAME)
-#define __rtld_lock_initialize(NAME)
-#define __libc_rwlock_init(NAME)
-
-/* Same as last but this time we initialize a recursive mutex. */
-#define __libc_lock_init_recursive(NAME)
-
-/* Finalize the named lock variable, which must be locked. It cannot be
- used again until __libc_lock_init is called again on it. This must be
- called on a lock variable before the containing storage is reused. */
-#define __libc_lock_fini(NAME)
-#define __libc_rwlock_fini(NAME)
-
-/* Finalize recursive named lock. */
-#define __libc_lock_fini_recursive(NAME)
-
-/* Lock the named lock variable. */
-#define __libc_lock_lock(NAME)
-#define __libc_rwlock_rdlock(NAME)
-#define __libc_rwlock_wrlock(NAME)
-
-/* Lock the recursive named lock variable. */
-#define __libc_lock_lock_recursive(NAME)
-#define __rtld_lock_lock_recursive(NAME)
-
-/* Try to lock the named lock variable. */
-#define __libc_lock_trylock(NAME) 0
-#define __libc_rwlock_tryrdlock(NAME) 0
-#define __libc_rwlock_trywrlock(NAME) 0
-
-/* Try to lock the recursive named lock variable. */
-#define __libc_lock_trylock_recursive(NAME) 0
-
-/* Unlock the named lock variable. */
-#define __libc_lock_unlock(NAME)
-#define __libc_rwlock_unlock(NAME)
-
-/* Unlock the recursive named lock variable. */
-#define __libc_lock_unlock_recursive(NAME)
-#define __rtld_lock_unlock_recursive(NAME)
+#define __libc_once_define(CLASS, NAME) \
+ CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
+#define __libc_lock_lock(NAME) \
+ pthread_mutex_lock (&(NAME))
-/* Define once control variable. */
-#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0
+#define __libc_lock_unlock(NAME) \
+ pthread_mutex_unlock (&(NAME))
/* Call handler iff the first call. */
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
- do { \
- if ((ONCE_CONTROL) == 0) { \
- INIT_FUNCTION (); \
- (ONCE_CONTROL) = 1; \
- } \
- } while (0)
-
-/* Get once control variable. */
-#define __libc_once_get(ONCE_CONTROL) \
- ((ONCE_CONTROL) == 1)
-
-/* Start a critical region with a cleanup function */
-#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
-{ \
- typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \
- typeof (ARG) __save_ARG = ARG; \
- /* close brace is in __libc_cleanup_region_end below. */
-
-/* End a critical region started with __libc_cleanup_region_start. */
-#define __libc_cleanup_region_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-}
-
-/* Sometimes we have to exit the block in the middle. */
-#define __libc_cleanup_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-
-#define __libc_cleanup_push(fct, arg) __libc_cleanup_region_start (1, fct, arg)
-#define __libc_cleanup_pop(execute) __libc_cleanup_region_end (execute)
-
-/* We need portable names for some of the functions. */
-#define __libc_mutex_unlock
-
-/* Type for key of thread specific data. */
-typedef int __libc_key_t;
-
-/* Create key for thread specific data. */
-#define __libc_key_create(KEY,DEST) ((void) (KEY), (void) (DEST), -1)
-
-/* Set thread-specific data associated with KEY to VAL. */
-#define __libc_setspecific(KEY,VAL) ((void) (KEY), (void) (VAL))
-
-/* Get thread-specific data associated with KEY. */
-#define __libc_getspecific(KEY) ((void) (KEY), (void *) 0)
+ pthread_once(&(ONCE_CONTROL), INIT_FUNCTION)
#endif /* bits/libc-lock.h */
Files old/yp-tools-3.0.1/po/de.gmo and new/yp-tools-3.3/po/de.gmo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/po/de.po new/yp-tools-3.3/po/de.po
--- old/yp-tools-3.0.1/po/de.po 2014-11-03 16:26:04.000000000 +0100
+++ new/yp-tools-3.3/po/de.po 2014-12-05 12:44:41.000000000 +0100
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: yp-tools 2.5\n"
"Report-Msgid-Bugs-To: kukuk@linux-nis.org\n"
-"POT-Creation-Date: 2014-11-03 16:26+0100\n"
+"POT-Creation-Date: 2014-12-05 12:44+0100\n"
"PO-Revision-Date: 2004-06-21 14:24+02:00\n"
"Last-Translator: Thorsten Kukuk \n"
"Language-Team: No Language-Team in the moment\n"
@@ -85,19 +85,19 @@
#: src/domainname.c:65 src/domainname.c:78 src/ypcat.c:72 src/ypmatch.c:70
#: src/yppasswd.c:103 src/yppasswd.c:114 src/yppasswd.c:126 src/yppoll.c:71
-#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:85
+#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:84
msgid " -?, --help Give this help list\n"
msgstr " -?, --help Gib diese Hilfe aus\n"
#: src/domainname.c:66 src/domainname.c:79 src/ypcat.c:73 src/ypmatch.c:71
#: src/yppasswd.c:104 src/yppasswd.c:115 src/yppasswd.c:127 src/yppoll.c:72
-#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:86
+#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:85
msgid " --usage Give a short usage message\n"
msgstr " --usage Gib eine kurze Aufruf Hilfe aus\n"
#: src/domainname.c:67 src/domainname.c:80 src/ypcat.c:74 src/ypmatch.c:72
#: src/yppasswd.c:105 src/yppasswd.c:116 src/yppasswd.c:128 src/yppoll.c:73
-#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:87
+#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:86
msgid " --version Print program version\n"
msgstr " --version Gib Programm Version Information aus\n"
@@ -109,7 +109,7 @@
msgstr "%s - Setze oder zeige den Namen der aktuellen NIS Domain an\n"
#: src/domainname.c:88 src/ypcat.c:83 src/ypmatch.c:82 src/yppasswd.c:142
-#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:97
+#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:96
#, c-format
msgid "Try `%s --help' or `%s --usage' for more information.\n"
msgstr "Versuche \"%s --help\" oder \"%s --usage\" f�r mehr Informationen.\n"
@@ -145,22 +145,22 @@
msgid " -k Display map keys\n"
msgstr " -k Gib Schl�ssel mit aus\n"
-#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:80
+#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:79
msgid " -t Inhibits map nickname translation\n"
msgstr " -t Verbietet die �bersetzung von Nicknames\n"
-#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:82
+#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:81
msgid " -x Display the map nickname translation table\n"
msgstr " -x Zeige die Nickname �bersetzungstabelle an\n"
# , c-format
#: src/ypcat.c:207 src/ypmatch.c:171 src/yppasswd.c:617 src/yppoll.c:159
-#: src/ypset.c:265 src/ypwhich.c:384
+#: src/ypset.c:265 src/ypwhich.c:383
#, c-format
msgid "%s: can't get local yp domain: %s\n"
msgstr "%s: Kann die lokale NIS Domain nicht bestimmen: %s\n"
-#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:418
+#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:417
#, c-format
msgid "No running ypbind\n"
msgstr "ypbind ist nicht am laufen\n"
@@ -807,7 +807,7 @@
#: src/ypwhich.c:65
#, fuzzy
-msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"
+msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"
msgstr "Aufruf: ypwhich [-d domain] [[-t] -m [Mapname]|[-Vn] Rechner] | -x\n"
#: src/ypwhich.c:73
@@ -822,22 +822,17 @@
msgid " -m mname Find the master NIS server for the map 'mname'\n"
msgstr " -m mname Finden den NIS Master Server f�r die Map \"mname\"\n"
-#: src/ypwhich.c:79
-#, fuzzy
-msgid " -n Don't convert addresses to names\n"
-msgstr " -q Gib keine Meldungen aus\n"
-
-#: src/ypwhich.c:81
+#: src/ypwhich.c:80
#, fuzzy
msgid " -V n Version of ypbind, V3 is default\n"
msgstr " -V n Version des ypbinds Protokoll, V2 ist default\n"
-#: src/ypwhich.c:84
+#: src/ypwhich.c:83
msgid " --verbose Verbose output of result\n"
msgstr ""
# , c-format
-#: src/ypwhich.c:150 src/ypwhich.c:207
+#: src/ypwhich.c:149 src/ypwhich.c:206
#, fuzzy, c-format
msgid ""
"ypwhich: can't call ypbind on '%s'\n"
@@ -846,56 +841,60 @@
"Kann keine Verbindung aufbauen.\n"
"Grund: %s\n"
-#: src/ypwhich.c:167 src/ypwhich.c:221
+#: src/ypwhich.c:166 src/ypwhich.c:220
#, c-format
msgid ""
"Error for domain '%s' from ypbind on '%s':\n"
"\t%s\n"
msgstr ""
-#: src/ypwhich.c:262
+#: src/ypwhich.c:261
#, c-format
msgid "ERROR: taddr2host failed!\n"
msgstr ""
-#: src/ypwhich.c:268
+#: src/ypwhich.c:267
#, c-format
msgid "Error: no server information gotten from ypbind on '%s'\n"
msgstr ""
# , c-format
-#: src/ypwhich.c:390
+#: src/ypwhich.c:389
#, fuzzy, c-format
msgid "%s: no local yp domain set\n"
msgstr "%s: Kann die lokale NIS Domain nicht bestimmen: %s\n"
# , c-format
-#: src/ypwhich.c:422
+#: src/ypwhich.c:421
#, c-format
msgid "Can't find master for map \"%s\". Reason: %s\n"
msgstr "Kann Master Server der Map \"%s\" nicht finden. Grund: %s\n"
# , c-format
-#: src/ypwhich.c:446
+#: src/ypwhich.c:445
#, c-format
msgid "Can't find master for map %s. Reason: %s\n"
msgstr ""
"Kann Master Server der Map %s nicht finden.\n"
"Grund: %s\n"
-#: src/ypwhich.c:456
+#: src/ypwhich.c:455
#, c-format
msgid "No running ypbind.\n"
msgstr "ypbind ist nicht am laufen.\n"
# , c-format
-#: src/ypwhich.c:460
+#: src/ypwhich.c:459
#, c-format
msgid "Can't get map list for domain %s. Reason: %s\n"
msgstr ""
"Kann die Liste der Maps aus der Domain %s nicht bekommen.\n"
"Grund: %s\n"
+#, fuzzy
+#~ msgid " -n Don't convert addresses to names\n"
+#~ msgstr " -q Gib keine Meldungen aus\n"
+
# , c-format
#~ msgid "yptest: host %s unknown\n"
#~ msgstr "yptest: Rechner �%s� unbekannt\n"
Files old/yp-tools-3.0.1/po/sv.gmo and new/yp-tools-3.3/po/sv.gmo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/po/sv.po new/yp-tools-3.3/po/sv.po
--- old/yp-tools-3.0.1/po/sv.po 2014-11-03 16:26:04.000000000 +0100
+++ new/yp-tools-3.3/po/sv.po 2014-12-05 12:44:41.000000000 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: yp-tools 2.9\n"
"Report-Msgid-Bugs-To: kukuk@linux-nis.org\n"
-"POT-Creation-Date: 2014-11-03 16:26+0100\n"
+"POT-Creation-Date: 2014-12-05 12:44+0100\n"
"PO-Revision-Date: 2006-11-12 17:34+0100\n"
"Last-Translator: Daniel Nylander \n"
"Language-Team: Swedish \n"
@@ -83,19 +83,19 @@
#: src/domainname.c:65 src/domainname.c:78 src/ypcat.c:72 src/ypmatch.c:70
#: src/yppasswd.c:103 src/yppasswd.c:114 src/yppasswd.c:126 src/yppoll.c:71
-#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:85
+#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:84
msgid " -?, --help Give this help list\n"
msgstr " -?, --help Visa den här hjälplistan\n"
#: src/domainname.c:66 src/domainname.c:79 src/ypcat.c:73 src/ypmatch.c:71
#: src/yppasswd.c:104 src/yppasswd.c:115 src/yppasswd.c:127 src/yppoll.c:72
-#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:86
+#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:85
msgid " --usage Give a short usage message\n"
msgstr " --usage Visa ett kort användningsmeddelande\n"
#: src/domainname.c:67 src/domainname.c:80 src/ypcat.c:74 src/ypmatch.c:72
#: src/yppasswd.c:105 src/yppasswd.c:116 src/yppasswd.c:128 src/yppoll.c:73
-#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:87
+#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:86
msgid " --version Print program version\n"
msgstr " --version Skriv ut programversion\n"
@@ -109,7 +109,7 @@
"\n"
#: src/domainname.c:88 src/ypcat.c:83 src/ypmatch.c:82 src/yppasswd.c:142
-#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:97
+#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:96
#, c-format
msgid "Try `%s --help' or `%s --usage' for more information.\n"
msgstr "Prova \"%s --help\" eller \"%s --usage\" för mer information.\n"
@@ -146,21 +146,21 @@
msgstr " -k Visa kartnycklar\n"
# Inhibit = hindrar, hämmar?
-#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:80
+#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:79
msgid " -t Inhibits map nickname translation\n"
msgstr " -t Hindrar smeknamnsöversättning för kartan\n"
-#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:82
+#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:81
msgid " -x Display the map nickname translation table\n"
msgstr " -x Visa kartans översättningstabell för smeknamn\n"
#: src/ypcat.c:207 src/ypmatch.c:171 src/yppasswd.c:617 src/yppoll.c:159
-#: src/ypset.c:265 src/ypwhich.c:384
+#: src/ypset.c:265 src/ypwhich.c:383
#, c-format
msgid "%s: can't get local yp domain: %s\n"
msgstr "%s: kan inte få lokal yp-domän: %s\n"
-#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:418
+#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:417
#, c-format
msgid "No running ypbind\n"
msgstr "Ingen körande ypbind\n"
@@ -777,7 +777,7 @@
#: src/ypwhich.c:65
#, fuzzy
-msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"
+msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"
msgstr "Användning: ypwhich [-d domän] [[-t] -m [knamn]|[-Vn] värdnamn] | -x\n"
#: src/ypwhich.c:73
@@ -792,69 +792,68 @@
msgid " -m mname Find the master NIS server for the map 'mname'\n"
msgstr " -m knamn Hitta NIS-masterservern för kartan \"knamn\"\n"
-#: src/ypwhich.c:79
-#, fuzzy
-msgid " -n Don't convert addresses to names\n"
-msgstr " -q Var tyst, skriv inte ut meddelanden\n"
-
-#: src/ypwhich.c:81
+#: src/ypwhich.c:80
#, fuzzy
msgid " -V n Version of ypbind, V3 is default\n"
msgstr " -V n Version av ypbind, V2 är standard\n"
-#: src/ypwhich.c:84
+#: src/ypwhich.c:83
msgid " --verbose Verbose output of result\n"
msgstr ""
-#: src/ypwhich.c:150 src/ypwhich.c:207
+#: src/ypwhich.c:149 src/ypwhich.c:206
#, fuzzy, c-format
msgid ""
"ypwhich: can't call ypbind on '%s'\n"
"\t"
msgstr "kan inte yp_bind: Anledning: %s\n"
-#: src/ypwhich.c:167 src/ypwhich.c:221
+#: src/ypwhich.c:166 src/ypwhich.c:220
#, c-format
msgid ""
"Error for domain '%s' from ypbind on '%s':\n"
"\t%s\n"
msgstr ""
-#: src/ypwhich.c:262
+#: src/ypwhich.c:261
#, c-format
msgid "ERROR: taddr2host failed!\n"
msgstr ""
-#: src/ypwhich.c:268
+#: src/ypwhich.c:267
#, c-format
msgid "Error: no server information gotten from ypbind on '%s'\n"
msgstr ""
-#: src/ypwhich.c:390
+#: src/ypwhich.c:389
#, fuzzy, c-format
msgid "%s: no local yp domain set\n"
msgstr "%s: kan inte få lokal yp-domän: %s\n"
-#: src/ypwhich.c:422
+#: src/ypwhich.c:421
#, c-format
msgid "Can't find master for map \"%s\". Reason: %s\n"
msgstr "Kan inte hitta master för kartan \"%s\". Anledning: %s\n"
-#: src/ypwhich.c:446
+#: src/ypwhich.c:445
#, c-format
msgid "Can't find master for map %s. Reason: %s\n"
msgstr "Kan inte hitta master för kartan %s. Anledning: %s\n"
-#: src/ypwhich.c:456
+#: src/ypwhich.c:455
#, c-format
msgid "No running ypbind.\n"
msgstr "Ingen körande ypbind.\n"
-#: src/ypwhich.c:460
+#: src/ypwhich.c:459
#, c-format
msgid "Can't get map list for domain %s. Reason: %s\n"
msgstr "Kan inte få kartlista för domänen %s. Anledning: %s\n"
+#, fuzzy
+#~ msgid " -n Don't convert addresses to names\n"
+#~ msgstr " -q Var tyst, skriv inte ut meddelanden\n"
+
#~ msgid "yptest: host %s unknown\n"
#~ msgstr "yptest: värden %s är okänd\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/src/Makefile.am new/yp-tools-3.3/src/Makefile.am
--- old/yp-tools-3.0.1/src/Makefile.am 2014-10-29 15:28:02.000000000 +0100
+++ new/yp-tools-3.3/src/Makefile.am 2014-12-05 11:47:44.000000000 +0100
@@ -9,14 +9,14 @@
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(srcdir) -I$(top_srcdir) \
-DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = @WARNFLAGS@ @TIRPC_CFLAGS@
-LDADD = ../lib/libnis.la
+LDADD = ../lib/libnis.la @TIRPC_LIBS@
CLEANFILES = *~ domainname
EXTRA_PROGRAMS = domainname
bin_PROGRAMS = ypwhich ypmatch ypcat yppasswd @DOMAINNAME@
-sbin_PROGRAMS = yppoll ypset
+sbin_PROGRAMS = yppoll ypset yp_dump_binding
noinst_PROGRAMS = yptest
yppasswd_SOURCES = yppasswd.c yppasswd_xdr.c
@@ -24,11 +24,10 @@
yppasswd_CFLAGS = -DPASSWD_PROG=\"${PASSWD_PROG}\" \
-DCHFN_PROG=\"${CHFN_PROG}\" -DCHSH_PROG=\"${CHSH_PROG}\"
domainname_LDADD = ../lib/yp_get_default_domain.lo ../lib/yperr_string.lo
-ypcat_LDADD = ${LDADD} ../lib/libyptools.a
-ypmatch_LDADD = ${LDADD} ../lib/libyptools.a
-ypwhich_LDADD = ${LDADD} ../lib/libyptools.a
-
-yptest_LDADD = ${LDADD} ../lib/yp_all_host.o
+ypcat_LDADD = ../lib/libyptools.a ${LDADD}
+ypmatch_LDADD = ../lib/libyptools.a ${LDADD}
+ypwhich_LDADD = ../lib/libyptools.a ${LDADD}
+yptest_LDADD = ../lib/yp_all_host.o ${LDADD}
install-exec-hook:
ln -f ${DESTDIR}${bindir}/yppasswd ${DESTDIR}${bindir}/ypchsh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/src/yp_dump_binding.c new/yp-tools-3.3/src/yp_dump_binding.c
--- old/yp-tools-3.0.1/src/yp_dump_binding.c 1970-01-01 01:00:00.000000000 +0100
+++ new/yp-tools-3.3/src/yp_dump_binding.c 2014-12-03 16:06:47.000000000 +0100
@@ -0,0 +1,266 @@
+/* Copyright (C) 2014 Thorsten Kukuk
+ This file is part of the yp-tools.
+ Author: Thorsten Kukuk
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifndef _
+#define _(String) gettext (String)
+#endif
+
+#ifndef BINDINGDIR
+# define BINDINGDIR "/var/yp/binding"
+#endif
+
+/* Name and version of program. */
+/* Print the version information. */
+static void
+print_version (void)
+{
+ fprintf (stdout, "yp_dump_binding (%s) %s\n", PACKAGE, VERSION);
+ fprintf (stdout, gettext ("\
+Copyright (C) %s Thorsten Kukuk.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"), "2014");
+ /* fprintf (stdout, _("Written by %s.\n"), "Thorsten Kukuk"); */
+}
+
+static void
+print_usage (FILE *stream)
+{
+ fputs (_("Usage: yp_dump_binding [-d domain]\n"), stream);
+}
+
+static void
+print_help (void)
+{
+ print_usage (stdout);
+ fputs (_("yp_dump_binding - print the used NIS servers from binding directory\n\n"),
+ stdout);
+ fputs (_(" -d domain Use 'domain' instead of the default domain\n"),
+ stdout);
+ fputs (_(" -p path Use 'path' instead of the default binding directory\n"),
+ stdout);
+ fputs (_(" -v version Only dump binding information of this ypbind protocol version\n"),
+ stdout);
+ fputs (_(" -?, --help Give this help list\n"), stdout);
+ fputs (_(" --usage Give a short usage message\n"), stdout);
+ fputs (_(" --version Print program version\n"), stdout);
+}
+
+static void
+print_error (void)
+{
+ const char *program = "yp_dump_binding";
+ print_usage (stderr);
+ fprintf (stderr,
+ _("Try `%s --help' or `%s --usage' for more information.\n"),
+ program, program);
+}
+
+static void
+dump_nconf (struct netconfig *nconf, char *prefix)
+{
+ printf ("%snc_netid: %s\n", prefix, nconf->nc_netid);
+ printf ("%snc_semantics: %lu\n", prefix, nconf->nc_semantics);
+ printf ("%snc_flag: %lu\n", prefix, nconf->nc_flag);
+ printf ("%snc_protofmly: '%s'\n", prefix, nconf->nc_protofmly);
+ printf ("%snc_proto: '%s'\n", prefix, nconf->nc_proto);
+ printf ("%snc_device: '%s'\n", prefix, nconf->nc_device);
+ printf ("%snc_nlookups: %lu\n", prefix, nconf->nc_nlookups);
+}
+
+static void
+dump_binding (const char *dir, const char *domain, int version)
+{
+ char path[sizeof (dir) + strlen (domain) + 3 * sizeof (unsigned) + 3];
+
+ snprintf (path, sizeof (path), "%s/%s.%u", dir, domain, version);
+
+ if (version == 3)
+ {
+ FILE *in = fopen (path, "rce");
+ if (in != NULL)
+ {
+ struct ypbind3_binding ypb3;
+ bool_t status;
+
+ XDR xdrs;
+ xdrstdio_create (&xdrs, in, XDR_DECODE);
+ memset (&ypb3, 0, sizeof (ypb3));
+ status = xdr_ypbind3_binding (&xdrs, &ypb3);
+ xdr_destroy (&xdrs);
+
+ if (!status)
+ fprintf (stderr, _("Error reading %s\n"), path);
+ else
+ {
+ char buf[INET6_ADDRSTRLEN];
+
+ printf ("Dump of %s:\n", path);
+ printf ("\typbind_nconf:\n");
+ if (ypb3.ypbind_nconf)
+ dump_nconf (ypb3.ypbind_nconf, "\t\t");
+ else
+ printf ("\t\tNULL\n");
+
+ printf ("\typbind_svcaddr: %s:%i\n",
+ taddr2ipstr (ypb3.ypbind_nconf, ypb3.ypbind_svcaddr,
+ buf, sizeof (buf)),
+ taddr2port (ypb3.ypbind_nconf, ypb3.ypbind_svcaddr));
+
+ printf ("\typbind_servername: ");
+ if (ypb3.ypbind_servername)
+ printf ("%s\n", ypb3.ypbind_servername);
+ else
+ printf ("\tNULL\n");
+ printf ("\typbind_hi_vers: %lu\n", (u_long) ypb3.ypbind_hi_vers);
+ printf ("\typbind_lo_vers: %lu\n", (u_long) ypb3.ypbind_lo_vers);
+ }
+ xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
+ }
+ else
+ fprintf (stderr, _("Error opening %s: %m\n"), path);
+ }
+ else
+ {
+ int fd;
+
+ fd = open (path, O_RDONLY);
+ if (fd >= 0)
+ {
+ struct ypbind2_resp ypbr;
+
+ if (pread (fd, &ypbr, sizeof (ypbr), 2) == sizeof (ypbr))
+ {
+ char straddr[INET_ADDRSTRLEN];
+ struct sockaddr_in sa;
+ sa.sin_family = AF_INET;
+ sa.sin_addr = ypbr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_addr;
+ inet_ntop(sa.sin_family, &sa.sin_addr, straddr, sizeof(straddr));
+
+ printf ("Dump of %s:\n", path);
+ printf ("\tAddress: %s\n", straddr);
+ printf ("\tPort: %i\n", ntohs (ypbr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_port));
+ }
+ else
+ fprintf (stderr, _("Error reading %s: %m\n"), path);
+
+ close (fd);
+ }
+ else
+ fprintf (stderr, _("Error opening %s: %m\n"), path);
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ char *bindingdir = BINDINGDIR;
+ char *domainname = NULL;
+ int vers = 0;
+
+ setlocale (LC_MESSAGES, "");
+ setlocale (LC_CTYPE, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+ while (1)
+ {
+ int c;
+ int option_index = 0;
+ static struct option long_options[] =
+ {
+ {"version", no_argument, NULL, '\255'},
+ {"usage", no_argument, NULL, '\254'},
+ {"help", no_argument, NULL, '?'},
+ {NULL, 0, NULL, '\0'}
+ };
+
+ c = getopt_long (argc, argv, "d:p:v:?", long_options, &option_index);
+ if (c == (-1))
+ break;
+ switch (c)
+ {
+ case 'd':
+ domainname = optarg;
+ break;
+ case 'p':
+ bindingdir = optarg;
+ break;
+ case 'v':
+ vers = atoi (optarg);
+ break;
+ case '?':
+ print_help ();
+ return 0;
+ case '\255':
+ print_version ();
+ return 0;
+ case '\254':
+ print_usage (stdout);
+ return 0;
+ default:
+ print_usage (stderr);
+ return 1;
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc > 1)
+ {
+ print_error ();
+ return 1;
+ }
+
+ if (domainname == NULL)
+ {
+ int error;
+
+ if ((error = yp_get_default_domain (&domainname)) != 0)
+ {
+ fprintf (stderr, _("%s: can't get local yp domain: %s\n"),
+ "yp_dump_binding", yperr_string (error));
+ return 1;
+ }
+ }
+
+ if (vers == 0 || vers == 1)
+ dump_binding (bindingdir, domainname, 1);
+ if (vers == 0 || vers == 2)
+ dump_binding (bindingdir, domainname, 2);
+ if (vers == 0 || vers == 3)
+ dump_binding (bindingdir, domainname, 3);
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/src/yptest.c new/yp-tools-3.3/src/yptest.c
--- old/yp-tools-3.0.1/src/yptest.c 2014-10-29 17:04:30.000000000 +0100
+++ new/yp-tools-3.3/src/yptest.c 2014-12-03 11:51:44.000000000 +0100
@@ -190,7 +190,7 @@
if (!be_quiet)
printf (_("Used NIS server: %s\n"), inet_ntoa (yp_r2.ypbind2_addr));
}
- else
+ else
{
if (yp_r3.ypbind_status != YPBIND_SUCC_VAL)
{
@@ -342,7 +342,7 @@
if (!be_quiet)
printf ("\nTest 2: ypbind\n");
-
+
if (!be_quiet)
printf (_("Use Protocol V1: "));
if (print_bindhost (domainname, hostname, 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yp-tools-3.0.1/src/ypwhich.c new/yp-tools-3.3/src/ypwhich.c
--- old/yp-tools-3.0.1/src/ypwhich.c 2014-10-28 10:01:08.000000000 +0100
+++ new/yp-tools-3.3/src/ypwhich.c 2014-12-02 15:49:08.000000000 +0100
@@ -62,7 +62,7 @@
static void
print_usage (FILE *stream)
{
- fputs (_("Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"),
+ fputs (_("Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"),
stream);
}
@@ -76,7 +76,6 @@
stdout);
fputs (_(" -m mname Find the master NIS server for the map 'mname'\n"),
stdout);
- fputs (_(" -n Don't convert addresses to names\n"), stdout);
fputs (_(" -t Inhibits map nickname translation\n"), stdout);
fputs (_(" -V n Version of ypbind, V3 is default\n"), stdout);
fputs (_(" -x Display the map nickname translation table\n"),