1 const GString hostnamed_config_xml_def
[] = {
2 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
3 "<!DOCTYPE busconfig PUBLIC",
4 " \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
5 " \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
7 " <!-- Only members of 'wheel' and user 'daemon' may set hostnames -->",
8 " <policy group=\"wheel\">",
9 " <allow own=\"org.freedesktop.hostname1\"/>",
10 " <allow send_destination=\"org.freedesktop.hostname1\"/>",
11 " <allow receive_sender=\"org.freedesktop.hostname1\"/>",
13 " <policy user=\"daemon\">",
14 " <allow own=\"org.freedesktop.hostname1\"/>",
15 " <allow send_destination=\"org.freedesktop.hostname1\"/>",
16 " <allow receive_sender=\"org.freedesktop.hostname1\"/>",
20 const GString hostnamed_ispect_xml_def
[] = {
21 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
22 "<!DOCTYPE node PUBLIC",
23 " \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
24 " \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
25 "<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
26 "<node name=\"/org/freedesktop/hostname1\">",
27 " <interface name=\"org.freedesktop.hostname1\">",
28 " <method name=\"SetHostname\">",
29 " <arg direction=\"in\" type=\"s\" name=\"name\"/>",
30 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
32 " <method name=\"SetStaticHostname\">",
33 " <arg direction=\"in\" type=\"s\" name=\"name\"/>",
34 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
36 " <method name=\"SetPrettyHostname\">",
37 " <arg direction=\"in\" type=\"s\" name=\"name\"/>",
38 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
40 " <method name=\"SetIconName\">",
41 " <arg direction=\"in\" type=\"s\" name=\"name\"/>",
42 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
44 " <property name=\"Hostname\" type=\"s\" access=\"read\"/>",
45 " <property name=\"StaticHostname\" type=\"s\" access=\"read\"/>",
46 " <property name=\"PrettyHostname\" type=\"s\" access=\"read\"/>",
47 " <property name=\"IconName\" type=\"s\" access=\"read\"/>",
51 const GString timedated_config_xml_def
[] = {
52 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
53 "<!DOCTYPE busconfig PUBLIC",
54 " \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
55 " \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
57 " <!-- Only members of 'wheel' and user 'daemon' may change time settings -->",
58 " <policy group=\"wheel\">",
59 " <allow own=\"org.freedesktop.timedate1\"/>",
60 " <allow send_destination=\"org.freedesktop.timedate1\"/>",
61 " <allow receive_sender=\"org.freedesktop.timedate1\"/>",
63 " <policy user=\"daemon\">",
64 " <allow own=\"org.freedesktop.timedate1\"/>",
65 " <allow send_destination=\"org.freedesktop.timedate1\"/>",
66 " <allow receive_sender=\"org.freedesktop.timedate1\"/>",
70 const GString timedated_ispect_xml_def
[] = {
71 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
72 "<!DOCTYPE node PUBLIC",
73 " \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
74 " \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
75 "<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
76 "<node name=\"/org/freedesktop/timedate1\">",
77 " <interface name=\"org.freedesktop.timedate1\">",
78 " <method name=\"SetTime\">",
79 " <arg direction=\"in\" type=\"x\" name=\"usec_utc\"/>",
80 " <arg direction=\"in\" type=\"b\" name=\"relative\"/>",
81 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
83 " <method name=\"SetTimezone\">",
84 " <arg direction=\"in\" type=\"s\" name=\"timezone\"/>",
85 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
87 " <method name=\"SetLocalRTC\">",
88 " <arg direction=\"in\" type=\"b\" name=\"local_rtc\"/>",
89 " <arg direction=\"in\" type=\"b\" name=\"fix_system\"/>",
90 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
92 " <method name=\"SetNTP\">",
93 " <arg direction=\"in\" type=\"b\" name=\"use_ntp\"/>",
94 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
96 " <property name=\"Timezone\" type=\"s\" access=\"read\"/>",
97 " <property name=\"LocalRTC\" type=\"b\" access=\"read\"/>",
98 " <property name=\"NTP\" type=\"b\" access=\"read\"/>",
102 const GString localed_config_xml_def
[] = {
103 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
104 "<!DOCTYPE busconfig PUBLIC",
105 " \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
106 " \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
108 " <!-- Only members of 'wheel' and user 'daemon' may change system-wide locales -->",
109 " <policy group=\"wheel\">",
110 " <allow own=\"org.freedesktop.locale1\"/>",
111 " <allow send_destination=\"org.freedesktop.locale1\"/>",
112 " <allow receive_sender=\"org.freedesktop.locale1\"/>",
114 " <policy user=\"daemon\">",
115 " <allow own=\"org.freedesktop.locale1\"/>",
116 " <allow send_destination=\"org.freedesktop.locale1\"/>",
117 " <allow receive_sender=\"org.freedesktop.locale1\"/>",
121 const GString localed_ispect_xml_def
[] = {
122 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
123 "<!DOCTYPE node PUBLIC",
124 " \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
125 " \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
126 "<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
127 "<node name=\"/org/freedesktop/locale1\">",
128 " <interface name=\"org.freedesktop.locale1\">",
129 " <method name=\"SetLocale\">",
130 " <arg direction=\"in\" type=\"as\" name=\"locale\" />",
131 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
133 " <method name=\"SetVConsoleKeyboard\">",
134 " <arg direction=\"in\" type=\"s\" name=\"keymap\" />",
135 " <arg direction=\"in\" type=\"s\" name=\"keymap_toggle\" />",
136 " <arg direction=\"in\" type=\"b\" name=\"convert\" />",
137 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
139 " <method name=\"SetX11Keyboard\">",
140 " <arg direction=\"in\" type=\"s\" name=\"layout\" />",
141 " <arg direction=\"in\" type=\"s\" name=\"model\" />",
142 " <arg direction=\"in\" type=\"s\" name=\"variant\" />",
143 " <arg direction=\"in\" type=\"s\" name=\"options\" />",
144 " <arg direction=\"in\" type=\"b\" name=\"convert\" />",
145 " <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
147 " <property name=\"Locale\" type=\"as\" access=\"read\" />",
148 " <property name=\"VConsoleKeymap\" type=\"s\" access=\"read\" />",
149 " <property name=\"VConsoleKeymapToggle\" type=\"s\" access=\"read\" />",
150 " <property name=\"X11Layout\" type=\"s\" access=\"read\" />",
151 " <property name=\"X11Model\" type=\"s\" access=\"read\" />",
152 " <property name=\"X11Variant\" type=\"s\" access=\"read\" />",
153 " <property name=\"X11Options\" type=\"s\" access=\"read\" />",
157 const GString logind_config_xml_def
[] = {
158 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
159 "<!DOCTYPE busconfig PUBLIC",
160 " \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
161 " \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
163 " <!-- TODO: figure out nessecary logind permissions -->",
164 " <policy group=\"wheel\">",
165 " <allow own=\"org.freedesktop.login1\"/>",
166 " <allow send_destination=\"org.freedesktop.login1\"/>",
167 " <allow receive_sender=\"org.freedesktop.login1\"/>",
169 " <policy user=\"daemon\">",
170 " <allow own=\"org.freedesktop.login1\"/>",
171 " <allow send_destination=\"org.freedesktop.login1\"/>",
172 " <allow receive_sender=\"org.freedesktop.login1\"/>",
176 const GString logind_ispect_xml_def
[] = {
177 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
178 "<!DOCTYPE node PUBLIC",
179 " \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
180 " \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
181 "<node name=\"/org/freedesktop/login1\">",
182 " <interface name=\"org.freedesktop.DBus.Peer\">",
183 " <method name=\"Ping\" />",
184 " <method name=\"GetMachineId\">",
185 " <arg type=\"s\" name=\"machine_uuid\" direction=\"out\" />",
188 " <interface name=\"org.freedesktop.DBus.Introspectable\">",
189 " <method name=\"Introspect\">",
190 " <arg name=\"data\" type=\"s\" direction=\"out\" />",
193 " <interface name=\"org.freedesktop.DBus.Properties\">",
194 " <method name=\"Get\">",
195 " <arg name=\"interface\" direction=\"in\" type=\"s\" />",
196 " <arg name=\"property\" direction=\"in\" type=\"s\" />",
197 " <arg name=\"value\" direction=\"out\" type=\"v\" />",
199 " <method name=\"GetAll\">",
200 " <arg name=\"interface\" direction=\"in\" type=\"s\" />",
201 " <arg name=\"properties\" direction=\"out\" type=\"a{sv}\" />",
203 " <method name=\"Set\">",
204 " <arg name=\"interface\" direction=\"in\" type=\"s\" />",
205 " <arg name=\"property\" direction=\"in\" type=\"s\" />",
206 " <arg name=\"value\" direction=\"in\" type=\"v\" />",
208 " <signal name=\"PropertiesChanged\">",
209 " <arg type=\"s\" name=\"interface\" direction=\"in\" />",
210 " <arg type=\"a{sv}\" name=\"changed_properties\" direction=\"in\" />",
211 " <arg type=\"as\" name=\"invalidated_properties\" direction=\"in\" />",
214 " <interface name=\"org.freedesktop.login1.Manager\">",
215 " <property name=\"NAutoVTs\" type=\"u\" access=\"read\">",
216 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
218 " <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\">",
219 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
221 " <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\">",
222 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
224 " <property name=\"KillUserProcesses\" type=\"b\" access=\"read\">",
225 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
227 " <property name=\"IdleHint\" type=\"b\" access=\"read\" />",
228 " <property name=\"IdleSinceHint\" type=\"t\" access=\"read\" />",
229 " <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\" />",
230 " <property name=\"BlockInhibited\" type=\"s\" access=\"read\" />",
231 " <property name=\"DelayInhibited\" type=\"s\" access=\"read\" />",
232 " <property name=\"InhibitDelayMaxUSec\" type=\"t\" access=\"read\">",
233 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
235 " <property name=\"HandlePowerKey\" type=\"s\" access=\"read\">",
236 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
238 " <property name=\"HandleSuspendKey\" type=\"s\" access=\"read\">",
239 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
241 " <property name=\"HandleHibernateKey\" type=\"s\" access=\"read\">",
242 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
244 " <property name=\"HandleLidSwitch\" type=\"s\" access=\"read\">",
245 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
247 " <property name=\"IdleAction\" type=\"s\" access=\"read\">",
248 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
250 " <property name=\"IdleActionUSec\" type=\"t\" access=\"read\">",
251 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
253 " <property name=\"PreparingForShutdown\" type=\"b\" access=\"read\">",
254 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"false\" />",
256 " <property name=\"PreparingForSleep\" type=\"b\" access=\"read\">",
257 " <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"false\" />",
259 " <method name=\"GetSession\">",
260 " <arg type=\"s\" direction=\"in\" />",
261 " <arg type=\"o\" direction=\"out\" />",
263 " <method name=\"GetSessionByPID\">",
264 " <arg type=\"u\" direction=\"in\" />",
265 " <arg type=\"o\" direction=\"out\" />",
267 " <method name=\"GetUser\">",
268 " <arg type=\"u\" direction=\"in\" />",
269 " <arg type=\"o\" direction=\"out\" />",
271 " <method name=\"GetUserByPID\">",
272 " <arg type=\"u\" direction=\"in\" />",
273 " <arg type=\"o\" direction=\"out\" />",
275 " <method name=\"GetSeat\">",
276 " <arg type=\"s\" direction=\"in\" />",
277 " <arg type=\"o\" direction=\"out\" />",
279 " <method name=\"ListSessions\">",
280 " <arg type=\"a(susso)\" direction=\"out\" />",
282 " <method name=\"ListUsers\">",
283 " <arg type=\"a(uso)\" direction=\"out\" />",
285 " <method name=\"ListSeats\">",
286 " <arg type=\"a(so)\" direction=\"out\" />",
288 " <method name=\"ListInhibitors\">",
289 " <arg type=\"a(ssssuu)\" direction=\"out\" />",
291 " <method name=\"CreateSession\">",
292 " <arg type=\"u\" direction=\"in\" />",
293 " <arg type=\"u\" direction=\"in\" />",
294 " <arg type=\"s\" direction=\"in\" />",
295 " <arg type=\"s\" direction=\"in\" />",
296 " <arg type=\"s\" direction=\"in\" />",
297 " <arg type=\"s\" direction=\"in\" />",
298 " <arg type=\"s\" direction=\"in\" />",
299 " <arg type=\"u\" direction=\"in\" />",
300 " <arg type=\"s\" direction=\"in\" />",
301 " <arg type=\"s\" direction=\"in\" />",
302 " <arg type=\"b\" direction=\"in\" />",
303 " <arg type=\"s\" direction=\"in\" />",
304 " <arg type=\"s\" direction=\"in\" />",
305 " <arg type=\"a(sv)\" direction=\"in\" />",
306 " <arg type=\"s\" direction=\"out\" />",
307 " <arg type=\"o\" direction=\"out\" />",
308 " <arg type=\"s\" direction=\"out\" />",
309 " <arg type=\"h\" direction=\"out\" />",
310 " <arg type=\"u\" direction=\"out\" />",
311 " <arg type=\"s\" direction=\"out\" />",
312 " <arg type=\"u\" direction=\"out\" />",
313 " <arg type=\"b\" direction=\"out\" />",
314 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
316 " <method name=\"ReleaseSession\">",
317 " <arg type=\"s\" direction=\"in\" />",
318 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
320 " <method name=\"ActivateSession\">",
321 " <arg type=\"s\" direction=\"in\" />",
323 " <method name=\"ActivateSessionOnSeat\">",
324 " <arg type=\"s\" direction=\"in\" />",
325 " <arg type=\"s\" direction=\"in\" />",
327 " <method name=\"LockSession\">",
328 " <arg type=\"s\" direction=\"in\" />",
329 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
331 " <method name=\"UnlockSession\">",
332 " <arg type=\"s\" direction=\"in\" />",
333 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
335 " <method name=\"LockSessions\">",
336 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
338 " <method name=\"UnlockSessions\">",
339 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
341 " <method name=\"KillSession\">",
342 " <arg type=\"s\" direction=\"in\" />",
343 " <arg type=\"s\" direction=\"in\" />",
344 " <arg type=\"i\" direction=\"in\" />",
345 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
347 " <method name=\"KillUser\">",
348 " <arg type=\"u\" direction=\"in\" />",
349 " <arg type=\"i\" direction=\"in\" />",
350 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
352 " <method name=\"TerminateSession\">",
353 " <arg type=\"s\" direction=\"in\" />",
354 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
356 " <method name=\"TerminateUser\">",
357 " <arg type=\"u\" direction=\"in\" />",
358 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
360 " <method name=\"TerminateSeat\">",
361 " <arg type=\"s\" direction=\"in\" />",
362 " <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
364 " <method name=\"SetUserLinger\">",
365 " <arg type=\"u\" direction=\"in\" />",
366 " <arg type=\"b\" direction=\"in\" />",
367 " <arg type=\"b\" direction=\"in\" />",
369 " <method name=\"AttachDevice\">",
370 " <arg type=\"s\" direction=\"in\" />",
371 " <arg type=\"s\" direction=\"in\" />",
372 " <arg type=\"b\" direction=\"in\" />",
374 " <method name=\"FlushDevices\">",
375 " <arg type=\"b\" direction=\"in\" />",
377 " <method name=\"PowerOff\">",
378 " <arg type=\"b\" direction=\"in\" />",
380 " <method name=\"Reboot\">",
381 " <arg type=\"b\" direction=\"in\" />",
383 " <method name=\"Suspend\">",
384 " <arg type=\"b\" direction=\"in\" />",
386 " <method name=\"Hibernate\">",
387 " <arg type=\"b\" direction=\"in\" />",
389 " <method name=\"HybridSleep\">",
390 " <arg type=\"b\" direction=\"in\" />",
392 " <method name=\"CanPowerOff\">",
393 " <arg type=\"s\" direction=\"out\" />",
395 " <method name=\"CanReboot\">",
396 " <arg type=\"s\" direction=\"out\" />",
398 " <method name=\"CanSuspend\">",
399 " <arg type=\"s\" direction=\"out\" />",
401 " <method name=\"CanHibernate\">",
402 " <arg type=\"s\" direction=\"out\" />",
404 " <method name=\"CanHybridSleep\">",
405 " <arg type=\"s\" direction=\"out\" />",
407 " <method name=\"Inhibit\">",
408 " <arg type=\"s\" direction=\"in\" />",
409 " <arg type=\"s\" direction=\"in\" />",
410 " <arg type=\"s\" direction=\"in\" />",
411 " <arg type=\"s\" direction=\"in\" />",
412 " <arg type=\"h\" direction=\"out\" />",
414 " <signal name=\"SessionNew\">",
415 " <arg type=\"s\" direction=\"in\" />",
416 " <arg type=\"o\" direction=\"in\" />",
418 " <signal name=\"SessionRemoved\">",
419 " <arg type=\"s\" direction=\"in\" />",
420 " <arg type=\"o\" direction=\"in\" />",
422 " <signal name=\"UserNew\">",
423 " <arg type=\"u\" direction=\"in\" />",
424 " <arg type=\"o\" direction=\"in\" />",
426 " <signal name=\"UserRemoved\">",
427 " <arg type=\"u\" direction=\"in\" />",
428 " <arg type=\"o\" direction=\"in\" />",
430 " <signal name=\"SeatNew\">",
431 " <arg type=\"s\" direction=\"in\" />",
432 " <arg type=\"o\" direction=\"in\" />",
434 " <signal name=\"SeatRemoved\">",
435 " <arg type=\"s\" direction=\"in\" />",
436 " <arg type=\"o\" direction=\"in\" />",
438 " <signal name=\"PrepareForShutdown\">",
439 " <arg type=\"b\" direction=\"in\" />",
441 " <signal name=\"PrepareForSleep\">",
442 " <arg type=\"b\" direction=\"in\" />",