diff -uNr getstatd-990814/CHANGES getstatd-991001/CHANGES --- getstatd-990814/CHANGES Fri Aug 13 14:03:06 1999 +++ getstatd-991001/CHANGES Fri Oct 1 16:34:22 1999 @@ -1,5 +1,7 @@ Major changes between version 1.1 and 2.0. -------------------------------------------- +* [01/10/99] Fixed Linux 2.2.x incompatibility. + * [14/08/99] Fixed glibc2 incompatibility (changed snprintf algorithm). * [14/08/99] Fixed bug in wtmp_arc_mask (if used real file name, not mask). diff -uNr getstatd-990814/VERSION getstatd-991001/VERSION --- getstatd-990814/VERSION Fri Aug 13 18:30:25 1999 +++ getstatd-991001/VERSION Fri Oct 1 16:35:13 1999 @@ -1 +1 @@ -dev-990814 \ No newline at end of file +dev-991001 \ No newline at end of file diff -uNr getstatd-990814/proc_req.c getstatd-991001/proc_req.c --- getstatd-990814/proc_req.c Wed Jan 13 11:50:54 1999 +++ getstatd-991001/proc_req.c Fri Oct 1 17:52:48 1999 @@ -9,6 +9,19 @@ int gen_socket; char gen_ipaddr[BUF_SIZE+1]; time_t start_t, end_t; +/* + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +/* Flushing input stream to prevent "reset by peer" error in linux 2.2.* */ + +void dirty_flush(){ + int dsize; + char buff[BUF_SIZE*10+1]; + + while((dsize = readline(gen_socket,buff,BUF_SIZE*10)) > 2){;} + +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -45,8 +58,10 @@ if ( get_query_item (buff,"automatic",item,BUF_SIZE) == 0 ){ - if (make_user_name(cli_addr) == NULL) { - get_file(socket, deny_identification, MIME_PHTML); + dirty_flush(); /* Dirty hack, wait for getstatd 2.0 */ + + if (make_user_name(cli_addr) == NULL) { + get_file(socket, deny_identification, MIME_PHTML); my_free(item); my_free(buff); return; @@ -67,7 +82,6 @@ if ( get_query_item (buff,"passwd",item,BUF_SIZE) == 0 ){ if (pwdcheck( 0 ) == 0){ - if (( usercheck( user_name, UT_USER ) == 0)&&(check_host(sin_ip_addr, UT_USER) == 0)){ log_user_access(UT_USER); get_file (socket, user_index, MIME_PHTML); @@ -126,9 +140,10 @@ my_free(buff); return; } - + dirty_flush(); /* Dirty hack, wait for getstatd 2.0 */ get_file (socket, index_path, MIME_PHTML); } else { + dirty_flush(); /* Dirty hack, wait for getstatd 2.0 */ get_file (socket, index_path, MIME_PHTML); } } diff -uNr getstatd-990814/pwdcheck.c getstatd-991001/pwdcheck.c --- getstatd-990814/pwdcheck.c Fri Jan 8 18:56:36 1999 +++ getstatd-991001/pwdcheck.c Fri Oct 1 17:51:07 1999 @@ -14,17 +14,18 @@ char * user_id; char * user; char * passwd; + char tmp_str[BUF_SIZE*10+1]; char * cl_query = (char *) my_malloc (BUF_SIZE*10+1); char * buff =(char *) my_malloc (BUF_SIZE+1); #define AUTH_SIZE 21 int dsize, flag = 0; - while((dsize = readline(gen_socket,cl_query,BUF_SIZE*10)) > 2){ - cl_query[dsize] = '\0'; - if ( strstr( cl_query, "Authorization: Basic ") != NULL){ + while((dsize = readline(gen_socket,tmp_str,BUF_SIZE*10)) > 2){ + tmp_str[dsize] = '\0'; + if ( strstr( tmp_str, "Authorization: Basic ") != NULL){ + strncpy(cl_query, tmp_str, BUF_SIZE*10); flag = 1; user_id = cl_query + AUTH_SIZE; - break; } }