Subject: Re: dhclient segfaults
To: None <prlw1@newn.cam.ac.uk>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: current-users
Date: 05/25/2001 02:18:11
In message <20010524162542.N8455@quartz.newn.cam.ac.uk>
on Thu, 24 May 2001 16:25:42 +0100,
Patrick Welche <prlw1@newn.cam.ac.uk> wrote:
> Using the standard install floppies (fdset) on an i386 with source of
> May 18 14:01 GMT, dhclient core dumps. It prints the "Internet Softare...
> For info..." lines, then
>
> uid 0 comm dhclient on /: file system full
>
> The thing is I think that is probably from writing the partial core dump.
Dhclient compiled with -DSMALL might be broken.
Is this patch solve your problem?
I'm sorry that I don't have enough time to check it really works or
not, but only compiled successfully.
(And it make sysinst a little bit larger.)
--
Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
Index: client/dhclient.c
===================================================================
RCS file: /usr/pkg/libdata/cvs/src/usr.sbin/dhcp/client/dhclient.c,v
retrieving revision 1.1.1.7.2.3
diff -u -r1.1.1.7.2.3 dhclient.c
--- client/dhclient.c 2001/04/07 05:22:50 1.1.1.7.2.3
+++ client/dhclient.c 2001/05/24 17:01:48
@@ -139,12 +139,6 @@
log_fatal ("Can't initialize OMAPI: %s",
isc_result_totext (status));
-#if !defined (SMALL)
- /* Set up the OMAPI wrappers for various server database internal
- objects. */
- dhcp_common_objects_setup ();
-#endif
-
dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
dhcp_interface_startup_hook = dhclient_interface_startup_hook;
Index: common/comapi.c
===================================================================
RCS file: /usr/pkg/libdata/cvs/src/usr.sbin/dhcp/common/comapi.c,v
retrieving revision 1.1.1.2.2.3
diff -u -r1.1.1.2.2.3 comapi.c
--- common/comapi.c 2001/04/07 05:22:59 1.1.1.2.2.3
+++ common/comapi.c 2001/05/24 17:02:48
@@ -111,9 +111,7 @@
log_fatal ("Can't register shared network object type: %s",
isc_result_totext (status));
-#if !defined (SMALL)
interface_setup ();
-#endif
}
isc_result_t dhcp_group_set_value (omapi_object_t *h,
Index: common/discover.c
===================================================================
RCS file: /usr/pkg/libdata/cvs/src/usr.sbin/dhcp/common/discover.c,v
retrieving revision 1.1.1.5.2.3
diff -u -r1.1.1.5.2.3 discover.c
--- common/discover.c 2001/04/07 05:23:00 1.1.1.5.2.3
+++ common/discover.c 2001/05/24 17:04:34
@@ -79,12 +79,12 @@
OMAPI_OBJECT_ALLOC (interface, struct interface_info, dhcp_type_interface)
-#if !defined (SMALL)
isc_result_t interface_setup ()
{
isc_result_t status;
status = omapi_object_type_register (&dhcp_type_interface,
"interface",
+#if !defined (SMALL)
dhcp_interface_set_value,
dhcp_interface_get_value,
dhcp_interface_destroy,
@@ -92,6 +92,15 @@
dhcp_interface_stuff_values,
dhcp_interface_lookup,
dhcp_interface_create,
+#else
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+#endif
dhcp_interface_remove,
0, 0, 0,
sizeof (struct interface_info),
@@ -102,7 +111,6 @@
return status;
}
-#endif
#if defined (TRACING)
void interface_trace_setup ()