]> err.no Git - systemd/commitdiff
util: move ACL code into internal library
authorKay Sievers <kay@vrfy.org>
Tue, 10 Apr 2012 12:53:38 +0000 (14:53 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 10 Apr 2012 12:59:45 +0000 (14:59 +0200)
Makefile.am
src/journal/journald.c
src/login/logind-acl.c
src/shared/acl.c [moved from src/acl-util.c with 98% similarity]
src/shared/acl.h [moved from src/acl-util.h with 100% similarity]

index 357002b95ad70b9fd9dbe027492078fdf7e75791..789e4420f3023be30903d1ca051bb47ad65c875e 100644 (file)
@@ -477,6 +477,7 @@ noinst_LTLIBRARIES = \
        libsystemd-basic.la \
        libsystemd-capability.la \
        libsystemd-audit.la \
+       libsystemd-acl.la \
        libsystemd-core.la
 
 # ------------------------------------------------------------------------------
@@ -534,6 +535,18 @@ libsystemd_audit_la_SOURCES = \
 libsystemd_audit_la_LIBADD = \
        libsystemd-capability.la
 
+# ------------------------------------------------------------------------------
+libsystemd_acl_la_SOURCES = \
+       src/shared/acl.c \
+       src/shared/acl.h
+
+libsystemd_acl_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(ACL_CFLAGS)
+
+libsystemd_acl_la_LIBADD = \
+       $(ACL_LIBS)
+
 # ------------------------------------------------------------------------------
 libsystemd_core_la_SOURCES = \
        src/unit.c \
@@ -666,7 +679,6 @@ libsystemd_core_la_SOURCES = \
        src/polkit.h \
        src/dbus-loop.h \
        src/spawn-agent.h \
-       src/acl-util.h \
        src/logs-show.h
 
 nodist_libsystemd_core_la_SOURCES = \
@@ -1345,15 +1357,11 @@ udev_common_CPPFLAGS = \
 if HAVE_ACL
 udev_common_sources += \
        src/udev/udev-builtin-uaccess.c \
-       src/login/logind-acl.c \
-       src/acl-util.c
-
-udev_common_CFLAGS += \
-       $(ACL_CFLAGS)
+       src/login/logind-acl.c
 
 udev_common_LDADD += \
        libsystemd-login.la \
-       $(ACL_LIBS)
+       libsystemd-acl.la
 endif
 
 udevd_SOURCES = \
@@ -1883,30 +1891,29 @@ systemd_journald_SOURCES = \
        src/sd-id128.c \
        src/cgroup-util.c
 
-if HAVE_ACL
-systemd_journald_SOURCES += \
-       src/acl-util.c
-endif
-
 nodist_systemd_journald_SOURCES = \
        src/journal/journald-gperf.c
 
-systemd_journald_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(ACL_CFLAGS)
+systemd_journald_CFLAGS =
 
 systemd_journald_LDADD = \
        libsystemd-basic.la \
        libsystemd-audit.la \
        libsystemd-daemon.la \
-       libsystemd-login.la \
-       $(ACL_LIBS)
+       libsystemd-login.la
+
+if HAVE_ACL
+systemd_journald_LDADD += \
+       libsystemd-acl.la
+endif
 
 if HAVE_XZ
 systemd_journald_SOURCES += \
        src/journal/compress.c
+
 systemd_journald_CFLAGS += \
        $(XZ_CFLAGS)
+
 systemd_journald_LDADD += \
        $(XZ_LIBS)
 endif
@@ -2493,24 +2500,24 @@ systemd_logind_SOURCES = \
 nodist_systemd_logind_SOURCES = \
        src/login/logind-gperf.c
 
-if HAVE_ACL
-systemd_logind_SOURCES += \
-       src/login/logind-acl.c \
-       src/acl-util.c
-endif
-
 systemd_logind_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
-       $(ACL_CFLAGS)
+       $(DBUS_CFLAGS)
 
 systemd_logind_LDADD = \
        libsystemd-basic.la \
        libsystemd-audit.la \
        libsystemd-daemon.la \
        libudev.la \
-       $(DBUS_LIBS) \
-       $(ACL_LIBS)
+       $(DBUS_LIBS)
+
+if HAVE_ACL
+systemd_logind_SOURCES += \
+       src/login/logind-acl.c
+
+systemd_logind_LDADD += \
+       libsystemd-acl.la
+endif
 
 systemd_user_sessions_SOURCES = \
        src/login/user-sessions.c \
index 555d74f04985c911fe0c77262561118d26642a9a..442d2eb5ae58c890edd62a66322d8ca80b283197 100644 (file)
@@ -50,7 +50,7 @@
 #ifdef HAVE_ACL
 #include <sys/acl.h>
 #include <acl/libacl.h>
-#include "acl-util.h"
+#include "acl.h"
 #endif
 
 #ifdef HAVE_SELINUX
index eb8a48d191f03189df4ed1a243dc3d0352811780..e2e8696cdab1ed2af7ab31cfa620cec326ae47ec 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "logind-acl.h"
 #include "util.h"
-#include "acl-util.h"
+#include "acl.h"
 
 static int flush_acl(acl_t acl) {
         acl_entry_t i;
similarity index 98%
rename from src/acl-util.c
rename to src/shared/acl.c
index a2a9f9a22bb851cb2ebce5047eee69e53fa45925..d6a80f44aec74542519b59759ddc5d738b2366a2 100644 (file)
@@ -25,7 +25,7 @@
 #include <errno.h>
 #include <stdbool.h>
 
-#include "acl-util.h"
+#include "acl.h"
 
 int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry) {
         acl_entry_t i;
similarity index 100%
rename from src/acl-util.h
rename to src/shared/acl.h