Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 597046 Details for
Bug 829487
ypbind will not bind if network is off
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch consulted with upstream
ypbind-nmlocal.patch (text/plain), 3.37 KB, created by
Honza Horak
on 2012-07-09 11:33:32 UTC
(
hide
)
Description:
patch consulted with upstream
Filename:
MIME Type:
Creator:
Honza Horak
Created:
2012-07-09 11:33:32 UTC
Size:
3.37 KB
patch
obsolete
>diff -up ypbind-mt-1.35/src/local.h.nmlocal ypbind-mt-1.35/src/local.h >--- ypbind-mt-1.35/src/local.h.nmlocal 2009-03-30 14:24:40.000000000 +0200 >+++ ypbind-mt-1.35/src/local.h 2012-06-11 19:31:42.297661066 +0200 >@@ -7,6 +7,7 @@ extern int broken_server; > extern int port; > extern int ping_interval; > extern int use_broadcast; >+extern int localhost_used; > extern char *domain; > > extern void find_domain (const char *domain, ypbind_resp *result); >diff -up ypbind-mt-1.35/src/serv_list.c.nmlocal ypbind-mt-1.35/src/serv_list.c >--- ypbind-mt-1.35/src/serv_list.c.nmlocal 2012-06-11 19:31:41.970660463 +0200 >+++ ypbind-mt-1.35/src/serv_list.c 2012-06-11 19:39:15.177987490 +0200 >@@ -108,6 +108,28 @@ static pthread_mutex_t search_lock = PTH > static void do_broadcast (struct binding *list); > static int ping_all (struct binding *list); > >+/* We have localhost defined in one of the domains. >+ * If so, we don't need to be connected to outer network. */ >+void >+check_localhost() >+{ >+ int i, s; >+ localhost_used = 0; >+ for (i = 0; i < max_domains; ++i) >+ { >+ for (s = 0; s < _MAXSERVER; ++s) >+ { >+ if (domainlist[i].server[s].host == NULL) >+ break; >+ if (strcmp(inet_ntoa(domainlist[i].server[s].addr), "127.0.0.1") == 0) >+ { >+ localhost_used = 1; >+ return; >+ } >+ } >+ } >+} >+ > static void > remove_bindingfile (struct binding *entry) > { >@@ -220,6 +242,7 @@ update_bindingfile (struct binding *entr > } > else > log_msg (LOG_ERR, "open(%s): %s", path2, strerror (errno)); >+ check_localhost(); > } > > /* this is called from the RPC thread (ypset). */ >@@ -562,6 +585,7 @@ add_server (const char *domain, const ch > If there is none, use the first one. */ > memcpy (&entry->server[active].addr, hent->h_addr_list[0], > hent->h_length); >+ check_localhost(); > res = 1; > } > >@@ -1105,7 +1129,7 @@ test_bindings (void *param __attribute__ > int lastcheck = 0; > > #ifdef USE_DBUS_NM >- if (is_online) >+ if (is_online || localhost_used) > #endif > do_binding (); > >@@ -1125,7 +1149,7 @@ test_bindings (void *param __attribute__ > lastcheck = 0; > > #if USE_DBUS_NM >- if (is_online) >+ if (is_online || localhost_used) > > #endif > lastcheck = test_bindings_once (lastcheck, NULL); >diff -up ypbind-mt-1.35/src/ypbind_dbus_nm.c.nmlocal ypbind-mt-1.35/src/ypbind_dbus_nm.c >--- ypbind-mt-1.35/src/ypbind_dbus_nm.c.nmlocal 2012-06-11 19:31:42.296661064 +0200 >+++ ypbind-mt-1.35/src/ypbind_dbus_nm.c 2012-06-11 19:31:42.300661070 +0200 >@@ -92,8 +92,11 @@ go_offline (void) > if (debug_flag) > log_msg (LOG_DEBUG, _("Switch to offline mode")); > is_online = 0; >- portmapper_disconnect (); >- clear_server (); >+ if (!localhost_used) >+ { >+ portmapper_disconnect (); >+ clear_server (); >+ } > } > > static void >diff -up ypbind-mt-1.35/src/ypbind-mt.c.nmlocal ypbind-mt-1.35/src/ypbind-mt.c >--- ypbind-mt-1.35/src/ypbind-mt.c.nmlocal 2011-08-31 15:21:11.000000000 +0200 >+++ ypbind-mt-1.35/src/ypbind-mt.c 2012-06-11 19:40:02.419996267 +0200 >@@ -74,6 +74,7 @@ int broken_server = 0; > int foreground_flag = 0; > int ping_interval = 20; > int local_only = 0; >+int localhost_used = 1; > int port = -1; > static int lock_fd; > static int pid_is_written = 0; >@@ -945,7 +946,7 @@ main (int argc, char **argv) > } > > #ifdef USE_DBUS_NM >- if (!is_online) >+ if (!is_online && !localhost_used) > portmapper_disconnect (); > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 829487
:
597046
|
597245