oomd: reject invalid arguments early
Validate input parameter immediately during initial parsing
Follow-up for 9de5e32136
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
7bce482c35
commit
cde88c4ea3
@@ -88,6 +88,11 @@ static int process_managed_oom_message(Manager *m, uid_t uid, sd_json_variant *p
|
||||
if (r < 0)
|
||||
continue;
|
||||
|
||||
if (!path_is_normalized(empty_to_root(message.path))) {
|
||||
log_debug("Received non-normalized cgroup path '%s', ignoring.", message.path);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (uid != 0) {
|
||||
uid_t cg_uid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user