summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-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-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-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-01cryptsetup: do not 'fail' if trying to detach a nonexistent deviceMantas Mikulėnas
It could be that our .service is being stopped precisely because the device already disappeared (e.g. due to a manual `cryptsetup close`, or due to UDisks2 cleaning up).
2016-04-01Merge pull request #2937 from thom311/masterLennart Poettering
dhcp-identifier: handle too large duid_len argument in dhcp_validate_duid_len()
2016-04-01Merge pull request #2939 from bjne/read_only_bindmountLennart Poettering
dont create bind-mount target when it exists
2016-04-01prevent systemd-nspawn from trying to create targetBjørnar Ness
for bind-mounts when they already exist. This allows bind-mounting over read-only files.
2016-04-01dhcp-identifier: handle too long duid_len in dhcp_validate_duid_len()Thomas Haller
Callers of dhcp_validate_duid_len() know that they must not pass a zero duid_len. Thus asserting against that is appropriate. On the other hand, they are not aware of the maximum allowed length of a duid, as that is the reason why they call dhcp_validate_duid_len() in the first place. So dhcp_validate_duid_len() should just signal a regular error. Thereby, change assert_return() to an assert() as this is an internal function.
2016-04-01systemctl: use correct printf macros for uint32Martin Pitt
%u is a simple uint which might not be 32 bit on every platform. Use PRIu32 instead.
2016-04-01bus-util: Fix reading uint32 propertiesMartin Pitt
Fix copy&paste bug in map_basic() to use the correct data type for SD_BUS_TYPE_UINT32. Before we were copying the wrong 32 bits into the destination pointer, resulting in complete garbage on big-endian systems. Fixes #2927
2016-04-01Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"Lennart Poettering
2016-03-31Merge pull request #2915 from vinaykul/masterZbigniew Jędrzejewski-Szmek
2016-03-30DHCP DUID, IAID configuration optionsVinay Kulkarni
2016-03-30core: improve error message when starting template without instanceLukas Nykryn
2016-03-29Merge pull request #2898 from bengal/lldp-apiZbigniew Jędrzejewski-Szmek
lldp: move public macros to sd-lldp.h and namespace them
2016-03-29Merge pull request #2903 from keszybz/cgroup2-v3Zbigniew Jędrzejewski-Szmek
core: cgroup2 support
2016-03-29core: ShutdownWatchdogSec=infinity disables the watchdog logic tooEvgeny Vereshchagin
This is a follow-up for 947292eef
2016-03-29Merge pull request #2907 from evverx/runtime-watchdog-infinityDaniel Mack
core: RuntimeWatchdogSec=infinity disables the watchdog logic
2016-03-29Merge pull request #2905 from keszybz/gcrypt-compilationDaniel Mack
build-sys: fix build with libgrcypt disabled
2016-03-28core: RuntimeWatchdogSec=infinity disables the watchdog logicEvgeny Vereshchagin
2016-03-29shared: fix a misspelling of "journalctl"Biao Lu
2016-03-27build-sys: fix build with libgrcypt disabledZbigniew Jędrzejewski-Szmek
- Move gcrypt.h include inside grcrypt-util.h. - Allow gcrypt-util.[ch] to be compiled even without gcrypt. This allows the logic in files using gcrypt to be simplified. - Fix compilation of systemd-resolve without gcrypt. systemd-resolved already supported that. Fixes #2711.
2016-03-26core: update invoke_sigchld_event() to handle NULL ->sigchld_event()Tejun Heo
After receiving SIGCHLD, one of the ways manager_dispatch_sigchld() maps the now zombie $PID to its unit is through manager_get_unit_by_pid_cgroup() which reads /proc/$PID/cgroup and looks up the unit associated with the cgroup path. On non-unified cgroup hierarchies, a process is immediately migrated to the root cgroup on death and the cgroup lookup would always have returned the unit associated with it, making it rather pointless but safe. On unified hierarchy, a zombie remains associated with the cgroup that it was associated with at the time of death and thus manager_get_unit_by_pid_cgroup() will look up the unit properly. However, by the time manager_dispatch_sigchld() is running, the original cgroup may have become empty and it and its associated unit might already have been removed. If the cgroup path doesn't yield a match, manager_dispatch_sigchld() keeps pruning the leaf component. This means that the function may return a slice unit for a pid and as a slice doesn't have ->sigchld_event() handler, calling invoke_sigchld_event() on it causes a segfault. This patch updates invoke_sigchld_event() so that it skips calling if the handler is not set.
2016-03-26core: update populated event handling in unified hierarchyTejun Heo
Earlier during the development of unified hierarchy, the populated event was reported through by the dedicated "cgroup.populated" file; however, the interface was updated so that it's reported through the "populated" field of "cgroup.events" file. Update populated event handling logic accordingly.
2016-03-26cgroup2: use new fstype for unified hierarchyAlban Crequy
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and is replaced by a new fstype "cgroup2". With this patch, systemd no longer supports the old (unstable) way of doing unified hierarchy with __DEVEL__sane_behavior and systemd now requires Linux v4.4 for unified hierarchy. Non-unified hierarchy is still the default and is unchanged by this patch. https://github.com/torvalds/linux/commit/67e9c74b8a873408c27ac9a8e4c1d1c8d72c93ff
2016-03-25Merge pull request #2887 from martinpitt/masterZbigniew Jędrzejewski-Szmek
Fix logind crash if shutdown is called from a non-tty
2016-03-24lldp: move public macros to sd-lldp.h and namespace themBeniamino Galvani
lldp.h contains definitions of LLDP types, subtypes and capabilities which should be exposed in public headers. Get rid of the file and move those definitions to sd-lldp.h with the SD_ prefix.
2016-03-24logind: fix crash when shutdown is not issued from a ttyMartin Pitt
It's possible that sd_bus_creds_get_tty() fails and thus scheduled_shutdown_tty is NULL in method_schedule_shutdown(). Fix logind_wall_tty_filter() to get along with that, by showing the message on all TTYs, instead of crashing in strcmp(). https://launchpad.net/bugs/1553040
2016-03-24core: fix "stoppping" typoMartin Pitt