[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OPENBSD_2_9 (SEMMNI, SEMMNS, SHMMAXPGS): httpd Memory fault(core dumped)
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: OPENBSD_2_9 (SEMMNI, SEMMNS, SHMMAXPGS): httpd Memory fault(core dumped)
- From: "Alexander Farber (EED)" <eedalf_(_at_)_eed_(_dot_)_ericsson_(_dot_)_se>
- Date: Fri, 06 Jul 2001 16:34:14 +0200
Thanks Heikki,
Heikki Korpela wrote:
> On Wed, 4 Jul 2001, Alexander Farber (EED) wrote:
>
> > So, there is a problem with httpd in OPENBSD_2_9, when
> > the ServerName is unset in /var/www/conf/httpd.conf.
>
> This is fixed in Apache 1.3.20.
>
> http://httpd.apache.org/dist/httpd/CHANGES_1.3
>
> *) Fix a possible NULL pointer dereference in the detection of the
> default ServerName or IP string (introduced in 1.3.18).
> [Ignasi Roca, <Ignasi_(_dot_)_Roca_(_at_)_fujitsu-siemens_(_dot_)_com>]
>
> Try this patch:
>
> --
> <---------------------------------------------------------------------->
> Heikki Korpela -- heko_(_at_)_saitti_(_dot_)_net
>
> Index: src/main/util.c
> ===================================================================
> RCS file: /usr/cvs/src/usr.sbin/httpd/src/main/util.c,v
> retrieving revision 1.9
> retrieving revision 1.10
> diff -u -r1.9 -r1.10
> --- src/main/util.c 2001/03/29 10:21:43 1.9
> +++ src/main/util.c 2001/05/03 17:16:12 1.10
> @@ -2047,12 +2047,16 @@
> str[sizeof(str) - 1] = '\0';
> if ((!(p = gethostbyname(str)))
> || (!(server_hostname = find_fqdn(a, p)))) {
> - /* Recovery - return the default servername by IP: */
> - if (p->h_addr_list[0]) {
> - ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
> - server_hostname = ap_pstrdup(a, str);
> - /* We will drop through to report the IP-named server */
> - }
> + if (!p)
> + server_hostname=NULL;
> + else {
> + /* Recovery - return the default servername by IP: */
> + if (p->h_addr_list[0]) {
> + ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
> + server_hostname = ap_pstrdup(a, str);
> + /* We will drop through to report the IP-named server */
> + }
> + }
> }
> else
> /* Since we found a fdqn, return it with no logged message. */
I've just applied it (to the httpd from OPENBSD_2_9) and it works -
the Apache doesn't dump core even if the ServerName is missing.
Regards
Alex
PS: It's really cool to have an own server - my
"baby" is hanging at http://pref.dyndns.org :-)
Visit your host, monkey.org