|
@@ -111,16 +111,16 @@ int check_executor_permissions(char *executable_file) {
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- // check others do not have read/write/execute permissions
|
|
|
- if ((filestat.st_mode & S_IROTH) == S_IROTH || (filestat.st_mode & S_IWOTH)
|
|
|
- == S_IWOTH || (filestat.st_mode & S_IXOTH) == S_IXOTH) {
|
|
|
+ // check others do not have write/execute permissions
|
|
|
+ if ((filestat.st_mode & S_IWOTH) == S_IWOTH ||
|
|
|
+ (filestat.st_mode & S_IXOTH) == S_IXOTH) {
|
|
|
fprintf(LOGFILE,
|
|
|
- "The container-executor binary should not have read or write or"
|
|
|
- " execute for others.\n");
|
|
|
+ "The container-executor binary should not have write or execute "
|
|
|
+ "for others.\n");
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- // Binary should be setuid/setgid executable
|
|
|
+ // Binary should be setuid executable
|
|
|
if ((filestat.st_mode & S_ISUID) == 0) {
|
|
|
fprintf(LOGFILE, "The container-executor binary should be set setuid.\n");
|
|
|
return -1;
|