summaryrefslogtreecommitdiff
path: root/core/systemd
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-06-20 16:36:47 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-06-20 16:36:47 -0300
commit572f3b3bd973bfa7e64c4c42fe87c8e3a79b7c20 (patch)
tree89f43dd22eaacadfa97977de1f3b73285da15735 /core/systemd
parentcebf33d7109e0157a80f34d6136e212f0a28d274 (diff)
parent5898d76e47144f2366f9acda9ab52827b696c2d5 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/bitcoin/PKGBUILD community/ecryptfs-utils/PKGBUILD community/erlang/PKGBUILD community/esmtp/PKGBUILD community/gmic/PKGBUILD community/ibus-sunpinyin/PKGBUILD community/libev/PKGBUILD community/libmirage/PKGBUILD community/libraw/PKGBUILD community/lilypond/PKGBUILD community/luajit/PKGBUILD community/matchbox-window-manager/PKGBUILD community/miniupnpc/PKGBUILD community/mplayer2/PKGBUILD community/mumble/PKGBUILD community/oss/PKGBUILD community/pidgin-lwqq/PKGBUILD community/postgis/PKGBUILD community/python2-pytables/PKGBUILD community/qmc2/PKGBUILD community/qtfm/PKGBUILD community/ruby-gtk3/PKGBUILD community/tea/PKGBUILD community/yacpi/PKGBUILD core/bridge-utils/PKGBUILD core/gcc/PKGBUILD core/libsasl/PKGBUILD core/lvm2/PKGBUILD core/net-tools/PKGBUILD core/ppp/PKGBUILD core/pptpclient/PKGBUILD core/sdparm/PKGBUILD core/systemd/PKGBUILD core/sysvinit-tools/PKGBUILD extra/aisleriot/PKGBUILD extra/arora/PKGBUILD extra/bluez-hcidump/PKGBUILD extra/bluez/PKGBUILD extra/cups/PKGBUILD extra/cyrus-sasl/PKGBUILD extra/dhcp/PKGBUILD extra/gnome-bluetooth/PKGBUILD extra/gnome-desktop/PKGBUILD extra/gnutls/PKGBUILD extra/gts/PKGBUILD extra/guile/PKGBUILD extra/harfbuzz/PKGBUILD extra/iptraf-ng/PKGBUILD extra/json-c/PKGBUILD extra/kdenetwork/PKGBUILD extra/kdepim/PKGBUILD extra/kdesdk-kate/PKGBUILD extra/libatasmart/PKGBUILD extra/libbsd/PKGBUILD extra/libdmtx/PKGBUILD extra/libhangul/PKGBUILD extra/libindi/PKGBUILD extra/libpeas/PKGBUILD extra/libsmbios/PKGBUILD extra/libspiro/PKGBUILD extra/libsrtp/PKGBUILD extra/libxml2/PKGBUILD extra/libxrender/PKGBUILD extra/libxvmc/PKGBUILD extra/llvm/PKGBUILD extra/maxima/PKGBUILD extra/msmtp/PKGBUILD extra/ortp/PKGBUILD extra/perl-dbd-sqlite/PKGBUILD extra/perl-yaml-syck/PKGBUILD extra/php/PKGBUILD extra/pm-utils/PKGBUILD extra/pulseaudio/PKGBUILD extra/pyqt4/PKGBUILD extra/scim-anthy/PKGBUILD extra/scim-chewing/PKGBUILD extra/scim-m17n/PKGBUILD extra/scim/PKGBUILD extra/ssmtp/PKGBUILD extra/texmacs/PKGBUILD extra/v86d/PKGBUILD extra/vlc/PKGBUILD extra/webkitgtk/PKGBUILD extra/webkitgtk2/PKGBUILD extra/wireshark/PKGBUILD extra/zsh/PKGBUILD libre/bogofilter-libre/PKGBUILD libre/ecasound-libre/PKGBUILD libre/libretools/libretools.install libre/mc-libre/PKGBUILD
Diffstat (limited to 'core/systemd')
-rw-r--r--core/systemd/0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch87
-rw-r--r--core/systemd/PKGBUILD26
-rw-r--r--core/systemd/use-split-usr-path.patch14
3 files changed, 98 insertions, 29 deletions
diff --git a/core/systemd/0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch b/core/systemd/0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch
new file mode 100644
index 000000000..372ecebff
--- /dev/null
+++ b/core/systemd/0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch
@@ -0,0 +1,87 @@
+From 23ad4dd8844c582929115a11ed2830a1371568d6 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Tue, 28 May 2013 20:45:34 +0200
+Subject: [PATCH] journald: DO recalculate the ACL mask, but only if it doesn't
+ exist
+
+Since 11ec7ce, journald isn't setting the ACLs properly anymore if
+the files had no ACLs to begin with: acl_set_fd fails with EINVAL.
+
+An ACL with ACL_USER or ACL_GROUP entries but no ACL_MASK entry is
+invalid, so make sure a mask exists before trying to set the ACL.
+---
+ src/journal/journald-server.c | 6 ++++--
+ src/shared/acl-util.c | 28 ++++++++++++++++++++++++++++
+ src/shared/acl-util.h | 1 +
+ 3 files changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
+index b717b92..da5b725 100644
+--- a/src/journal/journald-server.c
++++ b/src/journal/journald-server.c
+@@ -227,9 +227,11 @@ void server_fix_perms(Server *s, JournalFile *f, uid_t uid) {
+ }
+ }
+
+- /* We do not recalculate the mask here, so that the fchmod() mask above stays intact. */
++ /* We do not recalculate the mask unconditionally here,
++ * so that the fchmod() mask above stays intact. */
+ if (acl_get_permset(entry, &permset) < 0 ||
+- acl_add_perm(permset, ACL_READ) < 0) {
++ acl_add_perm(permset, ACL_READ) < 0 ||
++ calc_acl_mask_if_needed(&acl) < 0) {
+ log_warning("Failed to patch ACL on %s, ignoring: %m", f->path);
+ goto finish;
+ }
+diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
+index 48bb12f..fb04e49 100644
+--- a/src/shared/acl-util.c
++++ b/src/shared/acl-util.c
+@@ -69,6 +69,34 @@ int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry) {
+ return 0;
+ }
+
++int calc_acl_mask_if_needed(acl_t *acl_p) {
++ acl_entry_t i;
++ int found;
++
++ assert(acl_p);
++
++ for (found = acl_get_entry(*acl_p, ACL_FIRST_ENTRY, &i);
++ found > 0;
++ found = acl_get_entry(*acl_p, ACL_NEXT_ENTRY, &i)) {
++
++ acl_tag_t tag;
++
++ if (acl_get_tag_type(i, &tag) < 0)
++ return -errno;
++
++ if (tag == ACL_MASK)
++ return 0;
++ }
++
++ if (found < 0)
++ return -errno;
++
++ if (acl_calc_mask(acl_p) < 0)
++ return -errno;
++
++ return 0;
++}
++
+ int search_acl_groups(char*** dst, const char* path, bool* belong) {
+ acl_t acl;
+
+diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h
+index 23090d9..36ef490 100644
+--- a/src/shared/acl-util.h
++++ b/src/shared/acl-util.h
+@@ -24,4 +24,5 @@
+ #include <stdbool.h>
+
+ int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry);
++int calc_acl_mask_if_needed(acl_t *acl_p);
+ int search_acl_groups(char*** dst, const char* path, bool* belong);
+--
+1.8.3
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index d26c533fb..ad695a979 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'systemd-sysvcompat')
pkgver=204
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64' 'mips64el')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
@@ -14,24 +14,24 @@ makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gobject-introspection
options=('!libtool' '!distcc')
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch
+ 0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch
'initcpio-hook-udev'
'initcpio-install-udev'
- 'initcpio-install-timestamp'
- 'use-split-usr-path.patch')
+ 'initcpio-install-timestamp')
md5sums=('a07619bb19f48164fbf0761d12fd39a8'
'7f39f9fde1ff7b48293ed1e3d0a6c213'
+ '66e3162856ded8eb7dc7383405c6e0d6'
'e99e9189aa2f6084ac28b8ddf605aeb8'
'fb37e34ea006c79be1c54cbb0f803414'
- 'df69615503ad293c9ddf9d8b7755282d'
- '76bf83fe34c5b40533abc5dc940576a6')
+ 'df69615503ad293c9ddf9d8b7755282d')
prepare() {
cd "$pkgname-$pkgver"
- # hang onto this until we do the /{,s}bin merge
- patch -Np1 <"$srcdir/use-split-usr-path.patch"
-
patch -Np1 <"$srcdir/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch"
+
+ patch -Np1 <"$srcdir/0001-journald-DO-recalculate-the-ACL-mask-but-only-if-it-.patch"
+
autoreconf
}
@@ -103,10 +103,6 @@ package_systemd() {
# get rid of RPM macros
rm -r "$pkgdir/etc/rpm"
- # the path to udevadm is hardcoded in some places
- install -d "$pkgdir/sbin"
- ln -s ../usr/bin/udevadm "$pkgdir/sbin/udevadm"
-
# add back tmpfiles.d/legacy.conf
install -m644 "systemd-$pkgver/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
@@ -135,12 +131,12 @@ package_systemd-sysvcompat() {
mv "$srcdir/_sysvcompat"/* "$pkgdir"
- install -dm755 "$pkgdir/sbin"
+ install -dm755 "$pkgdir/usr/bin"
for tool in runlevel reboot shutdown poweroff halt telinit; do
- ln -s '/usr/bin/systemctl' "$pkgdir/sbin/$tool"
+ ln -s 'systemctl' "$pkgdir/usr/bin/$tool"
done
- ln -s '../usr/lib/systemd/systemd' "$pkgdir/sbin/init"
+ ln -s '../lib/systemd/systemd' "$pkgdir/usr/bin/init"
}
# vim: ft=sh syn=sh et
diff --git a/core/systemd/use-split-usr-path.patch b/core/systemd/use-split-usr-path.patch
deleted file mode 100644
index 40dd62f90..000000000
--- a/core/systemd/use-split-usr-path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/src/core/main.c 2012-09-20 23:02:54.000000000 -0400
-+++ b/src/core/main.c 2012-09-20 23:03:13.000000000 -0400
-@@ -1487,11 +1487,7 @@ int main(int argc, char *argv[]) {
-
- /* Set up PATH unless it is already set */
- setenv("PATH",
--#ifdef HAVE_SPLIT_USR
- "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
--#else
-- "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin",
--#endif
- arg_running_as == SYSTEMD_SYSTEM);
-
- if (arg_running_as == SYSTEMD_SYSTEM) {