cvs commit: apachen/src/modules/standard mod_autoindex.c

1997-12-23 Thread dgaudet
dgaudet 97/12/22 17:50:03

  Modified:.STATUS
   src  CHANGES
   src/modules/standard mod_autoindex.c
  Log:
  AddIconByType (TXT,/icons/text.gif text/*, note the missing closing
  paren, does the wrong thing, and doesn't report an error.
  
  Don't fread() without testing for errors.
  
  Reviewed by:  Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.16  +1 -4  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- STATUS1997/12/22 21:52:59 1.15
  +++ STATUS1997/12/23 01:49:58 1.16
  @@ -48,6 +48,7 @@
   * Dean's [PATCH] Re: problem with a .gif and v2.1.4
   * Dean's [PATCH] util_date.c needless reinitialization
   * Martin's [PATCH] Gimme a break! (missing break;s in mod_include)
  +* Dean's [PATCH] two bugs in mod_autoindex
   
   Available:
   
  @@ -58,10 +59,6 @@
   * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
[EMAIL PROTECTED]
Status: Dean +1, Martin +1
  -
  -* Dean's [PATCH] two bugs in mod_autoindex
  - [EMAIL PROTECTED]
  - Status: Dean +1, Randy +1, Martin +1
   
   * Dean's [PATCH] fix Rasmus' chunking error
[EMAIL PROTECTED]
  
  
  
  1.536 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.535
  retrieving revision 1.536
  diff -u -r1.535 -r1.536
  --- CHANGES   1997/12/21 08:18:14 1.535
  +++ CHANGES   1997/12/23 01:50:00 1.536
  @@ -1,4 +1,8 @@
   Changes with Apache 1.3b4
  +  
  +  *) mod_autoindex had an fread() without checking the result code.
  + It also wouldn't handle AddIconByType (TXT,/icons/text.gif text/*
  + (note the missing closing paren) properly.  [Dean Gaudet]
   
 *) It appears the 257th byte bug (see
htdocs/manual/misc/known_client_problems.html#257th-byte) can happen
  
  
  
  1.60  +12 -2 apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_autoindex.c   1997/12/18 19:55:17 1.59
  +++ mod_autoindex.c   1997/12/23 01:50:02 1.60
  @@ -186,8 +186,14 @@
   char *iconbak = pstrdup(cmd-pool, icon);
   
   if (icon[0] == '(') {
  - char *alt = getword_nc(cmd-pool, iconbak, ',');
  - iconbak[strlen(iconbak) - 1] = '\0';/* Lose closing paren */
  + char *alt;
  + char *cl = strchr(iconbak, ')');
  +
  + if (cl == NULL) {
  + return missing closing paren;
  + }
  + alt = getword_nc(cmd-pool, iconbak, ',');
  + *cl = '\0'; /* Lose closing paren */
add_alt(cmd, d, alt[1], to);
   }
   if (cmd-info == BY_PATH)
  @@ -612,6 +618,10 @@
if (!(thefile = pfopen(r-pool, r-filename, r)))
 return NULL;
n = fread(titlebuf, sizeof(char), MAX_STRING_LEN - 1, thefile);
  + if (n = 0) {
  + pfclose(r-pool, thefile);
  + return NULL;
  + }
titlebuf[n] = '\0';
for (x = 0, p = 0; titlebuf[x]; x++) {
if (toupper(titlebuf[x]) == find[p]) {
  
  
  


cvs commit: apachen STATUS

1997-12-23 Thread dgaudet
dgaudet 97/12/22 17:51:28

  Modified:.STATUS
  Log:
  two patches I posted today
  
  Revision  ChangesPath
  1.17  +8 -0  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- STATUS1997/12/23 01:49:58 1.16
  +++ STATUS1997/12/23 01:51:26 1.17
  @@ -52,6 +52,14 @@
   
   Available:
   
  +* Dean's [PATCH] more useful warning message for fcntl() lock failure
  + [EMAIL PROTECTED]
  + Status: Dean +1, Jim +1
  +
  +* Dean's [PATCH] ap_snprintf should be more sane (fwd)
  + [EMAIL PROTECTED]
  + Status: Dean +1, Jim +1
  +
   * Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
[EMAIL PROTECTED]
Status: Dean +1, Jim +1
  
  
  


cvs commit: apachen/src/main buff.c

1997-12-23 Thread dgaudet
dgaudet 97/12/22 18:03:55

  Modified:.STATUS
   src  CHANGES
   src/main buff.c
  Log:
  remove some dead code
  
  Submitted by: Igor Tatarinov [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Jim Jagielski
  
  Revision  ChangesPath
  1.18  +1 -4  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- STATUS1997/12/23 01:51:26 1.17
  +++ STATUS1997/12/23 02:03:51 1.18
  @@ -49,6 +49,7 @@
   * Dean's [PATCH] util_date.c needless reinitialization
   * Martin's [PATCH] Gimme a break! (missing break;s in mod_include)
   * Dean's [PATCH] two bugs in mod_autoindex
  +* Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
   
   Available:
   
  @@ -58,10 +59,6 @@
   
   * Dean's [PATCH] ap_snprintf should be more sane (fwd)
[EMAIL PROTECTED]
  - Status: Dean +1, Jim +1
  -
  -* Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
  - [EMAIL PROTECTED]
Status: Dean +1, Jim +1
   
   * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
  
  
  
  1.537 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.536
  retrieving revision 1.537
  diff -u -r1.536 -r1.537
  --- CHANGES   1997/12/23 01:50:00 1.536
  +++ CHANGES   1997/12/23 02:03:52 1.537
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b4
  +
  +  *) Eliminate some dead code from writev_it_all().
  + [Igor Tatarinov [EMAIL PROTECTED]]
 
 *) mod_autoindex had an fread() without checking the result code.
It also wouldn't handle AddIconByType (TXT,/icons/text.gif text/*
  
  
  
  1.52  +0 -3  apachen/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/buff.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- buff.c1997/11/13 20:37:57 1.51
  +++ buff.c1997/12/23 02:03:54 1.52
  @@ -898,9 +898,6 @@
vec[i].iov_base = (char *) vec[i].iov_base + rv;
vec[i].iov_len -= rv;
rv = 0;
  - if (vec[i].iov_len == 0) {
  - ++i;
  - }
}
else {
rv -= vec[i].iov_len;
  
  
  


cvs commit: apachen STATUS

1997-12-23 Thread coar
coar97/12/23 11:55:55

  Modified:.STATUS
  Log:
Update some votes on patches..
  
  Revision  ChangesPath
  1.19  +3 -3  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- STATUS1997/12/23 02:03:51 1.18
  +++ STATUS1997/12/23 19:55:54 1.19
  @@ -55,11 +55,11 @@
   
   * Dean's [PATCH] more useful warning message for fcntl() lock failure
[EMAIL PROTECTED]
  - Status: Dean +1, Jim +1
  + Status: Dean +1, Jim +1, Ken +1
   
   * Dean's [PATCH] ap_snprintf should be more sane (fwd)
[EMAIL PROTECTED]
  - Status: Dean +1, Jim +1
  + Status: Dean +1, Jim +1, Ken +1
   
   * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
[EMAIL PROTECTED]
  @@ -67,7 +67,7 @@
   
   * Dean's [PATCH] fix Rasmus' chunking error
[EMAIL PROTECTED]
  - Status: Dean +1
  + Status: Dean +1, Rasmus +1
   
   * Dean's [PATCH] mod_status cleanups
[EMAIL PROTECTED]
  
  
  


cvs commit: apachen/src/main http_main.c

1997-12-23 Thread dgaudet
dgaudet 97/12/23 12:33:44

  Modified:.STATUS
   src  CHANGES
   src/main http_main.c
  Log:
  tell users to try the LockFile directive when a fcntl() locking error occurs.
  
  Reviewed by:  Jim Jagielski, Ken Coar
  
  Revision  ChangesPath
  1.20  +1 -4  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- STATUS1997/12/23 19:55:54 1.19
  +++ STATUS1997/12/23 20:33:38 1.20
  @@ -50,12 +50,9 @@
   * Martin's [PATCH] Gimme a break! (missing break;s in mod_include)
   * Dean's [PATCH] two bugs in mod_autoindex
   * Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
  +* Dean's [PATCH] more useful warning message for fcntl() lock failure
   
   Available:
  -
  -* Dean's [PATCH] more useful warning message for fcntl() lock failure
  - [EMAIL PROTECTED]
  - Status: Dean +1, Jim +1, Ken +1
   
   * Dean's [PATCH] ap_snprintf should be more sane (fwd)
[EMAIL PROTECTED]
  
  
  
  1.538 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.537
  retrieving revision 1.538
  diff -u -r1.537 -r1.538
  --- CHANGES   1997/12/23 02:03:52 1.537
  +++ CHANGES   1997/12/23 20:33:40 1.538
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b4
  +  
  +  *) When an error occurs in fcntl() locking suggest the user look up
  + the docs for LockFile.  [Dean Gaudet]
   
 *) Eliminate some dead code from writev_it_all().
[Igor Tatarinov [EMAIL PROTECTED]]
  
  
  
  1.259 +15 -5 apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.258
  retrieving revision 1.259
  diff -u -r1.258 -r1.259
  --- http_main.c   1997/12/21 01:54:39 1.258
  +++ http_main.c   1997/12/23 20:33:42 1.259
  @@ -592,21 +592,31 @@
   {
   int ret;
   
  -while ((ret = fcntl(lock_fd, F_SETLKW, lock_it))  0  errno == EINTR)
  - continue;
  +while ((ret = fcntl(lock_fd, F_SETLKW, lock_it))  0  errno == EINTR) 
{
  + /* nop */
  +}
   
   if (ret  0) {
aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  - fcntl: F_SETLKW: Error getting accept lock. Exiting!);
  + fcntl: F_SETLKW: Error getting accept lock, exiting!  
  + Perhaps you need to use the LockFile directive to place 
  + your lock file on a local disk!);
exit(1);
   }
   }
   
   static void accept_mutex_off(void)
   {
  -if (fcntl(lock_fd, F_SETLKW, unlock_it)  0) {
  +int ret;
  +
  +while ((ret = fcntl(lock_fd, F_SETLKW, unlock_it))  0  errno == 
EINTR) {
  + /* nop */
  +}
  +if (ret  0) {
aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
  - fcntl: F_SETLKW: Error freeing accept lock. Exiting!);
  + fcntl: F_SETLKW: Error freeing accept lock, exiting!  
  + Perhaps you need to use the LockFile directive to place 
  + your lock file on a local disk!);
exit(1);
   }
   }
  
  
  


cvs commit: apachen STATUS

1997-12-23 Thread coar
coar97/12/23 15:03:38

  Modified:.STATUS
  Log:
Record the ap_snprintf() move concept discussion.
  
  Revision  ChangesPath
  1.22  +5 -0  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- STATUS1997/12/23 20:36:15 1.21
  +++ STATUS1997/12/23 23:03:37 1.22
  @@ -142,6 +142,11 @@
   
   Needs patch:
   
  +* Jim's/Ken's move of main/util_snprintf.c to ap/ap_snprintf.c
  + [EMAIL PROTECTED]
  + (Concept only)
  + Status: Jim +1, Ken +1, Dean +1
  +
   * Dean's locale project
See [EMAIL PROTECTED]
Status: Jim'll look into it