Merge lp:~ricotz/switchboard-plug-parental-controls/polkit into lp:~elementary-pantheon/switchboard-plug-parental-controls/trunk
- polkit
- Merge into trunk
Proposed by
Rico Tzschichholz
Status: | Merged |
---|---|
Approved by: | Corentin Noël |
Approved revision: | 239 |
Merged at revision: | 239 |
Proposed branch: | lp:~ricotz/switchboard-plug-parental-controls/polkit |
Merge into: | lp:~elementary-pantheon/switchboard-plug-parental-controls/trunk |
Diff against target: |
323 lines (+11/-229) 7 files modified
debian/control (+1/-1) src/CMakeLists.txt (+1/-1) src/client/Client.vala (+2/-2) src/daemon/ProcessWatcher.vala (+3/-3) src/daemon/Server.vala (+2/-2) src/shared/Utils.vala (+2/-2) vapi/polkit-gobject-1.vapi (+0/-218) |
To merge this branch: | bzr merge lp:~ricotz/switchboard-plug-parental-controls/polkit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
elementary Pantheon team | Pending | ||
Review via email: mp+309262@code.launchpad.net |
Commit message
Remove polkit-
Description of the change
Remove polkit-
To post a comment you must log in.
- 239. By Rico Tzschichholz
-
Remove polkit-
gobject- 1.vapi and use the one shippped with valac 0.34.1
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/control' |
2 | --- debian/control 2016-09-09 14:51:34 +0000 |
3 | +++ debian/control 2016-10-25 21:36:09 +0000 |
4 | @@ -11,7 +11,7 @@ |
5 | libgtk-3-dev, |
6 | libpolkit-gobject-1-dev, |
7 | libswitchboard-2.0-dev, |
8 | - valac |
9 | + valac (>= 0.34.1) |
10 | Standards-Version: 3.9.2 |
11 | Homepage: https://launchpad.net/pantheon-plugs |
12 | |
13 | |
14 | === modified file 'src/CMakeLists.txt' |
15 | --- src/CMakeLists.txt 2016-08-26 14:35:28 +0000 |
16 | +++ src/CMakeLists.txt 2016-10-25 21:36:09 +0000 |
17 | @@ -8,7 +8,7 @@ |
18 | |
19 | find_package (Vala REQUIRED) |
20 | include (ValaVersion) |
21 | -ensure_vala_version ("0.22.0" MINIMUM) |
22 | +ensure_vala_version ("0.34.1" MINIMUM) |
23 | |
24 | include (ValaPrecompile) |
25 | # Add all your vala files and requires packages to the List below to include them in the build |
26 | |
27 | === modified file 'src/client/Client.vala' |
28 | --- src/client/Client.vala 2016-08-30 17:28:55 +0000 |
29 | +++ src/client/Client.vala 2016-10-25 21:36:09 +0000 |
30 | @@ -57,9 +57,9 @@ |
31 | } |
32 | |
33 | try { |
34 | - var user = (Polkit.UnixUser)Polkit.UnixUser.new_for_name (username); |
35 | + var user = new Polkit.UnixUser.for_name (username); |
36 | permission = new Polkit.Permission.sync (action_id, |
37 | - Polkit.UnixProcess.new_for_owner (Posix.getpid (), 0, user.get_uid ())); |
38 | + new Polkit.UnixProcess.for_owner (Posix.getpid (), 0, user.get_uid ())); |
39 | } catch (Error e) { |
40 | warning ("%s\n", e.message); |
41 | } |
42 | |
43 | === modified file 'src/daemon/ProcessWatcher.vala' |
44 | --- src/daemon/ProcessWatcher.vala 2016-08-30 17:40:51 +0000 |
45 | +++ src/daemon/ProcessWatcher.vala 2016-10-25 21:36:09 +0000 |
46 | @@ -84,8 +84,8 @@ |
47 | ulong signal_id = 0; |
48 | signal_id = server.app_authorization_ended.connect ((client_pid) => { |
49 | try { |
50 | - var unix_user = (Polkit.UnixUser)Polkit.UnixUser.new_for_name (config.username); |
51 | - var result = authority.check_authorization_sync (Polkit.UnixProcess.new_for_owner (client_pid, 0, unix_user.get_uid ()), |
52 | + var unix_user = new Polkit.UnixUser.for_name (config.username); |
53 | + var result = authority.check_authorization_sync (new Polkit.UnixProcess.for_owner (client_pid, 0, unix_user.get_uid ()), |
54 | Vars.PARENTAL_CONTROLS_ACTION_ID, |
55 | null, |
56 | Polkit.CheckAuthorizationFlags.NONE); |
57 | @@ -107,4 +107,4 @@ |
58 | } |
59 | } |
60 | } |
61 | -} |
62 | \ No newline at end of file |
63 | +} |
64 | |
65 | === modified file 'src/daemon/Server.vala' |
66 | --- src/daemon/Server.vala 2016-08-30 17:28:55 +0000 |
67 | +++ src/daemon/Server.vala 2016-10-25 21:36:09 +0000 |
68 | @@ -227,7 +227,7 @@ |
69 | warning (e.message); |
70 | } |
71 | |
72 | - var subject = Polkit.UnixProcess.new_for_owner ((int)pid, 0, (int)user); |
73 | + var subject = new Polkit.UnixProcess.for_owner ((int)pid, 0, (int)user); |
74 | |
75 | try { |
76 | var authority = Polkit.Authority.get_sync (null); |
77 | @@ -252,4 +252,4 @@ |
78 | return pid; |
79 | } |
80 | } |
81 | -} |
82 | \ No newline at end of file |
83 | +} |
84 | |
85 | === modified file 'src/shared/Utils.vala' |
86 | --- src/shared/Utils.vala 2016-08-29 22:25:35 +0000 |
87 | +++ src/shared/Utils.vala 2016-10-25 21:36:09 +0000 |
88 | @@ -90,9 +90,9 @@ |
89 | } |
90 | |
91 | try { |
92 | - var user = (Polkit.UnixUser)Polkit.UnixUser.new_for_name (Environment.get_user_name ()); |
93 | + var user = new Polkit.UnixUser.for_name (Environment.get_user_name ()); |
94 | permission = new Polkit.Permission.sync (Vars.PARENTAL_CONTROLS_ACTION_ID, |
95 | - Polkit.UnixProcess.new_for_owner (Posix.getpid (), 0, user.get_uid ())); |
96 | + new Polkit.UnixProcess.for_owner (Posix.getpid (), 0, user.get_uid ())); |
97 | return permission; |
98 | } catch (Error e) { |
99 | critical (e.message); |
100 | |
101 | === removed file 'vapi/polkit-gobject-1.vapi' |
102 | --- vapi/polkit-gobject-1.vapi 2015-09-03 19:59:14 +0000 |
103 | +++ vapi/polkit-gobject-1.vapi 1970-01-01 00:00:00 +0000 |
104 | @@ -1,218 +0,0 @@ |
105 | -/* polkit-gobject-1.vapi generated by vapigen, do not modify. */ |
106 | - |
107 | -[CCode (cprefix = "Polkit", gir_namespace = "Polkit", gir_version = "1.0", lower_case_cprefix = "polkit_")] |
108 | -namespace Polkit { |
109 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_action_description_get_type ()")] |
110 | - public class ActionDescription : GLib.Object { |
111 | - [CCode (has_construct_function = false)] |
112 | - protected ActionDescription (); |
113 | - public unowned string get_action_id (); |
114 | - public unowned string get_annotation (string key); |
115 | - [CCode (array_length = false, array_null_terminated = true)] |
116 | - public unowned string[] get_annotation_keys (); |
117 | - public unowned string get_description (); |
118 | - public unowned string get_icon_name (); |
119 | - public Polkit.ImplicitAuthorization get_implicit_active (); |
120 | - public Polkit.ImplicitAuthorization get_implicit_any (); |
121 | - public Polkit.ImplicitAuthorization get_implicit_inactive (); |
122 | - public unowned string get_message (); |
123 | - public unowned string get_vendor_name (); |
124 | - public unowned string get_vendor_url (); |
125 | - } |
126 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_authority_get_type ()")] |
127 | - public class Authority : GLib.Object, GLib.AsyncInitable, GLib.Initable { |
128 | - [CCode (has_construct_function = false)] |
129 | - protected Authority (); |
130 | - public async bool authentication_agent_response (string cookie, Polkit.Identity identity, GLib.Cancellable? cancellable) throws GLib.Error; |
131 | - public bool authentication_agent_response_sync (string cookie, Polkit.Identity identity, GLib.Cancellable? cancellable = null) throws GLib.Error; |
132 | - public async Polkit.AuthorizationResult check_authorization (Polkit.Subject subject, string action_id, Polkit.Details? details, Polkit.CheckAuthorizationFlags flags, GLib.Cancellable? cancellable) throws GLib.Error; |
133 | - public Polkit.AuthorizationResult check_authorization_sync (Polkit.Subject subject, string action_id, Polkit.Details? details, Polkit.CheckAuthorizationFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; |
134 | - public async void enumerate_actions (GLib.Cancellable? cancellable); |
135 | - public async void enumerate_temporary_authorizations (Polkit.Subject subject, GLib.Cancellable? cancellable); |
136 | - public static Polkit.Authority @get (); |
137 | - public static async Polkit.Authority get_async (GLib.Cancellable? cancellable) throws GLib.Error; |
138 | - public Polkit.AuthorityFeatures get_backend_features (); |
139 | - public unowned string get_backend_name (); |
140 | - public unowned string get_backend_version (); |
141 | - public string get_owner (); |
142 | - public static Polkit.Authority get_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
143 | - public async bool register_authentication_agent (Polkit.Subject subject, string locale, string object_path, GLib.Cancellable? cancellable) throws GLib.Error; |
144 | - public bool register_authentication_agent_sync (Polkit.Subject subject, string locale, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error; |
145 | - public async bool register_authentication_agent_with_options (Polkit.Subject subject, string locale, string object_path, GLib.Variant? options, GLib.Cancellable? cancellable) throws GLib.Error; |
146 | - public bool register_authentication_agent_with_options_sync (Polkit.Subject subject, string locale, string object_path, GLib.Variant? options, GLib.Cancellable? cancellable = null) throws GLib.Error; |
147 | - public async bool revoke_temporary_authorization_by_id (string id, GLib.Cancellable? cancellable) throws GLib.Error; |
148 | - public bool revoke_temporary_authorization_by_id_sync (string id, GLib.Cancellable? cancellable = null) throws GLib.Error; |
149 | - public async bool revoke_temporary_authorizations (Polkit.Subject subject, GLib.Cancellable? cancellable) throws GLib.Error; |
150 | - public bool revoke_temporary_authorizations_sync (Polkit.Subject subject, GLib.Cancellable? cancellable = null) throws GLib.Error; |
151 | - public async bool unregister_authentication_agent (Polkit.Subject subject, string object_path, GLib.Cancellable? cancellable) throws GLib.Error; |
152 | - public bool unregister_authentication_agent_sync (Polkit.Subject subject, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error; |
153 | - public Polkit.AuthorityFeatures backend_features { get; } |
154 | - public string backend_name { get; } |
155 | - public string backend_version { get; } |
156 | - public string owner { owned get; } |
157 | - public signal void changed (); |
158 | - } |
159 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_authorization_result_get_type ()")] |
160 | - public class AuthorizationResult : GLib.Object { |
161 | - [CCode (has_construct_function = false)] |
162 | - public AuthorizationResult (bool is_authorized, bool is_challenge, Polkit.Details? details); |
163 | - public unowned Polkit.Details get_details (); |
164 | - public bool get_dismissed (); |
165 | - public bool get_is_authorized (); |
166 | - public bool get_is_challenge (); |
167 | - public bool get_retains_authorization (); |
168 | - public unowned string get_temporary_authorization_id (); |
169 | - } |
170 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_details_get_type ()")] |
171 | - public class Details : GLib.Object { |
172 | - [CCode (has_construct_function = false)] |
173 | - public Details (); |
174 | - [CCode (array_length = false, array_null_terminated = true)] |
175 | - public string[] get_keys (); |
176 | - public void insert (string key, string? value); |
177 | - public unowned string lookup (string key); |
178 | - } |
179 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_permission_get_type ()")] |
180 | - public class Permission : GLib.Permission, GLib.AsyncInitable, GLib.Initable { |
181 | - [CCode (cname = "polkit_permission_new", has_construct_function = false)] |
182 | - public async Permission (string action_id, Polkit.Subject? subject, GLib.Cancellable? cancellable) throws GLib.Error; |
183 | - public unowned string get_action_id (); |
184 | - public unowned Polkit.Subject get_subject (); |
185 | - [CCode (has_construct_function = false, type = "GPermission*")] |
186 | - public Permission.sync (string action_id, Polkit.Subject? subject, GLib.Cancellable? cancellable = null) throws GLib.Error; |
187 | - public string action_id { get; construct; } |
188 | - public Polkit.Subject subject { get; construct; } |
189 | - } |
190 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_system_bus_name_get_type ()")] |
191 | - public class SystemBusName : GLib.Object, Polkit.Subject { |
192 | - [CCode (has_construct_function = false)] |
193 | - protected SystemBusName (); |
194 | - public unowned string get_name (); |
195 | - public Polkit.Subject get_process_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
196 | - public static Polkit.Subject @new (string name); |
197 | - public void set_name (string name); |
198 | - public string name { get; set construct; } |
199 | - } |
200 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_temporary_authorization_get_type ()")] |
201 | - public class TemporaryAuthorization : GLib.Object { |
202 | - [CCode (has_construct_function = false)] |
203 | - public TemporaryAuthorization (string id, string action_id, Polkit.Subject subject, uint64 time_obtained, uint64 time_expires); |
204 | - public unowned string get_action_id (); |
205 | - public unowned string get_id (); |
206 | - public Polkit.Subject get_subject (); |
207 | - public uint64 get_time_expires (); |
208 | - public uint64 get_time_obtained (); |
209 | - } |
210 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_group_get_type ()")] |
211 | - public class UnixGroup : GLib.Object, Polkit.Identity { |
212 | - [CCode (has_construct_function = false)] |
213 | - protected UnixGroup (); |
214 | - public int get_gid (); |
215 | - public static Polkit.Identity @new (int gid); |
216 | - public static Polkit.Identity new_for_name (string name) throws GLib.Error; |
217 | - public void set_gid (int gid); |
218 | - public int gid { get; set construct; } |
219 | - } |
220 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_netgroup_get_type ()")] |
221 | - public class UnixNetgroup : GLib.Object, Polkit.Identity { |
222 | - [CCode (has_construct_function = false)] |
223 | - protected UnixNetgroup (); |
224 | - public unowned string get_name (); |
225 | - public static Polkit.Identity @new (string name); |
226 | - public void set_name (string name); |
227 | - public string name { get; set construct; } |
228 | - } |
229 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_process_get_type ()")] |
230 | - public class UnixProcess : GLib.Object, Polkit.Subject { |
231 | - [CCode (has_construct_function = false)] |
232 | - protected UnixProcess (); |
233 | - public int get_owner () throws GLib.Error; |
234 | - public int get_pid (); |
235 | - public uint64 get_start_time (); |
236 | - public int get_uid (); |
237 | - public static Polkit.Subject @new (int pid); |
238 | - public static Polkit.Subject new_for_owner (int pid, uint64 start_time, int uid); |
239 | - public static Polkit.Subject new_full (int pid, uint64 start_time); |
240 | - public void set_pid (int pid); |
241 | - public void set_start_time (uint64 start_time); |
242 | - public void set_uid (int uid); |
243 | - public int pid { get; set construct; } |
244 | - public uint64 start_time { get; set construct; } |
245 | - public int uid { get; set construct; } |
246 | - } |
247 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_session_get_type ()")] |
248 | - public class UnixSession : GLib.Object, GLib.AsyncInitable, GLib.Initable, Polkit.Subject { |
249 | - [CCode (has_construct_function = false)] |
250 | - protected UnixSession (); |
251 | - public unowned string get_session_id (); |
252 | - public static Polkit.Subject @new (string session_id); |
253 | - public static async Polkit.Subject new_for_process (int pid, GLib.Cancellable? cancellable) throws GLib.Error; |
254 | - public static Polkit.Subject new_for_process_sync (int pid, GLib.Cancellable? cancellable = null) throws GLib.Error; |
255 | - public void set_session_id (string session_id); |
256 | - public int pid { construct; } |
257 | - public string session_id { get; set construct; } |
258 | - } |
259 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_user_get_type ()")] |
260 | - public class UnixUser : GLib.Object, Polkit.Identity { |
261 | - [CCode (has_construct_function = false)] |
262 | - protected UnixUser (); |
263 | - public unowned string get_name (); |
264 | - public int get_uid (); |
265 | - public static Polkit.Identity @new (int uid); |
266 | - public static Polkit.Identity new_for_name (string name) throws GLib.Error; |
267 | - public void set_uid (int uid); |
268 | - public int uid { get; set construct; } |
269 | - } |
270 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_identity_get_type ()")] |
271 | - public interface Identity : GLib.Object { |
272 | - public abstract bool equal (Polkit.Identity b); |
273 | - public static Polkit.Identity from_string (string str) throws GLib.Error; |
274 | - public abstract uint hash (); |
275 | - public abstract string to_string (); |
276 | - } |
277 | - [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_subject_get_type ()")] |
278 | - public interface Subject : GLib.Object { |
279 | - public abstract bool equal (Polkit.Subject b); |
280 | - public abstract async bool exists (GLib.Cancellable? cancellable) throws GLib.Error; |
281 | - public abstract bool exists_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
282 | - public static Polkit.Subject from_string (string str) throws GLib.Error; |
283 | - public abstract uint hash (); |
284 | - public abstract string to_string (); |
285 | - } |
286 | - [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_AUTHORITY_FEATURES_", type_id = "polkit_authority_features_get_type ()")] |
287 | - [Flags] |
288 | - public enum AuthorityFeatures { |
289 | - NONE, |
290 | - TEMPORARY_AUTHORIZATION |
291 | - } |
292 | - [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_CHECK_AUTHORIZATION_FLAGS_", type_id = "polkit_check_authorization_flags_get_type ()")] |
293 | - [Flags] |
294 | - public enum CheckAuthorizationFlags { |
295 | - NONE, |
296 | - ALLOW_USER_INTERACTION |
297 | - } |
298 | - [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_IMPLICIT_AUTHORIZATION_", type_id = "polkit_implicit_authorization_get_type ()")] |
299 | - public enum ImplicitAuthorization { |
300 | - UNKNOWN, |
301 | - NOT_AUTHORIZED, |
302 | - AUTHENTICATION_REQUIRED, |
303 | - ADMINISTRATOR_AUTHENTICATION_REQUIRED, |
304 | - AUTHENTICATION_REQUIRED_RETAINED, |
305 | - ADMINISTRATOR_AUTHENTICATION_REQUIRED_RETAINED, |
306 | - AUTHORIZED; |
307 | - public static bool from_string (string string, Polkit.ImplicitAuthorization out_implicit_authorization); |
308 | - public static unowned string to_string (Polkit.ImplicitAuthorization implicit_authorization); |
309 | - } |
310 | - [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_ERROR_")] |
311 | - public errordomain Error { |
312 | - FAILED, |
313 | - CANCELLED, |
314 | - NOT_SUPPORTED, |
315 | - NOT_AUTHORIZED; |
316 | - public static GLib.Quark quark (); |
317 | - } |
318 | - [CCode (cheader_filename = "polkit/polkit.h")] |
319 | - public static Polkit.Identity identity_from_string (string str) throws GLib.Error; |
320 | - [CCode (cheader_filename = "polkit/polkit.h")] |
321 | - public static Polkit.Subject subject_from_string (string str) throws GLib.Error; |
322 | -} |
323 | \ No newline at end of file |