1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
6 #include "alloc-util.h"
7 #include "bus-common-errors.h"
9 #include "bus-locator.h"
11 #include "cgroup-util.h"
12 #include "clean-ipc.h"
17 #include "format-util.h"
20 #include "label-util.h"
21 #include "limits-util.h"
22 #include "logind-dbus.h"
23 #include "logind-user-dbus.h"
24 #include "logind-user.h"
25 #include "mkdir-label.h"
26 #include "parse-util.h"
27 #include "path-util.h"
28 #include "percent-util.h"
30 #include "serialize.h"
32 #include "stdio-util.h"
33 #include "string-table.h"
35 #include "tmpfile-util.h"
36 #include "uid-classification.h"
37 #include "unit-name.h"
38 #include "user-util.h"
40 int user_new(User
**ret
,
44 _cleanup_(user_freep
) User
*u
= NULL
;
45 char lu
[DECIMAL_STR_MAX(uid_t
) + 1];
55 if (!uid_is_valid(ur
->uid
))
64 .user_record
= user_record_ref(ur
),
65 .last_session_timestamp
= USEC_INFINITY
,
66 .gc_mode
= USER_GC_BY_ANY
,
69 if (asprintf(&u
->state_file
, "/run/systemd/users/" UID_FMT
, ur
->uid
) < 0)
72 if (asprintf(&u
->runtime_path
, "/run/user/" UID_FMT
, ur
->uid
) < 0)
75 xsprintf(lu
, UID_FMT
, ur
->uid
);
76 r
= slice_build_subslice(SPECIAL_USER_SLICE
, lu
, &u
->slice
);
80 r
= unit_name_build("user", lu
, ".service", &u
->service
);
84 r
= unit_name_build("user-runtime-dir", lu
, ".service", &u
->runtime_dir_service
);
88 r
= hashmap_put(m
->users
, UID_TO_PTR(ur
->uid
), u
);
92 r
= hashmap_put(m
->user_units
, u
->slice
, u
);
96 r
= hashmap_put(m
->user_units
, u
->service
, u
);
100 r
= hashmap_put(m
->user_units
, u
->runtime_dir_service
, u
);
108 User
*user_free(User
*u
) {
113 LIST_REMOVE(gc_queue
, u
->manager
->user_gc_queue
, u
);
116 session_free(u
->sessions
);
119 (void) hashmap_remove_value(u
->manager
->user_units
, u
->service
, u
);
121 if (u
->runtime_dir_service
)
122 (void) hashmap_remove_value(u
->manager
->user_units
, u
->runtime_dir_service
, u
);
125 (void) hashmap_remove_value(u
->manager
->user_units
, u
->slice
, u
);
127 (void) hashmap_remove_value(u
->manager
->users
, UID_TO_PTR(u
->user_record
->uid
), u
);
129 sd_event_source_unref(u
->timer_event_source
);
131 free(u
->service_job
);
134 free(u
->runtime_dir_service
);
136 free(u
->runtime_path
);
139 user_record_unref(u
->user_record
);
144 static int user_save_internal(User
*u
) {
145 _cleanup_(unlink_and_freep
) char *temp_path
= NULL
;
146 _cleanup_fclose_
FILE *f
= NULL
;
150 assert(u
->state_file
);
152 r
= mkdir_safe_label("/run/systemd/users", 0755, 0, 0, MKDIR_WARN_MODE
);
156 r
= fopen_temporary(u
->state_file
, &f
, &temp_path
);
160 (void) fchmod(fileno(f
), 0644);
163 "# This is private data. Do not parse.\n"
165 "STATE=%s\n" /* friendly user-facing state */
166 "STOPPING=%s\n" /* low-level state */
168 u
->user_record
->user_name
,
169 user_state_to_string(user_get_state(u
)),
171 user_gc_mode_to_string(u
->gc_mode
));
173 /* LEGACY: no-one reads RUNTIME= anymore, drop it at some point */
175 fprintf(f
, "RUNTIME=%s\n", u
->runtime_path
);
178 fprintf(f
, "SERVICE_JOB=%s\n", u
->service_job
);
181 fprintf(f
, "DISPLAY=%s\n", u
->display
->id
);
183 if (dual_timestamp_is_set(&u
->timestamp
))
185 "REALTIME="USEC_FMT
"\n"
186 "MONOTONIC="USEC_FMT
"\n",
187 u
->timestamp
.realtime
,
188 u
->timestamp
.monotonic
);
190 if (u
->last_session_timestamp
!= USEC_INFINITY
)
191 fprintf(f
, "LAST_SESSION_TIMESTAMP=" USEC_FMT
"\n",
192 u
->last_session_timestamp
);
197 fputs("SESSIONS=", f
);
199 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
208 fputs("\nSEATS=", f
);
210 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
219 fputs(i
->seat
->id
, f
);
222 fputs("\nACTIVE_SESSIONS=", f
);
224 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
225 if (!session_is_active(i
))
236 fputs("\nONLINE_SESSIONS=", f
);
238 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
239 if (session_get_state(i
) == SESSION_CLOSING
)
250 fputs("\nACTIVE_SEATS=", f
);
252 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
253 if (!session_is_active(i
) || !i
->seat
)
261 fputs(i
->seat
->id
, f
);
264 fputs("\nONLINE_SEATS=", f
);
266 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
267 if (session_get_state(i
) == SESSION_CLOSING
|| !i
->seat
)
275 fputs(i
->seat
->id
, f
);
280 r
= fflush_and_check(f
);
284 if (rename(temp_path
, u
->state_file
) < 0) {
289 temp_path
= mfree(temp_path
);
293 (void) unlink(u
->state_file
);
295 return log_error_errno(r
, "Failed to save user data %s: %m", u
->state_file
);
298 int user_save(User
*u
) {
304 return user_save_internal(u
);
307 int user_load(User
*u
) {
308 _cleanup_free_
char *realtime
= NULL
, *monotonic
= NULL
, *stopping
= NULL
, *last_session_timestamp
= NULL
, *gc_mode
= NULL
;
313 r
= parse_env_file(NULL
, u
->state_file
,
314 "SERVICE_JOB", &u
->service_job
,
315 "STOPPING", &stopping
,
316 "REALTIME", &realtime
,
317 "MONOTONIC", &monotonic
,
318 "LAST_SESSION_TIMESTAMP", &last_session_timestamp
,
319 "GC_MODE", &gc_mode
);
323 return log_error_errno(r
, "Failed to read %s: %m", u
->state_file
);
326 r
= parse_boolean(stopping
);
328 log_debug_errno(r
, "Failed to parse 'STOPPING' boolean: %s", stopping
);
334 (void) deserialize_usec(realtime
, &u
->timestamp
.realtime
);
336 (void) deserialize_usec(monotonic
, &u
->timestamp
.monotonic
);
337 if (last_session_timestamp
)
338 (void) deserialize_usec(last_session_timestamp
, &u
->last_session_timestamp
);
340 u
->gc_mode
= user_gc_mode_from_string(gc_mode
);
342 u
->gc_mode
= USER_GC_BY_PIN
;
347 static bool user_wants_service_manager(User
*u
) {
350 LIST_FOREACH(sessions_by_user
, s
, u
->sessions
)
351 if (SESSION_CLASS_WANTS_SERVICE_MANAGER(s
->class))
357 void user_start_service_manager(User
*u
) {
358 _cleanup_(sd_bus_error_free
) sd_bus_error error
= SD_BUS_ERROR_NULL
;
363 /* Start the service containing the "systemd --user" instance (user@.service). Note that we don't explicitly
364 * start the per-user slice or the systemd-runtime-dir@.service instance, as those are pulled in both by
365 * user@.service and the session scopes as dependencies. */
367 if (u
->stopping
) /* Don't try to start this if the user is going down */
370 if (!user_wants_service_manager(u
)) /* Only start user service manager if there's at least one session which wants it */
373 u
->service_job
= mfree(u
->service_job
);
375 r
= manager_start_unit(u
->manager
, u
->service
, &error
, &u
->service_job
);
377 log_full_errno(sd_bus_error_has_name(&error
, BUS_ERROR_UNIT_MASKED
) ? LOG_DEBUG
: LOG_WARNING
, r
,
378 "Failed to start user service '%s', ignoring: %s", u
->service
, bus_error_message(&error
, r
));
381 static int update_slice_callback(sd_bus_message
*m
, void *userdata
, sd_bus_error
*ret_error
) {
382 _cleanup_(user_record_unrefp
) UserRecord
*ur
= ASSERT_PTR(userdata
);
383 const sd_bus_error
*e
;
388 e
= sd_bus_message_get_error(m
);
390 r
= sd_bus_error_get_errno(e
);
392 "Failed to update slice of %s, ignoring: %s",
394 bus_error_message(e
, r
));
399 log_debug("Successfully set slice parameters of %s.", ur
->user_name
);
403 static int user_update_slice(User
*u
) {
404 _cleanup_(sd_bus_message_unrefp
) sd_bus_message
*m
= NULL
;
409 if (u
->user_record
->tasks_max
== UINT64_MAX
&&
410 u
->user_record
->memory_high
== UINT64_MAX
&&
411 u
->user_record
->memory_max
== UINT64_MAX
&&
412 u
->user_record
->cpu_weight
== UINT64_MAX
&&
413 u
->user_record
->io_weight
== UINT64_MAX
)
416 r
= bus_message_new_method_call(u
->manager
->bus
, &m
, bus_systemd_mgr
, "SetUnitProperties");
418 return bus_log_create_error(r
);
420 r
= sd_bus_message_append(m
, "sb", u
->slice
, true);
422 return bus_log_create_error(r
);
424 r
= sd_bus_message_open_container(m
, 'a', "(sv)");
426 return bus_log_create_error(r
);
432 { "TasksMax", u
->user_record
->tasks_max
},
433 { "MemoryMax", u
->user_record
->memory_max
},
434 { "MemoryHigh", u
->user_record
->memory_high
},
435 { "CPUWeight", u
->user_record
->cpu_weight
},
436 { "IOWeight", u
->user_record
->io_weight
},
439 FOREACH_ARRAY(st
, settings
, ELEMENTSOF(settings
)) {
440 if (st
->value
== UINT64_MAX
)
443 r
= sd_bus_message_append(m
, "(sv)", st
->name
, "t", st
->value
);
445 return bus_log_create_error(r
);
448 r
= sd_bus_message_close_container(m
);
450 return bus_log_create_error(r
);
452 r
= sd_bus_call_async(u
->manager
->bus
, NULL
, m
, update_slice_callback
, u
->user_record
, 0);
454 return log_error_errno(r
, "Failed to change user slice properties: %m");
456 /* Ref the user record pointer, so that the slot keeps it pinned */
457 user_record_ref(u
->user_record
);
462 int user_start(User
*u
) {
465 if (u
->started
&& !u
->stopping
)
468 /* If u->stopping is set, the user is marked for removal and service stop-jobs are queued. We have to clear
469 * that flag before queueing the start-jobs again. If they succeed, the user object can be re-used just fine
470 * (pid1 takes care of job-ordering and proper restart), but if they fail, we want to force another user_stop()
471 * so possibly pending units are stopped. */
475 log_debug("Tracking new user %s.", u
->user_record
->user_name
);
477 /* Save the user data so far, because pam_systemd will read the XDG_RUNTIME_DIR out of it while starting up
478 * systemd --user. We need to do user_save_internal() because we have not "officially" started yet. */
479 user_save_internal(u
);
481 /* Set slice parameters */
482 (void) user_update_slice(u
);
484 /* Start user@UID.service */
485 user_start_service_manager(u
);
488 if (!dual_timestamp_is_set(&u
->timestamp
))
489 dual_timestamp_now(&u
->timestamp
);
490 user_send_signal(u
, true);
494 /* Save new user data */
500 static void user_stop_service(User
*u
, bool force
) {
501 _cleanup_(sd_bus_error_free
) sd_bus_error error
= SD_BUS_ERROR_NULL
;
507 /* The reverse of user_start_service(). Note that we only stop user@UID.service here, and let StopWhenUnneeded=
508 * deal with the slice and the user-runtime-dir@.service instance. */
510 u
->service_job
= mfree(u
->service_job
);
512 r
= manager_stop_unit(u
->manager
, u
->service
, force
? "replace" : "fail", &error
, &u
->service_job
);
514 log_warning_errno(r
, "Failed to stop user service '%s', ignoring: %s", u
->service
, bus_error_message(&error
, r
));
517 int user_stop(User
*u
, bool force
) {
522 /* This is called whenever we begin with tearing down a user record. It's called in two cases: explicit API
523 * request to do so via the bus (in which case 'force' is true) and automatically due to GC, if there's no
524 * session left pinning it (in which case 'force' is false). Note that this just initiates tearing down of the
525 * user, the User object will remain in memory until user_finalize() is called, see below. */
530 if (u
->stopping
) { /* Stop jobs have already been queued */
535 LIST_FOREACH(sessions_by_user
, s
, u
->sessions
)
536 RET_GATHER(r
, session_stop(s
, force
));
538 user_stop_service(u
, force
);
547 int user_finalize(User
*u
) {
552 /* Called when the user is really ready to be freed, i.e. when all unit stop jobs and suchlike for it are
553 * done. This is called as a result of an earlier user_done() when all jobs are completed. */
556 log_debug("User %s exited.", u
->user_record
->user_name
);
558 LIST_FOREACH(sessions_by_user
, s
, u
->sessions
)
559 RET_GATHER(r
, session_finalize(s
));
561 /* Clean SysV + POSIX IPC objects, but only if this is not a system user. Background: in many setups cronjobs
562 * are run in full PAM and thus logind sessions, even if the code run doesn't belong to actual users but to
563 * system components. Since enable RemoveIPC= globally for all users, we need to be a bit careful with such
564 * cases, as we shouldn't accidentally remove a system service's IPC objects while it is running, just because
565 * a cronjob running as the same user just finished. Hence: exclude system users generally from IPC clean-up,
566 * and do it only for normal users. */
567 if (u
->manager
->remove_ipc
&& !uid_is_system(u
->user_record
->uid
))
568 RET_GATHER(r
, clean_ipc_by_uid(u
->user_record
->uid
));
570 (void) unlink(u
->state_file
);
571 user_add_to_gc_queue(u
);
574 user_send_signal(u
, false);
581 int user_get_idle_hint(User
*u
, dual_timestamp
*t
) {
582 bool idle_hint
= true;
583 dual_timestamp ts
= DUAL_TIMESTAMP_NULL
;
587 LIST_FOREACH(sessions_by_user
, s
, u
->sessions
) {
591 if (!SESSION_CLASS_CAN_IDLE(s
->class))
594 ih
= session_get_idle_hint(s
, &k
);
600 if (k
.monotonic
< ts
.monotonic
)
606 } else if (idle_hint
) {
608 if (k
.monotonic
> ts
.monotonic
)
619 int user_check_linger_file(User
*u
) {
620 _cleanup_free_
char *cc
= NULL
;
623 cc
= cescape(u
->user_record
->user_name
);
627 p
= strjoina("/var/lib/systemd/linger/", cc
);
628 if (access(p
, F_OK
) < 0) {
638 static bool user_unit_active(User
*u
) {
642 assert(u
->runtime_dir_service
);
645 FOREACH_STRING(i
, u
->service
, u
->runtime_dir_service
, u
->slice
) {
646 _cleanup_(sd_bus_error_free
) sd_bus_error error
= SD_BUS_ERROR_NULL
;
648 r
= manager_unit_is_active(u
->manager
, i
, &error
);
650 log_debug_errno(r
, "Failed to determine whether unit '%s' is active, ignoring: %s", i
, bus_error_message(&error
, r
));
658 static usec_t
user_get_stop_delay(User
*u
) {
661 if (u
->user_record
->stop_delay_usec
!= UINT64_MAX
)
662 return u
->user_record
->stop_delay_usec
;
664 if (user_record_removable(u
->user_record
) > 0)
665 return 0; /* For removable users lower the stop delay to zero */
667 return u
->manager
->user_stop_delay
;
670 static bool user_pinned_by_sessions(User
*u
) {
673 /* Returns true if at least one session exists that shall keep the user tracking alive. That
674 * generally means one session that isn't the service manager still exists. */
676 switch (u
->gc_mode
) {
682 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
)
683 if (SESSION_CLASS_PIN_USER(i
->class))
689 assert_not_reached();
693 bool user_may_gc(User
*u
, bool drop_not_started
) {
698 if (drop_not_started
&& !u
->started
)
701 if (user_pinned_by_sessions(u
))
704 if (u
->last_session_timestamp
!= USEC_INFINITY
) {
705 usec_t user_stop_delay
;
707 /* All sessions have been closed. Let's see if we shall leave the user record around for a bit */
709 user_stop_delay
= user_get_stop_delay(u
);
711 if (user_stop_delay
== USEC_INFINITY
)
712 return false; /* Leave it around forever! */
713 if (user_stop_delay
> 0 &&
714 now(CLOCK_MONOTONIC
) < usec_add(u
->last_session_timestamp
, user_stop_delay
))
715 return false; /* Leave it around for a bit longer. */
718 /* Is this a user that shall stay around forever ("linger")? Before we say "no" to GC'ing for lingering users, let's check
719 * if any of the three units that we maintain for this user is still around. If none of them is,
720 * there's no need to keep this user around even if lingering is enabled. */
721 if (user_check_linger_file(u
) > 0 && user_unit_active(u
))
724 /* Check if our job is still pending */
725 if (u
->service_job
) {
726 _cleanup_(sd_bus_error_free
) sd_bus_error error
= SD_BUS_ERROR_NULL
;
728 r
= manager_job_is_active(u
->manager
, u
->service_job
, &error
);
730 log_debug_errno(r
, "Failed to determine whether job '%s' is pending, ignoring: %s", u
->service_job
, bus_error_message(&error
, r
));
735 /* Note that we don't care if the three units we manage for each user object are up or not, as we are managing
736 * their state rather than tracking it. */
741 void user_add_to_gc_queue(User
*u
) {
747 LIST_PREPEND(gc_queue
, u
->manager
->user_gc_queue
, u
);
748 u
->in_gc_queue
= true;
751 UserState
user_get_state(User
*u
) {
757 if (!u
->started
|| u
->service_job
)
760 bool any
= false, all_closing
= true;
761 LIST_FOREACH(sessions_by_user
, i
, u
->sessions
) {
764 /* Ignore sessions that don't pin the user, i.e. are not supposed to have an effect on user state */
765 if (!SESSION_CLASS_PIN_USER(i
->class))
768 state
= session_get_state(i
);
769 if (state
== SESSION_ACTIVE
)
771 if (state
!= SESSION_CLOSING
)
778 return all_closing
? USER_CLOSING
: USER_ONLINE
;
780 if (user_check_linger_file(u
) > 0 && user_unit_active(u
))
781 return USER_LINGERING
;
786 int user_kill(User
*u
, int signo
) {
789 return manager_kill_unit(u
->manager
, u
->slice
, KILL_ALL
, signo
, NULL
);
792 static bool elect_display_filter(Session
*s
) {
793 /* Return true if the session is a candidate for the user’s ‘primary session’ or ‘display’. */
796 return SESSION_CLASS_CAN_DISPLAY(s
->class) && s
->started
&& !s
->stopping
;
799 static int elect_display_compare(Session
*s1
, Session
*s2
) {
800 /* Indexed by SessionType. Lower numbers mean more preferred. */
801 static const int type_ranks
[_SESSION_TYPE_MAX
] = {
802 [SESSION_UNSPECIFIED
] = 0,
805 [SESSION_WAYLAND
] = -3,
810 /* Calculate the partial order relationship between s1 and s2,
811 * returning < 0 if s1 is preferred as the user’s ‘primary session’,
812 * 0 if s1 and s2 are equally preferred or incomparable, or > 0 if s2
815 * s1 or s2 may be NULL. */
819 if ((s1
== NULL
) != (s2
== NULL
))
820 return (s1
== NULL
) - (s2
== NULL
);
822 if (s1
->stopping
!= s2
->stopping
)
823 return s1
->stopping
- s2
->stopping
;
825 if ((s1
->class != SESSION_USER
) != (s2
->class != SESSION_USER
))
826 return (s1
->class != SESSION_USER
) - (s2
->class != SESSION_USER
);
828 if ((s1
->class != SESSION_USER_EARLY
) != (s2
->class != SESSION_USER_EARLY
))
829 return (s1
->class != SESSION_USER_EARLY
) - (s2
->class != SESSION_USER_EARLY
);
831 if ((s1
->type
== _SESSION_TYPE_INVALID
) != (s2
->type
== _SESSION_TYPE_INVALID
))
832 return (s1
->type
== _SESSION_TYPE_INVALID
) - (s2
->type
== _SESSION_TYPE_INVALID
);
834 if (s1
->type
!= s2
->type
)
835 return type_ranks
[s1
->type
] - type_ranks
[s2
->type
];
840 void user_elect_display(User
*u
) {
843 /* This elects a primary session for each user, which we call the "display". We try to keep the assignment
844 * stable, but we "upgrade" to better choices. */
845 log_debug("Electing new display for user %s", u
->user_record
->user_name
);
847 LIST_FOREACH(sessions_by_user
, s
, u
->sessions
) {
848 if (!elect_display_filter(s
)) {
849 log_debug("Ignoring session %s", s
->id
);
853 if (elect_display_compare(s
, u
->display
) < 0) {
854 log_debug("Choosing session %s in preference to %s", s
->id
, u
->display
? u
->display
->id
: "-");
860 static int user_stop_timeout_callback(sd_event_source
*es
, uint64_t usec
, void *userdata
) {
861 User
*u
= ASSERT_PTR(userdata
);
863 user_add_to_gc_queue(u
);
868 void user_update_last_session_timer(User
*u
) {
869 usec_t user_stop_delay
;
874 if (user_pinned_by_sessions(u
)) {
875 /* There are sessions, turn off the timer */
876 u
->last_session_timestamp
= USEC_INFINITY
;
877 u
->timer_event_source
= sd_event_source_unref(u
->timer_event_source
);
881 if (u
->last_session_timestamp
!= USEC_INFINITY
)
882 return; /* Timer already started */
884 u
->last_session_timestamp
= now(CLOCK_MONOTONIC
);
886 assert(!u
->timer_event_source
);
888 user_stop_delay
= user_get_stop_delay(u
);
889 if (!timestamp_is_set(user_stop_delay
))
892 if (sd_event_get_state(u
->manager
->event
) == SD_EVENT_FINISHED
) {
893 log_debug("Not allocating user stop timeout, since we are already exiting.");
897 r
= sd_event_add_time(u
->manager
->event
,
898 &u
->timer_event_source
,
900 usec_add(u
->last_session_timestamp
, user_stop_delay
), 0,
901 user_stop_timeout_callback
, u
);
903 log_warning_errno(r
, "Failed to enqueue user stop event source, ignoring: %m");
906 log_debug("Last session of user '%s' logged out, terminating user context in %s.",
907 u
->user_record
->user_name
,
908 FORMAT_TIMESPAN(user_stop_delay
, USEC_PER_MSEC
));
911 static const char* const user_state_table
[_USER_STATE_MAX
] = {
912 [USER_OFFLINE
] = "offline",
913 [USER_OPENING
] = "opening",
914 [USER_LINGERING
] = "lingering",
915 [USER_ONLINE
] = "online",
916 [USER_ACTIVE
] = "active",
917 [USER_CLOSING
] = "closing"
920 DEFINE_STRING_TABLE_LOOKUP(user_state
, UserState
);
922 static const char* const user_gc_mode_table
[_USER_GC_MODE_MAX
] = {
923 [USER_GC_BY_PIN
] = "pin",
924 [USER_GC_BY_ANY
] = "any",
927 DEFINE_STRING_TABLE_LOOKUP(user_gc_mode
, UserGCMode
);
929 int config_parse_tmpfs_size(
931 const char *filename
,
934 unsigned section_line
,
941 uint64_t *sz
= ASSERT_PTR(data
);
948 /* First, try to parse as percentage */
949 r
= parse_permyriad(rvalue
);
951 *sz
= physical_memory_scale(r
, 10000U);
955 /* If the passed argument was not a percentage, or out of range, parse as byte size */
957 r
= parse_size(rvalue
, 1024, &k
);
958 if (r
>= 0 && (k
<= 0 || (uint64_t) (size_t) k
!= k
))
961 log_syntax(unit
, LOG_WARNING
, filename
, line
, r
, "Failed to parse size value '%s', ignoring: %m", rvalue
);
965 *sz
= PAGE_ALIGN((size_t) k
);
971 int config_parse_compat_user_tasks_max(
973 const char *filename
,
976 unsigned section_line
,
987 log_syntax(unit
, LOG_NOTICE
, filename
, line
, 0,
988 "Support for option %s= has been removed.",
990 log_info("Hint: try creating /etc/systemd/system/user-.slice.d/50-limits.conf with:\n"