adding some licencing stuff

This commit is contained in:
SJ 2015-12-09 21:19:14 +01:00
parent 526295dae4
commit c31b13d77b
5 changed files with 18 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#define DATAROOTDIR "/usr/local/share" #define DATAROOTDIR "/usr/local/share"
#define KEYFILE CONFDIR "/piler.key" #define KEYFILE CONFDIR "/piler.key"
#define LICENCE_SIGNATURE_FILE CONFDIR "/piler.lic"
#define MESSAGE_ID_DEDUP_FILE DATAROOTDIR "/piler/deduphelper" #define MESSAGE_ID_DEDUP_FILE DATAROOTDIR "/piler/deduphelper"

View File

@ -13,7 +13,7 @@
#define VERSION "1.2.0-master" #define VERSION "1.2.0-master"
#define BUILD 930 #define BUILD 931
#define HOSTID "mailarchiver" #define HOSTID "mailarchiver"

View File

@ -300,6 +300,15 @@ struct import {
}; };
struct licence {
char customer[TINYBUFSIZE];
char hostname[TINYBUFSIZE];
char ip[TINYBUFSIZE];
time_t expiry;
int licenced_users;
};
struct __data { struct __data {
int folder, quiet; int folder, quiet;
char recursive_folder_names; char recursive_folder_names;
@ -307,6 +316,7 @@ struct __data {
struct node *mydomains[MAXHASH]; struct node *mydomains[MAXHASH];
struct node *imapfolders[MAXHASH]; struct node *imapfolders[MAXHASH];
struct import *import; struct import *import;
struct licence licence;
char *dedup; char *dedup;
int child_serial; int child_serial;

View File

@ -29,4 +29,7 @@
#define ERR_READING_KEY "ERR: reading cipher key" #define ERR_READING_KEY "ERR: reading cipher key"
#define ERR_LICENCE "ERR: licence validation error"
#define ERR_LICENCE_IP "ERR: licenced IP-address doesn't match with listen_addr parameter"
#endif /* _ERRMSG_H */ #endif /* _ERRMSG_H */

View File

@ -32,6 +32,9 @@ check_parser_utils: check_parser_utils.c ../src/libpiler.a
smtp: smtp.c ../src/libpiler.a smtp: smtp.c ../src/libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR)
install:
@echo
clean: clean:
rm -f check_parser_utils smtp rm -f check_parser_utils smtp