configure.ac |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit a570a6b122125e88629fde990306f525c561284c
Author:     Michel Thomas <[email protected]>
AuthorDate: Sat Feb 8 22:17:39 2020 +0530
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Feb 10 05:09:45 2020 +0100

    tdf#84553 Detection of antivirus exclusion, EICAR test.
    
    Change-Id: I3577a361edcc67f85f86ddb75778cd39784b39a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88269
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 1bccce3578c8..96e2cbc58ae3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12982,7 +12982,20 @@ if test $_os = WINNT ; then
     ANTIVIRUS_LIST=`cscript.exe //Nologo $SRC_ROOT/antivirusDetection.vbs`
     if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then
         AC_MSG_RESULT([found])
-        add_warning "To speed up builds and avoid failures in unit tests, it 
is highly recommended that you exclude the build directories associated with 
LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST"
+        
EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
+        echo $EICAR_STRING > $SRC_ROOT/eicar
+        EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar`
+        rm $SRC_ROOT/eicar
+        if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+            AC_MSG_ERROR([Exclude the build and source directories associated 
with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+        fi
+        echo $EICAR_STRING > $BUILDDIR/eicar
+        EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar`
+        rm $BUILDDIR/eicar
+        if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+            AC_MSG_ERROR([Exclude the build and source directories associated 
with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+        fi
+        add_warning "To speed up builds and avoid failures in unit tests, it 
is highly recommended that you exclude the build and source directories 
associated with LibreOffice in the following Antivirus software: 
$ANTIVIRUS_LIST"
     else
         AC_MSG_RESULT([not found])
     fi
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to