[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Wed Feb 12 18:44:54 CET 2014


 src/core/dbus-execute.c |    4 ++++
 src/core/execute.c      |    4 ++++
 2 files changed, 8 insertions(+)

New commits:
commit 351a19b17d51ba0a5737f35d3c5deb8e7975fdee
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 12 18:44:40 2014 +0100

    core: fix build without libseccomp

diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 34d8eed..435c3d5 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -350,14 +350,17 @@ static int property_get_syscall_filter(
         ExecContext *c = userdata;
         _cleanup_strv_free_ char **l = NULL;
         _cleanup_free_ char *t = NULL;
+#ifdef HAVE_SECCOMP
         Iterator i;
         void *id;
         int r;
+#endif
 
         assert(bus);
         assert(reply);
         assert(c);
 
+#ifdef HAVE_SECCOMP
         SET_FOREACH(id, c->syscall_filter, i) {
                 char *name;
 
@@ -371,6 +374,7 @@ static int property_get_syscall_filter(
                         return -ENOMEM;
                 }
         }
+#endif
 
         strv_sort(l);
 
diff --git a/src/core/execute.c b/src/core/execute.c
index 1184777..4033470 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2115,9 +2115,11 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
                         prefix, c->selinux_context);
 
         if (c->syscall_filter) {
+#ifdef HAVE_SECCOMP
                 Iterator j;
                 void *id;
                 bool first = true;
+#endif
 
                 fprintf(f,
                         "%sSystemCallFilter: \n",
@@ -2126,6 +2128,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
                 if (!c->syscall_whitelist)
                         fputc('~', f);
 
+#ifdef HAVE_SECCOMP
                 SET_FOREACH(id, c->syscall_filter, j) {
                         _cleanup_free_ char *name = NULL;
 
@@ -2137,6 +2140,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
                         name = seccomp_syscall_resolve_num_arch(PTR_TO_INT(id)-1, SCMP_ARCH_NATIVE);
                         fputs(strna(name), f);
                 }
+#endif
 
                 fputc('\n', f);
         }



More information about the systemd-commits mailing list