summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-03dhcp-identifier: un-inline dhcp_validate_duid_lenZbigniew Jędrzejewski-Szmek
After all it is used in more than one place and is not that short. Also tweak the test a bit: - do not check that duid_len > 0, because we want to allow unknown duid types, and there might be some which are fine with 0 length data, (also assert should not be called from library code), - always check that duid_len <= MAX_DUID_LEN, because we could overwrite available buffer space otherwise.
2016-05-03sd-dhcp: change uint8_t *duid to const void*Zbigniew Jędrzejewski-Szmek
2016-05-03sd-dhcp{,6}-client: use standard indentation for functions argsZbigniew Jędrzejewski-Szmek
2016-05-03tests: add test for #3166 (#3180)Evgeny Vereshchagin
2016-05-03man: rename TriggerLimitIntervalBurst to TriggerLimitBurst (#3181)Evgeny Vereshchagin
[/etc/systemd/system/test.socket:2] Unknown lvalue 'TriggerLimitIntervalBurst' in section 'Socket' Follow-up for 8b26cdbd2a94
2016-05-02locale: Language fallbacks for fr_(BE|CA|CH|LU) to fr_FR (#3178)Sylvain Plantefève
2016-05-02Merge pull request #3162 from keszybz/alias-refusalLennart Poettering
Refuse Alias, DefaultInstance, templated units in install (as appropriate)
2016-05-02Merge pull request #3153 from poettering/async-cloneZbigniew Jędrzejewski-Szmek
machined: make "clone" asynchronous, and support copy-based fall-back
2016-05-02update TODOLennart Poettering
2016-05-02resolved: work around broken DNS zones set up by incapdns.netLennart Poettering
incapdns.net returns NXDOMAIN for the SOA of the zone itself but is not a terminal. This is against the specs, but we really should be able to deal with this. Previously, when verifying whether an NXDOMAIN response for a SOA/NS lookup is rightfully unsigned we'd issue a SOA lookup for the parent's domain, to derive the state from that. If the parent SOA would get an NXDOMAIN, we'd continue upwards, until we hit a signed top-level domain, which suggests that the domain actually exists. With this change whenver we need to authenticate an NXDOMAIN SOA reply, we'll request the DS RR for the zone first, and use for validation, since that this must be from the parent's zone, not the incorrect lower zone. Fixes: #2894
2016-05-02automount: move resetting of expiry timeout to automount_set_state()Lennart Poettering
that way we can be sure that there's no expiry timeout in place at any time when we aren't in the RUNNING state.
2016-05-02automount: rework propagation between automount and mount unitsLennart Poettering
Port the progagation logic to the generic Unit->trigger_notify() callback logic in the unit vtable, that is called for a unit not only when the triggered unit of it changes state but also when a job for that unit finishes. This, firstly allows us to make the code a bit cleaner and more generic, but more importantly, allows us to notice correctly when a mount job fails, and propagate that back to autofs client processes. Fixes: #2181
2016-05-02core: don't propagate service state to sockets as long as there's still a ↵Lennart Poettering
job for the service queued
2016-05-02fstab-generator: add newline before we start a new unit file sectionLennart Poettering
We already did this for the [Mount] section, let's do the same for [Automount].
2016-05-02automount: add debug message when we get notified about mount state changesLennart Poettering
2016-05-02core: remove duplicate code in automount_update_mount()Lennart Poettering
Also, fix indentation.
2016-05-02core: simplify unit_need_daemon_reload() a bitLennart Poettering
And let's make it more accurate: if we have acquire the list of unit drop-ins, then let's do a full comparison against the old list we already have, and if things differ in any way, we know we have to reload. This makes sure we detect changes to drop-in directories in more cases.
2016-05-02core: fix detection whether per-unit drop-ins changedLennart Poettering
This fixes fall-out from 6d10d308c6cd16528ef58fa4f5822aef936862d3. Until that commit, do determine whether a daemon reload was required we compare the mtime of the main unit file we loaded with the mtime of it on disk for equality, but for drop-ins we only stored the newest mtime of all of them and then did a "newer-than" comparison. This was brokeni with the above commit, when all checks where changed to be for equality. With this change all checks are now done as "newer-than", fixing the drop-in mtime case. Strictly speaking this will not detect a number of changes that the code before above commit detected, but given that the mtime is unlikely to go backwards, and this is just intended to be a helpful hint anyway, this looks OK in order to keep things simple. Fixes: #3123
2016-05-02core: move enforcement of the start limit into per-unit-type code againLennart Poettering
Let's move the enforcement of the per-unit start limit from unit.c into the type-specific files again. For unit types that know a concept of "result" codes this allows us to hook up the start limit condition to it with an explicit result code. Also, this makes sure that the state checks in clal like service_start() may be done before the start limit is checked, as the start limit really should be checked last, right before everything has been verified to be in order. The generic start limit logic is left in unit.c, but the invocation of it is moved into the per-type files, in the various xyz_start() functions, so that they may place the check at the right location. Note that this change drops the enforcement entirely from device, slice, target and scope units, since these unit types generally may not fail activation, or may only be activated a single time. This is also documented now. Note that restores the "start-limit-hit" result code that existed before 6bf0f408e4833152197fb38fb10a9989c89f3a59 already in the service code. However, it's not introduced for all units that have a result code concept. Fixes #3166.
2016-05-02util: don't dump /proc/cpuinfo contents in debug infoLennart Poettering
This is hardly useful, it's trivial for developers to get that info by running cat /proc/cpuinfo. Fixes #3155
2016-05-02man: slightly extend the machinectl clone documentationLennart Poettering
2016-05-02minor CODING_STYLE clarificationLennart Poettering
2016-05-02update TODOLennart Poettering
2016-05-02machinectl: since clone/remove/copy verbs are possibly slow, turn off bus ↵Lennart Poettering
call timeout By default we timeout all bus calls, but if we know that these bus calls might be slow, let's explicitly turn the timeouts off.
2016-05-02machined: rework copy-from/copy-to operation to use generic Operation objectLennart Poettering
With this all potentially slow operations are done out-of-process, asynchronously, using the same "Operation" object.
2016-05-02machined: also make image removal operation asynchronousLennart Poettering
If we remove a directory image (i.e. not a btrfs snapshot) then things might get quite expensive, hence run this asynchronous in a forked off process, too.
2016-05-02machined: support non-btrfs file systems with "machinectl clone"Lennart Poettering
Fall back to a normal copy operation when the backing file system isn't btrfs, and hence doesn't support cheap snapshotting. Of course, this will be slow, but given that the execution is asynchronous now, this should be OK. Fixes: #1308
2016-05-02tree-wide: fix invocations of chattr_path()Lennart Poettering
chattr_path() takes two bitmasks, and no booleans. Fix the various invocations to do this properly.
2016-05-02copy: adjust directory times after writing to the directoryLennart Poettering
When recursively copying a directory tree, fix up the file times after having created all contents in it, so that our changes don't end up altering any of the directory times.
2016-05-02copy: return the right error when we can't open a fileLennart Poettering
2016-05-02image: enable btrfs quotas on the clone destination, not the sourceLennart Poettering
2016-05-02util: rework sigkill_wait() to not require pid_t pointerLennart Poettering
Let's make sigkill_wait() take a normal pid_t, and add sigkill_waitp() that takes a pointer (which is useful for usage in _cleanup_), following the usual logic we have for this.
2016-05-02machined: run clone operation asynchronously in the backgroundLennart Poettering
Cloning an image can be slow, if the image is not on a btrfs subvolume, hence let's make sure we do this asynchronously in a child process, so that machined isn't blocked as long as we process the client request. This adds a new, generic "Operation" object to machined, that is used to track these kind of background processes. This is inspired by the MachineOperation object that already exists to make copy operations asynchronous. A later patch will rework the MachineOperation logic to use the generic Operation instead.
2016-05-02tests: add test for https://github.com/systemd/systemd/issues/2467 (#3168)Evgeny Vereshchagin
2016-05-01shared/install: refuse template files for non-templateable unitsZbigniew Jędrzejewski-Szmek
$ systemctl --root=/ enable templated@bar.mount Unit type mount cannot be templated. Failed to enable: Invalid argument.
2016-05-01shared/install: warn about DefaultInstance in non-template unitsZbigniew Jędrzejewski-Szmek
[/etc/systemd/system/mnt-test.mount:6] DefaultInstance only makes sense for template units, ignoring.
2016-05-01Move no_instances information to shared/Zbigniew Jędrzejewski-Szmek
This way it can be used in install.c in subsequent commit.
2016-05-01shared/install: ignore Alias in [Install] of units which don't allow aliasesZbigniew Jędrzejewski-Szmek
A downside is that a warning about missing [Install] is printed: $ systemctl --root=/ enable mnt-test.mount [/etc/systemd/system/mnt-test.mount:5] Aliases are not allowed for mount units, ignoring. The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some instance name specified. That's a bit misleading, but I don't see an easy way to fix this. But the situation is similar for many other parsing errors, so maybe that's OK.
2016-05-01Move no_alias information to shared/Zbigniew Jędrzejewski-Szmek
This way it can be used in install.c in subsequent commit.
2016-05-01Merge pull request #3165 from evverx/tests-cleanupsLennart Poettering
tests,build-sys: some cleanups
2016-05-01catalog: rename RateLimitInterval= to RateLimitIntervalSec=Evgeny Vereshchagin
Follow-up for f0367da7d1a61 Closes #3158
2016-05-01test: ensure presets are evaluated in orderAlex Crawford
This tests to make sure that preset patterns are checked in the order they were declared. Both "prefix-1.service" and "prefix-2.service" match against two rules: their exact name (which enables the service) and "prefix-*.service" (which disables the service). Because of the ordering, only "prefix-1.service" should be enabled.
2016-05-01tests: use symlink to MakefileEvgeny Vereshchagin
2016-05-01build-sys: add TEST-0[89]-* to distEvgeny Vereshchagin
Follow-up for 91f9f8f1bae and 4f4d6ee4be1c
2016-05-01build-sys: allow references to adm group to be omitted (#3150)Franck Bui
2016-04-30Merge pull request #3152 from poettering/aliasfixZbigniew Jędrzejewski-Szmek
Refuse aliases to non-aliasable units in more places Fixes #2730.
2016-04-30architecture: Add nios2 (#3159)Zbigniew Jędrzejewski-Szmek
Add nios2 architecture support. The nios2 is a softcore by Altera.
2016-04-29networkd: rework headers to avoid circular includesZbigniew Jędrzejewski-Szmek
Header files were organized in a way where the includer would add various typedefs used by the includee before including it, resulting in a tangled web of dependencies between files. Replace this with the following logic: networkd.h / \ networkd-link.h \ networkd-ipv4ll.h--\__\ networkd-fdb.h \ networkd-network.h netword-netdev-*.h networkd-route.h \ networkd-netdev.h If a pointer to a structure defined in a different header file is needed, use a typedef line instead of including the whole header.
2016-04-29Merge pull request #3151 from keszybz/pr3149-2Zbigniew Jędrzejewski-Szmek
Assorted fixes #3149 + one commit tacked on top
2016-04-29Merge pull request #3148 from poettering/triggerZbigniew Jędrzejewski-Szmek
core: introduce activation rate limit and parse nice levels and close sockets properly