Fossil SCM
Fix the error log parsing so that timeouts do not appear as panics.
Commit
b2ace8830ab16a34ec6325fb290f4829b075a12c44851fce4dcf5823f0996332
Parent
9d7c15d40919626…
1 file changed
+3
-1
+3
-1
| --- src/security_audit.c | ||
| +++ src/security_audit.c | ||
| @@ -954,11 +954,13 @@ | ||
| 954 | 954 | if( prevWasTime ){ |
| 955 | 955 | if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){ |
| 956 | 956 | bOutput = (eType & 0x01)!=0; |
| 957 | 957 | nHack++; |
| 958 | 958 | }else |
| 959 | - if( (strncmp(z,"panic: ", 7)==0 || strstr(z," assertion fault ")!=0) ){ | |
| 959 | + if( (strncmp(z,"panic: ", 7)==0 && strncmp(z+7,"Timeout",7)!=0) | |
| 960 | + || strstr(z," assertion fault ")!=0 | |
| 961 | + ){ | |
| 960 | 962 | bOutput = (eType & 0x02)!=0; |
| 961 | 963 | nPanic++; |
| 962 | 964 | }else |
| 963 | 965 | if( strncmp(z,"SMTP:", 5)==0 ){ |
| 964 | 966 | bOutput = (eType & 0x20)!=0; |
| 965 | 967 |
| --- src/security_audit.c | |
| +++ src/security_audit.c | |
| @@ -954,11 +954,13 @@ | |
| 954 | if( prevWasTime ){ |
| 955 | if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){ |
| 956 | bOutput = (eType & 0x01)!=0; |
| 957 | nHack++; |
| 958 | }else |
| 959 | if( (strncmp(z,"panic: ", 7)==0 || strstr(z," assertion fault ")!=0) ){ |
| 960 | bOutput = (eType & 0x02)!=0; |
| 961 | nPanic++; |
| 962 | }else |
| 963 | if( strncmp(z,"SMTP:", 5)==0 ){ |
| 964 | bOutput = (eType & 0x20)!=0; |
| 965 |
| --- src/security_audit.c | |
| +++ src/security_audit.c | |
| @@ -954,11 +954,13 @@ | |
| 954 | if( prevWasTime ){ |
| 955 | if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){ |
| 956 | bOutput = (eType & 0x01)!=0; |
| 957 | nHack++; |
| 958 | }else |
| 959 | if( (strncmp(z,"panic: ", 7)==0 && strncmp(z+7,"Timeout",7)!=0) |
| 960 | || strstr(z," assertion fault ")!=0 |
| 961 | ){ |
| 962 | bOutput = (eType & 0x02)!=0; |
| 963 | nPanic++; |
| 964 | }else |
| 965 | if( strncmp(z,"SMTP:", 5)==0 ){ |
| 966 | bOutput = (eType & 0x20)!=0; |
| 967 |