mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 18:33:16 +00:00
dconf: added passwd dconf for archives, applied to unzip
This commit is contained in:
parent
0b119e6f78
commit
f5f7b7a1b9
3 changed files with 7 additions and 1 deletions
|
@ -102,6 +102,7 @@ static struct dconf_module modules[] = {
|
|||
{ "ARCHIVE", "XAR", ARCH_CONF_XAR, 1 },
|
||||
{ "ARCHIVE", "HFSPLUS", ARCH_CONF_HFSPLUS, 1 },
|
||||
{ "ARCHIVE", "XZ", ARCH_CONF_XZ, 1 },
|
||||
{ "ARCHIVE", "PASSWD", ARCH_CONF_PASSWD, 1 },
|
||||
|
||||
{ "DOCUMENT", "HTML", DOC_CONF_HTML, 1 },
|
||||
{ "DOCUMENT", "RTF", DOC_CONF_RTF, 1 },
|
||||
|
|
|
@ -90,6 +90,7 @@ struct cli_dconf {
|
|||
#define ARCH_CONF_XAR 0x80000
|
||||
#define ARCH_CONF_HFSPLUS 0x100000
|
||||
#define ARCH_CONF_XZ 0x200000
|
||||
#define ARCH_CONF_PASSWD 0x400000
|
||||
|
||||
/* Document flags */
|
||||
#define DOC_CONF_HTML 0x1
|
||||
|
|
|
@ -362,7 +362,11 @@ static inline int zdecrypt(const uint8_t *src, uint32_t csize, uint32_t usize, c
|
|||
if (!ctx || !ctx->engine)
|
||||
return CL_ENULLARG;
|
||||
|
||||
/* TODO - dconf going here */
|
||||
/* dconf */
|
||||
if (ctx->dconf && !(ctx->dconf->archive & ARCH_CONF_PASSWD)) {
|
||||
cli_dbgmsg("cli_unzip: decrypt - skipping encrypted file\n");
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
password = ctx->engine->pw_dict;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue