diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-21 09:31:22 +0900 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-21 09:36:49 +0900 |
commit | f7dc3ab9f43b67abcbd34062b9352ab42debec49 (patch) | |
tree | 0a797055292a0741ef3f1cf473e3933926b42a74 /src/shared/clean-ipc.c | |
parent | f5c0c00f400e6f1fa58c5faf8bc93ca9057d4463 (diff) |
logind: don't apply RemoveIPC= to system users
We shouldn't destroy IPC objects of system users on logout.
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018373.html
This introduces SYSTEM_UID_MAX defined to the maximum UID of system
users. This value is determined compile-time, either as configure switch
or from /etc/login.defs. (We don't read that file at runtime, since this
is really a choice for a system builder, not the end user.)
While we are at it we then also update journald to use SYSTEM_UID_MAX
when we decide whether to split out log data for a specific client.
Diffstat (limited to 'src/shared/clean-ipc.c')
-rw-r--r-- | src/shared/clean-ipc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c index ddd42cc2b2..cb1722614e 100644 --- a/src/shared/clean-ipc.c +++ b/src/shared/clean-ipc.c @@ -332,8 +332,8 @@ fail: int clean_ipc(uid_t uid) { int ret = 0, r; - /* Refuse to clean IPC of the root user */ - if (uid == 0) + /* Refuse to clean IPC of the root and system users */ + if (uid <= SYSTEM_UID_MAX) return 0; r = clean_sysvipc_shm(uid); |