summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-05-07udevd: remove unused functionHEADmasterThomas Hindoe Paaboel Andersen1-4/+0
2015-05-06udevd: don't explicitly count the number of workersTom Gundersen1-13/+8
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 Gundersen1-82/+74
This makes the code somewhat more readable.
2015-05-06udevd: worker - drop reference countingTom Gundersen1-30/+32
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 Andersen1-1/+1
2015-05-06udev: fix weird coding-styleDavid Herrmann1-1/+1
Eeeew!
2015-05-06test-libudev: add error handlingThomas Hindoe Paaboel Andersen1-1/+4
CID#1296244
2015-05-06udevd: worker - allow passing NULL to worker_unref()Tom Gundersen1-2/+1
2015-05-06udevd: worker - use _exit() rather than exit()Tom Gundersen1-1/+1
Follow the coding style and avoid the exit handlers.
2015-05-06udevd: modernize error handlingTom Gundersen1-48/+36
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.
2015-05-06udevd: use kernel cmdline parserTom Gundersen1-43/+36
2015-05-06udevd: worker - move some fields from the worker to the eventTom Gundersen1-11/+14
2015-05-06udevd: worker - introduce worker_attach_event()Tom Gundersen1-13/+13
2015-05-06udevd: worker - make refcounting clearerTom Gundersen1-16/+32
Take and drop explicit references where it makes sense.
2015-05-06udevd: worker - only allocate the worker struct in the main processTom Gundersen1-12/+13
This is not used in the worker, so avoid having to free it there.
2015-05-06udevd: rename worker_new() to worker_spawn()Tom Gundersen1-2/+2
2015-05-06udevd: don't track worker exitcodeTom Gundersen1-10/+2
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-06Update TODODavid Herrmann1-2/+0
2015-05-06udev: fix coding styleSusant Sahani1-2/+1
2015-05-06systemctl: null-initialize pointer with cleanup attributeDaniel Buch1-1/+1
2015-05-06machinectl: remove unused variableThomas Hindoe Paaboel Andersen1-1/+1
2015-05-06bus: don't switch to kdbus if not requestedDavid Herrmann6-8/+37
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-Szmek1-3/+0
Not needed since 99f861310d3f05f4.
2015-05-06tmpfiles: try to handle read-only file systems gracefullyMichael Olbrich1-2/+11
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 Olbrich1-1/+1
2015-05-05Add audit type generated files to gitignoreZbigniew Jędrzejewski-Szmek1-1/+1
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 Walters7-136/+197
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 Jennings1-2/+2
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ø2-2/+2
2015-05-05update TODOLennart Poettering1-1/+5
2015-05-05man: document that nspawn -x, --template= and machinectl clone leave ↵Lennart Poettering2-3/+16
hostname and machine id unmodified
2015-05-05man: nspawn is used in production these days, admit thatLennart Poettering1-5/+2
Previously, the man page suggested to only use nspawn for testing, building, and debugging things. However, it is nowadays used in production and used as building block for rocket, hence let's just admit that it's pretty much production ready.
2015-05-05core: be more strict when manipulating slices names and unescaping paths ↵Lennart Poettering4-40/+178
from unit names Let's better be safe then sorry.
2015-05-05core: bus name units should not allow aliases or instancesLennart Poettering1-0/+3
2015-05-05core: rework unit name validation and manipulation logicLennart Poettering34-834/+1033
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 Poettering1-1/+1
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 Poettering2-2/+8
2015-05-05build-sys: remove left-overKay Sievers1-1/+0
2015-05-05Add VARIANT as a standard value for /etc/os-releaseStephen Gallagher1-0/+35
Some distributions (such as Fedora) are using the VARIANT field to indicate to select packages which of several default configurations they should be using. For example, VARIANT=Server provides a different default firewall configuration (blocking basically everything but SSH and the management console) whereas VARIANT=Workstation opens many other ports for application compatibility. By adding this patch to the manual pages, we can standardize on a cross-distribution mechanism for accomplishing this. Fedora implementation details are available at https://fedoraproject.org/wiki/Packaging:Per-Product_Configuration (David: drop double paranthesis)
2015-05-04generators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mountZbigniew Jędrzejewski-Szmek3-21/+38
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 Flykt4-3/+67
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-Szmek1-3/+3
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-05-02man: use utf-8 in systemd-remount-fs.service(8)Zbigniew Jędrzejewski-Szmek1-3/+3
2015-04-30terminal: update for simpler sd-bus api'sThomas Hindoe Paaboel Andersen5-25/+13
2015-04-30update TODOLennart Poettering1-2/+6
2015-04-30core: simplify %r and %R logic a bitLennart Poettering1-15/+24
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 Poettering2-2/+19
2015-04-30sym: adding missing symbols to .sym fileLennart Poettering1-2/+9
2015-04-30sd-bus,sd-login: add api for querying the slice within the the user systemd ↵Lennart Poettering10-64/+184
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-30update TODOLennart Poettering1-0/+2