summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* resolved: consider pointopoint links for local multicast (#6343)v234florianjacob2017-07-121-4/+1
| | | Resolves #6313.
* Revert "core: link user keyring to session keyring (#6275)" (#6342)Lennart Poettering2017-07-122-12/+0
| | | | | | This reverts commit 437a85112e02042b62751395b9e7225628c1b708. The outcome of this isn't that clear, let's revert this for now, see discussion on #6286.
* Merge pull request #6300 from keszybz/refuse-to-load-some-unitsLennart Poettering2017-07-125-71/+123
|\ | | | | Refuse to load some units
| * man: add warnings that Private*= settings are not always appliedZbigniew Jędrzejewski-Szmek2017-07-111-9/+26
| |
| * core/load-fragment: refuse units with errors in ↵Zbigniew Jędrzejewski-Szmek2017-07-113-10/+19
| | | | | | | | | | | | | | RootDirectory/RootImage/DynamicUser Behaviour of the service is completely different with the option off, so the service would probably mess up state on disk and do unexpected things.
| * core/load-fragment: refuse units with errors in certain directivesZbigniew Jędrzejewski-Szmek2017-07-112-52/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error is encountered in any of the Exec* lines, WorkingDirectory, SELinuxContext, ApparmorProfile, SmackProcessLabel, Service (in .socket units), User, or Group, refuse to load the unit. If the config stanza has support, ignore the failure if '-' is present. For those configuration directives, even if we started the unit, it's pretty likely that it'll do something unexpected (like write files in a wrong place, or with a wrong context, or run with wrong permissions, etc). It seems better to refuse to start the unit and have the admin clean up the configuration without giving the service a chance to mess up stuff. Note that all "security" options that restrict what the unit can do (Capabilities, AmbientCapabilities, Restrict*, SystemCallFilter, Limit*, PrivateDevices, Protect*, etc) are _not_ treated like this. Such options are only supplementary, and are not always available depending on the architecture and compilation options, so unit authors have to make sure that the service runs correctly without them anyway. Fixes #6237, #6277.
* | NEWS: say that libidn2 is experimental (#6335)Zbigniew Jędrzejewski-Szmek2017-07-123-36/+37
| | | | | | | | | | | | Handling of "_" and some other details requires more thought: https://gitlab.com/libidn/libidn2/issues/30 Let's switch the default back to libidn and add a note in NEWS.
* | Merge pull request #6337 from poettering/more-new-v234Lennart Poettering2017-07-124-203/+770
|\ \ | | | | | | Let's try to release v234 tomorrow
| * | hwdb: update hwdb again for v234Lennart Poettering2017-07-113-182/+746
| | |
| * | update NEWS file, let's try to release this tomorrowLennart Poettering2017-07-111-21/+24
| | |
* | | time-util: make parse_timestamp() return -EINVAL if the input is very old ↵Yu Watanabe2017-07-112-23/+15
|/ / | | | | | | | | | | | | | | date (#6327) This reverts 7635ab8e74ea4a94e81143c3077570a986df375c and makes parse_timestamp() return -EINVAL if the input is older than 1970-01-01. Fixes #6290.
* | fstab-generator: Chase symlinks where possible (#6293)Colin Walters2017-07-113-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has a long history; see see 5261ba901845c084de5a8fd06500ed09bfb0bd80 which originally introduced the behavior. Unfortunately that commit doesn't include any rationale, but IIRC the basic issue is that systemd wants to model the real mount state as units, and symlinks make canonicalization much more difficult. At the same time, on a RHEL6 system (upstart), one can make e.g. `/home` a symlink, and things work as well as they always did; but one doesn't have access to the sophistication of mount units (dependencies, introspection, etc.) Supporting symlinks here will hence make it easier for people to do upgrades to RHEL7 and beyond. The `/home` as symlink case also appears prominently for OSTree; see https://ostree.readthedocs.io/en/latest/manual/adapting-existing/ Further work has landed in the nspawn case for this; see e.g. d944dc9553009822deaddec76814f5642a6a8176 A basic limitation with doing this in the fstab generator (and that I hit while doing some testing) is that we obviously can't chase symlinks into mounts, since the generator runs early before mounts. Or at least - doing so would require multiple passes over the fstab data (as well as looking at existing mount units), and potentially doing multi-phase generation. I'm not sure it's worth doing that without a real world use case. For now, this will fix at least the OSTree + `/home` <https://bugzilla.redhat.com/show_bug.cgi?id=1382873> case mentioned above, and in general anyone who for whatever reason has symlinks in their `/etc/fstab`.
* | bootctl: allow non-root user to run `bootctl status` (#5964)Yu Watanabe2017-07-111-29/+37
| |
* | Merge pull request #6329 from poettering/random-mini-fixesZbigniew Jędrzejewski-Szmek2017-07-111-5/+5
|\ \ | | | | | | random-util.c mini fixes
| * | random-util: we are fine if ints are 16 bytes actuallyLennart Poettering2017-07-111-1/+1
| | | | | | | | | | | | Not that it matters IRL, but let's make this less surprising to read...
| * | random-util: always cast from smaller to bigger type when comparingLennart Poettering2017-07-111-4/+4
| | | | | | | | | | | | | | | | | | When we compare two size values, let's make sure we cast from the smaller to the bigger type first, if both types differ, rather than the reverse in order to not run into overflows.
* | | systemd: do not stop units bound to inactive units while coldplugging (#6316)Zbigniew Jędrzejewski-Szmek2017-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running systemd-analyze verify I would get a random subset of warnings (sometimes none, sometimes one or two): dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.swap: Unit is bound to inactive unit dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device. Stopping, too. home.mount: Unit is bound to inactive unit dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device. Stopping, too. boot.mount: Unit is bound to inactive unit dev-disk-by\x2duuid-56c56bfd\x2d93f0\x2d48fb\x2dbc4b\x2d90aa67144ea5.device. Stopping, too. When running with debug on, it's pretty obvious what is happening: home.mount: Changed dead -> mounted home.mount: Unit is bound to inactive unit dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device. Stopping, too. home.mount: Trying to enqueue job home.mount/stop/fail home.mount: Installed new job home.mount/stop as 27 home.mount: Enqueued job home.mount/stop as 27 ... dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device: Installed new job dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device/start as 47 dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device: Changed dead -> plugged dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device: Job dev-disk-by\x2duuid-75751556\x2d6e31\x2d438b\x2d99c9\x2dd626330d9a1b.device/start finished, result=done Fixes #2206, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808151.
* | | resolved: allow resolution of names which libidn2 considers invalid (#6315)Zbigniew Jędrzejewski-Szmek2017-07-114-22/+63
| | | | | | | | | | | | | | | | | | | | | https://tools.ietf.org/html/rfc5891#section-4.2.3.1 says that > The Unicode string MUST NOT contain "--" (two consecutive hyphens) in the third > and fourth character positions and MUST NOT start or end with a "-" (hyphen). This means that libidn2 refuses to encode such names. Let's just resolve them without trying to use IDN.
* | | Add comments to log_functions which shouldn't be called from library code ↵Zbigniew Jędrzejewski-Szmek2017-07-112-0/+13
|/ / | | | | | | (#6326)
* | Merge pull request #6325 from keszybz/make-delta-boring-againLennart Poettering2017-07-112-49/+84
|\ \ | | | | | | Make delta output repeatable
| * | delta: sort files and dirs before processingZbigniew Jędrzejewski-Szmek2017-07-101-44/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make output deterministic, and independent of the directory layout on disk. Just using ordered hashmaps would be enough to make the output deterministic on a specific machine, but to make it identical on different machines with the same set of files and directories, names are sorted after being use. Fixes #6157.
| * | basic/strv: use existing qsort_safe() helperZbigniew Jędrzejewski-Szmek2017-07-101-5/+1
| | | | | | | | | | | | | | | strv_sort() predates qsort_safe(), but we can convert it to it to save a few lines.
* | | Merge pull request #6322 from poettering/mount-mini-fixesZbigniew Jędrzejewski-Szmek2017-07-101-18/+19
|\ \ \ | | | | | | | | a bunch of mini fixes for mount-tool.c
| * | | mount: add missing validation error messageLennart Poettering2017-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | We really should generate exactly one log message for each error, hence let's do that in this one case too.
| * | | mount: change find_loop_device() error code when no loop device is found to ↵Lennart Poettering2017-07-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENXIO ENOENT is a bit too likely to be returned for various reasons, for example if /sys or /proc are not mounted and hence the files we need not around. Hence, let's use ENXIO instead, which is equally fitting for the purpose but has the benefit that the underlying calls won't generate this error on their own, hence any ambiguity is removed.
| * | | mount: add debug logging for the case when we knowingly ignore an errorLennart Poettering2017-07-101-1/+3
| | | |
| * | | mount: rework find_loop_device() to log about no errorsLennart Poettering2017-07-101-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should either log about all errors in a function, or about none (and then leave the logging about it to the caller who we propagate the error to). Given that the callers of find_loop_device() already log about the returned errors let's hence suppress the log messages in find_loop_device() itself.
| * | | mount: fix potential bad memory access when /proc/self/mountinfo is emptyLennart Poettering2017-07-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | It's unlikely this can ever be triggered, but let's be safe rather than sorry, and handle the case where the list of mount points is zero, and the "l" array thus NULL. let's ensure we allocate at least one entry.
* | | | journal: explicitly add fds to mmap-cache (#6307)Vito Caputo2017-07-106-169/+169
| | | | | | | | | | | | | | | | | | | | This way we have a MMapFileDescriptor reference external to the cache, and can supply the handle directly to mmap_cache_get(), eliminating hashmap lookups entirely from the hot path.
* | | | hwdb: add axis range corrections for Lenovo X1 Carbon 5th gen (over (#6320)Alex Lu2017-07-111-0/+7
|/ / / | | | | | | rmi4).
* | | man: briefly document permitted user/group name syntax for User=/Group= and ↵Lennart Poettering2017-07-102-19/+33
| | | | | | | | | | | | | | | | | | | | | syusers.d (#6321) As discussed here: https://lists.freedesktop.org/archives/systemd-devel/2017-July/039237.html
* | | update TODOLennart Poettering2017-07-101-0/+4
| | |
* | | expand path of systemctl link argument (#6186)Boucman2017-07-091-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemctl link is the only systemctl verb that takes a filename (and not a unit name) as argument use path_strv_make_absolute_cwd to expand the provided filename in order to make it easier to use from the command line keep the absolute pathname requirement when --root is used [zj: add explicit error messages for the cases of --root and plain filename instead of skipping normalization and just relying on systemd to refuse to link non-absolute arguments. This allows us to make the error message more informative.]
* | | Merge pull request #6287 from keszybz/wsign-compareDjalal Harouni2017-07-101-1/+2
|\ \ \ | | | | | | | | build-sys: use -Wextra if available
| * | | meson: use -Wextra if availableZbigniew Jędrzejewski-Szmek2017-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wextra was not added to CFLAGS under meson by default, as it is done by the autotools build. C.f. 218f46711115669c26389a5bad79e57aa3c37f66.
* | | | Merge pull request #6289 from keszybz/config-tweaksDjalal Harouni2017-07-102-5/+5
|\ \ \ \ | | | | | | | | | | Config parsing tweaks
| * | | | basic/log: use getenv instead of secure_getenvZbigniew Jędrzejewski-Szmek2017-07-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | secure_getenv does not work when the process has a nonempty permitted capability set, which means that it's unduly hard to configure logging in systemd-logind, systemd-resolved, and others. secure_getenv is useful for code in libraries which might get called from a setuid application. log_parse_environment() is never called from our library code, but directly form various top-level executables. None of them are installed suid, and none are prepared to be used this way, since many additional changes would be required to make that safe. We may just as well drop the check and allow SYSTEMD_LOG_* to properly parsed. Fixes #4900.
| * | | | resolved: treat failure to parse config as non-fatalZbigniew Jędrzejewski-Szmek2017-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes #6014.
* | | | | hwdb: add axis range corrections for Lenovo X1 Carbon 5th gen. (#6312)Alex Lu2017-07-101-0/+7
| | | | |
* | | | | Merge pull request #6311 from keszybz/memleakDjalal Harouni2017-07-092-3/+6
|\ \ \ \ \ | | | | | | | | | | | | Fix trivial memleak in sd-login code
| * | | | | sd-login: fix memleak when output argument is NULLZbigniew Jędrzejewski-Szmek2017-07-081-2/+5
| | | | | |
| * | | | | networkd: trivial style cleanupZbigniew Jędrzejewski-Szmek2017-07-081-1/+1
| | | | | |
* | | | | | units: Tell login to preserve environment (#6023)Nikolai Kondrashov2017-07-094-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make agetty started by *getty* units pass '-p' option to "login", so it doesn't clear the environment and passes whatever was setup by systemd to shells. This is needed especially for programs which are specified as user shells, but won't read locale settings from anywhere but environment. [zj: cherry-pick just the second patch from the series, see discussion on the pull request.]
* | | | | | sd_uid_get_state: do not return -ENOENT if state is "offline" (#6302)Yu, Li-Yu2017-07-081-1/+1
|/ / / / /
* | | | | time-util: make parse_timestamp() set 0 if the input is very old date (#6297)Yu Watanabe2017-07-082-13/+24
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the input is older than "1970-01-01 UTC", then `parse_timestamp()` fails and returns -EINVAL. However, if the input is e.g. `-100years`, then the function succeeds and sets `usec = 0`. This commit makes the function also succeed for old dates and set `usec = 0`. Fixes #6290.
* | | | shared: leave output_journal() output in buffer (#6304)Vito Caputo2017-07-072-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e268b81e moved an fflush() from output_json() to the generic output_journal(), when it probably should have deleted all fflush() calls from logs-show.c altogether. The caller supplies the FILE * to these functions, and should be in charge of flushing as needed. The current implementation essentially defeats any buffering stdio was bringing to the table, resulting in extraneous tiny write() calls in commands like `journalctl -b`. This commit removes the fflush() call from output_journal(), and adds them to journalctl before waiting for more entries and at completion. This way in the hot path when journalctl loops on entries stdio can combine multiple entries into bulkier write() calls.
* | | | tests: adapt test-functions to run tests on SUSE (#6270)tblume2017-07-061-4/+28
| |_|/ |/| |
* | | resolve: Try to remove the ambiguity about the mtu parameter of ↵Benjamin Robin2017-07-053-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dns_packet_new (#6285) Actually the caller of dns_packet_new() pass 0 or the data size of the UDP message. So try to reflect that, so rename the `mtu` parameter to `min_alloc_dsize`. In fact `mtu` is the size of the whole UDP message, including the UDP header, and here we just need to pass the size of data (without header). This was confusing. Also add a check on the requested allocated size, since some caller do not check what is really allocated. Indeed the function do not allocate more than DNS_PACKET_SIZE_MAX whatever the value of the `mtu` parameter.
* | | fstab-generator: fix new NULL dereference. (#6296)NeilBrown2017-07-051-1/+1
| | | | | | | | | | | | fstype can be NULL, particularly when called from add_sysroot_mount(), so we need to use STRPTR_IN_SET().
* | | Merge pull request #6236 from yuwata/mount-loopZbigniew Jędrzejewski-Szmek2017-07-052-137/+330
|\ \ \ | | | | | | | | systemd-mount: support discovery of loop backing file