Received: by taz.hyperreal.com (8.6.12/8.6.5) id VAA27246; Thu, 6 Jun 1996 21:54:14 -0700 Received: from pooh.pageplus.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id VAA27239; Thu, 6 Jun 1996 21:54:12 -0700 Received: from pooh.pageplus.com (localhost [127.0.0.1]) by pooh.pageplus.com (8.7.5/8.7.3) with ESMTP id WAA32484 for ; Thu, 6 Jun 1996 22:51:35 -0600 Message-Id: <199606070451.WAA32484@pooh.pageplus.com> To: new-httpd@hyperreal.com Subject: Linux core dump patch for 1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <32373.834122661.0@pooh.pageplus.com> Date: Thu, 06 Jun 1996 22:51:34 -0600 From: Howard Fear Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32373.834122661.1@pooh.pageplus.com> Here's the patch for the latest from-cvs (taken ~ 1 hour ago). It also includes a small change that Randy sent me to fix a gcc -Wall message. From: ! sprintf(uid, "user#%ld", r->finfo.st_uid); To: ! sprintf(uid, "user#%lu", (unsigned long)r->finfo.st_uid); -- Howard Fear email1: howard_fear@pageplus.com email2: howard_fear@stortek.com http://www.pageplus.com/~hsf/ ------- =_aaaaaaaaaa0 Content-Type: application/x-patch Content-ID: <32373.834122661.2@pooh.pageplus.com> *** mod_include.c Thu Jun 6 22:38:55 1996 --- mod_include.c.new Thu Jun 6 22:28:50 1996 *************** *** 78,84 **** static void decodehtml(char *s); static char *get_tag(pool *p, FILE *in, char *tag, int tag_len, int dodecode); ! static int get_directive(FILE *in, char *d); /* ------------------------ Environment function -------------------------- */ --- 78,84 ---- static void decodehtml(char *s); static char *get_tag(pool *p, FILE *in, char *tag, int tag_len, int dodecode); ! static int get_directive(FILE *in, char *d, pool *p); /* ------------------------ Environment function -------------------------- */ *************** *** 99,105 **** table_set(e, "USER_NAME", pw->pw_name); } else { char uid[16]; ! sprintf(uid, "user#%ld", r->finfo.st_uid); table_set(e, "USER_NAME", uid); } --- 99,105 ---- table_set(e, "USER_NAME", pw->pw_name); } else { char uid[16]; ! sprintf(uid, "user#%lu", (unsigned long)r->finfo.st_uid); table_set(e, "USER_NAME", uid); } *************** *** 114,124 **** } } ! #define GET_CHAR(f,c,r) \ { \ int i = getc(f); \ if(feof(f) || ferror(f) || (i == -1)) { \ ! fclose(f); \ return r; \ } \ c = (char)i; \ --- 114,124 ---- } } ! #define GET_CHAR(f,c,r,p) \ { \ int i = getc(f); \ if(feof(f) || ferror(f) || (i == -1)) { \ ! pfclose(p,f); \ return r; \ } \ c = (char)i; \ *************** *** 136,142 **** p=0; while(1) { ! GET_CHAR(in,c,1); if(c == str[p]) { if((++p) == l) return 0; --- 136,142 ---- p=0; while(1) { ! GET_CHAR(in,c,1,r->pool); if(c == str[p]) { if((++p) == l) return 0; *************** *** 253,267 **** n = 0; do { /* skip whitespace */ ! GET_CHAR(in,c,NULL); } while (isspace(c)); /* tags can't start with - */ if(c == '-') { ! GET_CHAR(in,c,NULL); if(c == '-') { do { ! GET_CHAR(in,c,NULL); } while (isspace(c)); if(c == '>') { strcpy(tag,"done"); --- 253,267 ---- n = 0; do { /* skip whitespace */ ! GET_CHAR(in,c,NULL,p); } while (isspace(c)); /* tags can't start with - */ if(c == '-') { ! GET_CHAR(in,c,NULL,p); if(c == '-') { do { ! GET_CHAR(in,c,NULL,p); } while (isspace(c)); if(c == '>') { strcpy(tag,"done"); *************** *** 279,295 **** } if(c == '=' || isspace(c)) break; *(t++) = tolower(c); ! GET_CHAR(in,c,NULL); } *t++ = '\0'; tag_val = t; ! while (isspace(c)) GET_CHAR(in, c, NULL); /* space before = */ if (c != '=') return NULL; do { ! GET_CHAR(in,c,NULL); /* space after = */ } while (isspace(c)); /* we should allow a 'name' as a value */ --- 279,295 ---- } if(c == '=' || isspace(c)) break; *(t++) = tolower(c); ! GET_CHAR(in,c,NULL,p); } *t++ = '\0'; tag_val = t; ! while (isspace(c)) GET_CHAR(in, c, NULL,p); /* space before = */ if (c != '=') return NULL; do { ! GET_CHAR(in,c,NULL,p); /* space after = */ } while (isspace(c)); /* we should allow a 'name' as a value */ *************** *** 297,303 **** if (c != '"' && c != '\'') return NULL; term = c; while(1) { ! GET_CHAR(in,c,NULL); if(++n == tagbuf_len) { t[tagbuf_len - 1] = '\0'; return NULL; --- 297,303 ---- if (c != '"' && c != '\'') return NULL; term = c; while(1) { ! GET_CHAR(in,c,NULL,p); if(++n == tagbuf_len) { t[tagbuf_len - 1] = '\0'; return NULL; *************** *** 311,329 **** } static int ! get_directive(FILE *in, char *d) { char c; /* skip initial whitespace */ while(1) { ! GET_CHAR(in,c,1); if(!isspace(c)) break; } /* now get directive */ while(1) { *d++ = tolower(c); ! GET_CHAR(in,c,1); if(isspace(c)) break; } --- 311,329 ---- } static int ! get_directive(FILE *in, char *d, pool *p) { char c; /* skip initial whitespace */ while(1) { ! GET_CHAR(in,c,1,p); if(!isspace(c)) break; } /* now get directive */ while(1) { *d++ = tolower(c); ! GET_CHAR(in,c,1,p); if(isspace(c)) break; } *************** *** 723,729 **** while(1) { if(!find_string(f,STARTING_SEQUENCE,r)) { ! if(get_directive(f,directive)) return; if(!strcmp(directive,"exec")) { if(noexec) { --- 723,729 ---- while(1) { if(!find_string(f,STARTING_SEQUENCE,r)) { ! if(get_directive(f,directive,r->pool)) return; if(!strcmp(directive,"exec")) { if(noexec) { ------- =_aaaaaaaaaa0--