commit ypbind for openSUSE:Factory
Hello community, here is the log from the commit of package ypbind for openSUSE:Factory checked in at Thu May 28 04:52:43 CEST 2009. -------- --- ypbind/ypbind.changes 2009-05-19 09:53:17.000000000 +0200 +++ ypbind/ypbind.changes 2009-05-20 14:43:32.000000000 +0200 @@ -1,0 +2,5 @@ +Wed May 20 14:36:56 CEST 2009 - kukuk@suse.de + +- Update to 1.29.90: Rewrite of server search logic. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- ypbind-mt-1.23.1.tar.bz2 New: ---- ypbind-mt-1.29.90.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ypbind.spec ++++++ --- /var/tmp/diff_new_pack.Fm7183/_old 2009-05-28 04:52:00.000000000 +0200 +++ /var/tmp/diff_new_pack.Fm7183/_new 2009-05-28 04:52:00.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package ypbind (Version 1.23.1) +# spec file for package ypbind (Version 1.29.90) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -29,7 +29,7 @@ AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build -Version: 1.23.1 +Version: 1.29.90 Release: 1 Url: http://www.linux-nis.org/nis/ypbind-mt Summary: NIS client daemon @@ -115,6 +115,8 @@ %dir /var/yp/binding %changelog +* Wed May 20 2009 kukuk@suse.de +- Update to 1.29.90: Rewrite of server search logic. * Mon May 18 2009 kukuk@suse.de - Update to 1.23.1: Fix last patch if NM support is disabled * Mon Mar 30 2009 kukuk@suse.de ++++++ ypbind-mt-1.23.1.tar.bz2 -> ypbind-mt-1.29.90.tar.bz2 ++++++ ++++ 2167 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/ypbind-mt-1.23.1/ChangeLog new/ypbind-mt-1.29.90/ChangeLog --- old/ypbind-mt-1.23.1/ChangeLog 2009-04-28 15:03:40.000000000 +0200 +++ new/ypbind-mt-1.29.90/ChangeLog 2009-05-20 13:03:26.000000000 +0200 @@ -1,3 +1,25 @@ +2009-05-20 Thorsten Kukuk <kukuk@suse.de> + + * release version 1.29.90 + + * src/serv_list.c (test_bindings_once): directly do broadcast + after 15 min. to find new fastest server if configured. + +2009-05-19 Thorsten Kukuk <kukuk@suse.de> + + * src/ypbind_svc.c: Log if we cannot decode arguments + and try to free the current result. + * src/ypbind-mt.c: Free transp. + +2009-05-18 Thorsten Kukuk <kukuk@suse.de> + + * src/serv_list.c: Don't cache connection to ypserv any longer. + + * src/ypbind-mt.c: Implement -log option. + * src/ypbind_server.c: Add calls to write to log file. + * src/log_msg.c: Add new function to write to log file. + * src/log_msg.h: Add new prototypes for logging functions. + 2009-04-28 Thorsten Kukuk <kukuk@suse.de> * release version 1.23.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/ypbind-mt-1.23.1/configure.in new/ypbind-mt-1.29.90/configure.in --- old/ypbind-mt-1.23.1/configure.in 2009-04-28 15:03:30.000000000 +0200 +++ new/ypbind-mt-1.29.90/configure.in 2009-05-19 13:22:52.000000000 +0200 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/ypbind-mt.c) -AM_INIT_AUTOMAKE(ypbind-mt, 1.23.1) +AM_INIT_AUTOMAKE(ypbind-mt, 1.29.90) AM_CONFIG_HEADER(config.h) AC_PREFIX_DEFAULT(/usr) 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/ypbind-mt-1.23.1/man/ypbind.8 new/ypbind-mt-1.29.90/man/ypbind.8 --- old/ypbind-mt-1.23.1/man/ypbind.8 2009-03-30 13:42:12.000000000 +0200 +++ new/ypbind-mt-1.29.90/man/ypbind.8 2009-05-20 13:02:33.000000000 +0200 @@ -1,12 +1,12 @@ .\" Title: ypbind .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> -.\" Date: 03/30/2009 +.\" Date: 05/20/2009 .\" Manual: ypbind-mt .\" Source: ypbind-mt .\" Language: English .\" -.TH "YPBIND" "8" "03/30/2009" "ypbind-mt" "ypbind\-mt" +.TH "YPBIND" "8" "05/20/2009" "ypbind-mt" "ypbind\-mt" .\" ----------------------------------------------------------------- .\" * (re)Define some macros .\" ----------------------------------------------------------------- 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/ypbind-mt-1.23.1/man/yp.conf.5 new/ypbind-mt-1.29.90/man/yp.conf.5 --- old/ypbind-mt-1.23.1/man/yp.conf.5 2009-03-30 13:42:14.000000000 +0200 +++ new/ypbind-mt-1.29.90/man/yp.conf.5 2009-05-20 13:02:35.000000000 +0200 @@ -1,12 +1,12 @@ .\" Title: yp.conf .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> -.\" Date: 03/30/2009 +.\" Date: 05/20/2009 .\" Manual: ypbind-mt .\" Source: ypbind-mt .\" Language: English .\" -.TH "YP\&.CONF" "5" "03/30/2009" "ypbind-mt" "ypbind\-mt" +.TH "YP\&.CONF" "5" "05/20/2009" "ypbind-mt" "ypbind\-mt" .\" ----------------------------------------------------------------- .\" * (re)Define some macros .\" ----------------------------------------------------------------- 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/ypbind-mt-1.23.1/NEWS new/ypbind-mt-1.29.90/NEWS --- old/ypbind-mt-1.23.1/NEWS 2009-04-28 15:04:01.000000000 +0200 +++ new/ypbind-mt-1.29.90/NEWS 2009-05-19 13:58:20.000000000 +0200 @@ -4,6 +4,10 @@ Please send bug reports, questions and suggestions to <kukuk@thkukuk.de>. +Version 1.29.90 +* Don't cache connection to NIS server any longer, create + new one for every check. + Version 1.23.1 * Fix compiling without DBUS/NetworkManager support Files old/ypbind-mt-1.23.1/po/de.gmo and new/ypbind-mt-1.29.90/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/ypbind-mt-1.23.1/po/de.po new/ypbind-mt-1.29.90/po/de.po --- old/ypbind-mt-1.23.1/po/de.po 2009-04-28 15:04:21.000000000 +0200 +++ new/ypbind-mt-1.29.90/po/de.po 2009-05-20 14:24:04.000000000 +0200 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: ypbind-mt\n" "Report-Msgid-Bugs-To: kukuk@linux-nis.org\n" -"POT-Creation-Date: 2009-04-28 15:04+0200\n" +"POT-Creation-Date: 2009-05-20 14:24+0200\n" "PO-Revision-Date: 2004-02-13 16:22+01:00\n" "Last-Translator: Thorsten Kukuk <kukuk@suse.de>\n" "Language-Team: No Language-Team\n" @@ -14,125 +14,115 @@ "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: src/serv_list.c:426 +#: src/serv_list.c:416 msgid "Not enough memory !" msgstr "Nicht genug Arbeitsspeicher !" -#: src/serv_list.c:452 +#: src/serv_list.c:442 msgid "internal error: add_server called with NULL domain." msgstr "" "Interner Fehler: add_server wurde mit NULL pointer f�r domain aufgerufen." -#: src/serv_list.c:467 +#: src/serv_list.c:457 #, c-format msgid "add_server() domain: %s, broadcast" msgstr "add_server() Domain: %s, Broadcast" -#: src/serv_list.c:491 +#: src/serv_list.c:481 #, c-format msgid "add_server() domain: %s, host: %s, NO SLOT FREE!" msgstr "add_server() Domain: %s, Rechner: %s, Kein Slot mehr frei!" -#: src/serv_list.c:498 +#: src/serv_list.c:488 #, c-format msgid "add_server() domain: %s, host: %s, slot: %d" msgstr "add_server() Domain: %s, Rechner: %s, Slot: %d" -#: src/serv_list.c:528 src/serv_list.c:530 +#: src/serv_list.c:518 src/serv_list.c:520 msgid "Unknown host:" msgstr "Unbekannter Rechner:" -#: src/serv_list.c:534 src/serv_list.c:536 +#: src/serv_list.c:524 src/serv_list.c:526 msgid "Host name lookup failure" msgstr "Fehler beim Aufl�sen des Rechnernamens" -#: src/serv_list.c:541 src/serv_list.c:544 +#: src/serv_list.c:531 src/serv_list.c:534 msgid "No address associated with name:" msgstr "Keine Addresse vorhanden f�r Rechner:" -#: src/serv_list.c:548 src/serv_list.c:550 +#: src/serv_list.c:538 src/serv_list.c:540 msgid "Unknown server error" msgstr "Unbekanter Server Fehler" -#: src/serv_list.c:554 src/serv_list.c:556 +#: src/serv_list.c:544 src/serv_list.c:546 msgid "gethostbyname: Unknown error" msgstr "gethostbyname: Unbekannter Fehler" -#: src/serv_list.c:628 src/serv_list.c:940 +#: src/serv_list.c:615 src/serv_list.c:920 src/serv_list.c:1039 #, c-format msgid "Answer for domain '%s' from server '%s'" msgstr "Antwort f�r Domain \"%s\" vom Server \"%s\"" -#: src/serv_list.c:632 +#: src/serv_list.c:619 #, c-format msgid "Answer for domain '%s' from unknown server '%s'" msgstr "Antwort f�r Domain \"%s\" von unbekantem Server \"%s\"" -#: src/serv_list.c:639 src/serv_list.c:844 +#: src/serv_list.c:626 src/serv_list.c:820 #, c-format msgid "Answer for domain '%s' from '%s' on illegal port %d." msgstr "Antwort f�r Domain \"%s\" vom Server \"%s\" vom illegalen Port %d." -#: src/serv_list.c:684 +#: src/serv_list.c:659 #, c-format msgid "do_broadcast() for domain '%s' is called" msgstr "" -#: src/serv_list.c:719 +#: src/serv_list.c:694 #, c-format msgid "leave do_broadcast() for domain '%s'" msgstr "" -#: src/serv_list.c:832 src/serv_list.c:985 +#: src/serv_list.c:808 src/serv_list.c:979 #, c-format msgid "ping host '%s', domain '%s'" msgstr "Ping Host \"%s\", Domain \"%s\"" -#: src/serv_list.c:857 +#: src/serv_list.c:833 #, c-format msgid "host '%s' doesn't answer." msgstr "Server \"%s\" antwortet nicht." -#: src/serv_list.c:928 +#: src/serv_list.c:904 #, fuzzy, c-format msgid "Server '%s' for domain '%s' answered ping but failed to bind" msgstr "Server \"%s\" f�r Domain \"%s\" antwortet nicht." -#: src/serv_list.c:1004 +#: src/serv_list.c:998 #, c-format msgid "clnt_create for server '%s' (domain '%s') failed" msgstr "clnt_create f�r server \"%s\" (domain \"%s\") schlug fehl" -#: src/serv_list.c:1025 +#: src/serv_list.c:1019 #, c-format msgid "domain '%s' not served by '%s'" msgstr "Domain \"%s\" wird nicht von \"%s\" unterst�tzt" -#: src/serv_list.c:1129 +#: src/serv_list.c:1141 #, fuzzy msgid "Pinging all active servers." msgstr "Sende ein Ping zu allen aktiven Servern." -#: src/serv_list.c:1131 +#: src/serv_list.c:1143 #, fuzzy msgid "Checking for new fastest server." msgstr "Suche erneut den schnellsten Server." -#: src/serv_list.c:1143 +#: src/serv_list.c:1155 #, c-format msgid "Requested domain %s, found %s, ignored." msgstr "" -#: src/serv_list.c:1194 -#, c-format -msgid "Server for domain '%s' doesn't answer." -msgstr "Server f�r Domain \"%s\" antwortet nicht." - -#: src/serv_list.c:1200 src/serv_list.c:1205 -#, c-format -msgid "Server '%s' for domain '%s' doesn't answer." -msgstr "Server \"%s\" f�r Domain \"%s\" antwortet nicht." - #: src/ypbind-mt.c:161 src/ypbind-mt.c:164 msgid "Trying entry:" msgstr "Versuche Eintrag:" @@ -235,24 +225,24 @@ msgid "cannot unlock pidfile" msgstr "Kann Pidfile nicht unlocken." -#: src/ypbind-mt.c:467 +#: src/ypbind-mt.c:470 msgid "SIGHUP arrived, reloading config file." msgstr "SIGHUP abgefangen, Config Datei wird neu geladen." -#: src/ypbind-mt.c:480 +#: src/ypbind-mt.c:483 msgid "Ignoring SIGPIPE." msgstr "" -#: src/ypbind-mt.c:483 +#: src/ypbind-mt.c:486 #, c-format msgid "Unknown signal: %d" msgstr "Unbekanntes Signal: %d" -#: src/ypbind-mt.c:500 +#: src/ypbind-mt.c:503 msgid "Usage:\n" msgstr "Aufruf:\n" -#: src/ypbind-mt.c:501 +#: src/ypbind-mt.c:504 #, fuzzy msgid "" "\typbind [-broadcast | -ypset | -ypsetme] [-p port] [-f configfile]\n" @@ -262,138 +252,144 @@ " ypbind [-broadcast | -ypset | -ypsetme] [-p Port] [-f " "configfile] [-no-ping] [-broken-server] [-local-only] [-debug]\n" -#: src/ypbind-mt.c:503 +#: src/ypbind-mt.c:506 msgid "\t [-no-dbus]\n" msgstr "" -#: src/ypbind-mt.c:505 +#: src/ypbind-mt.c:508 msgid "\typbind -c [-f configfile]\n" msgstr "" -#: src/ypbind-mt.c:506 +#: src/ypbind-mt.c:509 msgid "\typbind --version\n" msgstr "" -#: src/ypbind-mt.c:542 +#: src/ypbind-mt.c:545 #, c-format msgid "Cannot create UDP: %s" msgstr "Kann UDP Socket nicht erzeugen: %s" -#: src/ypbind-mt.c:560 +#: src/ypbind-mt.c:563 #, c-format msgid "Cannot bind UDP: %s" msgstr "" -#: src/ypbind-mt.c:570 +#: src/ypbind-mt.c:573 msgid "Cannot create udp service." msgstr "Kann UDP Servie nicht erzeugen." -#: src/ypbind-mt.c:579 +#: src/ypbind-mt.c:582 msgid "Unable to register (YPBINDPROG, YPBINDVERS, udp)." msgstr "Kann (YPBINDPROG, YPBINDVERS, upd) nicht beim portmapper registrieren." -#: src/ypbind-mt.c:587 +#: src/ypbind-mt.c:591 msgid "Unable to register (YPBINDPROG, YPBINDOLDVERS, udp)." msgstr "" "Kann (YPBINDPROG, YPBINDOLDVERS, udp) nicht beim portmapper registrieren." -#: src/ypbind-mt.c:596 +#: src/ypbind-mt.c:601 #, c-format msgid "Cannot create TCP: %s" msgstr "Kann TCP Socket nicht erzeugen: %s" -#: src/ypbind-mt.c:614 +#: src/ypbind-mt.c:620 #, c-format msgid "Cannot bind TCP: %s" msgstr "" -#: src/ypbind-mt.c:624 +#: src/ypbind-mt.c:632 msgid "Cannot create tcp service.\n" msgstr "Kann TCP Service nicht erzeugen.\n" -#: src/ypbind-mt.c:632 +#: src/ypbind-mt.c:640 msgid "Unable to register (YPBINDPROG, YPBINDVERS, tcp)." msgstr "Kann (YPBINDPROG, YPBINDVERS, tcp) nicht beim portmapper registrieren." -#: src/ypbind-mt.c:640 +#: src/ypbind-mt.c:649 msgid "Unable to register (YPBINDPROG, YPBINDOLDVERS, tcp)." msgstr "" "Kann (YPBINDPROG, YPBINDOLDVERS, tcp) nicht beim portmapper registrieren." -#: src/ypbind-mt.c:733 +#: src/ypbind-mt.c:751 msgid "ERROR: domainname not set.\n" msgstr "Fehler: Domainname wurde nicht gesetzt.\n" -#: src/ypbind-mt.c:738 +#: src/ypbind-mt.c:756 msgid "domainname not set - aborting.\n" msgstr "Domainname wurde nicht gesetzt - Abbruch.\n" -#: src/ypbind-mt.c:747 +#: src/ypbind-mt.c:765 #, c-format msgid "Config file %s is not ok.\n" msgstr "Konfigurationsdatei %s ist nicht in Ordnung.\n" -#: src/ypbind-mt.c:752 +#: src/ypbind-mt.c:770 #, c-format msgid "Config file %s is ok.\n" msgstr "Konfigurationsdatei %s ist in Ordnung.\n" -#: src/ypbind-mt.c:759 +#: src/ypbind-mt.c:777 msgid "ypbind must be run as root\n" msgstr "ypbind mu� als root gestartet werden.\n" -#: src/ypbind-mt.c:767 src/ypbind-mt.c:776 +#: src/ypbind-mt.c:785 src/ypbind-mt.c:794 #, c-format msgid "Could not create %s: %s\n" msgstr "Kann %s nicht erzeugen: %s\n" -#: src/ypbind-mt.c:783 +#: src/ypbind-mt.c:801 #, c-format msgid "Could not change to directory %s: %s\n" msgstr "Fehler beim Wechseln in das Verzeichnis %s: %s\n" -#: src/ypbind-mt.c:875 +#: src/ypbind-mt.c:893 msgid "Could not block signals." msgstr "Kann die Signale nicht blocken." -#: src/ypbind-mt.c:920 +#: src/ypbind-mt.c:941 msgid "svc_run returned." msgstr "svc_run hat sich beendet." -#: src/ypbind_server.c:67 src/ypbind_server.c:111 +#: src/ypbind_server.c:83 src/ypbind_server.c:143 #, c-format msgid "Domain name '%s' has embedded slash -- rejecting." msgstr "Domainname \"%s\" enth�lt einen Schr�gstrich -- zur�ckgewiesen." -#: src/ypbind_server.c:78 +#: src/ypbind_server.c:94 msgid "Status: YPBIND_FAIL_VAL" msgstr "Status: YPBIND_FAIL_VAL" -#: src/ypbind_server.c:80 +#: src/ypbind_server.c:96 msgid "Status: YPBIND_SUCC_VAL" msgstr "Status: YPBIND_SUCC_VAL" -#: src/ypbind_server.c:123 +#: src/ypbind_server.c:155 #, c-format msgid "User from '%s' try's to change the binding." msgstr "User vom host \"%s\" versucht das Binding to �ndern." -#: src/ypbind_server.c:132 +#: src/ypbind_server.c:164 msgid "Changing the binding is not allowed." msgstr "Das �ndern des Bindings ist nicht erlaubt." -#: src/ypbind_server.c:137 +#: src/ypbind_server.c:169 msgid "SETDOM request doesn't come from reserved port." msgstr "Der SETDOM Request kam nicht von einem reservierten Port." -#: src/ypbind_svc.c:80 src/ypbind_svc.c:145 +#: src/ypbind_svc.c:99 src/ypbind_svc.c:182 msgid "unable to free arguments" msgstr "Kann Argumente nicht freigeben" -#: src/ypbind_svc.c:83 src/ypbind_svc.c:148 +#: src/ypbind_svc.c:102 src/ypbind_svc.c:185 msgid "unable to free results" msgstr "Kann Result nicht freigeben" +#~ msgid "Server for domain '%s' doesn't answer." +#~ msgstr "Server f�r Domain \"%s\" antwortet nicht." + +#~ msgid "Server '%s' for domain '%s' doesn't answer." +#~ msgstr "Server \"%s\" f�r Domain \"%s\" antwortet nicht." + #, fuzzy #~ msgid "Trying entry: %s\n" #~ msgstr "Versuche Eintrag: %s" Files old/ypbind-mt-1.23.1/po/sv.gmo and new/ypbind-mt-1.29.90/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/ypbind-mt-1.23.1/po/sv.po new/ypbind-mt-1.29.90/po/sv.po --- old/ypbind-mt-1.23.1/po/sv.po 2009-04-28 15:04:21.000000000 +0200 +++ new/ypbind-mt-1.29.90/po/sv.po 2009-05-20 14:24:04.000000000 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: ypbind-mt 1.20-2\n" "Report-Msgid-Bugs-To: kukuk@linux-nis.org\n" -"POT-Creation-Date: 2009-04-28 15:04+0200\n" +"POT-Creation-Date: 2009-05-20 14:24+0200\n" "PO-Revision-Date: 2006-11-12 16:48+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -15,123 +15,113 @@ "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: src/serv_list.c:426 +#: src/serv_list.c:416 msgid "Not enough memory !" msgstr "Inte tillr�ckligt med minne!" -#: src/serv_list.c:452 +#: src/serv_list.c:442 msgid "internal error: add_server called with NULL domain." msgstr "internt fel: add_server anropades med NULL dom�n." -#: src/serv_list.c:467 +#: src/serv_list.c:457 #, c-format msgid "add_server() domain: %s, broadcast" msgstr "add_server() dom�n: %s, broadcast" -#: src/serv_list.c:491 +#: src/serv_list.c:481 #, c-format msgid "add_server() domain: %s, host: %s, NO SLOT FREE!" msgstr "add_server() dom�n: %s, v�rd: %s, INGEN LEDIG PLATS!" -#: src/serv_list.c:498 +#: src/serv_list.c:488 #, c-format msgid "add_server() domain: %s, host: %s, slot: %d" msgstr "add_server() dom�n: %s, v�rd: %s, plats: %d" -#: src/serv_list.c:528 src/serv_list.c:530 +#: src/serv_list.c:518 src/serv_list.c:520 msgid "Unknown host:" msgstr "Ok�nd v�rd:" -#: src/serv_list.c:534 src/serv_list.c:536 +#: src/serv_list.c:524 src/serv_list.c:526 msgid "Host name lookup failure" msgstr "Uppslag av v�rdnamn misslyckades" -#: src/serv_list.c:541 src/serv_list.c:544 +#: src/serv_list.c:531 src/serv_list.c:534 msgid "No address associated with name:" msgstr "Ingen adress associerad med namnet:" -#: src/serv_list.c:548 src/serv_list.c:550 +#: src/serv_list.c:538 src/serv_list.c:540 msgid "Unknown server error" msgstr "Ok�nt serverfel" -#: src/serv_list.c:554 src/serv_list.c:556 +#: src/serv_list.c:544 src/serv_list.c:546 msgid "gethostbyname: Unknown error" msgstr "gethostbyname: Ok�nt fel" -#: src/serv_list.c:628 src/serv_list.c:940 +#: src/serv_list.c:615 src/serv_list.c:920 src/serv_list.c:1039 #, c-format msgid "Answer for domain '%s' from server '%s'" msgstr "Svar f�r dom�nen \"%s\" fr�n servern \"%s\"" -#: src/serv_list.c:632 +#: src/serv_list.c:619 #, c-format msgid "Answer for domain '%s' from unknown server '%s'" msgstr "Svar f�r dom�nen \"%s\" fr�n ok�nd server \"%s\"" -#: src/serv_list.c:639 src/serv_list.c:844 +#: src/serv_list.c:626 src/serv_list.c:820 #, c-format msgid "Answer for domain '%s' from '%s' on illegal port %d." msgstr "Svar f�r dom�nen \"%s\" fr�n \"%s\" p� ogiltiga porten %d." -#: src/serv_list.c:684 +#: src/serv_list.c:659 #, c-format msgid "do_broadcast() for domain '%s' is called" msgstr "do_broadcast() f�r dom�nen \"%s\" anropas" -#: src/serv_list.c:719 +#: src/serv_list.c:694 #, c-format msgid "leave do_broadcast() for domain '%s'" msgstr "l�mna do_broadcast() f�r dom�nen \"%s\"" -#: src/serv_list.c:832 src/serv_list.c:985 +#: src/serv_list.c:808 src/serv_list.c:979 #, c-format msgid "ping host '%s', domain '%s'" msgstr "pinga v�rden \"%s\", dom�n \"%s\"" -#: src/serv_list.c:857 +#: src/serv_list.c:833 #, c-format msgid "host '%s' doesn't answer." msgstr "v�rden \"%s\" svarar inte." -#: src/serv_list.c:928 +#: src/serv_list.c:904 #, c-format msgid "Server '%s' for domain '%s' answered ping but failed to bind" msgstr "" "Servern \"%s\" f�r dom�nen \"%s\" svarade p� ping men misslyckades att binda" -#: src/serv_list.c:1004 +#: src/serv_list.c:998 #, c-format msgid "clnt_create for server '%s' (domain '%s') failed" msgstr "clnt_create f�r servern \"%s\" (dom�n \"%s\") misslyckades" -#: src/serv_list.c:1025 +#: src/serv_list.c:1019 #, c-format msgid "domain '%s' not served by '%s'" msgstr "dom�nen \"%s\" hanteras inte av \"%s\"" -#: src/serv_list.c:1129 +#: src/serv_list.c:1141 msgid "Pinging all active servers." msgstr "Pingar alla aktiva servrar." -#: src/serv_list.c:1131 +#: src/serv_list.c:1143 msgid "Checking for new fastest server." msgstr "Letar efter den snabbaste servern." -#: src/serv_list.c:1143 +#: src/serv_list.c:1155 #, c-format msgid "Requested domain %s, found %s, ignored." msgstr "Beg�rd dom�n %s, hittade %s, ignoreras." -#: src/serv_list.c:1194 -#, c-format -msgid "Server for domain '%s' doesn't answer." -msgstr "Servern f�r dom�nen \"%s\" svarar inte." - -#: src/serv_list.c:1200 src/serv_list.c:1205 -#, c-format -msgid "Server '%s' for domain '%s' doesn't answer." -msgstr "Servern \"%s\" f�r dom�nen \"%s\" svarar inte." - #: src/ypbind-mt.c:161 src/ypbind-mt.c:164 msgid "Trying entry:" msgstr "F�rs�ker med posten:" @@ -234,24 +224,24 @@ msgid "cannot unlock pidfile" msgstr "kan inte l�sa upp pid-fil" -#: src/ypbind-mt.c:467 +#: src/ypbind-mt.c:470 msgid "SIGHUP arrived, reloading config file." msgstr "SIGHUP togs emot, l�ser om konfigurationsfilen." -#: src/ypbind-mt.c:480 +#: src/ypbind-mt.c:483 msgid "Ignoring SIGPIPE." msgstr "Ignorerar SIGPIPE." -#: src/ypbind-mt.c:483 +#: src/ypbind-mt.c:486 #, c-format msgid "Unknown signal: %d" msgstr "Ok�nd signal: %d" -#: src/ypbind-mt.c:500 +#: src/ypbind-mt.c:503 msgid "Usage:\n" msgstr "Anv�ndning:\n" -#: src/ypbind-mt.c:501 +#: src/ypbind-mt.c:504 #, fuzzy msgid "" "\typbind [-broadcast | -ypset | -ypsetme] [-p port] [-f configfile]\n" @@ -261,132 +251,138 @@ "\typbind [-broadcast | -ypset | -ypsetme] [-p port] [-f konfigurationsfil]\n" "\t [-no-ping] [-broken-server] [-local-only] [-i ping-interval] [-debug]\n" -#: src/ypbind-mt.c:503 +#: src/ypbind-mt.c:506 msgid "\t [-no-dbus]\n" msgstr "\t [-no-dbus]\n" -#: src/ypbind-mt.c:505 +#: src/ypbind-mt.c:508 msgid "\typbind -c [-f configfile]\n" msgstr "\typbind -c [-f konfigurationsfil]\n" -#: src/ypbind-mt.c:506 +#: src/ypbind-mt.c:509 msgid "\typbind --version\n" msgstr "\typbind --version\n" -#: src/ypbind-mt.c:542 +#: src/ypbind-mt.c:545 #, c-format msgid "Cannot create UDP: %s" msgstr "Kan inte skapa UDP: %s" -#: src/ypbind-mt.c:560 +#: src/ypbind-mt.c:563 #, c-format msgid "Cannot bind UDP: %s" msgstr "Kan inte binda UDP: %s" -#: src/ypbind-mt.c:570 +#: src/ypbind-mt.c:573 msgid "Cannot create udp service." msgstr "Kan inte skapa udp-tj�nst." -#: src/ypbind-mt.c:579 +#: src/ypbind-mt.c:582 msgid "Unable to register (YPBINDPROG, YPBINDVERS, udp)." msgstr "Kan inte registrera (YPBINDPROG, YPBINDVERS, udp)." -#: src/ypbind-mt.c:587 +#: src/ypbind-mt.c:591 msgid "Unable to register (YPBINDPROG, YPBINDOLDVERS, udp)." msgstr "Kan inte registrera (YPBINDPROG, YPBINDOLDVERS, udp)." -#: src/ypbind-mt.c:596 +#: src/ypbind-mt.c:601 #, c-format msgid "Cannot create TCP: %s" msgstr "Kan inte skapa TCP: %s" -#: src/ypbind-mt.c:614 +#: src/ypbind-mt.c:620 #, c-format msgid "Cannot bind TCP: %s" msgstr "Kan inte binda TCP: %s" -#: src/ypbind-mt.c:624 +#: src/ypbind-mt.c:632 msgid "Cannot create tcp service.\n" msgstr "Kan inte skapa tcp-tj�nst.\n" -#: src/ypbind-mt.c:632 +#: src/ypbind-mt.c:640 msgid "Unable to register (YPBINDPROG, YPBINDVERS, tcp)." msgstr "Kan inte registrera (YPBINDPROG, YPBINDVERS, tcp)." -#: src/ypbind-mt.c:640 +#: src/ypbind-mt.c:649 msgid "Unable to register (YPBINDPROG, YPBINDOLDVERS, tcp)." msgstr "Kan inte registrera (YPBINDPROG, YPBINDOLDVERS, tcp)." -#: src/ypbind-mt.c:733 +#: src/ypbind-mt.c:751 msgid "ERROR: domainname not set.\n" msgstr "FEL: domainname inte inst�llt.\n" -#: src/ypbind-mt.c:738 +#: src/ypbind-mt.c:756 msgid "domainname not set - aborting.\n" msgstr "domainname inte inst�llt - avbryter.\n" -#: src/ypbind-mt.c:747 +#: src/ypbind-mt.c:765 #, c-format msgid "Config file %s is not ok.\n" msgstr "Konfigurationsfilen %s �r inte ok.\n" -#: src/ypbind-mt.c:752 +#: src/ypbind-mt.c:770 #, c-format msgid "Config file %s is ok.\n" msgstr "Konfigurationsfilen %s �r ok.\n" -#: src/ypbind-mt.c:759 +#: src/ypbind-mt.c:777 msgid "ypbind must be run as root\n" msgstr "ypbind m�ste k�ras som root\n" -#: src/ypbind-mt.c:767 src/ypbind-mt.c:776 +#: src/ypbind-mt.c:785 src/ypbind-mt.c:794 #, c-format msgid "Could not create %s: %s\n" msgstr "Kunde inte skapa %s: %s\n" -#: src/ypbind-mt.c:783 +#: src/ypbind-mt.c:801 #, c-format msgid "Could not change to directory %s: %s\n" msgstr "Kunde inte �ndra till katalogen %s: %s\n" -#: src/ypbind-mt.c:875 +#: src/ypbind-mt.c:893 msgid "Could not block signals." msgstr "Kunde inte blockera signaler." -#: src/ypbind-mt.c:920 +#: src/ypbind-mt.c:941 msgid "svc_run returned." msgstr "svc_run �terv�nde." -#: src/ypbind_server.c:67 src/ypbind_server.c:111 +#: src/ypbind_server.c:83 src/ypbind_server.c:143 #, c-format msgid "Domain name '%s' has embedded slash -- rejecting." msgstr "Dom�nnamnet \"%s\" har inb�ddat snedstreck -- v�grar." -#: src/ypbind_server.c:78 +#: src/ypbind_server.c:94 msgid "Status: YPBIND_FAIL_VAL" msgstr "Status: YPBIND_FAIL_VAL" -#: src/ypbind_server.c:80 +#: src/ypbind_server.c:96 msgid "Status: YPBIND_SUCC_VAL" msgstr "Status: YPBIND_SUCC_VAL" -#: src/ypbind_server.c:123 +#: src/ypbind_server.c:155 #, c-format msgid "User from '%s' try's to change the binding." msgstr "Anv�ndare fr�n \"%s\" f�rs�ker �ndra bindningen." -#: src/ypbind_server.c:132 +#: src/ypbind_server.c:164 msgid "Changing the binding is not allowed." msgstr "�ndring av bindningen till�ts inte." -#: src/ypbind_server.c:137 +#: src/ypbind_server.c:169 msgid "SETDOM request doesn't come from reserved port." msgstr "SETDOM-beg�ran kommer inte fr�n reserverad port." -#: src/ypbind_svc.c:80 src/ypbind_svc.c:145 +#: src/ypbind_svc.c:99 src/ypbind_svc.c:182 msgid "unable to free arguments" msgstr "kunde inte frig�ra argumenten" -#: src/ypbind_svc.c:83 src/ypbind_svc.c:148 +#: src/ypbind_svc.c:102 src/ypbind_svc.c:185 msgid "unable to free results" msgstr "kunde inte frig�ra resultaten" + +#~ msgid "Server for domain '%s' doesn't answer." +#~ msgstr "Servern f�r dom�nen \"%s\" svarar inte." + +#~ msgid "Server '%s' for domain '%s' doesn't answer." +#~ msgstr "Servern \"%s\" f�r dom�nen \"%s\" svarar inte." 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/ypbind-mt-1.23.1/src/log_msg.c new/ypbind-mt-1.29.90/src/log_msg.c --- old/ypbind-mt-1.23.1/src/log_msg.c 2006-09-13 14:52:57.000000000 +0200 +++ new/ypbind-mt-1.29.90/src/log_msg.c 2009-05-18 12:36:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2002, 2006 Thorsten Kukuk +/* Copyright (c) 2000, 2002, 2006, 2009 Thorsten Kukuk This file is part of ypbind-mt. Author: Thorsten Kukuk <kukuk@suse.de> @@ -22,6 +22,7 @@ #define _GNU_SOURCE +#include <time.h> #include <stdarg.h> #include <stdio.h> #include <syslog.h> @@ -44,6 +45,7 @@ #endif int debug_flag = 0; +int logfile_flag = 0; void log_msg (int type, const char *fmt,...) @@ -73,3 +75,59 @@ va_end (ap); } + +static FILE *logfp = NULL; +static const char *logfilename = "/var/log/ypbind-mt.log"; + +void +close_logfile (void) +{ + if (logfp == NULL) + return; + + fclose (logfp); + logfp = NULL; +} + +static int +open_logfile (void) +{ + if (logfp != NULL) + close_logfile(); + + if ((logfp = fopen (logfilename, "a+")) == NULL) + { + log_msg (LOG_ERR, "Cannot open log file '%s': %m", + logfilename); + return 1; + } + return 0; +} + +void +log2file (const char *fmt,...) +{ + va_list ap; + char date[128]; + time_t tmp; + struct tm *t; + + if (logfp == NULL) + { + if (open_logfile () != 0) + return; + } + + tmp = time (NULL); + t = localtime (&tmp); + strftime (date, sizeof (date), "%F %T", t); + + va_start (ap, fmt); + + fprintf (logfp, "%s (%d): ", date, gettid ()); + vfprintf (logfp, fmt, ap); + fputc ('\n', logfp); + fflush (logfp); + + va_end (ap); +} 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/ypbind-mt-1.23.1/src/log_msg.h new/ypbind-mt-1.29.90/src/log_msg.h --- old/ypbind-mt-1.23.1/src/log_msg.h 1999-02-28 21:27:58.000000000 +0100 +++ new/ypbind-mt-1.29.90/src/log_msg.h 2009-05-19 13:24:08.000000000 +0200 @@ -4,7 +4,14 @@ #include <syslog.h> extern int debug_flag; +extern int logfile_flag; + +#define LOG_RPC_CALLS 1 +#define LOG_BROKEN_CALLS 2 +#define LOG_SERVER_CHANGES 4 extern void log_msg (int type, const char *, ...); +extern void close_logfile (void); +extern void log2file (const char *, ...); #endif 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/ypbind-mt-1.23.1/src/serv_list.c new/ypbind-mt-1.29.90/src/serv_list.c --- old/ypbind-mt-1.23.1/src/serv_list.c 2008-08-28 14:38:11.000000000 +0200 +++ new/ypbind-mt-1.29.90/src/serv_list.c 2009-05-20 13:01:49.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998-2008 Thorsten Kukuk +/* Copyright (c) 1998-2009 Thorsten Kukuk This file is part of ypbind-mt. Author: Thorsten Kukuk <kukuk@suse.de> @@ -80,7 +80,7 @@ bool_t use_broadcast; struct bound_server server[_MAXSERVER]; struct bound_server ypset; - CLIENT *client_handle; + struct sockaddr_in sin; struct bound_server last; /* last written */ }; static inline char * @@ -231,15 +231,10 @@ if (strcmp (domainlist[i].domain, domain) == 0) { struct sockaddr_in addr; - struct timeval timeout; - int sock; pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); - if (domainlist[i].client_handle != NULL) - clnt_destroy (domainlist[i].client_handle); - domainlist[i].active = -2; memcpy(&(domainlist[i].ypset.addr), &(binding->ypbind_binding_addr), @@ -249,22 +244,13 @@ sizeof (unsigned short int)); domainlist[i].ypset.family = AF_INET; - sock = RPC_ANYSOCK; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - memset (&addr, 0, sizeof (struct sockaddr_in)); - memcpy (&addr.sin_addr, &domainlist[i].ypset.addr, - sizeof (struct in_addr)); - memcpy (&addr.sin_port, &domainlist[i].ypset.port, - sizeof (unsigned short int)); - addr.sin_family = domainlist[i].ypset.family; - - if ((domainlist[i].client_handle = - clntudp_create(&addr, YPPROG, YPVERS, timeout, &sock)) == NULL) - { - domainlist[i].active = -1; - remove_bindingfile (domain); - } + memset (&addr, 0, sizeof (struct sockaddr_in)); + memcpy (&addr.sin_addr, &domainlist[i].ypset.addr, + sizeof (struct in_addr)); + memcpy (&addr.sin_port, &domainlist[i].ypset.port, + sizeof (unsigned short int)); + addr.sin_family = domainlist[i].ypset.family; + memcpy (&domainlist[i].sin, &addr, sizeof (struct sockaddr_in)); pthread_rdwr_wunlock_np (&domainlock); pthread_rdwr_rlock_np (&domainlock); update_bindingfile (&domainlist[i]); @@ -275,6 +261,12 @@ " for domain '%s'", bound_host(&domainlist[i]), domainlist[i].domain); } + if (logfile_flag && (logfile_flag & LOG_SERVER_CHANGES)) + { + log2file ("NIS server for domain '%s' set to '%s' ", + domainlist[i].domain, + bound_host(&domainlist[i])); + } return; } @@ -391,8 +383,6 @@ } if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); - if (domainlist[i].client_handle != NULL) - clnt_destroy (domainlist[i].client_handle); domainlist[i].active = -1; } } @@ -581,9 +571,6 @@ static bool_t eachresult (bool_t *out, struct sockaddr_in *addr) { - struct timeval timeout; - int sock; - if (*out) { if(debug_flag) @@ -642,19 +629,7 @@ return 0; } - memcpy(&(in_use->server[0].addr), &addr->sin_addr, - sizeof (struct in_addr)); - memcpy(&(in_use->server[0].port), &addr->sin_port, - sizeof (unsigned short int)); - - sock = RPC_ANYSOCK; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - in_use->client_handle = - clntudp_create(addr, YPPROG, YPVERS, timeout, &sock); - - if (in_use->client_handle == NULL) - return 0; + memcpy (&(in_use->sin), &addr, sizeof (struct sockaddr_in)); in_use->active = 0; @@ -813,6 +788,7 @@ u_long i, pings_count = 0; struct cu_data *cu; char *domain = list->domain; + int old_active = list->active; if (list->server[0].host == NULL) /* There is no known server */ return 0; @@ -909,19 +885,19 @@ clnt_call (clnt, YPPROC_DOMAIN_NONACK, (xdrproc_t) NULL, (caddr_t) NULL, (xdrproc_t) xdr_bool, (caddr_t) &clnt_res, TIMEOUT00); - xid_lookup = *((u_int32_t *) (cu->cu_inbuf)); + memcpy (&xid_lookup, &(cu->cu_inbuf), sizeof (u_int32_t)); close (sock); for (i = 0; i < pings_count; ++i) { if (pings[i]->xid == xid_lookup) { + CLIENT *client_handle; pthread_rdwr_wlock_np (&domainlock); sock = RPC_ANYSOCK; - list->client_handle = - clntudp_create (&(pings[i]->sin), - YPPROG, YPVERS, TIMEOUT50, &sock); - if (list->client_handle == NULL) + client_handle = clntudp_create (&(pings[i]->sin), + YPPROG, YPVERS, TIMEOUT50, &sock); + if (client_handle == NULL) { /* NULL should not happen, we have got an answer from the server. */ log_msg (LOG_DEBUG, @@ -930,15 +906,32 @@ } else { + clnt_destroy (client_handle); + + memcpy (&(list->sin), &pings[i]->sin, sizeof(struct sockaddr_in)); list->active = pings[i]->server_nr; pthread_rdwr_wunlock_np (&domainlock); pthread_rdwr_rlock_np (&domainlock); update_bindingfile (list); pthread_rdwr_runlock_np (&domainlock); + if (debug_flag) log_msg (LOG_DEBUG, _("Answer for domain '%s' from server '%s'"), domain, list->server[list->active].host); + + if (logfile_flag && (logfile_flag & LOG_SERVER_CHANGES) && + old_active != list->active) + { + if (old_active == -1) + log2file ("NIS server for domain '%s' set to '%s'", + domain, list->server[list->active].host); + else + log2file ("NIS server for domain '%s' changed from '%s' to '%s'", + domain, list->server[old_active].host, + list->server[list->active].host); + } + found = 1; } } @@ -970,6 +963,7 @@ struct timeval timeout; CLIENT *clnt_handlep = NULL; int i = 0; + int old_active = list->active; if (list->server[0].host == NULL) /* There is no known server */ return 0; @@ -1032,13 +1026,31 @@ { memcpy (&(list->server[i].port), &server_addr.sin_port, sizeof (unsigned short int)); - list->client_handle = clnt_handlep; + memcpy (&(list->sin), &server_addr, sizeof (struct sockaddr_in)); + clnt_destroy (clnt_handlep); pthread_rdwr_wlock_np (&domainlock); list->active = i; pthread_rdwr_wunlock_np (&domainlock); pthread_rdwr_rlock_np (&domainlock); update_bindingfile (list); pthread_rdwr_runlock_np (&domainlock); + if (debug_flag) + log_msg (LOG_DEBUG, + _("Answer for domain '%s' from server '%s'"), + domain, list->server[list->active].host); + + if (logfile_flag && (logfile_flag & LOG_SERVER_CHANGES) && + old_active != list->active) + { + if (old_active == -1) + log2file ("NIS server for domain '%s' set to '%s'", + domain, list->server[list->active].host); + else + log2file ("NIS server for domain '%s' changed from '%s' to '%s'", + domain, list->server[old_active].host, + list->server[list->active].host); + } + return 1; } @@ -1147,36 +1159,47 @@ active = domainlist[i].active; - /* We should never run into this. For debugging. */ - if (domainlist[i].client_handle == NULL && domainlist[i].active != -1) - { - log_msg (LOG_ERR, "ALERT: active=%d, but client_handle is NULL!", - domainlist[i].active); - domainlist[i].active = -1; - } - if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { - /* Check only if the current binding is still valid. */ - struct timeval time_out; + const struct timeval TIMEOUT50 = {5, 0}; + int sock = RPC_ANYSOCK; + CLIENT *client_handle = + clntudp_create (&(domainlist[i].sin), + YPPROG, YPVERS, TIMEOUT50, &sock); + if (client_handle == NULL) + { + if (verbose_flag) + log_msg (LOG_NOTICE, + "NIS server '%s' for domain '%s' not reachable", + bound_host(&domainlist[i]), + domainlist[i].domain); + status = RPC_CANTSEND; + } + else + { + /* Check only if the current binding is still valid. */ + struct timeval time_out; - time_out.tv_sec = 3; - time_out.tv_usec = 0; - status = - clnt_call(domainlist[i].client_handle, - YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, - (caddr_t) &domain, (xdrproc_t) xdr_bool, - (caddr_t) &out, time_out); - if (verbose_flag && status != RPC_SUCCESS) - log_msg (LOG_NOTICE, "NIS server '%s' not responding" - " for domain '%s'", bound_host(&domainlist[i]), - domainlist[i].domain); + time_out.tv_sec = 3; + time_out.tv_usec = 0; + status = + clnt_call(client_handle, YPPROC_DOMAIN, + (xdrproc_t) ypbind_xdr_domainname, + (caddr_t) &domain, + (xdrproc_t) xdr_bool, + (caddr_t) &out, time_out); + if (verbose_flag && status != RPC_SUCCESS) + log_msg (LOG_NOTICE, + "NIS server '%s' not responding for domain '%s'", + bound_host(&domainlist[i]), + domainlist[i].domain); + clnt_destroy (client_handle); + } } - /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ @@ -1185,39 +1208,7 @@ { /* The current binding is not valid or it is time to search for a new, fast server. */ - if (debug_flag && lastcheck != 0) - { - /* Current active binding is not longer valid, print - the old binding for debugging. */ - if (domainlist[i].use_broadcast) - log_msg (LOG_DEBUG, - _("Server for domain '%s' doesn't answer."), - domain); - else - { - if (domainlist[i].active == -2) - log_msg (LOG_DEBUG, - _("Server '%s' for domain '%s' doesn't answer."), - inet_ntoa(domainlist[i].ypset.addr), - domain); - else - log_msg (LOG_DEBUG, - _("Server '%s' for domain '%s' doesn't answer."), - domainlist[i].server[domainlist[i].active].host, - domain); - } - } - /* We can destroy the client_handle since we are the - only thread who uses it. */ - /* client_handle can be NULL? */ - if (domainlist[i].client_handle == NULL) - { - log_msg (LOG_ERR, "ALERT: client_handle=NULL, active=%d, lastcheck=%d, domain=%s", - domainlist[i].active, lastcheck, domain); - } - else - clnt_destroy (domainlist[i].client_handle); - domainlist[i].client_handle = NULL; + if (domainlist[i].active == -2) { /* We can give this free, server does not answer any @@ -1226,16 +1217,16 @@ free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } - domainlist[i].active = -1; lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* And give the write lock away, search a new host and get the write lock again. */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); - if (!ping_all (&domainlist[i]) && - domainlist[i].use_broadcast) + if (domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); + else + ping_all (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_wlock_np (&domainlock); } @@ -1246,8 +1237,10 @@ server */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); - if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) + if (domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); + else + ping_all (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_wlock_np (&domainlock); } 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/ypbind-mt-1.23.1/src/ypbind-mt.c new/ypbind-mt-1.29.90/src/ypbind-mt.c --- old/ypbind-mt-1.23.1/src/ypbind-mt.c 2009-04-28 14:52:08.000000000 +0200 +++ new/ypbind-mt-1.29.90/src/ypbind-mt.c 2009-05-19 16:21:27.000000000 +0200 @@ -459,6 +459,9 @@ close (lock_fd); unlink (_YPBIND_PIDFILE); unlink_bindingdir (); + if (logfile_flag) + log2file ("Stopping %s-%s", PACKAGE, VERSION); + close_logfile (); exit (0); break; case SIGHUP: @@ -577,6 +580,7 @@ { log_msg (LOG_ERR, _("Unable to register (YPBINDPROG, YPBINDVERS, udp).")); + svc_destroy (transp); return 1; } @@ -585,6 +589,7 @@ { log_msg (LOG_ERR, _("Unable to register (YPBINDPROG, YPBINDOLDVERS, udp).")); + svc_destroy (transp); return 1; } @@ -594,6 +599,7 @@ if (sock < 0) { log_msg (LOG_ERR, _("Cannot create TCP: %s"), strerror (errno)); + svc_destroy (transp); return 1; } @@ -612,6 +618,8 @@ if (result < 0) { log_msg (LOG_ERR, _("Cannot bind TCP: %s"), strerror (errno)); + close (sock); + svc_destroy (transp); return 1; } } @@ -630,6 +638,7 @@ IPPROTO_TCP)) { log_msg (LOG_ERR, _("Unable to register (YPBINDPROG, YPBINDVERS, tcp).")); + svc_destroy (transp); return 1; } @@ -638,8 +647,10 @@ { log_msg (LOG_ERR, _("Unable to register (YPBINDPROG, YPBINDOLDVERS, tcp).")); + svc_destroy (transp); return 1; } + svc_destroy (transp); return 0; } @@ -715,6 +726,13 @@ } else if (strcmp ("-c", argv[i]) == 0) configcheck_only = 1; + else if (strcmp ("-log", argv[i]) == 0) + { + if (i+1 == argc || argv[i+1][0] == '-') + usage (1); + ++i; + logfile_flag = atoi (argv[i]); + } #ifdef USE_DBUS_NM else if (strcmp ("-no-dbus", argv[i]) == 0) disable_dbus = 1; @@ -902,6 +920,9 @@ is_online = 1; #endif + if (logfile_flag) + log2file ("Starting %s-%s", PACKAGE, VERSION); + portmapper_disconnect (); if (portmapper_register () != 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/ypbind-mt-1.23.1/src/ypbind_server.c new/ypbind-mt-1.29.90/src/ypbind_server.c --- old/ypbind-mt-1.23.1/src/ypbind_server.c 2006-09-13 14:51:29.000000000 +0200 +++ new/ypbind-mt-1.29.90/src/ypbind_server.c 2009-05-18 17:14:58.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2001, 2006 Thorsten Kukuk, Germany +/* Copyright (c) 1998, 1999, 2000, 2001, 2006, 2009 Thorsten Kukuk, Germany This file is part of ypbind-mt. Author: Thorsten Kukuk <kukuk@suse.de> @@ -40,16 +40,32 @@ bool_t ypbindproc_oldnull_1_svc (void *argp __attribute__ ((unused)), void *result, - struct svc_req *rqstp __attribute__ ((unused))) + struct svc_req *rqstp) { + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + log2file ("ypbindproc_oldnull_1_svc from %s:%i", + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + memset (result, 0, sizeof (char *)); return TRUE; } bool_t ypbindproc_null_2_svc (void *argp __attribute__ ((unused)), void *result, - struct svc_req *rqstp __attribute__ ((unused))) + struct svc_req *rqstp) { + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + log2file ("ypbindproc_null_2_svc from %s:%i", + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + memset (result, 0, sizeof (char *)); return TRUE; } @@ -89,6 +105,14 @@ if (debug_flag) log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", *argp); + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + log2file ("ypbindproc_olddomain_1 (%s) from %s:%i", *argp, + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + return ypbindproc_domain (*argp, result, rqstp); } @@ -99,6 +123,14 @@ if (debug_flag) log_msg (LOG_DEBUG, "ypbindproc_domain_2_svc (%s)", *argp); + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + log2file ("ypbindproc_domain_2 (%s) from %s:%i", *argp, + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + return ypbindproc_domain (*argp, result, rqstp); } @@ -151,6 +183,24 @@ log_msg (LOG_DEBUG, "ypbindproc_oldsetdom_1_svc (%s)", argp->ypoldsetdom_domain); + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + unsigned short int port; + + const struct sockaddr_in *sin = svc_getcaller (rqstp->rq_xprt); + + memcpy (&port, argp->ypoldsetdom_binding.ypbind_binding_port, sizeof (port)); + + log2file ("ypbindproc_olddomain_1 (%s:%u.%u.%u.%u:%d) from %s:%i", + *argp->ypoldsetdom_domain, + argp->ypoldsetdom_binding.ypbind_binding_addr[0], + argp->ypoldsetdom_binding.ypbind_binding_addr[1], + argp->ypoldsetdom_binding.ypbind_binding_addr[2], + argp->ypoldsetdom_binding.ypbind_binding_addr[3], + ntohs (port), + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + memset (result, 0, sizeof (char *)); return ypbindproc_setdom (argp->ypoldsetdom_domain, @@ -166,6 +216,24 @@ log_msg (LOG_DEBUG, "ypbindproc_setdom_2_svc (%s)", argp->ypsetdom_domain); + if (logfile_flag && (logfile_flag & LOG_RPC_CALLS)) + { + unsigned short int port; + + const struct sockaddr_in *sin = svc_getcaller (rqstp->rq_xprt); + + memcpy (&port, argp->ypsetdom_binding.ypbind_binding_port, sizeof (port)); + + log2file ("ypbindproc_domain_2 (%s:%u.%u.%u.%u:%d) from %s:%i", + argp->ypsetdom_domain, + argp->ypsetdom_binding.ypbind_binding_addr[0], + argp->ypsetdom_binding.ypbind_binding_addr[1], + argp->ypsetdom_binding.ypbind_binding_addr[2], + argp->ypsetdom_binding.ypbind_binding_addr[3], + ntohs (port), + inet_ntoa (sin->sin_addr), rqstp->rq_xprt->xp_port); + } + memset (result, 0, sizeof (char *)); return ypbindproc_setdom (argp->ypsetdom_domain, 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/ypbind-mt-1.23.1/src/ypbind_svc.c new/ypbind-mt-1.29.90/src/ypbind_svc.c --- old/ypbind-mt-1.23.1/src/ypbind_svc.c 2001-10-27 22:24:36.000000000 +0200 +++ new/ypbind-mt-1.29.90/src/ypbind_svc.c 2009-05-19 11:14:28.000000000 +0200 @@ -11,6 +11,7 @@ #include <memory.h> #include <syslog.h> #include <sys/socket.h> +#include <arpa/inet.h> #include <netinet/in.h> #include <locale.h> #include <libintl.h> @@ -68,6 +69,24 @@ memset ((char *) &argument, 0, sizeof (argument)); if (!svc_getargs (transp, xdr_argument, (caddr_t) & argument)) { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + + log_msg (LOG_ERR, "Cannot decode arguments for %d from %s:", + rqstp->rq_proc, inet_ntoa (sin->sin_addr)); + + if (logfile_flag && (logfile_flag & LOG_BROKEN_CALLS)) + { + log2file ("ypbindprog_1: cannot decode arguments for %d from %s:%i", + rqstp->rq_proc, + inet_ntoa (sin->sin_addr), + rqstp->rq_xprt->xp_port); + } + + /* try to free already allocated memory during decoding. + bnc#471924 */ + svc_freeargs (transp, xdr_argument, (caddr_t) &argument); + svcerr_decode (transp); return; } @@ -133,6 +152,24 @@ memset ((char *) &argument, 0, sizeof (argument)); if (!svc_getargs (transp, xdr_argument, (caddr_t) & argument)) { + const struct sockaddr_in *sin = + svc_getcaller (rqstp->rq_xprt); + + log_msg (LOG_ERR, "Cannot decode arguments for %d from %s:", + rqstp->rq_proc, inet_ntoa (sin->sin_addr)); + + if (logfile_flag && (logfile_flag & LOG_BROKEN_CALLS)) + { + log2file ("ypbindprog_2: cannot decode arguments for %d from %s:%i", + rqstp->rq_proc, + inet_ntoa (sin->sin_addr), + rqstp->rq_xprt->xp_port); + } + + /* try to free already allocated memory during decoding. + bnc#471924 */ + svc_freeargs (transp, xdr_argument, (caddr_t) &argument); + svcerr_decode (transp); return; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de