mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-08-07 04:52:03 -04:00
Fix unit tests when run as root (bb #1635).
This commit is contained in:
1 parent
4cda88ccac
commit
92740b7383
2 files changed
+8
No files matched your search
@@ -1,3 +1,7 @@
|
||||
Wed Jul 15 16:25:00 EEST 2009 (edwin)
|
||||
-------------------------------------
|
||||
* unit_tests/check_clamd.c: fix unit tests when run as root (bb #1635).
|
||||
|
||||
Wed Jul 15 12:50:50 CEST 2009 (acab)
|
||||
------------------------------------
|
||||
* libclamav/ishield.c: fix distcheck, patch from edwin
|
||||
|
||||
@@ -740,6 +740,8 @@ static void test_idsession_commands(int split, int instream)
|
||||
/* test all commands that must be accepted inside an IDSESSION */
|
||||
for (i=0;i < sizeof(basic_tests)/sizeof(basic_tests[0]); i++) {
|
||||
const struct basic_test *test = &basic_tests[i];
|
||||
if (test->skiproot && isroot)
|
||||
continue;
|
||||
if (test->ids == IDS_OK) {
|
||||
fail_unless(p+strlen(test->command)+2 < buf+sizeof(buf), "Buffer too small");
|
||||
*p++ = 'z';
|
||||
@@ -792,6 +794,8 @@ static void test_idsession_commands(int split, int instream)
|
||||
p = recvdata;
|
||||
for (i=0;i < sizeof(basic_tests)/sizeof(basic_tests[0]); i++) {
|
||||
const struct basic_test *test = &basic_tests[i];
|
||||
if (test->skiproot && isroot)
|
||||
continue;
|
||||
if (test->ids == IDS_OK) {
|
||||
unsigned id;
|
||||
char *q = strchr(p, ':');
|
||||
|
||||
Reference in new issue
Block a user