mirror of
https://github.com/systemd/systemd.git
synced 2026-08-10 17:14:31 +00:00
logind-varlink: add missing validation for session class
D-Bus CreateSession() method carries this check, but the varlink one didn't.
This commit is contained in:
@@ -184,6 +184,9 @@ static int vl_method_create_session(sd_varlink *link, sd_json_variant *parameter
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
if (p.class == SESSION_NONE)
|
||||
return sd_varlink_error_invalid_parameter_name(link, "Class");
|
||||
|
||||
Seat *seat = NULL;
|
||||
if (p.seat) {
|
||||
seat = hashmap_get(m->seats, p.seat);
|
||||
|
||||
Reference in New Issue
Block a user