.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=477
This commit is contained in:
parent
486d838917
commit
5971d6e815
28
0001-logind-garbage-collect-stale-users.patch
Normal file
28
0001-logind-garbage-collect-stale-users.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 63966da86d8e71b1f3f2b57d5448770d526421f9 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bächler <thomas@archlinux.org>
|
||||
Date: Sun, 15 Dec 2013 11:06:37 +0000
|
||||
Subject: login: Don't stop a running user manager from garbage-collecting the user.
|
||||
|
||||
With the current logic, a user will never be garbage-collected, since its
|
||||
manager will always be around. Change the logic such that a user is
|
||||
garbage-collected when it has no sessions and linger is disabled.
|
||||
---
|
||||
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
|
||||
index 6ba8d98..441e086 100644
|
||||
--- a/src/login/logind-user.c
|
||||
+++ b/src/login/logind-user.c
|
||||
@@ -629,12 +629,6 @@ int user_check_gc(User *u, bool drop_not
|
||||
if (u->slice_job || u->service_job)
|
||||
return 1;
|
||||
|
||||
- if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0)
|
||||
- return 1;
|
||||
-
|
||||
- if (u->service && manager_unit_is_active(u->manager, u->service) != 0)
|
||||
- return 1;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
@ -1,5 +1,5 @@
|
||||
--- systemd-208/src/journal/journald-server.c
|
||||
+++ systemd-208/src/journal/journald-server.c 2013-12-06 12:37:27.482735840 +0000
|
||||
+++ systemd-208/src/journal/journald-server.c 2013-12-10 16:31:50.770235717 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <sys/signalfd.h>
|
||||
@ -17,11 +17,12 @@
|
||||
char *fn;
|
||||
sd_id128_t machine;
|
||||
char ids[33];
|
||||
@@ -905,7 +906,28 @@ static int system_journal_open(Server *s
|
||||
@@ -905,7 +906,31 @@ static int system_journal_open(Server *s
|
||||
(void) mkdir("/var/log/journal/", 0755);
|
||||
|
||||
fn = strappenda("/var/log/journal/", ids);
|
||||
- (void) mkdir(fn, 0755);
|
||||
+ (void)mkdir(fn, 0755);
|
||||
+
|
||||
+ /*
|
||||
+ * On journaling and/or compressing file systems avoid doubling the
|
||||
@ -29,18 +30,20 @@
|
||||
+ * Check for every single flag as otherwise some of the file systems
|
||||
+ * may return EOPNOTSUPP on one unkown flag (like BtrFS does).
|
||||
+ */
|
||||
+ if (mkdir(fn, 0755) == 0 && (fd = open(fn, O_DIRECTORY)) >= 0) {
|
||||
+ if ((fd = open(fn, O_DIRECTORY)) >= 0) {
|
||||
+ long flags;
|
||||
+ if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == 0) {
|
||||
+ if (ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOATIME_FL) == 0)
|
||||
+ int old = flags;
|
||||
+ if (!(flags&FS_NOATIME_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOATIME_FL) == 0)
|
||||
+ flags |= FS_NOATIME_FL;
|
||||
+ if (ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOCOW_FL) == 0)
|
||||
+ if (!(flags&FS_NOCOW_FL) && ioctl(fd, FS_IOC_SETFLAGS, flags|FS_NOCOW_FL) == 0)
|
||||
+ flags |= FS_NOCOW_FL;
|
||||
+ if (s->compress) {
|
||||
+ if (!(flags&FS_NOCOMP_FL) && s->compress) {
|
||||
+ flags &= ~FS_COMPR_FL;
|
||||
+ flags |= FS_NOCOMP_FL;
|
||||
+ }
|
||||
+ ioctl(fd, FS_IOC_SETFLAGS, flags);
|
||||
+ if (old != flags)
|
||||
+ ioctl(fd, FS_IOC_SETFLAGS, flags);
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
|
@ -244,6 +244,8 @@ Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch
|
||||
Patch79: 0001-analyze-set-white-background.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-analyze-set-text-on-side-with-most-space.patch werner@suse.com -- Place the text on the side with most space
|
||||
Patch80: 0001-analyze-set-text-on-side-with-most-space.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user.
|
||||
Patch81: 0001-logind-garbage-collect-stale-users.patch
|
||||
|
||||
# udev patches
|
||||
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
@ -272,6 +274,8 @@ Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_use
|
||||
Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
|
||||
# PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch
|
||||
Patch1014: 1014-journald-with-journaling-FS.patch
|
||||
# PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch
|
||||
Patch1015: build-sys-make-multi-seat-x-optional.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -534,6 +538,7 @@ cp %{SOURCE7} m4/
|
||||
%patch78 -p1
|
||||
%patch79 -p1
|
||||
%patch80 -p1
|
||||
%patch81 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -552,6 +557,7 @@ cp %{SOURCE7} m4/
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 18 18:56:01 UTC 2013 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Added 0001-logind-garbage-collect-stale-users.patch: Don't stop a
|
||||
running user manager from garbage-collecting the user. Original
|
||||
behavior caused bnc#849870
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 16 11:08:33 UTC 2013 - lbsousajr@gmail.com
|
||||
|
||||
|
@ -239,6 +239,8 @@ Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch
|
||||
Patch79: 0001-analyze-set-white-background.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-analyze-set-text-on-side-with-most-space.patch werner@suse.com -- Place the text on the side with most space
|
||||
Patch80: 0001-analyze-set-text-on-side-with-most-space.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user.
|
||||
Patch81: 0001-logind-garbage-collect-stale-users.patch
|
||||
|
||||
# udev patches
|
||||
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
@ -531,6 +533,7 @@ cp %{SOURCE7} m4/
|
||||
%patch78 -p1
|
||||
%patch79 -p1
|
||||
%patch80 -p1
|
||||
%patch81 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user