summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-05-19import/pull: Tag replaced with referencePavel Odvody
Default pull version set to V2
2015-05-19test/test-json: Tests for the tokenizer bugfix and the DOM parserPavel Odvody
The DOM parser tests are accompanied with structure and element analysis
2015-05-19shared/json: Added DOM-like JSON parserPavel Odvody
This makes working with complexly structured documents easy and more reliable as the parser is not susceptible to element re-ordering. Also fixes a bug when the tokenizer would choke after reading a number.
2015-05-19shared/import-util: Tag renamed to referencePavel Odvody
Added (sha256) digest validation function
2015-05-19core: when propagating restart requests due to deps, downgrade restart to ↵Lennart Poettering
try-restart Previously, if a service A depended on a service B via Requires=, and A was not running and B restarted this would trigger a start of A as well, since the restart was propagated as restart independently of the state of A. This patch ensures that a restart of B would be propagated as a try-restart to A, thus not changing its state if it isn't up. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032061.html
2015-05-19dhcp-identifier: fix for unaligned writeTom Gundersen
Reported by Michael Olbrich.
2015-05-19core: sd_bus_error() already checks for NULL, no need to duplicate checkLennart Poettering
2015-05-19core: reinstate propagation of stop/restart jobs via RequsiteOf dependenciesLennart Poettering
This reverts the primary effect of be7d9ff730cb88d7c6a869dd5c47754c78ceaef2. After all Requisite= should be close to Requires=, without the one exception that it doesn't pull in dependencies on start. However, reverse deps on stop/restart should be treated the same way as for Restart=, and this is already documented in the man page, hence stick to it. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032049.html
2015-05-19util: fix typoJan Synacek
2015-05-19mount: properly check for mounts currently in /proc/self/mountinfoLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032059.html
2015-05-19unit: drop support for pre-v44 job serializationLennart Poettering
No distro ships that old systemd versions anyway, hence let's drop support for live-upgrades for them. Offline updates are still supported. And live-upgrades will only lose the job queue, hence basically still work...
2015-05-19core: also enforce ratelimiter if we stop a unit due to BindsTo=Lennart Poettering
This extends on bea355dac94e82697aa98e25d80ee4248263bf92, and extends the ratelimiter to not only be used for StopWhenUnneeded=1 units but also for units that have BindsTo= on a unit that is dead. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19core: use bitfield where possibleLennart Poettering
2015-05-19core: enforce a ratelimiter when stopping units due to StopWhenUnneeded=1Lennart Poettering
Otherwise we might end up in an endless stop loop. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19unit: fix unit_check_unneeded() dependency iterationLennart Poettering
Fixes a regression introduced in be7d9ff730cb88d7c6a869dd5c47754c78ceaef2.
2015-05-19mount: don't claim a device is gone from /proc/self/mountinfo before it is ↵Lennart Poettering
gone from *all* lines Devices might be referenced by multiple mount points in /proc/self/mountinfo, hence we should consider them unmounted only after they disappeared from all lines, not just from one. http://lists.freedesktop.org/archives/systemd-devel/2015-May/032026.html
2015-05-19device: create units with intended "found" valueMartin Pitt
Change device_found_node() to also create a .device unit if a device is not known by udev; this is the case for "tentative" devices picked up by mountinfo (DEVICE_FOUND_MOUNT). With that we can record the "found" attribute on the unit. Change device_setup_unit() to also accept a NULL udev_device, and don't add the extra udev information in that case. Previously device_found_node() would not create a .device unit, and unit_add_node_link() would then create a "dead" stub one via manager_load_unit(), so we lost the "found" attribute and unmounted everything from that device. https://launchpad.net/bugs/1444402 http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html
2015-05-19hostname: Allow comments in /etc/hostnameMartin Pitt
The hostname(1) tool allows comments in /etc/hostname. Introduce a new read_hostname_config() in hostname-util which reads a hostname configuration file like /etc/hostname, strips out comments, whitespace, and cleans the hostname. Use it in hostname-setup.c and hostnamed and remove duplicated code. Update hostname manpage. Add tests. https://launchpad.net/bugs/1053048
2015-05-19core: fix OOM checks in dbus-unitThomas Hindoe Paaboel Andersen
CID#1299014
2015-05-19test-hashmap: fix an assertThomas Hindoe Paaboel Andersen
CID#1299016
2015-05-19core: introduce seperate reverse dependencies for Requires= and Requisite=Lennart Poettering
This allows us to ensure that Requisite= dependencies never cause propagation between units, while Requires= dependencies might. http://lists.freedesktop.org/archives/systemd-devel/2015-May/031742.html
2015-05-19journalctl: unify how we free boot id lists a bitLennart Poettering
Instead of use LIST_FOREACH_SAFE, just use the same, seperate destructor everywhere.
2015-05-19journalctl: clean up how we log errorsLennart Poettering
All functions should either log the errors they run into, or only return them in which case the caller should log them. Make sure this rule is followed, so that each error is logged precisely once, and neither never, nor more than once.
2015-05-19journalctl: rename boot_id_t to BootIdLennart Poettering
So far we tried to reserve the _t suffix to types we use like a value in contrast to types we use as objects, hence let's do this in journalctl too.
2015-05-19journalctl: lstat() should suffice if we call canonicalize_file_name() firstLennart Poettering
2015-05-19journalctl: free all command line argument objectsLennart Poettering
let's try to be valgrind clean
2015-05-19journalctl: only have a single exit path from main()Lennart Poettering
That way we can be sure we execute the destructors properly, and can be valgrind-clean.
2015-05-19journalctl: Improve boot ID lookupJan Janssen
This method should greatly improve offset based lookup, by simply jumping from one boot to the next boot. It starts at the journal head to get the a boot ID, makes a _BOOT_ID match and then comes from the opposite journal direction (tail) to get to the end that boot. After flushing the matches and advancing the journal from that exact position, we arrive at the start of next boot. Rinse and repeat. This is faster than the old method of aggregating the full boot listing just so we can jump to a specific boot, which can be a real pain on big journals just for a mere "-b -1" case. As an additional benefit --list-boots should improve slightly too, because it does less seeking. Note that there can be a change in boot order with this lookup method because it will use the order of boots in the journal, not the realtime stamp stored in them. That's arguably better, though. Another deficiency is that it will get confused with boots interleaving in the journal, therefore, it will refuse operation in --merge, --file and --directory mode. https://bugs.freedesktop.org/show_bug.cgi?id=72601
2015-05-18udevd: main - use _exit() when daemonizingTom Gundersen
Makes it a bit clearer what is going on, rather than jumping to the end of main(). No functional change.
2015-05-18udevd: main - reshuffleTom Gundersen
First parse config, then sanitize environment before donig any further setup. No functional change.
2015-05-18udevd: rename on_reque_{exit,reload} to on_sig{term,chld}Tom Gundersen
No functional change.
2015-05-18udevd: introduce on_event_timeout{,_warning}Tom Gundersen
This uses kill_and_sigcont() instead of kill(), otherwise no functional change.
2015-05-18udevd: process all SIGCHLD events every time the handler is invokedTom Gundersen
We were returning rather than continuing in some cases. The intention was always to fully process all pending events before returning from the SIGCHLD handler. Restore this behaviour.
2015-05-18udevd: init/exit the builtins in manager_new/freeTom Gundersen
No functional change.
2015-05-18udevd: move file descriptors to ManagerTom Gundersen
No functional change.
2015-05-18resolved: allow DnsAnswer objects with no space for RRsLennart Poettering
They might be created as result of merged answer sets, hence accept them. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030834.html
2015-05-18resolved: fix crash when shutting downLennart Poettering
Reported by Cristian Rodríguez http://lists.freedesktop.org/archives/systemd-devel/2015-May/031626.html
2015-05-18nspawn: close extra fds before execing initAlban Crequy
When systemd-nspawn gets exec*()ed, it inherits the followings file descriptors: - 0, 1, 2: stdin, stdout, stderr - SD_LISTEN_FDS_START, ... SD_LISTEN_FDS_START+LISTEN_FDS: file descriptors passed by the system manager (useful for socket activation). They are passed to the child process (process leader). - extra lock fd: rkt passes a locked directory as an extra fd, so the directory remains locked as long as the container is alive. systemd-nspawn used to close all open fds except 0, 1, 2 and the SD_LISTEN_FDS_START..SD_LISTEN_FDS_START+LISTEN_FDS. This patch delays the close just before the exec so the nspawn process (parent) keeps the extra fds open. This patch supersedes the previous attempt ("cloexec extraneous fds"): http://lists.freedesktop.org/archives/systemd-devel/2015-May/031608.html
2015-05-18ata_id: drop spurious spaceLennart Poettering
2015-05-18core: Private*/Protect* options with RootDirectoryAlban Crequy
When a service is chrooted with the option RootDirectory=/opt/..., then the options PrivateDevices, PrivateTmp, ProtectHome, ProtectSystem must mount the directories under $RootDirectory/{dev,tmp,home,usr,boot}. The test-ns tool can test setup_namespace() with and without chroot: $ sudo TEST_NS_PROJECTS=/home/lennart/projects ./test-ns $ sudo TEST_NS_CHROOT=/home/alban/debian-tree TEST_NS_PROJECTS=/home/alban/debian-tree/home/alban/Documents ./test-ns
2015-05-18kmod-setup: conditionalize kmod autoloading properlyLennart Poettering
Load kdbus.ko only if we are built with kdbus, and load ip_tables.ko only if we are built with iptables support.
2015-05-18util: split all hostname related calls into hostname-util.cLennart Poettering
2015-05-18fstab-generator: add x-systemd.requires and x-systemd.requires-mounts-forKarel Zak
Currently we have no way how to specify dependencies between fstab entries (or another units) in the /etc/fstab. It means that users are forced to bypass fstab and write .mount units manually. The patch introduces new systemd fstab options: x-systemd.requires=<PATH> - to specify dependence an another mount (PATH is translated to unit name) x-systemd.requires=<UNIT> - to specify dependence on arbitrary UNIT x-systemd.requires-mounts-for=<PATH ...> - to specify dependence on another paths, implemented by RequiresMountsFor=. The option may be specified more than once. For example two bind mounts where B depends on A: /mnt/test/A /mnt/test/A none bind,defaults /mnt/test/A /mnt/test/B none bind,x-systemd.requires=/mnt/test/A More complex example with overlay FS where one mount point depends on "low" and "upper" directories: /dev/sdc1 /mnt/low ext4 defaults /dev/sdc2 /mnt/high ext4 defaults overlay /mnt/merged overlay lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work,x-systemd.requires-mounts-for=/mnt/low,x-systemd.requires-mounts-for=mnt/high https://bugzilla.redhat.com/show_bug.cgi?id=812826 https://bugzilla.redhat.com/show_bug.cgi?id=1164334
2015-05-16load-fragment: put quotes around iffy rvalueZbigniew Jędrzejewski-Szmek
2015-05-16Use fflush_and_check() in more placesZbigniew Jędrzejewski-Szmek
2015-05-16udevd: queue - update queue state when events are queued/freedTom Gundersen
This way it is more obvious that the queue flag file is always up-to-date. Moreover, we only have to touch/unlink it when the first/last event is allocated/freed.
2015-05-16udevd: on_worker - distinguish between EINTR and EAGAINTom Gundersen
EAGAIN means there are no more messages to read, so give up. EINTR means we got interrupted reading a message, so try again.
2015-05-16udevd: worker - use loop_write() rather than send()Tom Gundersen
When notifying the main daemon about event completion, make sure the message is sent successfully, and not interrupted.
2015-05-16util: loop_write - accept 0-length messageTom Gundersen
write() can send empty messages, so make sure loop_write() can do the same.
2015-05-16udevd: net - fix leak in .link configTom Gundersen
Path, Driver and Type are now strv rather than strings, so free them properly.