Let's move this helper call from journald specific code to src/basic/,
so that we can use it from sd-journal.
While we are at it, slightly extend it to also cover container uids,
which are also routed to the system journal now.
This places the call in uid-alloc-range.[ch] which contains similar
functions that match UID ranges for specific purposes.
return gid <= defs->system_gid_max;
}
+
+bool uid_for_system_journal(uid_t uid) {
+
+ /* Returns true if the specified UID shall get its data stored in the system journal. */
+
+ return uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY || uid_is_container(uid);
+}
int read_login_defs(UGIDAllocationRange *ret_defs, const char *path, const char *root);
const UGIDAllocationRange *acquire_ugid_allocation_range(void);
+
+bool uid_for_system_journal(uid_t uid);
NULL);
}
-static bool uid_for_system_journal(uid_t uid) {
-
- /* Returns true if the specified UID shall get its data stored in the system journal. */
-
- return uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY;
-}
-
static void server_add_acls(ManagedJournalFile *f, uid_t uid) {
assert(f);