chiark / gitweb /
service: hook up custom endpoint logic
[elogind.git] / src / core / execute.h
index d23a98097a667a18d924985319328e4b914e733d..9c1f249cd4a59e5ddb655ae85e3f4f2945b08cee 100644 (file)
@@ -25,6 +25,7 @@ typedef struct ExecStatus ExecStatus;
 typedef struct ExecCommand ExecCommand;
 typedef struct ExecContext ExecContext;
 typedef struct ExecRuntime ExecRuntime;
+typedef struct ExecParameters ExecParameters;
 
 #include <linux/types.h>
 #include <sys/time.h>
@@ -40,6 +41,7 @@ typedef struct ExecRuntime ExecRuntime;
 #include "fdset.h"
 #include "missing.h"
 #include "namespace.h"
+#include "bus-endpoint.h"
 
 typedef enum ExecInput {
         EXEC_INPUT_NULL,
@@ -136,7 +138,6 @@ struct ExecContext {
 
         bool selinux_context_ignore;
         char *selinux_context;
-        bool selinux_label_via_net;
 
         bool apparmor_profile_ignore;
         char *apparmor_profile;
@@ -188,25 +189,34 @@ struct ExecContext {
         bool ioprio_set:1;
         bool cpu_sched_set:1;
         bool no_new_privileges_set:1;
+
+        /* custom dbus enpoint */
+        BusEndpoint *bus_endpoint;
 };
 
 #include "cgroup.h"
 
+struct ExecParameters {
+        char **argv;
+        int *fds; unsigned n_fds;
+        char **environment;
+        bool apply_permissions;
+        bool apply_chroot;
+        bool apply_tty_stdin;
+        bool confirm_spawn;
+        CGroupControllerMask cgroup_supported;
+        const char *cgroup_path;
+        const char *runtime_prefix;
+        const char *unit_id;
+        usec_t watchdog_usec;
+        int *idle_pipe;
+        char *bus_endpoint_path;
+        int bus_endpoint_fd;
+};
+
 int exec_spawn(ExecCommand *command,
-               char **argv,
-               ExecContext *context,
-               int fds[], unsigned n_fds,
-               char **environment,
-               bool apply_permissions,
-               bool apply_chroot,
-               bool apply_tty_stdin,
-               bool confirm_spawn,
-               CGroupControllerMask cgroup_mask,
-               const char *cgroup_path,
-               const char *runtime_prefix,
-               const char *unit_id,
-               usec_t watchdog_usec,
-               int pipe_fd[2],
+               const ExecContext *context,
+               const ExecParameters *exec_params,
                ExecRuntime *runtime,
                pid_t *ret);