Systemd/src
Zbigniew Jędrzejewski-Szmek 32854f7044 systemctl: deprecate blanket import-environment
Importing the full environment is convenient, but it doesn't work too well in
practice, because we get a metric ton of shell-specific crap that should never
end up in the global environment block:

$ systemctl --user show-environment
...
SHELL=/bin/zsh
AUTOJUMP_ERROR_PATH=/home/zbyszek/.local/share/autojump/errors.log
AUTOJUMP_SOURCED=1
CONDA_SHLVL=0
CVS_RSH=ssh
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome
DISPLAY=:0
FPATH=/usr/share/Modules/init/zsh-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.8/functions
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
GNOME_SETUP_DISPLAY=:1
GUESTFISH_INIT=$'\\e[1;34m'
GUESTFISH_OUTPUT=$'\\e[0m'
GUESTFISH_PS1=$'\\[\\e[1;32m\\]><fs>\\[\\e[0;31m\\] '
GUESTFISH_RESTORE=$'\\e[0m'
HISTCONTROL=ignoredups
HISTSIZE=1000
LOADEDMODULES=
OLDPWD=/home/zbyszek
PWD=/home/zbyszek
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QTLIB=/usr/lib64/qt-3.3/lib
QT_IM_MODULE=ibus
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2612,unix/unix:/tmp/.ICE-unix/2612
SHLVL=0
STEAM_FRAME_FORCE_CLOSE=1
TERM=xterm-256color
USERNAME=zbyszek
WISECONFIGDIR=/usr/share/wise2/
...

Plenty of shell-specific and terminal-specific stuff that have no global
significance.

Let's start warning when this is used to push people towards importing only
specific variables.

Putative NEWS entry:
  * systemctl import-environment will now emit a warning when called without
    any arguments (i.e. to import the full environment block of the called
    program). This command will usually be invoked from a shell, which means
    that it'll inherit a bunch of variables which are specific to that shell,
    and usually to the tty the shell is connected to, and don't have any
    meaning in the global context of the system or user service manager.
    Instead, only specific variables should be imported into the manager
    environment block.

    Similarly, programs which update the manager environment block by directly
    calling the D-Bus API of the manager, should also push specific variables,
    and not the full inherited environment.
2021-01-08 20:01:40 +01:00
..
ac-power license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
activate license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
analyze license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
ask-password license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
backlight backlight: add several debug logs and adjust log level of non critical error 2020-11-23 14:35:14 +01:00
basic stat-util: don't try to open path on path_is_temporary_fs() 2021-01-06 23:26:08 +00:00
binfmt license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
boot A typo fix in bootctl.c (#18106) 2020-12-30 12:10:24 +09:00
busctl string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
cgls license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
cgroups-agent license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
cgtop license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
core pkg-config: make prefix overridable again 2021-01-07 15:28:21 +01:00
coredump coredumpctl: Add --debugger-args= option 2020-12-16 12:42:53 +09:00
cryptenroll cryptsetup: use crypt_token_max if available 2021-01-05 12:16:07 +00:00
cryptsetup cryptsetup: use crypt_token_max if available 2021-01-05 12:16:07 +00:00
debug-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
delta license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
detect-virt license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dissect license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
environment-d-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
escape license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
firstboot firstboot: clean-up the copied hostname, not argv[] directly, as that's ugly 2020-12-15 18:00:02 +01:00
fsck license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
fstab-generator string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
fuzz fuzzers: set maximum length for several fuzzers 2020-12-30 00:31:17 +09:00
getty-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
gpt-auto-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
hibernate-resume string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
home homed: split out HMAC-HASH fido2 decode code into src/shared/ 2020-12-17 20:00:15 +01:00
hostname hostname: fix build failure 2020-12-18 23:11:02 +09:00
hwdb license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
id128 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
import hostname-util: flagsify hostname_is_valid(), drop machine_name_is_valid() 2020-12-15 17:59:48 +01:00
initctl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
journal Merge pull request #17702 from rnhmjoj/master 2020-12-16 19:26:40 +01:00
journal-remote fileio: teach read_full_file_full() to read from offset/with maximum size 2020-12-01 14:17:47 +01:00
kernel-install kernel-install: drop redundant "/" 2020-11-24 11:18:40 +01:00
libsystemd string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
libsystemd-network sd-dhcp-client: avoid "maybe-uninitialized" warning in client_timeout_resend() 2020-12-26 09:01:01 +09:00
libudev udev: introduce udev_queue_is_empty() and udev_queue_init() 2020-12-16 02:28:08 +09:00
locale license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
login logind: use free_and_strdup() where appropriate 2020-12-09 10:09:11 +01:00
machine string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
machine-id-setup license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
modules-load license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
mount license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
network network: route - add support to configure tcp advmss 2021-01-08 14:06:13 +00:00
notify license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
nspawn nspawn: sort headers 2020-12-18 13:27:44 +09:00
nss-myhostname license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
nss-mymachines nss-mymachines: initialize logging 2020-12-10 20:52:03 +01:00
nss-resolve nss-resolve: initialize logging, log json errors 2020-12-10 20:50:01 +01:00
nss-systemd nss-systemd: initialize logging 2020-12-10 20:51:59 +01:00
oom test: use for(;;) instead of while(true) 2020-11-27 14:35:20 +09:00
partition repart: optionally lock encrypted partitions to TPM2 2020-12-17 20:02:20 +01:00
path license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
portable string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
pstore pstore: use log_oom() 2020-11-20 02:59:02 +09:00
quotacheck license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
random-seed license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
rc-local-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
remount-fs license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
reply-password license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
resolve string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
rfkill license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
run license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
run-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
shared string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
shutdown string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
sleep license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
socket-proxy license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
stdio-bridge stdio-bridge: add support for --system and --user 2020-12-15 18:01:20 +01:00
sulogin-shell license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
sysctl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
system-update-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemctl systemctl: deprecate blanket import-environment 2021-01-08 20:01:40 +01:00
systemd sd-netlink: replace *messages[] -> **messages 2020-12-18 13:11:06 +09:00
sysusers specifiers: introduce common macros for generating specifier tables 2020-11-25 14:13:02 +09:00
sysv-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
test string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
time-wait-sync license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
timedate timedate: use localtime_or_gmtime_r() and mktime_or_timegm() 2020-11-21 04:28:45 +09:00
timesync timesync: Make delaying attempts to contact servers configurable 2020-12-15 08:52:51 +09:00
tmpfiles string-util: imply NULL termination of strextend() argument list 2021-01-06 17:24:46 +01:00
tty-ask-password-agent license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
udev udev/cdrom: split main() into main() and run() 2021-01-08 14:08:38 +00:00
update-done license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
update-utmp tree-wide: use return value of log_xxx_errno() 2020-11-20 02:58:27 +09:00
user-sessions license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
userdb tree-wide: unsetenv cannot fail 2020-11-10 15:52:32 +01:00
vconsole license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
veritysetup veritysetup: also place udev socket dep 2020-12-10 20:44:12 +01:00
version
volatile-root license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
xdg-autostart-generator license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00