=================================================================== RCS file: /cvs/cvs/blind/config.c,v retrieving revision 1.6 retrieving revision 1.8 diff -u -p -r1.6 -r1.8 --- blind/config.c 2022/03/25 21:12:46 1.6 +++ blind/config.c 2022/04/03 11:01:52 1.8 @@ -39,7 +39,6 @@ config_init(void) cfg->bl_ttl = BL_TTL; cfg->bl_opt = BL_OPT_DEFAULT; - cfg->bl_flg = BL_FLG_DEFAULT; return cfg; } @@ -47,19 +46,19 @@ config_init(void) int config_perm(int fd, const char *name) { - struct stat st; + struct stat st; - if (fstat(fd, &st)) { - log_debug("cannot stat config file"); - return (-1); - } - if (st.st_uid != 0 && st.st_uid != getuid()) { - log_debug("not root or current user owned"); - return (-1); - } - if (st.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO)) { - log_debug("insecure config file"); - return (-1); - } - return (0); + if (fstat(fd, &st)) { + log_debug("cannot stat config file"); + return (-1); + } + if (st.st_uid != 0 && st.st_uid != getuid()) { + log_debug("not root or current user owned"); + return (-1); + } + if (st.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO)) { + log_debug("insecure config file"); + return (-1); + } + return (0); }