CONF_DATA *cd;
CONF_SECTION *top;
rbtree_t *tree;
- int fd;
FILE *fp;
top = cf_top_section(cs);
return NULL;
}
- fd = fileno(fp);
-
file = talloc(tree, cf_file_t);
if (!file) {
fclose(fp);
file->cs = cs;
file->input = true;
- if (fstat(fd, &file->buf) == 0) {
+ if (stat(filename, &file->buf) < 0) {
#ifdef S_IWOTH
if ((file->buf.st_mode & S_IWOTH) != 0) {
fclose(fp);
if (!cd) return false;
tree = cd->data;
-
file = talloc(tree, cf_file_t);
if (!file) return false;