| version 1.1, 2022/03/17 21:15:43 |
version 1.2, 2022/03/18 20:54:01 |
|
|
| */ |
*/ |
| |
|
| #include <stdlib.h> |
#include <stdlib.h> |
| |
#include <string.h> |
| |
|
| #include "blind.h" |
#include "blind.h" |
| |
#include "log.h" |
| |
|
| struct blind * config_init(void); |
struct blind * config_init(void); |
| |
|
| Line 28 config_init(void) |
|
| Line 30 config_init(void) |
|
| if ((cfg = calloc(1, sizeof(*cfg))) == NULL) |
if ((cfg = calloc(1, sizeof(*cfg))) == NULL) |
| return cfg; |
return cfg; |
| |
|
| |
if (strlcpy(cfg->bl_conf, BL_CONF, PATH_MAX) >= PATH_MAX) |
| |
log_fatal("config file exceeds PATH_MAX"); |
| |
|
| |
if (strlcpy(cfg->bl_sock, BL_SOCK, PATH_MAX) >= PATH_MAX) |
| |
log_fatal("socket file exceeds PATH_MAX"); |
| |
|
| cfg->bl_ttl = BL_TTL; |
cfg->bl_ttl = BL_TTL; |
| |
|
| return cfg; |
return cfg; |