cvs commit: apache/support logresolve.c
brian 96/08/07 19:32:03 Modified:support logresolve.c Log: Reviewed by: Brian Behlendorf Submitted by: Paul Richards Removed requirement for OS/2 specific #ifdef. Revision ChangesPath 1.4 +0 -6 apache/support/logresolve.c Index: logresolve.c === RCS file: /export/home/cvs/apache/support/logresolve.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C3 -r1.3 -r1.4 *** logresolve.c 1996/08/06 05:21:20 1.3 --- logresolve.c 1996/08/08 02:32:00 1.4 *** *** 41,50 \*** ***/ - #ifdef __EMX__ - /* Need this include before any others under OS/2 */ #include - #endif #include #include --- 41,47 *** *** 52,60 #include #include - #ifndef __EMX__ - #include - #endif #include #include --- 49,54
cvs commit: apache/support logresolve.c
marc98/01/05 13:06:15 Modified:support Tag: APACHE_1_2_X logresolve.c Log: SECURITY: Fix a possible buffer overflow in logresolve. This is only an issue on systems without a MAXDNAME define or where the resolver returns domain names longer than MAXDNAME. Reviewed by: Martin Kraemer, Mark J Cox, Dean Gaudet, Randy Terbush Revision ChangesPath No revision No revision 1.7.2.1 +3 -1 apache/support/logresolve.c Index: logresolve.c === RCS file: /export/home/cvs/apache/support/logresolve.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- logresolve.c 1997/02/04 23:54:28 1.7 +++ logresolve.c 1998/01/05 21:06:15 1.7.2.1 @@ -202,7 +202,9 @@ } else cachehits++; -strcpy(string, (*current)->hostname); +/* size of string == MAXDNAME +1 */ +strncpy(string, (*current)->hostname, MAXDNAME); +string[MAXDNAME] = '\0'; } /*
cvs commit: apache/support logresolve.c Makefile
brian 96/08/05 22:21:23 Modified:support logresolve.c Makefile Log: Reviewed by: Brian Behlendorf Submitted by: Garey Smiley Added support for OS/2. Revision ChangesPath 1.3 +7 -0 apache/support/logresolve.c Index: logresolve.c === RCS file: /export/home/cvs/apache/support/logresolve.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C3 -r1.2 -r1.3 *** logresolve.c 1996/02/22 11:47:38 1.2 --- logresolve.c 1996/08/06 05:21:20 1.3 *** *** 41,53 --- 41,60 \*** ***/ + #ifdef __EMX__ + /* Need this include before any others under OS/2 */ + #include + #endif + #include #include #include #include #include + #ifndef __EMX__ #include + #endif #include #include 1.10 +2 -2 apache/support/Makefile Index: Makefile === RCS file: /export/home/cvs/apache/support/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C3 -r1.9 -r1.10 *** Makefile 1996/06/13 19:49:55 1.9 --- Makefile 1996/08/06 05:21:21 1.10 *** *** 10,16 # For SCO ODT #EXTRA_LIBS= -lcrypt_i # For OS/2 port ! #EXTRA_LIBS= -llibufc INCLUDES= -I../src --- 10,16 # For SCO ODT #EXTRA_LIBS= -lcrypt_i # For OS/2 port ! #EXTRA_LIBS= -llibufc -lsocket INCLUDES= -I../src *** *** 69,75 $(CC) $(INCLUDES) $(CFLAGS) rotatelogs.c -o rotatelogs logresolve: logresolve.c ! $(CC) $(INCLUDES) $(CFLAGS) logresolve.c -o logresolve clean: rm -f $(TARGETS) --- 69,75 $(CC) $(INCLUDES) $(CFLAGS) rotatelogs.c -o rotatelogs logresolve: logresolve.c ! $(CC) $(INCLUDES) $(CFLAGS) logresolve.c -o logresolve $(EXTRA_LIBS) clean: rm -f $(TARGETS)
Re: cvs commit: apache/support logresolve.c Makefile
Brian Behlendorf <[EMAIL PROTECTED]> writes: > + #ifdef __EMX__ > + /* Need this include before any others under OS/2 */ > + #include > + #endif > + This should be done for all OS's. Most OS's get away with it because header files that need other header files include them and the files are made idempotent with #ifdef tricks. Special casing OS/2 just adds more #ifdef spaghetti. The bit of the BSD style guide that said system files should be included first was most likely related to this. -- Paul Richards. Originative Solutions Ltd. (Netcraft Ltd. contractor) Elsevier Science TIS online journal project. Email: [EMAIL PROTECTED] Phone: 0370 462071 (Mobile), +44 (0)1865 843155
Re: cvs commit: apache/support logresolve.c Makefile
On 7 Aug 1996, Paul Richards wrote: > Brian Behlendorf <[EMAIL PROTECTED]> writes: > > > + #ifdef __EMX__ > > + /* Need this include before any others under OS/2 */ > > + #include > > + #endif > > + > > This should be done for all OS's. Most OS's get away with it because > header files that need other header files include them and the files > are made idempotent with #ifdef tricks. Special casing OS/2 just adds > more #ifdef spaghetti. > > The bit of the BSD style guide that said system files should be > included first was most likely related to this. Sounds right to me. I'll make the change. Brian --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- [EMAIL PROTECTED] www.apache.org hyperreal.com http://www.organic.com/JOBS