summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-04-21logind: allow any user to request lingeringZbigniew Jędrzejewski-Szmek
We enable lingering for anyone who wants this. It is still disabled by default to avoid keeping long-running processes accidentally. Admins might want to customize this policy on multi-user sites.
2016-04-21logind: make KillOnlyUsers override KillUserProcessesZbigniew Jędrzejewski-Szmek
Instead of KillOnlyUsers being a filter for KillUserProcesses, it can now be used to specify users to kill, independently of the KillUserProcesses setting. Having the settings orthogonal seems to make more sense. It also makes KillOnlyUsers symmetrical to KillExcludeUsers.
2016-04-21build-sys: add --without-kill-user-processes configure optionZbigniew Jędrzejewski-Szmek
2016-04-21logind: flip KillUserProcesses to on by defaultZbigniew Jędrzejewski-Szmek
This ensures that users sessions are properly cleaned up after. The admin can still enable or disable linger for specific users to allow them to run processes after they log out. Doing that through the user session is much cleaner and provides better control. dbus daemon can now be run in the user session (with --enable-user-session, added in 1.10.2), and most distributions opted to pick this configuration. In the normal case it makes a lot of sense to kill remaining processes. The exception is stuff like screen and tmux. But it's easy enough to work around, a simple example was added to the man page in previous commit. In the long run those services should integrate with the systemd users session on their own. https://bugs.freedesktop.org/show_bug.cgi?id=94508 https://github.com/systemd/systemd/issues/2900
2016-04-21logind: reload config on SIGHUPZbigniew Jędrzejewski-Szmek
v2: - fix setting of kill_user_processes and *_ignore_inhibited settings
2016-04-21core: prefix selinux messages with "selinux: "Zbigniew Jędrzejewski-Szmek
SELinux outputs semi-random messages like "Unknown permission start for class system", and the user has to dig into message metadata to find out where they are comming from. Add a prefix to give a hint.
2016-04-08Merge pull request #2985 from keszybz/lldp-assertMartin Pitt
Replace if with assert_cc in lldp code and a build-sys tweak
2016-04-07Merge pull request #2943 from vinaykul/systemd_duid_review_fixesZbigniew Jędrzejewski-Szmek
DHCP DUID parsing fix, logging fix, man-page fix
2016-04-07core: downgrade warning about duplicate device names againVladimir Panteleev
Pull request #2412 seemed to have unintentionally reverted 5259bcf6a638d8d489db1ddefd55327aa15f3e51, thus reintroducing https://bugs.freedesktop.org/show_bug.cgi?id=90386. This commit reverts that part of the commit, changing the log level to debug again.
2016-04-07lldp: replace if with assert_ccZbigniew Jędrzejewski-Szmek
LLDP_TX_HOLD or one of the other variables might be changed in the future resulting in a silent error here if the if was just removed. Replacement for #2983.
2016-04-06Merge pull request #2976 from martinpitt/udev-test-tagsZbigniew Jędrzejewski-Szmek
Add tags tests to udev-test.pl
2016-04-06sd-device: Allocate enough room for tags stringMartin Pitt
Fix commit 1d88a2: We need to allocate another byte for building the "tags" string, as we append an extra ':' and still need the NUL terminator.
2016-04-06Merge pull request #2970 from msekletar/machine-id-prefix-rootaZbigniew Jędrzejewski-Szmek
machine-id-setup: simplify by using prefix_roota
2016-04-06Merge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2Martin Pitt
tests: don't rely on the underlying fs in test-udev (v2)
2016-04-06Merge pull request #2968 from keszybz/journal-upload-watchdog-update-masterLennart Poettering
Journal upload watchdog update master
2016-04-06Merge pull request #2944 from keszybz/man-coredump-sysctlLennart Poettering
Man coredump sysctl
2016-04-06Merge pull request #2947 from keszybz/test-nssLennart Poettering
Add a test for nss modules and some related fixes
2016-04-06Merge pull request #2962 from keszybz/value-optionLennart Poettering
Add `--value` option to systemctl and loginctl to only print values
2016-04-06Merge pull request #2961 from evverx/fix-activate-sigchldLennart Poettering
activate: improve SIGCHLD handler
2016-04-06machine-id-setup: simplify by using prefix_rootaMichal Sekletar
2016-04-06tests: don't rely on the underlying fs in test-udev (v2)Evgeny Vereshchagin
* This reverts commit 646048b40a7b62c4e9bc59024ef6133613cda01b. Let's test really big numbers again * Don't be so brutal: use rmdir instead of rm -rf As suggested https://github.com/systemd/systemd/pull/2966#issuecomment-205751680
2016-04-05nss-myhostname: remove dead test of variable that was not setZbigniew Jędrzejewski-Szmek
2016-04-05test-nss: test the resolution of various namesZbigniew Jędrzejewski-Szmek
nss-dns is also "tested". It should be almost always available, and provides a reference for comparison.
2016-04-05string-table: split long definitionsZbigniew Jędrzejewski-Szmek
2016-04-05machinectl: indentation fixZbigniew Jędrzejewski-Szmek
2016-04-05machinectl: add --value optionZbigniew Jędrzejewski-Szmek
2016-04-05Merge pull request #2966 from evverx/udev-test-dont-rely-on-underlying-fsZbigniew Jędrzejewski-Szmek
tests: don't rely on underlying fs in udev-test, use tmpfs instead
2016-04-05journal-upload: make watchdog state non-staticZbigniew Jędrzejewski-Szmek
Also parse watchdog config when creating the Uploader object.
2016-04-05journal-upload: Update watchdog while in curl_easy_performKlearchos Chaloulos
It is observed that a combination of high log throughput, low I/O speed on journal remote side and many nodes uploading simultaneously caused the journal-upload process to dump core because of watchdog starvation. This is caused because journal-upload stays in curl_easy_perform(), because it cannot upload fast enough to reach the end of the journal. Currently journal-upload will return from curl_easy_perform() only when the end of the journal is reached. Therefore a check is added in journal_input_callback(), which will update the watchdog if the elapsed time since the start of the uploading process is greater than WATCHDOG_USEC/2.
2016-04-05activate: improve SIGCHLD handlerEvgeny Vereshchagin
* Don't lose children exit codes * Don't receive notification when child processes stop Eliminates annoying "Child died"-messages: $ ./systemd-socket-activate -l 2000 --inetd -a cat ^Z [1]+ Stopped ./systemd-socket-activate -l 2000 --inetd -a cat $ bg %1 [1]+ ./systemd-socket-activate -l 2000 --inetd -a cat & Child 15657 died with code 20 $ ps u 15657 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ubuntu 15657 0.0 0.0 4540 680 pts/2 S 00:34 0:00 cat * Don't fail to reap some zombie children Fixes $ ./systemd-socket-activate -l 2000 --inetd -a cat & $ for i in {1..1000}; do echo a | nc localhost 2000 & done $ ps f ... 18235 pts/2 Ss 0:01 -bash 15849 pts/2 S 0:00 \_ ./systemd-socket-activate -l 2000 --inetd -a cat 16081 pts/2 Z 0:00 | \_ [cat] <defunct> 16381 pts/2 Z 0:00 | \_ [cat] <defunct> and many more zombies ...
2016-04-05tests: don't rely on underlying fs in udev-test, use tmpfs insteadEvgeny Vereshchagin
Fixes: #457
2016-04-05polkit: don't start polkit agent when running as rootMartin Pitt
On the server side we already bypass the polkit checks if the caller is root (see the sd_bus_query_sender_privilege() call in bus_verify_polkit_async()). So there is no reason to invoke polkit when running systemctl/machinectl/loginctl/timedatectl as root. Fixes #2748
2016-04-05sd-device: fix crash if a device has many tags or devlinksMartin Pitt
strjoina() is unsafe to be used in an unbounded loop as alloca() has no error reporting. Thus devices with a large number of tags or devlinks trigger a segfault in device_properties_prepare() due to overflowing the stack. Rewrite the building of the "tags" and "devlinks" strings using GREEDY_REALLOC() and strpcpy() to work with arbitrarily long strings. This also avoids re-copying the entire string in each loop iteration. Before this commit we always appended one final ":" to "tags". Change this to start with an iniital ":" and for each tag append instead of prepend a ":". This unifies what happens for the first and all subsequent tags so that we can use a for loop. Fixes #2954
2016-04-04Address code-review items for pull-request #2890Vinay Kulkarni
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings. 2. Fix logging to use log_syntax instead of log_error. 3. On error reading DUID, ignore read and preserve previous state. 4. Fix man-pages to use markup, remove options not yet implemented. 5. Remove spurious header line in new files.
2016-04-04loginctl: add --value optionZbigniew Jędrzejewski-Szmek
2016-04-04systemctl: add --value optionZbigniew Jędrzejewski-Szmek
With this option, systemctl will only print the rhs in show: $ systemctl show -p Wants,After systemd-journald --value systemd-journald.socket ... systemd-journald-dev-log.socket ... This is useful in scripts, because the need to call awk or similar is removed.
2016-04-04Merge pull request #2959 from keszybz/stop-resolving-localdomainZbigniew Jędrzejewski-Szmek
*.localdomain != localhost
2016-04-04*.localdomain != localhostDavid R. Hedges
".localdomain" is not a reserved suffix (or prefix). I'm not aware of any product expecting *.localdomain to resolve to localhost, however I am aware of at least one product that defaults to ".localdomain" as its DNS suffix provided via DHCP (pfSense). This leads to unexpected results when attempting to access a host that's offline (or a host that's online, when nsswitch.conf is [mis-]configured to have myhostname ahead of DNS). Operate on: localhost (and localhost.) *.localhost (and *.localhost.) localhost.localdomain (and localhost.localdomain.) *.localhost.localdomain (and *.localhost.localdomain.) We should not cover: *.localdomain (nor *.localdomain.) localdomain (nor localdomain.)
2016-04-04run: add colon before printing started unitsLennart Poettering
run: add colon before printing started units
2016-04-04import: Preserve xattrs in tar filesMike Gilbert
Resolves #2908
2016-04-04basic: fallback to fstatat if entry->d_type is DT_UNKNOWNEvgeny Vereshchagin
* tests-functions: improve FSTYPE-support make clean setup FSTYPE=reiserfs is working fine now :) * basic: fallback to fstatat if entry->d_type is DT_UNKNOWN Fixes localectl on reiserfs: -bash-4.3# mkdir -p /usr/lib/locale -bash-4.3# stat -f /usr/lib/locale/ File: "/usr/lib/locale/" ID: bdb0322715b5366e Namelen: 255 Type: reiserfs Block size: 4096 Blocks: Total: 99835 Free: 60262 Available: 60262 Inodes: Total: 0 Free: 0 -bash-4.3# mkdir /usr/lib/locale/HeyHo -bash-4.3# localectl list-locales --no-pager -bash-4.3# mount -t tmpfs tmpfs /usr/lib/locale -bash-4.3# mkdir /usr/lib/locale/HeyHo -bash-4.3# localectl list-locales --no-pager HeyHo
2016-04-04run: add colon before printing started unitsIago López Galeiras
In 110ceee58e5bc796c03a7db2109f85a999d5bc2e we removed the period after printing the started units. This makes copying the unit name easier but results in improper English. This adds a colon before printing the units, which makes the output look better.
2016-04-02Merge pull request #2931 from systemd/revert-2843-clock_boottimeZbigniew Jędrzejewski-Szmek
Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"
2016-04-02Move nss typedefs into nss-util.hZbigniew Jędrzejewski-Szmek
In preparation for subsequent changes.
2016-04-02nss-myhostname: trivial style fixesZbigniew Jędrzejewski-Szmek
2016-04-02compress: fix gcc warnings about void* used in arithmeticZbigniew Jędrzejewski-Szmek
src/journal/compress.c: In function ‘compress_blob_lz4’: src/journal/compress.c:115:49: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] r = LZ4_compress_limitedOutput(src, dst + 8, src_size, (int) dst_alloc_size - 8); ^ src/journal/compress.c: In function ‘decompress_blob_xz’: src/journal/compress.c:179:35: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] s.next_out = *dst + used; ^ src/journal/compress.c: In function ‘decompress_blob_lz4’: src/journal/compress.c:218:37: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] r = LZ4_decompress_safe(src + 8, out, src_size - 8, size); ^ src/journal/compress.c: In function ‘decompress_startswith_xz’: src/journal/compress.c:294:38: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] s.next_out = *buffer + *buffer_size - s.avail_out; ^ src/journal/compress.c:294:53: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] s.next_out = *buffer + *buffer_size - s.avail_out; ^ src/journal/compress.c: In function ‘decompress_startswith_lz4’: src/journal/compress.c:327:45: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] r = LZ4_decompress_safe_partial(src + 8, *buffer, src_size - 8, ^ LZ4 and XZ functions use char* and unsigned char*, respectively, so keep void* in our internal APIs and add casts.
2016-04-02basic/copy: remove unnecessary castZbigniew Jędrzejewski-Szmek
Both types are unsigned, so the cast to the longer type is automatic.
2016-04-02test-compress-benchmark: fix argument parsing on 32bitZbigniew Jędrzejewski-Szmek
The patch is not minimal, but a function to parse size_t is probably going to come in handy in other places, so I think it's nicer to define a proper parsing function than to open-code the cast.
2016-04-02Add networkd-gperf.c to gitignoreZbigniew Jędrzejewski-Szmek
For #2915.
2016-04-02sd-lldp.h: remove double newlineZbigniew Jędrzejewski-Szmek
For #2898.