polkit-agent: Include subject PID in ::initiate
It is not always clear what triggered a particular polkit request, so displaying more information to the user is desirable. Unfortunately the information provided by polkitd is rather sparse, and is usually limited to subject- and caller PID. Still that's better than nothing, so include the PID of the initiating process in the signal parameters. https://bugzilla.gnome.org/show_bug.cgi?id=688351
This commit is contained in:
parent
d9a1434ae9
commit
087f290ff7
@ -380,7 +380,7 @@ var AuthenticationAgent = new Lang.Class({
|
||||
}
|
||||
},
|
||||
|
||||
_onInitiate(nativeAgent, actionId, message, iconName, cookie, userNames) {
|
||||
_onInitiate(nativeAgent, actionId, message, iconName, cookie, subjectPid, userNames) {
|
||||
// Don't pop up a dialog while locked
|
||||
if (Main.sessionMode.isLocked) {
|
||||
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||
|
@ -162,7 +162,8 @@ shell_polkit_authentication_agent_class_init (ShellPolkitAuthenticationAgentClas
|
||||
NULL, /* accumulator data */
|
||||
NULL, /* marshaller */
|
||||
G_TYPE_NONE,
|
||||
5,
|
||||
6,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
@ -267,6 +268,7 @@ auth_request_initiate (AuthRequest *request)
|
||||
request->message,
|
||||
request->icon_name,
|
||||
request->cookie,
|
||||
polkit_details_lookup (request->details, "polkit.subject-pid"),
|
||||
user_names);
|
||||
g_strfreev (user_names);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user