summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-17core: minor typo fixAli H. Caliskan
2014-04-16delta: do not use unicode chars in C localeZbigniew Jędrzejewski-Szmek
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
2014-04-16install: create_symlink() check unlink() return valueDjalal Harouni
create_symlink() do not check the return value of unlink(), this may confuse the user. Before the unlink() call we check the 'force' argument. If it is not set we fail with -EEXIST, otherwise we unlink() the file, therefore the next symlink() should not fail with -EEXIST (do not count races...). However since callers may not have appropriate privileges to unlink() the file we lose the -EPERM or any other errno code of unlink(), and return the -EEXIST of the next symlink(). Fix this by checking unlink() results. Before: $ systemctl --force --root=~/container-03 set-default multi-user.target Failed to set default target: File exists After: $ systemctl --force --root=~/container-03 set-default multi-user.target Failed to set default target: Permission denied
2014-04-16systemctl: allow to change the default target without the --force switchDjalal Harouni
Currently "systemctl set-default" will fail to change the default target due to the 'default.target' being a symlink which is always the case. To work around this, the user must specify the "--force" switch to be able to overwrite the existing symlink. This is clearly a regression that was introduced by commit 718db96199e since it worked before without the "--force" switch and the man pages do not mention that you need to specify it. It is expected that this is a symlink. So just explicity set the force flag to make it work again. https://bugs.freedesktop.org/show_bug.cgi?id=76623 Reported-by: <code@progandy.de>
2014-04-16Handle Unix domain socket connections from outside our namespaceEelco Dolstra
NixOS uses Unix domain sockets for certain host <-> container interaction; i.e. the host connects to a socket visible in the container's directory tree, where the container uses a .socket unit to spawn the handler program on demand. This worked in systemd 203, but in 212 fails with "foo.socket failed to queue service startup job (Maybe the service file is missing or not a template unit?): No data available". The reason is that getpeercred() now returns ENODATA if it can't get the PID of the client, which happens in this case because the client is not in the same PID namespace. Since getpeercred() is only used to generate the instance name, this patch simply handles ENODATA by creating an instance name "<nr>-unknown". [zj: reorder clauses and remove (unsigned long) casts.]
2014-04-16man: document relationship between RequiresMountsFor and noautoZbigniew Jędrzejewski-Szmek
https://bugzilla.redhat.com/show_bug.cgi?id=1088057
2014-04-16test-path-util: fix running with separate build dirZbigniew Jędrzejewski-Szmek
test-path-utils attempts to find itself, but if the binary is not in current directory, the test would fail.
2014-04-16sysctl: replaces some slashes with dotsZbigniew Jędrzejewski-Szmek
It turns out that plain sysctl understands a.b/c syntax to write to /proc/sys/a/b.c. Support this for compatibility. https://bugs.freedesktop.org/show_bug.cgi?id=77466
2014-04-16systemctl: add --recursive for list-timersThomas Hindoe Paaboel Andersen
2014-04-16systemctl: add --recursive for list-socketsThomas Hindoe Paaboel Andersen
2014-04-14bus-proxy: remove unused variableThomas Hindoe Paaboel Andersen
2014-04-14cgls: avoid writing an unused valueThomas Hindoe Paaboel Andersen
silences a build-scan warning for the unused value in r
2014-04-14timedatectl: avoid using uninitialized varThomas Hindoe Paaboel Andersen
sec is not set if have_time is false so avoid using it. have_time was introduced in 9ff09bcb86fb125768667aca9bc0b10b1745370a but only the first uses for sec were covered Found with scan-build
2014-04-14man: fix typos in sd_event_newThomas Hindoe Paaboel Andersen
2014-04-14networkd: link - make state changing logging a bit less verboseTom Gundersen
2014-04-14sd-rtnl: message_addr - allow dumping of messagesTom Gundersen
2014-04-14sd-rtnl: socket_read - use a read bufferTom Gundersen
Rather than allocating/freeing memory for each message read, keep a global read buffer in the rtnl object. Also, rather than using a fixed size, peek at the pending message header to get the message size and reallocate as necessary.
2014-04-14sd-rtnl: multi-part message - store as linked-list rather than independent ↵Tom Gundersen
messages This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing the head of the linked list unrefs the whole list.
2014-04-14sd-rtnl: message_addr - expose a few more gettersTom Gundersen
2014-04-14networkd: link - ignore missing MAC address from NEWLINK messageTom Gundersen
The kernel may broadcast such messages, simply discard them.
2014-04-14hwdb: PCI - include "primary" model string in subsystem model stringKay Sievers
The data in the PCI ids file is randomly inconsistent. Many subvendor model strings just describe the "product" where the hardware is built into, not the hardware itself. This causes some "Network Card Model Foo" to show up as "Laptop Model Bar". Try to make the best out of this mess and concatenate both strings to describe the hardware.
2014-04-14hwdb: updateKay Sievers
2014-04-13util: ignore kernel errors reported via close(), unless it is EBADFLennart Poettering
The kernel can return pretty much anything there, even though the fd is closed. Let's not get confused by that.
2014-04-13udev: serialize/synchronize block device event handling with file locksKay Sievers
2014-04-13bus-proxy: when replying to bus calls set a synthetic serial number and ↵Lennart Poettering
patch the sender address Otherwise old libdbus1 is confused and will not accept our replies.
2014-04-13bus: process AddMatch/RemoveMatch driver call in proxyLennart Poettering
Previously, AddMatch/RemoveMatch calls where processed exclusively in the proxy. That's racy however, since subscribing to a signal might not complete before the signal is sent due to some subsequent method call. Hence, in order to expose the same ordering guarantees as dbus1 process the AddMatch/RemoveMatch calls from the proxy, so that they are dispatched synchronously to all following messages, thus fixing the race. Ultimately, we should probabably dissolve the driver entirely into the proxy, as it is purely a compatibility feature anyway...
2014-04-13man: explain that the timestamps on incoming kdbus messages are not ↵Lennart Poettering
necessarily monotonically increasing
2014-04-13update TODOLennart Poettering
2014-04-13build-sys: add Makefile symlinkLennart Poettering
2014-04-13update TODOLennart Poettering
2014-04-13man: add man page for sd_event_new()Lennart Poettering
2014-04-13udev: remove seqnum API and all assumptions about seqnumsKay Sievers
The way the kernel namespaces have been implemented breaks assumptions udev made regarding uevent sequence numbers. Creating devices in a namespace "steals" uevents and its sequence numbers from the host. It confuses the "udevadmin settle" logic, which might block until util a timeout is reached, even when no uevent is pending. Remove any assumptions about sequence numbers and deprecate libudev's API exposing these numbers; none of that can reliably be used anymore when namespaces are involved.
2014-04-13bash completion: fix __get_startable_unitsDan Kilman
2014-04-12path-util: also check for existence of binary when given absolute pathZbigniew Jędrzejewski-Szmek
In contrast to a filename-only argument, find_binary() did not actually check if an path exists, allowing the code to fail later on. This was OK, but it seems nicer to treat both paths identically. Also take advantage of path_make_absolute_cwd doing strdup() by itself if necessary to simplify.
2014-04-12fsck: Search for fsck.type in PATHMike Gilbert
Modifies find_binary() to accept NULL in the second argument. fsck.type lookup logic moved to new fsck_exists() function, with a test.
2014-04-12hwdb: Update database of Bluetooth company identifiersMarcel Holtmann
2014-04-12man: mention XDG_CONFIG_HOME in systemd.unitTanu Kaskinen
2014-04-12build: if -fstack-protector-strong is available, use it.Cristian Rodríguez
2014-04-12core: Make sure a stamp file exists for all Persistent=true timersThomas Bächler
If a persistent timer has no stamp file yet, it behaves just like a normal timer until it runs for the first time. If the system is always shut down while the timer is supposed to run, a stamp file is never created and Peristent=true has no effect. This patch fixes this by creating a stamp file with the current time when the timer is first started.
2014-04-12journal: properly detect language specified in lineZbigniew Jędrzejewski-Szmek
... it turns out that the duplicates in our own catalog were not real duplicates, but translations.
2014-04-12journal: cleanup up error handling in update_catalog()Zbigniew Jędrzejewski-Szmek
- Negative/positive errno mixup caused duplicates not to be detected properly. Now we get a warning about some duplicate entries in our own catalogs... - Errors in update_catalog would be ignored, but they should not be.
2014-04-12test-dhcp-client: unref lease objects to make valgrind happyZbigniew Jędrzejewski-Szmek
Also unref client objects in test code, and initalize logging, to DEBUG by default.
2014-04-12Unify GREEDY_REALLOC and GREEDY_REALLOC_TZbigniew Jędrzejewski-Szmek
greedy_realloc() and greedy_realloc0() now store the allocated size as the count, not bytes. Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere, and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just too error-prone to have two slightly different macros which do the same thing.
2014-04-12networkd: link - require both RUNNING and LOWER_UP before using linkTom Gundersen
Usually RUNNING implies LOWER_UP, but for drivers that don't support oper state, RUNNING can also mean that the state is unknown. In that case we should just trust LOWER_UP directly.
2014-04-12networkd: wait for IFF_RUNNING rather than IFF_LOWER_UPTom Gundersen
The interface is not fully ready until it enterns RUNNING. This was causing problems with sending out DHCP messages before the interface was ready, so they would get lost. In particular this affected DHCP INIT-REBOOT, as it relies on the first package sent being successful (or it will fall back to a full reboot). Also improve the logging a lot, to make future debugging of link state a lot easier.
2014-04-12sd-dhcp-client: drop logging about T1/T2Tom Gundersen
These are redundant now that the REQUEST messages contain the same information.
2014-04-12sd-dhcp-client: improve loggingTom Gundersen
Specify what kind of REQUEST we send, and distinguish between REBOOT and START. Also log stop reasons as strings rather than numbers.
2014-04-12sd-dhcp-client: use client_initialiez and client_restart for REBOOTTom Gundersen
2014-04-11networkd: add an assertTom Gundersen
This error should never happen, so replace the check with an assert. The check was anyway broken due to an uninitialized return value. Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>.
2014-04-11sd-dhcp-client: document message creation a bit moreTom Gundersen
Also reshuffle some code to make the correspondence with the RFC a bit more obvious. Small functional change: fail if we try to send a message from the wrong state.