1 #include "timebomb.h"
\r
3 #include <sys/stat.h>
\r
6 #define LASTYEAR 2001
\r
10 "To reduce support liability this release had an expiration date.\n" \
\r
11 "The expiration date of this release has expired.\n"
\r
13 static char *files[] =
\r
15 "/usr/lib/libcinelerra.so",
\r
16 "/usr/bin/cinelerra"
\r
19 TimeBomb::TimeBomb()
\r
21 struct stat fileinfo;
\r
25 result = stat("/etc", &fileinfo);
\r
26 system_time = time(0);
\r
28 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
29 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
30 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
31 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
32 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
33 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
34 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
35 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
36 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
37 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
38 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
39 printf("This release expires %d/%d/%d\n", LASTMONTH, LASTDAY, LASTYEAR);
\r
41 if(test_time(fileinfo.st_mtime) ||
\r
42 test_time(system_time))
\r
51 int TimeBomb::test_time(time_t testtime)
\r
53 struct tm *currenttime;
\r
54 currenttime = localtime(&testtime);
\r
56 if(currenttime->tm_year >= LASTYEAR - 1900 &&
\r
57 currenttime->tm_mday >= LASTDAY &&
\r
58 currenttime->tm_mon >= LASTMONTH - 1) return 1;
\r
62 void TimeBomb::disable_system()
\r
64 //printf("TimeBomb::disable_system %d\n", sizeof(files));
\r
65 for(int i = 0; i < sizeof(files) / sizeof(char*); i++)
\r
67 remove((const char*)files[i]);
\r
71 TimeBomb::~TimeBomb()
\r