chiark / gitweb /
core: rewind message before forwarding it
[elogind.git] / src / core / execute.c
index 340b8000d4f224667a96863f5f9bfc2891955e0b..39ec5adbbe44f2783691945a7816c0dd0f393424 100644 (file)
@@ -19,8 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
-#include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/prctl.h>
-#include <linux/sched.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <grp.h>
-#include <pwd.h>
-#include <sys/mount.h>
-#include <linux/fs.h>
-#include <linux/oom.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <glob.h>
 #include <sys/personality.h>
 
 #include "errno-list.h"
 #include "af-list.h"
 #include "mkdir.h"
-#include "apparmor-util.h"
 #include "smack-util.h"
 #include "bus-endpoint.h"
-#include "label.h"
 #include "cap-list.h"
 
+#ifdef HAVE_APPARMOR
+#include "apparmor-util.h"
+#endif
+
 #ifdef HAVE_SECCOMP
 #include "seccomp-util.h"
 #endif
@@ -1524,7 +1518,7 @@ static int exec_child(
                                 return -ENOMEM;
                         }
 
-                        r = mkdir_safe(p, context->runtime_directory_mode, uid, gid);
+                        r = mkdir_safe_label(p, context->runtime_directory_mode, uid, gid);
                         if (r < 0) {
                                 *exit_status = EXIT_RUNTIME_DIRECTORY;
                                 return r;