Mailing List Archive

Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic}
Forwarded message:
> From weingart@austin.BrandonU.CA Sun Aug 27 17:50:16 1995
> Date: Sun, 27 Aug 1995 19:47:54 -0500
> From: Tobias Weingartner <weingart@austin.BrandonU.CA>
> Subject: Patches for 0.8.8 to 0.8.11
> To: apache-bugs@apache.org
> Cc: weingart@austin.BrandonU.CA
> Message-id: <22250.809570874@austin>
> X-Envelope-to: apache-bugs@apache.org
> Content-transfer-encoding: 7BIT
>
>
> Here are a couple of patches, which I use. One is to get rid of using
> gethostname() on SVR4 (SYSV) boxes, and use utsname() instead. The others
> are mostly cosmetic changes, so that gcc -Wall does not complain anymore.
>
> Hope these make it through ok. Please let me know what you think.
>
> -----------------------------------------------------------------------
> *** 1.1 1995/08/28 00:33:53
> --- conf.h 1995/08/28 00:38:56
> ***************
> *** 302,307 ****
> --- 302,311 ----
> #include <fcntl.h>
> #include <limits.h>
> #include <memory.h>
> + #if defined(SVR4) || defined(SYSV) || defined(SOLARIS2)
> + #include <sys/utsname.h>
> + #include <crypt.h>
> + #endif
>
> #ifndef LOGNAME_MAX
> #define LOGNAME_MAX 25
> *** 1.1 1995/08/28 00:33:53
> --- mod_access.c 1995/08/28 00:44:19
> ***************
> *** 68,73 ****
> --- 68,74 ----
>
> #include "httpd.h"
> #include "http_config.h"
> + #include "http_log.h"
>
> typedef struct {
> char *from;
> *** 1.1 1995/08/28 00:33:53
> --- mod_negotiation.c 1995/08/28 00:41:41
> ***************
> *** 847,853 ****
> var_rec *var_recs = (var_rec*)neg->avail_vars->elts;
> int i;
> int found_any = 0;
> ! neg_dir_config *conf;
> int naccept = neg->accept_langs->nelts;
>
> if (naccept == 0)
> --- 847,853 ----
> var_rec *var_recs = (var_rec*)neg->avail_vars->elts;
> int i;
> int found_any = 0;
> ! neg_dir_config *conf = NULL;
> int naccept = neg->accept_langs->nelts;
>
> if (naccept == 0)
> *** 1.1 1995/08/28 00:33:53
> --- util.c 1995/08/28 00:36:40
> ***************
> *** 843,851 ****
> char str[128];
> int len = 128;
> char *server_hostname;
> -
> struct hostent *p;
> gethostname(str, len);
> if((!(p=gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) {
> fprintf(stderr,"httpd: cannot determine local host name.\n");
> fprintf(stderr,"Use ServerName to set it manually.\n");
> --- 843,862 ----
> char str[128];
> int len = 128;
> char *server_hostname;
> struct hostent *p;
> +
> + #if defined(SVR4) || defined(SYSV) || defined(SOLARIS2)
> + struct utsname n;
> + if(uname(&n) < 0) {
> + fprintf(stderr, "httpd: uname(2) failed.\n");
> + fprintf(stderr, "Use ServerName to set nodename manually.\n");
> + exit(1);
> + }else{
> + strncpy(str, n.nodename, len);
> + }
> + #else
> gethostname(str, len);
> + #endif
> if((!(p=gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) {
> fprintf(stderr,"httpd: cannot determine local host name.\n");
> fprintf(stderr,"Use ServerName to set it manually.\n");
> -----------------------------------------------------------------------
>
> --Toby.
> *----------------------------------------------------------------------------*
> | Tobias Weingartner | Email: weingart@BrandonU.Ca | Need a Unix sys-admin? |
> | Box 27, Beulah, MB |-----------------------------| Send E-Mail for resume, |
> | R0M 0B0, Canada | Unix Guru, Admin, Sys-Prgmr | and other details... |
> |----------------------------------------------------------------------------|
> | %SYSTEM-F-ANARCHISM, The operating system has been overthrown |
> *----------------------------------------------------------------------------*
>
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
In reply to Rob Hartill who said
>
> > Here are a couple of patches, which I use. One is to get rid of using
> > gethostname() on SVR4 (SYSV) boxes, and use utsname() instead. The others

Why? Does gethostname not work?

--
Paul Richards, Bluebird Computer Systems. FreeBSD core team member.
Internet: paul@FreeBSD.org, http://www.freebsd.org/~paul
Phone: 0370 462071 (Mobile), +44 1222 457651 (home)
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> In reply to Rob Hartill who said

>> and use utsname() instead. The others
>
> Why? Does gethostname not work?
>
According to my man-pages; gethostname() should be in the BSD compatibility lib,
it says a few nasty things, like;

NOTES
Use of these interfaces should be restricted to only appli-
cations written on BSD platforms. Use of these interfaces
with any of the system libraries or in multi-thread applica-
tions is unsupported.

and so on. But it really ought to be OK, as it is in the compat lib.

Dw.

DISCLAIMER: My manpages are known to be a combination of utrix/osf/solaris
and god knows what else. So if the above is correct, well lucky you !
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
In reply to Dirk.vanGulik who said
>
> > In reply to Rob Hartill who said
>
> >> and use utsname() instead. The others
> >
> > Why? Does gethostname not work?
> >
> According to my man-pages; gethostname() should be in the BSD compatibility lib,
> it says a few nasty things, like;
>
> NOTES
> Use of these interfaces should be restricted to only appli-
> cations written on BSD platforms. Use of these interfaces
> with any of the system libraries or in multi-thread applica-
> tions is unsupported.
>
> and so on. But it really ought to be OK, as it is in the compat lib.

God I hate Solaris. My SunOS 4.1 doesn't say anything about this but
I wouldn't be surprised if SYSV machines are deprecating it since it
has it's origins in BSD.

Oh well, how many BSD machines don't have uname? I know FreeBSD. NetBSD
and BSDI have it in all but very, very early versions. What about
AU/X, AIX, HPUX and Next?

On a related note, can we have people step forward to be authoritative
for particular OS's and not release code until we get a report from
the people working on each OS? We seem to get quite a few bug
reports for specific platforms and that's probably because things
are rushing ahead on the platforms the main developers have and
the other platforms don't get tried until some user who isn't
tracking every little patch update goes and tries to compile it
and finds the last X patches don't work on their box.

I'll obviously step forward for FreeBSD, although Brian Tao's probably
spending more time on Apache than I am personally. If we have such a list
we can buzz the people for feedback on changes for that particular OS and
make sure all the platforms move forward together.

--
Paul Richards, Bluebird Computer Systems. FreeBSD core team member.
Internet: paul@FreeBSD.org, http://www.freebsd.org/~paul
Phone: 0370 462071 (Mobile), +44 1222 457651 (home)
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> > According to my man-pages; gethostname() should be in the BSD compatibility
lib,
> > it says a few nasty things, like;
> >
> > NOTES
> > Use of these interfaces should be restricted to only appli-
> > cations written on BSD platforms. Use of these interfaces
> > with any of the system libraries or in multi-thread applica-
> > tions is unsupported.

In Solaris 2.5 BETA gethostname() is in libc and the above NOTES have
been removed from the man pages.


----------
gethostname(3C) C Library Functions gethostname(3C)

NAME
gethostname, sethostname - get/set name of current host

SYNOPSIS
int gethostname(char *name, int namelen);

int sethostname(char *name, int namelen);

DESCRIPTION
gethostname() returns the standard host name for the current
processor, as previously set by sethostname. The parameter
namelen specifies the size of the array pointed to by name.
The returned name is null-terminated unless insufficient
space is provided.

sethostname() sets the name of the host machine to be name,
which has length namelen. This call is restricted to the
privileged user and is normally used only when the system is
bootstrapped.

RETURN VALUES
If the call succeeds a value of 0 is returned. If the call
fails, then a value of -1 is returned and an error code is
placed in the global location errno.

ERRORS
The following error may be returned by these calls:

EFAULT The name or namelen parameter gave an invalid
address.

EPERM The caller was not the privileged user.
Note: this error only applies to sethost-
name().

SEE ALSO
uname(2), sysinfo(2), gethostid(3C)

NOTES
Host names are limited to MAXHOSTNAMELEN characters,
currently 256. (See the <sys/param.h> header.)

SunOS 5.5 Last change: 12 Feb 1993 1
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> On a related note, can we have people step forward to be authoritative
> for particular OS's and not release code until we get a report from
> the people working on each OS? We seem to get quite a few bug
> reports for specific platforms and that's probably because things
> are rushing ahead on the platforms the main developers have and
> the other platforms don't get tried until some user who isn't
> tracking every little patch update goes and tries to compile it
> and finds the last X patches don't work on their box.

Platforms I am currently compiling for and *using* are:

NetBSD-current
BSDI 1.1
SunOS 4.1.3
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
At 08:32 AM 8/29/95 -0500, you wrote:
>
>> On a related note, can we have people step forward to be authoritative
>> for particular OS's and not release code until we get a report from
>> the people working on each OS? We seem to get quite a few bug
>> reports for specific platforms and that's probably because things
>> are rushing ahead on the platforms the main developers have and
>> the other platforms don't get tried until some user who isn't
>> tracking every little patch update goes and tries to compile it
>> and finds the last X patches don't work on their box.
>
>Platforms I am currently compiling for and *using* are:
>

Linux
& Soon SCO. <YUCK>

<Aram>
--
Aram W. Mirzadeh, MIS Manager, Qosina Corporation
http://www.qosina.com/~awm/, awm@qosina.com
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
In reply to Randy Terbush who said
>
> Platforms I am currently compiling for and *using* are:
>
> NetBSD-current
> BSDI 1.1
> SunOS 4.1.3

We should put this info somewhere so we can look it up when we want to, say,
accost the person who's testing the Next code and hasn't said anything
for a month :-)

--
Paul Richards, Bluebird Computer Systems. FreeBSD core team member.
Internet: paul@FreeBSD.org, http://www.freebsd.org/~paul
Phone: 0370 462071 (Mobile), +44 1222 457651 (home)
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
At 04:05 PM 8/29/95 +0100, you wrote:
>In reply to Randy Terbush who said
>>
>> Platforms I am currently compiling for and *using* are:
>>
>> NetBSD-current
>> BSDI 1.1
>> SunOS 4.1.3
>
>We should put this info somewhere so we can look it up when we want to, say,
>accost the person who's testing the Next code and hasn't said anything
>for a month :-)

How about in the member.html.... An OS field can be added, this way if someone
has a question, instead of send it to someone random, they can send it directly
to the person, with a CC to the list.

<Aram>
--
Aram W. Mirzadeh, MIS Manager, Qosina Corporation
http://www.qosina.com/~awm/, awm@qosina.com
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> On a related note, can we have people step forward to be authoritative
> for particular OS's and not release code until we get a report from
> the people working on each OS? We seem to get quite a few bug
> reports for specific platforms and that's probably because things
> are rushing ahead on the platforms the main developers have and
> the other platforms don't get tried until some user who isn't
> tracking every little patch update goes and tries to compile it
> and finds the last X patches don't work on their box.


I'll sign up for solaris 2.x (where x >=4)

Cliff
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
In reply to Chuck Murcko who said
>
> There are more problems to be uncovered here. A default Solaris install
> leaves you needing to get both uname -n & domainname output to get a fully
> qualified hostname. Same results with UnixWare. NetBSD and BSDI give you a
> fully qualified hostname from uname -n. SVR4. Feh.
>

Umm, domainname returns the the NIS domain and not the internet
domain name. There's something wrong with Solaris and/or your configuration
if that's the case. Apache will never use domainname to get a FQDN, it's
just not the same thing.

Of course, if Sun have totally screwed this up with Solaris I wouldn't
be surprised :-)

--
Paul Richards, Bluebird Computer Systems. FreeBSD core team member.
Internet: paul@FreeBSD.org, http://www.freebsd.org/~paul
Phone: 0370 462071 (Mobile), +44 1222 457651 (home)
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> From owner-new-httpd@hyperreal.com Tue Aug 29 21:41:56 1995
> From: Paul Richards <paul@netcraft.co.uk>
> Subject: Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic}
> To: new-httpd@hyperreal.com
> Date: Tue, 29 Aug 1995 20:24:02 +0100 (BST)
> Mime-Version: 1.0
> Content-Transfer-Encoding: 8bit
> Sender: owner-new-httpd@hyperreal.com
> Reply-To: new-httpd@hyperreal.com
>
> In reply to Chuck Murcko who said
> >
> > There are more problems to be uncovered here. A default Solaris install
> > leaves you needing to get both uname -n & domainname output to get a fully
> > qualified hostname. Same results with UnixWare. NetBSD and BSDI give you a
> > fully qualified hostname from uname -n. SVR4. Feh.
> >
>
> Umm, domainname returns the the NIS domain and not the internet
> domain name. There's something wrong with Solaris and/or your configuration
> if that's the case. Apache will never use domainname to get a FQDN, it's
> just not the same thing.
>
> Of course, if Sun have totally screwed this up with Solaris I wouldn't
> be surprised :-)
>

Ok, could not resist, I was once trained to be an experimental physisist,
never made it, but does this help; here is the output on an very
old Sun 4.1.1, 4.1.3, Solaris, OSF and an SGI. done a

( uname -a; uname -n; domainname) | mail myself, which gives the
following (and yes they are in two domains :-)

SunOS elect6 5.4 Generic_101945-10 sun4m sparc
elect6
elec.isei.jrc.it

SunOS indian 4.1.1_+N 1 sun4c
indian
sea.irsa.jrc.it

SunOS med 4.1.3 1 sun4m
med
sea.irsa.jrc.it

OSF1 nansen V1.3 110 alpha
nansen
sea.irsa.jrc.it

IRIX dino 5.2 02282016 IP22 mips
dino
elec.isei.jrc.it
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
On Tue, 29 Aug 1995, Chuck Murcko wrote:
> Here, we use apache on:
>
> FreeBSD-2.0.5
> BSDI 1.1 and 2.0
> Solaris 2.3 and 2.4
> Unixware 1.1.2
> Linux 1.1.x and 1.2.x
>
> We also develop at various levels of effort on all of them.

Okay, but which platforms are you willing to be responsible for, i.e.,
when there's a vote ballot you'll compile it for that platform, and stay
on top of any OS-specific bugs/dependencies?

(question asked to the list in general)

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
In reply to Dirk.vanGulik who said
>
> > Umm, domainname returns the the NIS domain and not the internet
> > domain name. There's something wrong with Solaris and/or your configuration
> > if that's the case. Apache will never use domainname to get a FQDN, it's
> > just not the same thing.
> >
> > Of course, if Sun have totally screwed this up with Solaris I wouldn't
> > be surprised :-)
> >
>
> Ok, could not resist, I was once trained to be an experimental physisist,
> never made it, but does this help; here is the output on an very
> old Sun 4.1.1, 4.1.3, Solaris, OSF and an SGI. done a
>
> ( uname -a; uname -n; domainname) | mail myself, which gives the
> following (and yes they are in two domains :-)
>
> SunOS elect6 5.4 Generic_101945-10 sun4m sparc
> elect6
> elec.isei.jrc.it
>
> SunOS indian 4.1.1_+N 1 sun4c
> indian
> sea.irsa.jrc.it
>
> SunOS med 4.1.3 1 sun4m
> med
> sea.irsa.jrc.it
>
> OSF1 nansen V1.3 110 alpha
> nansen
> sea.irsa.jrc.it
>
> IRIX dino 5.2 02282016 IP22 mips
> dino
> elec.isei.jrc.it
>
>

Umm, rather irrelevant. Read the domainname manpage.

In some cases the domainname() is the internet domain but that's
just a coincidence. On the Cardiff web server for instance,
the domainname has little to do with it's internet domain. Regardless
of what domainname() may or may not return it cannot be used to
determine the internet domain for FQDN's.



--
Paul Richards, Bluebird Computer Systems. FreeBSD core team member.
Internet: paul@FreeBSD.org, http://www.freebsd.org/~paul
Phone: 0370 462071 (Mobile), +44 1222 457651 (home)
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
>
> Umm, rather irrelevant. Read the domainname manpage.
>
I wish I could fully agree with you, that the manpage
was the panace for all pains. But not all implementors
stick to it. Said but true. But still; you should never
use the domainname/uname and expect to be able to create
some sort of FQDN. But some pages are really unclear
about about this and more or less equal NIS domains
to DNS domains.

Dw.
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
On Tue, 29 Aug 1995, Chuck Murcko wrote:
> > Okay, but which platforms are you willing to be responsible for, i.e.,
> > when there's a vote ballot you'll compile it for that platform, and stay
> > on top of any OS-specific bugs/dependencies?
> >
> Well, I can be primary for BSDI 1.1/2.0, if Randy doesn't mind.
> I can also be a backstop for FreeBSD or Solaris, since others have
> spoken for those...

Hey, redundancy is cool (I'm also listed for BSDI 2.0).

> We here at Telebase (others, not me) can supply periodic patches
> and regular updates testing for the other OS (Linux and UnixWare).

Unixware is definitely needed - I don't know any other members who are
using it. (though I'm sure some are)

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
> Brian Behlendorf liltingly intones:
> >
> > On Tue, 29 Aug 1995, Chuck Murcko wrote:
> > > Here, we use apache on:
> > >
> > > FreeBSD-2.0.5
> > > BSDI 1.1 and 2.0
> > > Solaris 2.3 and 2.4
> > > Unixware 1.1.2
> > > Linux 1.1.x and 1.2.x
> > >
> > > We also develop at various levels of effort on all of them.
> >
> > Okay, but which platforms are you willing to be responsible for, i.e.,
> > when there's a vote ballot you'll compile it for that platform, and stay
> > on top of any OS-specific bugs/dependencies?
> >
> Well, I can be primary for BSDI 1.1/2.0, if Randy doesn't mind.
> I can also be a backstop for FreeBSD or Solaris, since others have
> spoken for those...

No argument here. As Brian pointed out, it would be good to have
a couple of people covering each OS. I think the group as a
whole seems to be strongest on BSD. We could use some SysV
coverage...
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
On Tue, 29 Aug 1995, Paul Richards wrote:
>
> I'll obviously step forward for FreeBSD, although Brian Tao's probably
> spending more time on Apache than I am personally. If we have such a list
> we can buzz the people for feedback on changes for that particular OS and
> make sure all the platforms move forward together.

I haven't had much time lately to run through the code (especially
the module stuff). As long as it compiles cleanly and can handle my
rather simple Web server needs on the FreeBSD machines here, I'm
happy. Give me a couple of months... my current job is done in a
week, then I'm in San Jose for a couple weeks, then back to Toronto
for the next job. Once I'm settled in there, I'll be able to pay more
attention to the goings-on here.

I'm good for FreeBSD 2.x and possibly BSD/OS 2.0 (the OS at my new
workplace).
--
Brian ("Though this be madness, yet there is method in't") Tao
taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
On Tue, 29 Aug 1995, Paul Richards wrote:
>
> I'll obviously step forward for FreeBSD, although Brian Tao's probably
> spending more time on Apache than I am personally. If we have such a list
> we can buzz the people for feedback on changes for that particular OS and
> make sure all the platforms move forward together.

I haven't had much time lately to run through the code (especially
the module stuff). As long as it compiles cleanly and can handle my
rather simple Web server needs on the FreeBSD machines here, I'm
happy. Give me a couple of months... my current job is done in a
week, then I'm in San Jose for a couple weeks, then back to Toronto
for the next job. Once I'm settled in there, I'll be able to pay more
attention to the goings-on here.

I'm good for FreeBSD 2.x and possibly BSD/OS 2.0 (the OS at my new
workplace).
--
Brian ("Though this be madness, yet there is method in't") Tao
taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org
Re: Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic} [ In reply to ]
On Tue, 29 Aug 1995, Randy Terbush wrote:
>
> No argument here. As Brian pointed out, it would be good to have
> a couple of people covering each OS. I think the group as a
> whole seems to be strongest on BSD. We could use some SysV
> coverage...

I'd say an IRIX 5.x and 6.x person would be needed, AIX to a
lesser extent (just my own feeling that there are probably more SGI
Web servers than IBM RS/6k ones), and Solaris admins are a dime a
dozen. ;-)
--
Brian ("Though this be madness, yet there is method in't") Tao
taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org

1 2  View All