Mercurial > trustbridge
comparison common/selftest.c @ 1073:fa3f4e2370d3
Fix selftest it was broken during the move out of verify_binary
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 10 Sep 2014 17:54:26 +0200 |
parents | f89b41fa7048 |
children | edbf5e5e88f4 |
comparison
equal
deleted
inserted
replaced
1072:1e429faf7c84 | 1073:fa3f4e2370d3 |
---|---|
25 { | 25 { |
26 ERRORPRINTF ("Failed to convert module path to utf-8"); | 26 ERRORPRINTF ("Failed to convert module path to utf-8"); |
27 return false; | 27 return false; |
28 } | 28 } |
29 | 29 |
30 if (!verify_binary (utf8path, strlen(utf8path)) != VerifyValid) | 30 if (verify_binary (utf8path, strlen(utf8path)) != VerifyValid) |
31 { | 31 { |
32 ERRORPRINTF ("Verification of the binary failed"); | 32 ERRORPRINTF ("Verification of the binary failed"); |
33 syslog_error_printf ("Integrity check failed."); | 33 syslog_error_printf ("Integrity check failed."); |
34 xfree(utf8path); | 34 xfree(utf8path); |
35 return false; | 35 return false; |
36 } | 36 } |
37 | 37 |
38 xfree(utf8path); | 38 xfree(utf8path); |
39 return true; | |
39 #else | 40 #else |
40 if (!verify_binary ("/proc/self/exe", 14) != VerifyValid) | 41 if (!verify_binary ("/proc/self/exe", 14) != VerifyValid) |
41 { | 42 { |
42 syslog_error_printf ("Integrity check failed."); | 43 syslog_error_printf ("Integrity check failed."); |
43 return false; | 44 return false; |