AW: Encrypted rar
Grooz, Marc (regio iT)
Marc.Grooz at regioit.de
Mon Nov 12 09:42:44 CET 2018
Hi Thomas,
thanks, I didn't know that the git Repo is allready online.
You know that the same problem exists with 7z? Does anybody know when this patches will be avalible in an official patch?
Regards Marc
-----Ursprüngliche Nachricht-----
Von: Thomas Jarosch <thomas.jarosch at intra2net.com>
Gesendet: Freitag, 9. November 2018 11:58
An: amavis-users at amavis.org
Betreff: Re: Encrypted rar
Hi Marc,
On Thursday, 8 November 2018 12:21:36 CET Grooz, Marc (regio iT) wrote:
> we found that this could be a solution?
>
> diff -U5 /usr/sbin/amavisd-new.bak /usr/sbin/amavisd-new
>
> --- /usr/sbin/amavisd-new.bak 2018-11-08 11:58:36.300181125 +0100
> +++ /usr/sbin/amavisd-new 2018-11-08 11:50:58.262021510 +0100
>
> @@ -31605,10 +31605,15 @@
>
> } elsif (proc_status_ok($rv,$err, 3)) { # CRC_ERROR
> # NOTE: password protected files in the archive cause CRC_ERROR
> do_log(4,"do_unrar: CRC_ERROR - undecipherable, %s",
> exit_status_str($rv,$err));
> $part->attributes_add('U');
> + } elsif (proc_status_ok($rv,$err, 11)) { # ENCRYPT_ERROR
> + do_log(4,"do_unrar: maybe PROTECTED ARCHIVE - undecipherable, %s",
> + exit_status_str($rv,$err));
> + $part->attributes_add('U');
> } elsif (proc_status_ok($rv,$err, 1) && @list && $bytes > 0) {
> # WARNING, probably still ok
> do_log(4,"do_unrar: warning, %s", exit_status_str($rv,$err));
> } elsif (!proc_status_ok($rv,$err)) {
> die("can't get a list of archive members: " .
Intra2net sent some unrar patches upstream here:
https://gitlab.com/amavis/amavis/merge_requests/3
Specifially you need this change to detect encrypted rar archives:
https://gitlab.com/phgsng/amavis/commit/c42b345aeb44353896b41cf7fd495f61d19702c3
Or the whole branch as patch:
https://gitlab.com/amavis/amavis/merge_requests/3.diff
HTH,
Thomas
More information about the amavis-users
mailing list