build-sys: add --without-kill-user-processes configure option

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-04-11 22:51:31 -04:00
parent 97e5530cf2
commit 95365a576f
6 changed files with 121 additions and 104 deletions

View file

@ -5725,7 +5725,7 @@ dist_dbussystemservice_DATA += \
dist_dbuspolicy_DATA += \
src/login/org.freedesktop.login1.conf
dist_pkgsysconf_DATA += \
nodist_pkgsysconf_DATA += \
src/login/logind.conf
polkitpolicy_files += \
@ -5762,7 +5762,8 @@ gperf_gperf_sources += \
EXTRA_DIST += \
src/login/71-seat.rules.in \
src/login/73-seat-late.rules.in \
units/systemd-logind.service.in
units/systemd-logind.service.in \
src/login/logind.conf.in
# ------------------------------------------------------------------------------
if HAVE_PAM
@ -5879,6 +5880,7 @@ substitutions = \
'|NTP_SERVERS=$(NTP_SERVERS)|' \
'|DNS_SERVERS=$(DNS_SERVERS)|' \
'|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
'|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
'|systemuidmax=$(SYSTEM_UID_MAX)|' \
'|systemgidmax=$(SYSTEM_GID_MAX)|' \
'|TTY_GID=$(TTY_GID)|' \

3
NEWS
View file

@ -43,6 +43,9 @@ CHANGES WITH 230 in spe:
logged out, lingering must be enabled for them. See loginctl(1)
for details.
Previous defaults can be restored at compile time by the
--without-kill-user-processes option.
* The unified cgroup hierarchy added in Linux 4.5 is now supported.
Use systemd.unified_cgroup_hierarchy=1 on the kernel command line
to enable.

View file

@ -1014,6 +1014,16 @@ fi
AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
AC_ARG_WITH([kill-user-processes],
[AS_HELP_STRING([--without-kill-user-processes], [Set logind's KillUserProcesses=no by default])])
AS_IF([test "$with_kill_user_processes" != "no"],
[kill_user_processes=true
KILL_USER_PROCESSES=yes],
[kill_user_processes=false
KILL_USER_PROCESSES=no])
AC_DEFINE_UNQUOTED(KILL_USER_PROCESSES, [$kill_user_processes], [Default KillUserProcesses setting])
AC_SUBST(KILL_USER_PROCESSES)
# ------------------------------------------------------------------------------
have_machined=no
AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
@ -1585,6 +1595,7 @@ AC_MSG_RESULT([
backlight: ${have_backlight}
rfkill: ${have_rfkill}
logind: ${have_logind}
Default KillUserProcesses setting: ${KILL_USER_PROCESSES}
machined: ${have_machined}
importd: ${have_importd}
hostnamed: ${have_hostnamed}

View file

@ -1,4 +1,5 @@
/logind-gperf.c
/logind.conf
/org.freedesktop.login1.policy
/71-seat.rules
/73-seat-late.rules

View file

@ -64,7 +64,7 @@ static void manager_reset_config(Manager *m) {
m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */
m->user_tasks_max = UINT64_C(12288);
m->kill_user_processes = true;
m->kill_user_processes = KILL_USER_PROCESSES;
m->kill_only_users = strv_free(m->kill_only_users);
m->kill_exclude_users = strv_free(m->kill_exclude_users);

View file

@ -14,7 +14,7 @@
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=yes
#KillUserProcesses=@KILL_USER_PROCESSES@
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5