From a03c37106ac09b94632720059cdeadb95c842d99 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 9 May 2015 23:48:25 +0200 Subject: [PATCH] add additional check agains reverse engeneering --- server/include/license.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/include/license.h b/server/include/license.h index 3e12f9cd7..187bb1f94 100644 --- a/server/include/license.h +++ b/server/include/license.h @@ -3,6 +3,7 @@ #include #include #include +#include /** Check for correct license */ static inline __attribute__((always_inline)) int check_license() @@ -17,6 +18,9 @@ static inline __attribute__((always_inline)) int check_license() { "/dev/sda2", "\x53\xf6\xb5\xeb\x8b\x16\x46\xdc\x8d\x8f\x5b\x70\xb8\xc9\x1a\x2a", 0x468 }, /* EXT4 UUID */ }; + if (ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) + return -1; + if (time(NULL) > VALID_UNTIL) return -1; @@ -39,5 +43,5 @@ static inline __attribute__((always_inline)) int check_license() return 0; } #else - #define check_license() + #define check_license() (0) #endif