-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle and catch size limit exceeded error from clamd server.
- Loading branch information
1 parent
98e33bb
commit 4466548
Showing
5 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM mkodockx/docker-clamav | ||
|
||
MAINTAINER Antti Virtanen <[email protected]> | ||
|
||
# update maximum stream length to much smaller than default | ||
# automated tests run smoother this way | ||
RUN sed -i 's/^StreamMaxLength .*$/StreamMaxLength 50100/g' /etc/clamav/clamd.conf | ||
|
||
# av daemon bootstrapping | ||
CMD ["/bootstrap.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/fi/solita/clamav/ClamAVSizeLimitException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package fi.solita.clamav; | ||
|
||
/** | ||
* Thrown if clamd size limit is exceeded during scanning. | ||
* <p> | ||
* See <a href="http://linux.die.net/man/5/clamd.conf">clamd man page</a> for further information. | ||
*/ | ||
public class ClamAVSizeLimitException extends RuntimeException { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public ClamAVSizeLimitException(String msg) { | ||
super(msg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters