summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-16Merge pull request #3481 from poettering/relative-memcgLennart Poettering
various changes, most importantly regarding memory metrics
2016-06-15Merge pull request #3537 from poettering/journal-stream-envZbigniew Jędrzejewski-Szmek
Permit services to detect whether their stdout/stderr is connected to the journal.
2016-06-15load-fragment: ignore ENOTDIR/EACCES errors (#3510)Zbigniew Jędrzejewski-Szmek
If for whatever reason the file system is "corrupted", we want to be resilient and ignore the error, as long as we can load the units from a different place. Arch bug https://bugs.archlinux.org/task/49547. A user had an ntfs symlink (essentially a file) instead of a directory after restoring from backup. We should just ignore that like we would treat a missing directory, for general resiliency. We should treat permission errors similarly. For example an unreadable /usr/local/lib directory would prevent (user) instances of systemd from loading any units. It seems better to continue.
2016-06-15core: set $JOURNAL_STREAM to the dev_t/ino_t of the journal stream of ↵Lennart Poettering
executed services This permits services to detect whether their stdout/stderr is connected to the journal, and if so talk to the journal directly, thus permitting carrying of metadata. As requested by the gtk folks: #2473
2016-06-15execute: minor coding style improvementsLennart Poettering
2016-06-15socket-util: Run the fallback when the kernel complains about the null ↵Kai Ruhnau
buffer (#3541) Calling recv with a NULL buffer returns EFAULT instead of EOPNOTSUPP on older kernels (3.14). Fixes #3407 Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
2016-06-14Merge pull request #3540 from poettering/resolved-variousZbigniew Jędrzejewski-Szmek
three resolved fixes
2016-06-15tree-wide: htonl() is weird, let's use htobe32() instead (#3538)Lennart Poettering
Super-important change, yeah!
2016-06-14util-lib: rework get_process_cmdline() (#3529)Lennart Poettering
This reworks get_process_cmdline() quite substantially, fixing the following: - Fixes: https://github.com/systemd/systemd/pull/3512/commits/a4e3bf4d7ac2de51191ce136ee9361ba319e106c#r66837630 - The passed max_length is also applied to the "comm" name, if comm_fallback is set. - The right thing happens if max_length == 1 is specified - when the cmdline "foobar" is abbreviated to 6 characters the result is not "foobar" instead of "foo...". - trailing whitespace are removed before the ... suffix is appended. The 7 character abbreviation of "foo barz" is hence "foo..." instead of "foo ...". - leading whitespace are suppressed from the cmdline - a comprehensive test case is added
2016-06-14Merge pull request #3539 from keszybz/udevadm-man-fixLennart Poettering
Udevadm man fix
2016-06-14resolved: in the ResolveHostname() bus call, accept IP addresses with scopeLennart Poettering
When we get a literal IP address as string that includes a zone suffix, process this properly and return the parsed ifindex back to the client, and include it in the canonical name in case of a link-local IP address.
2016-06-14resolved: make sure we initialize the ifindex of direct zone answers properlyLennart Poettering
Previously, after checking the local zone for a reply and finding one we'd not initialize the answer ifindex from that. Let's fix that.
2016-06-14resolve: port resolve tool to in_addr_ifindex_{from_string_auto|to_string}()Lennart Poettering
We can reuse some code here, so let's do it.
2016-06-14man: fix option letter in udevadm control -eZbigniew Jędrzejewski-Szmek
-x never worked, so let's just correct the man page. Fixes #3524.
2016-06-14udevadm: trivial simplificationZbigniew Jędrzejewski-Szmek
2016-06-14update TODOLennart Poettering
2016-06-14unit: properly comment generated comments in unit filesLennart Poettering
Fix-up for 2a9a6f8ac04a69ca36d645f9305a33645f22a22b
2016-06-14sd-ndisc: add missing castLennart Poettering
Apparently newer gcc versions are a bit more forgiving when assigning an "unsigned char*" pointer to something of a different type. Let's add the missing cast so that old gcc versions are fine, too.
2016-06-14systemctl: allow percent-based MemoryLimit= settings via systemctl set-propertyLennart Poettering
The unit files already accept relative, percent-based memory limit specification, let's make sure "systemctl set-property" support this too. Since we want the physical memory size of the destination machine to apply we pass the percentage in a new set of properties that only exist for this purpose, and can only be set.
2016-06-14util: introduce physical_memory_scale() to unify how we scale by physical memoryLennart Poettering
The various bits of code did the scaling all different, let's unify this, given that the code is not trivial.
2016-06-14core: make sure to use "infinity" in unit files, not "max"Lennart Poettering
THe latter is a kernelism, we only understand "infinity".
2016-06-14core: when receiving a memory limit via the bus, refuse 0Lennart Poettering
When parsing unit files we already refuse unit memory limits of zero, let's also refuse it when the value is set via the bus.
2016-06-14man: minor fixesLennart Poettering
2016-06-14core: optionally, accept a percentage value for MemoryLimit= and related ↵Lennart Poettering
settings If a percentage is used, it is taken relative to the installed RAM size. This should make it easier to write generic unit files that adapt to the local system.
2016-06-14util-lib: introduce parse_percent() for parsing percent specificationsLennart Poettering
And port a couple of users over to it.
2016-06-14util: when determining the amount of memory on this system, take cgroup ↵Lennart Poettering
limit into account When determining the amount of RAM in the system, let's make sure we also read the root-level cgroup memory limit into account. This isn't particularly useful on the host, but in containers it makes sure that whatever memory the container got assigned is actually used for RAM size calculations.
2016-06-14networkd: Tunnel add support to configure key for VTI/VTI6 (#3532)Susant Sahani
fixes #3298
2016-06-14Merge pull request #3527 from poettering/systemctl-fixesDaniel Mack
Systemctl fixes
2016-06-14manager: reduce complexity of unit_gc_sweep (#3507)Lukáš Nykrýn
When unit is marked as UNSURE, we are trying to find if it state was changed over and over again. So lets not go through the UNSURE states again. Also when we find a GOOD unit lets propagate the GOOD state to all units that this unit reference. This is a problem on machines with a lot of initscripts with different starting priority, since those units will reference each other and the original algorithm might get to n! complexity. Thanks HATAYAMA Daisuke for the expand_good_state code.
2016-06-14core: on unified we don't need to check u->pids: we can use proper ↵Evgeny Vereshchagin
notifications (#3531) Fixes: #3483
2016-06-14build: fix missing symbol for old kernel headers (#3530)Andrew Jeddeloh
Fix issue where IN6_ADDR_GEN_MODE_STABLE_PRIVACY is undefined but IFLA_INET6_ADDR_GEN_MODE is defined and thus the former does not get fixed in missing.h. This occurs with kernel headers new enough to have the IFLA_INET6_ADDR_GEN_MODE but old enough to not yet have IN6_ADDR_GEN_MODE_STABLE_PRIVACY (e.g. 3.18).
2016-06-13systemctl: rework "systemctl status" a bitLennart Poettering
This reworks "systemctl status" and "systemctl show" a bit. It removes the definition of the `property_info` structure, because we can simply reuse the existing UnitStatusInfo type for that. The "could not be found" message is now printed by show_one() itself (and not its caller), so that it is shown regardless by who the function is called. (This makes it necessary to pass the unit name to the function.) This also adds all properties found to a set, and then checks if any of the properties passed via "--property=" is mising in it, if so, a proper error is generated. Support for checking the PID file of a unit is removed, as this cannot be done reasonably client side (since the systemd instance we are talking to might sit on another host) Replaces: #3411 Fixes: #3425 Also see: #3504
2016-06-13systemctl: fix assertion hit when showing state of a unit without control groupLennart Poettering
2016-06-13unit-name: remove spurious newlineLennart Poettering
2016-06-13Merge pull request #3491 from poettering/hwdb-acpiTom Gundersen
hwdb: update UEFI/ACPI/PNP/EISA/EDID database from UEFI web site
2016-06-13Merge pull request #3498 from poettering/syscall-filter-fixesLennart Poettering
Syscall filter fixes, tighter nspawn seccomp sandbox by default
2016-06-13core: parse `rd.rescue` and `rd.emergency` as initrd-specific shorthands (#3488)Ivan Shapovalov
Typing `rd.rescue` is easier than `rd.systemd.unit=rescue.target`.
2016-06-13Merge pull request #3384 from keszybz/localed-keymapLennart Poettering
More verbose logging in localed, unit tests, and a few tweaks to keymap conversions
2016-06-13nspawn: lock down system call filter a bitLennart Poettering
Let's block access to the kernel keyring and a number of obsolete system calls. Also, update list of syscalls that may alter the system clock, and do raw IO access. Filter ptrace() if CAP_SYS_PTRACE is not passed to the container and acct() if CAP_SYS_PACCT is not passed. This also changes things so that kexec(), some profiling calls, the swap calls and quotactl() is never available to containers, not even if CAP_SYS_ADMIN is passed. After all we currently permit CAP_SYS_ADMIN to containers by default, but these calls should not be available, even then.
2016-06-13units: tighten system call filters a bitLennart Poettering
Take away kernel keyring access, CPU emulation system calls and various debug system calls from the various daemons we have.
2016-06-13core: improve seccomp syscall grouping a bitLennart Poettering
This adds three new seccomp syscall groups: @keyring for kernel keyring access, @cpu-emulation for CPU emulation features, for exampe vm86() for dosemu and suchlike, and @debug for ptrace() and related calls. Also, the @clock group is updated with more syscalls that alter the system clock. capset() is added to @privileged, and pciconfig_iobase() is added to @raw-io. Finally, @obsolete is a cleaned up. A number of syscalls that never existed on Linux and have no number assigned on any architecture are removed, as they only exist in the man pages and other operating sytems, but not in code at all. create_module() is moved from @module to @obsolete, as it is an obsolete system call. mem_getpolicy() is removed from the @obsolete list, as it is not obsolete, but simply a NUMA API.
2016-06-13nspawn: order caps to retain alphabeticallyLennart Poettering
2016-06-13update TODOLennart Poettering
2016-06-13resolved: use single message for both dbus and signal calls (#3515)Zbigniew Jędrzejewski-Szmek
Follow-up for #3502.
2016-06-13Merge pull request #3520 from keszybz/add-release.mdLennart Poettering
Add RELEASE.md
2016-06-13Merge pull request #3518 from keszybz/test-process-utilLennart Poettering
Enhance test-process-util to take the PID to look at
2016-06-13networkd: fix NULL pointer (#3523)Susant Sahani
Not every link has kind associated with it. (gdb) r Starting program: /home/sus/tt/systemd/systemd-networkd Missing separate debuginfos, use: dnf debuginfo-install glibc-2.23.1-7.fc24.x86_64 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". vboxnet0: Gained IPv6LL wlp3s0: Gained IPv6LL enp0s25: Gained IPv6LL Enumeration completed Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6e27ade in __strcmp_sse2_unaligned () from /lib64/libc.so.6 (gdb) bt src/network/networkd-link.c:2008 src/network/networkd-link.c:2059 src/network/networkd-link.c:2442 m=0x555555704a30, userdata=0x55555570bfe0) at src/network/networkd-link.c:2497 at src/libsystemd/sd-netlink/sd-netlink.c:347 src/libsystemd/sd-netlink/sd-netlink.c:402 src/libsystemd/sd-netlink/sd-netlink.c:432 userdata=0x5555556f7470) at src/libsystemd/sd-netlink/sd-netlink.c:739 src/libsystemd/sd-event/sd-event.c:2275 src/libsystemd/sd-event/sd-event.c:2626 timeout=18446744073709551615) at src/libsystemd/sd-event/sd-event.c:2685 bus=0x5555556f9af0, name=0x555555692315 "org.freedesktop.network1", timeout=30000000, check_idle=0x55555556ac84 <manager_check_idle>, userdata=0x5555556f6b20) at src/shared/bus-util.c:134 src/network/networkd-manager.c:1128 src/network/networkd.c:127 (gdb) f 1 src/network/networkd-link.c:2008 2008 if (link->network->bridge || streq("bridge", link->kind)) { (gdb) p link->kind $1 = 0x0
2016-06-13networkd: route priority replace parsing config_parse_uint32 with ↵Susant Sahani
safe_atou32 (#3522)
2016-06-13core/execute: pass env vars to PAM session setup (#3503)Jouke Witteveen
Move the merger of environment variables before setting up the PAM session and pass the aggregate environment to PAM setup. This allows control over the PAM session hooks through environment variables. PAM session initiation may update the environment. On successful initiation of a PAM session, we adopt the environment of the PAM context.
2016-06-13systemctl: disallow systemctl --user reboot (#3519)Zbigniew Jędrzejewski-Szmek
... as well as halt/poweroff/kexec/suspend/hibernate/hybrid-sleep. Running those commands will fail in user mode, but we try to set the wall message first, which might even succeed for privileged users. Best to nip the whole sequence in the bud. https://github.com/systemd/systemd/pull/3453#issuecomment-225455156