version 1.288, 2018/06/01 03:33:53 |
version 1.289, 2018/06/06 18:29:18 |
|
|
int flags, int *activep, int depth) |
int flags, int *activep, int depth) |
{ |
{ |
FILE *f; |
FILE *f; |
char line[4096]; |
char *line = NULL; |
|
size_t linesize = 0; |
int linenum; |
int linenum; |
int bad_options = 0; |
int bad_options = 0; |
|
|
|
|
* on/off by Host specifications. |
* on/off by Host specifications. |
*/ |
*/ |
linenum = 0; |
linenum = 0; |
while (fgets(line, sizeof(line), f)) { |
while (getline(&line, &linesize, f) != -1) { |
/* Update line number counter. */ |
/* Update line number counter. */ |
linenum++; |
linenum++; |
if (strlen(line) == sizeof(line) - 1) |
|
fatal("%s line %d too long", filename, linenum); |
|
if (process_config_line_depth(options, pw, host, original_host, |
if (process_config_line_depth(options, pw, host, original_host, |
line, filename, linenum, activep, flags, depth) != 0) |
line, filename, linenum, activep, flags, depth) != 0) |
bad_options++; |
bad_options++; |
} |
} |
|
free(line); |
fclose(f); |
fclose(f); |
if (bad_options > 0) |
if (bad_options > 0) |
fatal("%s: terminating, %d bad configuration options", |
fatal("%s: terminating, %d bad configuration options", |