mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-04-05 18:19:19 +02:00
0.1.6
This commit is contained in:
19
src/piler.c
19
src/piler.c
@@ -111,25 +111,6 @@ void initialise_configuration(){
|
||||
}
|
||||
|
||||
|
||||
int read_key(struct __config *cfg){
|
||||
int fd, n;
|
||||
|
||||
fd = open(KEYFILE, O_RDONLY);
|
||||
if(fd == -1){
|
||||
syslog(LOG_PRIORITY, "cannot read keyfile: %s", KEYFILE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
n = read(fd, cfg->key, KEYLEN);
|
||||
|
||||
close(fd);
|
||||
|
||||
if(n > 5) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv){
|
||||
int i, new_sd, yes=1, pid, daemonise=0;
|
||||
unsigned int clen;
|
||||
|
||||
Reference in New Issue
Block a user