]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/dbus-execute.h
execute: setup namespace after doing NSS calls
[thirdparty/systemd.git] / src / dbus-execute.h
CommitLineData
4139c1b2
LP
1/*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3#ifndef foodbusexecutehfoo
4#define foodbusexecutehfoo
5
6/***
7 This file is part of systemd.
8
9 Copyright 2010 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
25#include <dbus/dbus.h>
26
27#include "manager.h"
28
29#define BUS_EXEC_CONTEXT_INTERFACE \
4288f619
LP
30 " <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
31 " <property name=\"UMask\" type=\"u\" access=\"read\"/>\n" \
32 " <property name=\"WorkingDirectory\" type=\"s\" access=\"read\"/>\n" \
33 " <property name=\"RootDirectory\" type=\"s\" access=\"read\"/>\n" \
34 " <property name=\"CPUSchedulingResetOnFork\" type=\"b\" access=\"read\"/>\n" \
35 " <property name=\"NonBlocking\" type=\"b\" access=\"read\"/>\n" \
36 " <property name=\"StandardInput\" type=\"s\" access=\"read\"/>\n" \
37 " <property name=\"StandardOutput\" type=\"s\" access=\"read\"/>\n" \
38 " <property name=\"StandardError\" type=\"s\" access=\"read\"/>\n" \
39 " <property name=\"TTYPath\" type=\"s\" access=\"read\"/>\n" \
40 " <property name=\"SyslogPriority\" type=\"i\" access=\"read\"/>\n" \
41 " <property name=\"SyslogIdentifier\" type=\"s\" access=\"read\"/>\n" \
42 " <property name=\"SecureBits\" type=\"i\" access=\"read\"/>\n" \
43 " <property name=\"CapabilityBoundingSetDrop\" type=\"t\" access=\"read\"/>\n" \
44 " <property name=\"User\" type=\"s\" access=\"read\"/>\n" \
45 " <property name=\"Group\" type=\"s\" access=\"read\"/>\n" \
df1f0afe
LP
46 " <property name=\"SupplementaryGroups\" type=\"as\" access=\"read\"/>\n" \
47 " <property name=\"TCPWrapName\" type=\"s\" access=\"read\"/>\n"
4139c1b2
LP
48
49#define BUS_EXEC_CONTEXT_PROPERTIES(interface, context) \
50 { interface, "Environment", bus_property_append_strv, "as", (context).environment }, \
51 { interface, "UMask", bus_property_append_mode, "u", &(context).umask }, \
52 /* RLimits */ \
53 { interface, "WorkingDirectory", bus_property_append_string, "s", (context).working_directory }, \
54 { interface, "RootDirectory", bus_property_append_string, "s", (context).root_directory }, \
55 /* OOM Adjust */ \
56 /* Nice */ \
57 /* IOPrio */ \
58 /* CPUSchedPolicy */ \
59 /* CPUSchedPriority */ \
60 /* CPUAffinity */ \
61 /* TimerSlackNS */ \
62 { interface, "CPUSchedulingResetOnFork", bus_property_append_bool, "b", &(context).cpu_sched_reset_on_fork }, \
63 { interface, "NonBlocking", bus_property_append_bool, "b", &(context).non_blocking }, \
64 { interface, "StandardInput", bus_execute_append_input, "s", &(context).std_input }, \
65 { interface, "StandardOutput", bus_execute_append_output, "s", &(context).std_output }, \
66 { interface, "StandardError", bus_execute_append_output, "s", &(context).std_error }, \
67 { interface, "TTYPath", bus_property_append_string, "s", (context).tty_path }, \
68 { interface, "SyslogPriority", bus_property_append_int, "i", &(context).syslog_priority }, \
69 { interface, "SyslogIdentifier", bus_property_append_string, "s", (context).syslog_identifier }, \
70 /* CAPABILITIES */ \
71 { interface, "SecureBits", bus_property_append_int, "i", &(context).secure_bits }, \
72 { interface, "CapabilityBoundingSetDrop", bus_property_append_uint64, "t", &(context).capability_bounding_set_drop }, \
73 { interface, "User", bus_property_append_string, "s", (context).user }, \
74 { interface, "Group", bus_property_append_string, "s", (context).group }, \
df1f0afe
LP
75 { interface, "SupplementaryGroups", bus_property_append_strv, "as", (context).supplementary_groups }, \
76 { interface, "TCPWrapName", bus_property_append_string, "s", (context).tcpwrap_name }
4139c1b2
LP
77
78int bus_execute_append_output(Manager *m, DBusMessageIter *i, const char *property, void *data);
79int bus_execute_append_input(Manager *m, DBusMessageIter *i, const char *property, void *data);
80
81#endif