mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
bb#907
git-svn: trunk@3752
This commit is contained in:
parent
6c06c7b3bb
commit
6f6fc585f5
5 changed files with 12 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Apr 2 22:54:23 CEST 2008 (tk)
|
||||
----------------------------------
|
||||
* libclamav/scanners.c: cl_scandesc: check if limits is not null (bb#907)
|
||||
* clamd/scanners.c: remove RAWSCAN command (bb#907)
|
||||
|
||||
Wed Apr 2 16:38:36 CEST 2008 (acab)
|
||||
------------------------------------
|
||||
* libclamav: check return codes from syscalls (bb#384)
|
||||
|
|
|
@ -79,12 +79,6 @@ int command(int desc, const struct cl_engine *engine, const struct cl_limits *li
|
|||
if(cfgopt(copt, "ExitOnOOM")->enabled)
|
||||
return COMMAND_SHUTDOWN;
|
||||
|
||||
} else if(!strncmp(buff, CMD2, strlen(CMD2))) { /* RAWSCAN */
|
||||
opt = options & ~CL_SCAN_ARCHIVE;
|
||||
if(scan(buff + strlen(CMD2) + 1, NULL, engine, NULL, opt, copt, desc, TYPE_SCAN) == -2)
|
||||
if(cfgopt(copt, "ExitOnOOM")->enabled)
|
||||
return COMMAND_SHUTDOWN;
|
||||
|
||||
} else if(!strncmp(buff, CMD3, strlen(CMD3))) { /* QUIT */
|
||||
return COMMAND_SHUTDOWN;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define COMMAND_SESSION 4
|
||||
|
||||
#define CMD1 "SCAN"
|
||||
#define CMD2 "RAWSCAN"
|
||||
/* #define CMD2 "RAWSCAN" */
|
||||
#define CMD3 "QUIT" /* deprecated */
|
||||
#define CMD4 "RELOAD"
|
||||
#define CMD5 "PING"
|
||||
|
|
|
@ -28,9 +28,6 @@ Perform a clean exit.
|
|||
\fBSCAN file/directory\fR
|
||||
Scan a file or a directory (recursively) with archive support enabled (if not disabled in clamd.conf). A full path is required.
|
||||
.TP
|
||||
\fBRAWSCAN file/directory\fR
|
||||
Scan a file or directory (recursively) with archive support disabled. A full path is required.
|
||||
.TP
|
||||
\fBCONTSCAN file/directory\fR
|
||||
Scan file or directory (recursively) with archive support enabled and don't stop the scanning when a virus is found.
|
||||
.TP
|
||||
|
|
|
@ -1928,6 +1928,10 @@ int cl_scandesc(int desc, const char **virname, unsigned long int *scanned, cons
|
|||
struct cl_limits l_limits;
|
||||
int rc;
|
||||
|
||||
if(!limits) {
|
||||
cli_errmsg("cl_scandesc: limits == NULL\n");
|
||||
return CL_ENULLARG;
|
||||
}
|
||||
memset(&ctx, '\0', sizeof(cli_ctx));
|
||||
ctx.engine = engine;
|
||||
ctx.virname = virname;
|
||||
|
@ -1935,10 +1939,8 @@ int cl_scandesc(int desc, const char **virname, unsigned long int *scanned, cons
|
|||
ctx.options = options;
|
||||
ctx.found_possibly_unwanted = 0;
|
||||
ctx.dconf = (struct cli_dconf *) engine->dconf;
|
||||
if (limits) {
|
||||
ctx.limits = &l_limits;
|
||||
memcpy(&l_limits, limits, sizeof(struct cl_limits));
|
||||
}
|
||||
ctx.limits = &l_limits;
|
||||
memcpy(&l_limits, limits, sizeof(struct cl_limits));
|
||||
|
||||
rc = cli_magic_scandesc(desc, &ctx);
|
||||
if(rc == CL_CLEAN && ctx.found_possibly_unwanted)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue