diff --git a/server/Makefile b/server/Makefile index dbe1007fe..f79198f26 100644 --- a/server/Makefile +++ b/server/Makefile @@ -75,15 +75,6 @@ receive: receive.o $(OBJS) test: test.o $(OBJS) random: random.o msg.o utils.o timing.o log.o -protected: CFLAGS += -DLICENSE -DLICENSE_VALID=$(shell date -d "now +5months" +%s) -s -O3 -fvisibility=hidden -protected: clean strip - -strip: $(TARGETS) - strip --remove-section=.comment \ - --remove-section=.note \ - --strip-debug \ - --strip-all \ - $(TARGETS) clean: $(RM) *~ *.o *.d diff --git a/server/include/checks.h b/server/include/checks.h index d0ce09a43..74e61e9b5 100644 --- a/server/include/checks.h +++ b/server/include/checks.h @@ -50,17 +50,4 @@ int check_kernel_module(char *module); */ int check_root(); -/** Simple copy protection. - * - * This function checks several machine IDs for predefined values. - * - * @retval 0 The machine is allowed to run this program. - * @reval <>0 The machine is not allowed to run this program. - */ -int check_license_ids(); - -int check_license_time(); - -int check_license_trace(); - #endif /* _CHECKS_H_ */ diff --git a/server/src/checks.c b/server/src/checks.c index c3d3dbc8c..66a3174db 100644 --- a/server/src/checks.c +++ b/server/src/checks.c @@ -81,40 +81,3 @@ int check_root() { return getuid(); } - -int check_license_time() -{ - return time(NULL) > LICENSE_VALID; -} - -int check_license_trace() -{ - return ptrace(PTRACE_TRACEME, 0, 0, 0) < 0; -} - -int check_license_ids() -{ - const struct { - char *file, *content; - off_t offset; - } checks[] = LICENSE_CHECKS; - - FILE *f; - char buf[128]; - - for (int i = 0; i < ARRAY_LEN(checks); i++) { - f = fopen(checks[i].file, "r"); - if (!f) - return -1; - - fseek(f, checks[i].offset, SEEK_SET); - fgets(buf, sizeof(buf), f); - fclose(f); - - if (strncmp(buf, checks[i].content, strlen(checks[i].content))) - return -1; - } - - return 0; -} - diff --git a/server/src/server.c b/server/src/server.c index 8b7d09719..1f522cd49 100644 --- a/server/src/server.c +++ b/server/src/server.c @@ -151,14 +151,6 @@ int main(int argc, char *argv[]) BLD(MAG(__DATE__)), BLD(MAG(__TIME__))); /* Checks system requirements*/ -#ifdef LICENSE - if (check_license_trace()) - error("This software should not be traced!"); - if (check_license_time()) - error("Your license expired"); - if (check_license_ids()) - error("This version is compiled for a different machine!"); -#endif if (check_kernel_version()) error("Your kernel version is to old: required >= %u.%u", KERNEL_VERSION_MAJ, KERNEL_VERSION_MIN);