version 1.133, 2004/06/17 15:10:14 |
version 1.134, 2004/07/11 17:48:47 |
|
|
*/ |
*/ |
|
|
int |
int |
read_config_file(const char *filename, const char *host, Options *options, |
read_config_file(const char *filename, const char *host, Options *options, |
int checkperm) |
int checkperm) |
{ |
{ |
FILE *f; |
FILE *f; |
|
|
|
|
if (checkperm) { |
if (checkperm) { |
struct stat sb; |
struct stat sb; |
|
|
if (fstat(fileno(f), &sb) == -1) |
if (fstat(fileno(f), &sb) == -1) |
fatal("fstat %s: %s", filename, strerror(errno)); |
fatal("fstat %s: %s", filename, strerror(errno)); |
if (((sb.st_uid != 0 && sb.st_uid != getuid()) || |
if (((sb.st_uid != 0 && sb.st_uid != getuid()) || |