bus-util: support details in CheckAuthorization calls
Extra details for an action can be supplied when calling polkit's CheckAuthorization method. Details are a list of key/value string pairs. Custom policy can use these details when making authorization decisions.
This commit is contained in:
@@ -434,6 +434,7 @@ static int method_set_hostname(sd_bus_message *m, void *userdata, sd_bus_error *
|
||||
m,
|
||||
CAP_SYS_ADMIN,
|
||||
"org.freedesktop.hostname1.set-hostname",
|
||||
NULL,
|
||||
interactive,
|
||||
UID_INVALID,
|
||||
&c->polkit_registry,
|
||||
@@ -486,6 +487,7 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
|
||||
m,
|
||||
CAP_SYS_ADMIN,
|
||||
"org.freedesktop.hostname1.set-static-hostname",
|
||||
NULL,
|
||||
interactive,
|
||||
UID_INVALID,
|
||||
&c->polkit_registry,
|
||||
@@ -557,6 +559,7 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
|
||||
m,
|
||||
CAP_SYS_ADMIN,
|
||||
prop == PROP_PRETTY_HOSTNAME ? "org.freedesktop.hostname1.set-static-hostname" : "org.freedesktop.hostname1.set-machine-info",
|
||||
NULL,
|
||||
interactive,
|
||||
UID_INVALID,
|
||||
&c->polkit_registry,
|
||||
|
||||
Reference in New Issue
Block a user