Skip to content

Commit db0b0b1

Browse files
author
rsora
committed
Add --fdpass flag to clamdscan command to pass filedescriptor to clamd (useful if clamd is running as a different user)
1 parent cd6d49b commit db0b0b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/clamav.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func modifyEnv(env []string, key, value string) []string {
5656

5757
// RunAntiVirus scans the folder for viruses.
5858
func RunAntiVirus(folder string) ([]byte, error) {
59-
cmd := exec.Command("clamdscan", "-i", folder)
59+
cmd := exec.Command("clamdscan", "--fdpass", "-i", folder)
6060
cmd.Env = modifyEnv(os.Environ(), "LANG", "en")
6161

6262
out, err := cmd.CombinedOutput()

0 commit comments

Comments
 (0)