summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-05-11core: always initialize ExecParamters.bus_endpoint_fd to -1Lennart Poettering
Otherwise it might be passed in as 0, which is a valid fd, but usually does not refer to a real endpoint.
2015-05-11util: optimize free_and_strdup() if NOPLennart Poettering
Under the assumption that strcmp() is cheaper than memory allocation, let's avoid the allocation, if the new value is identical to the old.
2015-05-11nspawn: pass on kill signal setting to contaner scopeLennart Poettering
Let's just pass on what the user set for us.
2015-05-11test-libudev: fix leak in error caseThomas Hindoe Paaboel Andersen
CID# 1297428
2015-05-11swap: avoid null pointer dereferenceThomas Hindoe Paaboel Andersen
CID#1297436
2015-05-11treewide: Correct typos and spell plural of bus consistentTorstein Husebø
2015-05-10Generate systemd-fsck-root.service in the initramfsZbigniew Jędrzejewski-Szmek
In the initrafms, generate a systemd-fsck-root.service to replace systemd-fsck@<sysroot-device>.service. This way, after we transition to the real root, systemd-fsck-root.service is marked as already done. This introduces an unnecessary synchronization point, because systemd-fsck@* is ordered after systemd-fsck-root also in the initramfs. In practice this shouldn't be a problem. https://bugzilla.redhat.com/show_bug.cgi?id=1201979 C.f. 956eaf2b8d6c9999024705ddadc7393bc707de02.
2015-05-07udevd: remove unused functionThomas Hindoe Paaboel Andersen
2015-05-06udevd: don't explicitly count the number of workersTom Gundersen
Simply query the size of the hashmap keeping all the worker contexts instead.
2015-05-06udevd: keep workers in a hashmap rather than a listTom Gundersen
This makes the code somewhat more readable.
2015-05-06udevd: worker - drop reference countingTom Gundersen
Make the worker context have the same life-span as the worker process. It is created on fork() and free'd on SIGCHLD. The change means that we can get worker_returned() for a worker context that is no longer around, this is not a problem and we can just drop the message. The only use for worker_returned() is to know to reschedule events to workers that are still around, so if the worker has already exited it is not important to keep track of. We still print a debug statement in this case to be on the safe side.
2015-05-06device: avoid null pointer dereferenceThomas Hindoe Paaboel Andersen
2015-05-06udev: fix weird coding-styleDavid Herrmann
Eeeew!
2015-05-06test-libudev: add error handlingThomas Hindoe Paaboel Andersen
CID#1296244
2015-05-06udevd: worker - allow passing NULL to worker_unref()Tom Gundersen
2015-05-06udevd: worker - use _exit() rather than exit()Tom Gundersen
Follow the coding style and avoid the exit handlers.
2015-05-06udevd: modernize error handlingTom Gundersen
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.
2015-05-06udevd: use kernel cmdline parserTom Gundersen
2015-05-06udevd: worker - move some fields from the worker to the eventTom Gundersen
2015-05-06udevd: worker - introduce worker_attach_event()Tom Gundersen
2015-05-06udevd: worker - make refcounting clearerTom Gundersen
Take and drop explicit references where it makes sense.
2015-05-06udevd: worker - only allocate the worker struct in the main processTom Gundersen
This is not used in the worker, so avoid having to free it there.
2015-05-06udevd: rename worker_new() to worker_spawn()Tom Gundersen
2015-05-06udevd: don't track worker exitcodeTom Gundersen
We used to use this to track failed events so they could be retriggered, but that is no longer done, so the code can be dropped.
2015-05-06udev: fix coding styleSusant Sahani
2015-05-06systemctl: null-initialize pointer with cleanup attributeDaniel Buch
2015-05-06machinectl: remove unused variableThomas Hindoe Paaboel Andersen
2015-05-06bus: don't switch to kdbus if not requestedDavid Herrmann
Whenever systemd is re-executed, it tries to create a system bus via kdbus. If the system did not have kdbus loaded during bootup, but the module is loaded later on manually, this will cause two system buses running (kdbus and dbus-daemon in parallel). This patch makes sure we never try to create kdbus buses if it wasn't explicitly requested on the command-line.
2015-05-06timedated: remove unnecessary gotoZbigniew Jędrzejewski-Szmek
Not needed since 99f861310d3f05f4.
2015-05-06tmpfiles: try to handle read-only file systems gracefullyMichael Olbrich
On read-only filesystems trying to create the target will not fail with EEXIST but with EROFS. Handle EROFS by checking if the target already exists, and if empty when truncating. This avoids reporting errors if tmpfiles doesn't actually needs to do anything. [zj: revert condition to whitelist rather then blacklisting, and add goto to avoid stat'ting twice.]
2015-05-05shared/utmp-wtmp: fix copy/paste errorMichael Olbrich
2015-05-05Add audit type generated files to gitignoreZbigniew Jędrzejewski-Szmek
They are not currently used, but the Makefile rules don't know that. It's easier to ignore them, then to special-case creation rules.
2015-05-05lockfile-util.[ch]: Split out from util.[ch]Colin Walters
Continuing the general trend of splitting up util.[ch]. I specifically want to reuse this code in https://github.com/GNOME/libglnx and having it split up will make future copy-pasting easier.
2015-05-05Fix permissions on /run/systemd/nspawn/locksSeth Jennings
machined is getting an EACCES when trying to create the lock file for images because the mode on /run/systemd/nspawn/locks is 0600. mkdir("/run/systemd/nspawn/locks", 0600) = -1 EEXIST (File exists) stat("/run/systemd/nspawn/locks", {st_mode=S_IFDIR|0600, st_size=40, ...}) = 0 open("/run/systemd/nspawn/locks/inode-41:256", O_RDWR|O_CREAT|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EACCES (Permission denied) This commit adjusts the mode to 0700 to correct the issue.
2015-05-05treewide: fix typosTorstein Husebø
2015-05-05core: be more strict when manipulating slices names and unescaping paths ↵Lennart Poettering
from unit names Let's better be safe then sorry.
2015-05-05core: bus name units should not allow aliases or instancesLennart Poettering
2015-05-05core: rework unit name validation and manipulation logicLennart Poettering
A variety of changes: - Make sure all our calls distuingish OOM from other errors if OOM is not the only error possible. - Be much stricter when parsing escaped paths, do not accept trailing or leading escaped slashes. - Change unit validation to take a bit mask for allowing plain names, instance names or template names or an combination thereof. - Refuse manipulating invalid unit name
2015-05-05util: be a bit safer in path_is_safe()Lennart Poettering
We should be more strict when verifying paths with path_is_safe() for potentially dangerous constructs, and that includes lengths of PATH_MAX-1 and larger. Be more accurate here.
2015-05-05cgroup-util: be more strict when processing slice unit namesLennart Poettering
2015-05-04generators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mountZbigniew Jędrzejewski-Szmek
This makes it obvious that those functions are only usable in the initramfs. Also, add a warning when noauto, nofail, or automount is used for the root fs, instead of silently ignoring. Using those options would be a sign of significant misconfiguration, and if we bother to check for them, than let's go all the way and complain. Other various small cleanups and reformattings elsewhere.
2015-05-04network: Implement fallback DHCPv6 prefix handling for older kernelsPatrik Flykt
When setting IPv6 addresses acquired by DHCPv6, systemd-networkd sets the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. As the flag and the attribute are present starting with Linux 3.14, older kernels will need systemd-network to manage prefix route expiry. By default, DHCPv6 addresses are first assigned setting the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. Should the address assignment fail, the same assignment is tried without the IFA_FLAGS attribute. Should also the second attempt fail, an error is printed and address assignment ends with failure. As successful use of the IFA_FLAGS netlink attribute is recorded in the Link structure, the DHCPv6 code will know if the kernel or systemd-network fallback code handles expiring prefixes. The prefix expiration and IPv6 address updating fallback code is resurrected from the parts deleted with commit 47d45d3cde45d6545367570264e4e3636bc9e345. This patch can be removed once the minimum kernel requirements are greater than or equal to 3.14.
2015-05-02fstab-generator: fix memleakZbigniew Jędrzejewski-Szmek
filtered was used to store an allocated string twice. The first allocation was thus lost. The string is not needed for anything, so simply skip the allocation. Fixup for deb0a77cf0b409141c4.
2015-04-30terminal: update for simpler sd-bus api'sThomas Hindoe Paaboel Andersen
2015-04-30core: simplify %r and %R logic a bitLennart Poettering
Do not calculate the cgroup path manually, just use normal unit fields and calls for that.
2015-04-30core: catch some special cases in cg_slice_to_path()Lennart Poettering
2015-04-30sym: adding missing symbols to .sym fileLennart Poettering
2015-04-30sd-bus,sd-login: add api for querying the slice within the the user systemd ↵Lennart Poettering
instance of a process units are organized in slice trees, not only for the system instance, but also for user systemd instances, expose this properly.
2015-04-30core: simplify unit type detection logicLennart Poettering
Introduce a new call unit_type_supported() and make use of it everywhere. Also, drop Manager parameter from per-type supported method prototype.
2015-04-30sd-bus: when we get ENOTTY on the HELLO ioctl assume incompatible API versionLennart Poettering
As perparation for future incompatible kdbus kernel API changes.