RMPS: remove intrusive code in confparse()
This commit is contained in:
@@ -189,17 +189,6 @@ static int test_conf_perms(char *config)
|
||||
free(config_copy);
|
||||
return 1;
|
||||
}
|
||||
if (s.st_uid != 0) {
|
||||
enumtostr(confresult, CONF_FILE_UID_INSECURE);
|
||||
log(WARNING, confresult, config);
|
||||
} else if (s.st_gid != 0) {
|
||||
enumtostr(confresult, CONF_FILE_GID_INSECURE);
|
||||
log(WARNING, confresult, config);
|
||||
} else if ((0004 & s.st_mode) ||
|
||||
(0002 & s.st_mode)) {
|
||||
enumtostr(confresult, CONF_FILE_PERM_INSECURE);
|
||||
log(WARNING, confresult, config);
|
||||
}
|
||||
}
|
||||
|
||||
err = stat(dirname(config_copy), &s);
|
||||
@@ -225,17 +214,6 @@ static int test_conf_perms(char *config)
|
||||
free(config_copy);
|
||||
return 1;
|
||||
}
|
||||
if (s.st_uid != 0) {
|
||||
enumtostr(confresult, CONF_DIR_UID_INSECURE);
|
||||
log(WARNING, confresult, config_copy);
|
||||
} else if (s.st_gid != 0) {
|
||||
enumtostr(confresult, CONF_DIR_GID_INSECURE);
|
||||
log(WARNING, confresult, config_copy);
|
||||
} else if ((0004 & s.st_mode) ||
|
||||
(0002 & s.st_mode)) {
|
||||
enumtostr(confresult, CONF_DIR_PERM_INSECURE);
|
||||
log(WARNING, confresult, config_copy);
|
||||
}
|
||||
}
|
||||
free(config_copy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user