summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/systemd.pc.in2
-rw-r--r--src/journal/journald-server.c2
-rw-r--r--src/shared/clean-ipc.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index de0f6494e9..f8bccb5d6a 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -19,6 +19,8 @@ systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/run/systemd/user:/u
systemdsystemgeneratordir=@systemgeneratordir@
systemdusergeneratordir=@usergeneratordir@
catalogdir=@catalogdir@
+systemuidmax=@systemuidmax@
+systemgidmax=@systemgidmax@
Name: systemd
Description: systemd System and Service Manager
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 0439caf909..381d80a938 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -258,7 +258,7 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
if (s->runtime_journal)
return s->runtime_journal;
- if (uid <= 0)
+ if (uid <= SYSTEM_UID_MAX)
return s->system_journal;
r = sd_id128_get_machine(&machine);
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);