Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2001 21:31:49 -0600 (CST)
From:      "Scot W. Hetzel" <hetzels@westbend.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/25979: [MAINTAINER] www/apache13-fp - Apache 1.3.19 sig 11 when ap_get_local_host() is called
Message-ID:  <200103220331.f2M3Vnt71508@spare.westbend.net>

next in thread | raw e-mail | index | archive | help

>Number:         25979
>Category:       ports
>Synopsis:       [MAINTAINER] www/apache13-fp - Apache 1.3.19 sig11 when ap_get_local_host() is called
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 21 19:40:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
West Bend Internet
>Environment:


>Description:

When ServerName directive in httpd.conf is not set the Apache server will
cause a Sig 11 in ap_get_local_host().

See the following discussion for more info on this problem:

  http://docs.freebsd.org/cgi/getmsg.cgi?fetch=620754+0+current/freebsd-stable

>How-To-Repeat:

Don't set ServerName directive in httpd.conf.

>Fix:

Either set ServerName directive in httpd.conf or apply the following patch to
src/main/util.c.

NOTE: A Similar patch should be applied to the other Apache 1.3.19 ports.

--- patch-fj.orig	Sun Sep 26 21:52:25 1999
+++ patch-fj	Wed Mar 21 21:13:46 2001
@@ -1,6 +1,6 @@
---- src/main/util.c.orig	Sat Aug 14 03:35:50 1999
-+++ src/main/util.c	Mon Sep  6 13:12:55 1999
-@@ -635,7 +635,7 @@
+--- src/main/util.c.orig	Thu Feb  1 04:06:37 2001
++++ src/main/util.c	Wed Mar 21 21:12:35 2001
+@@ -708,7 +708,7 @@
      char *res;
  
      for (x = 0; (*line)[x]; x++) {
@@ -9,3 +9,20 @@
  	    pos = x;
  	    break;
  	}
+@@ -2040,7 +2040,6 @@
+ 	ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
+ 	             "%s: gethostname() failed to determine ServerName\n",
+                      ap_server_argv0);
+-	server_hostname = ap_pstrdup(a, "127.0.0.1");
+     }
+     else 
+     {
+@@ -2048,7 +2047,7 @@
+         if ((!(p = gethostbyname(str))) 
+             || (!(server_hostname = find_fqdn(a, p)))) {
+             /* Recovery - return the default servername by IP: */
+-            if (p->h_addr_list[0]) {
++            if (p && 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 */
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103220331.f2M3Vnt71508>