A System and Service Manager
CentOS Buildsys
2014-04-02 572a44c507ecd5e7dee4fd5958e7d5aaa3466e6f
import systemd-208-11.el7.src.rpm
233 files added
97 files deleted
3 files modified
34879 ■■■■ changed files
.systemd.metadata 2 ●●● patch | view | raw | blame | history
SOURCES/0001-RHEL-units-add-Install-section-to-tmp.mount.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0001-units-add-Install-section-to-tmp.mount.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0002-kernel-install-add-fedora-specific-callouts-to-new-k.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0002-man-explain-NAME-in-systemctl-man-page.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0003-core-cgroup-first-print-then-free.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0003-fix-lingering-references-to-var-lib-backlight-random.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/0004-swap-fix-reverse-dependencies.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0005-journald-add-missing-error-check.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0005-update-TODO.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0006-bus-fix-potentially-uninitialized-memory-access.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch 50 ●●●●● patch | view | raw | blame | history
SOURCES/0007-cryptsetup-generator-allow-specifying-options-in-pro.patch 185 ●●●●● patch | view | raw | blame | history
SOURCES/0007-dbus-fix-return-value-of-dispatch_rqueue.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0008-automount-rename-repeat_unmont-to-repeat_unmount.patch 41 ●●●●● patch | view | raw | blame | history
SOURCES/0008-modules-load-fix-error-handling.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0009-cgroup-add-the-missing-setting-of-variable-s-value.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0010-cgroup-correct-the-log-information.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0010-strv-don-t-access-potentially-NULL-string-arrays.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0011-cgroup-fix-incorrectly-setting-memory-cgroup.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0013-gpt-auto-generator-exit-immediately-if-in-container.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0013-update-TODO.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0014-libudev-fix-move_later-comparison.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0015-man-document-luks.options-kernel-commandline.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0015-manager-when-verifying-whether-clients-may-change-en.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0016-keymap-remove-some-commented-out-lines.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0016-mount-check-for-NULL-before-reading-pm-what.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0017-Advertise-hibernation-only-if-there-s-enough-free-sw.patch 259 ●●●●● patch | view | raw | blame | history
SOURCES/0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch 178 ●●●●● patch | view | raw | blame | history
SOURCES/0018-README-add-SCSI-BSG-option.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0018-systemd-serialize-deserialize-forbid_restart-value.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/0019-core-unify-the-way-we-denote-serialization-attribute.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0019-swap-create-.wants-symlink-to-auto-swap-devices.patch 87 ●●●●● patch | view | raw | blame | history
SOURCES/0020-cgroup-add-missing-equals-for-BlockIOWeight.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0020-journald-fix-minor-memory-leak.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0021-Assume-that-proc-meminfo-can-be-missing.patch 50 ●●●●● patch | view | raw | blame | history
SOURCES/0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch 36 ●●●●● patch | view | raw | blame | history
SOURCES/0022-transaction.c-do-not-point-users-to-logs-when-unit-n.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/0022-udevadm.xml-document-resolve-names-option-for-test.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0023-Verify-validity-of-session-name-when-received-from-o.patch 283 ●●●●● patch | view | raw | blame | history
SOURCES/0023-dbus-common-avoid-leak-in-error-path.patch 68 ●●●●● patch | view | raw | blame | history
SOURCES/0024-drop-ins-check-return-value.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0025-keymap-Add-Samsung-Series-5-Ultra.patch 65 ●●●●● patch | view | raw | blame | history
SOURCES/0025-shared-util-Fix-glob_extend-argument.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0026-login-fix-login_is_valid-test.patch 149 ●●●●● patch | view | raw | blame | history
SOURCES/0027-man-document-the-b-special-boot-option.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0027-polkit-Avoid-race-condition-in-scraping-proc.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch 71 ●●●●● patch | view | raw | blame | history
SOURCES/0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0029-remove-user-.service.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/0030-Configurable-Timeouts-Restarts-default-values.patch 293 ●●●●● patch | view | raw | blame | history
SOURCES/0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0031-logind-return-EINVAL-when-PID-is-wrong.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/0031-manager-configurable-StartLimit-default-values.patch 161 ●●●●● patch | view | raw | blame | history
SOURCES/0032-core-drop-some-out-of-date-references-to-cgroup-sett.patch 197 ●●●●● patch | view | raw | blame | history
SOURCES/0032-sysctl-bring-back-etc-sysctl.conf.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0033-man-explain-NAME-in-systemctl-man-page.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0033-systemd-treat-reload-failure-as-failure.patch 90 ●●●●● patch | view | raw | blame | history
SOURCES/0034-journal-when-appending-to-journal-file-allocate-larg.patch 135 ●●●●● patch | view | raw | blame | history
SOURCES/0034-journald-accept-EPOLLERR-from-dev-kmsg.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch 244 ●●●●● patch | view | raw | blame | history
SOURCES/0035-journald-avoid-NSS-in-journald.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0036-libudev-add-missing-global-to-symbol-export.patch 20 ●●●●● patch | view | raw | blame | history
SOURCES/0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch 206 ●●●●● patch | view | raw | blame | history
SOURCES/0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0038-journal-simplify-pre-allocation-logic.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/0038-logind-put-correct-user-object-paths-in-introspectio.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0039-Fix-obsolete-references-to-systemd-random-seed-load..patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/0040-Never-call-qsort-on-potentially-NULL-arrays.patch 368 ●●●●● patch | view | raw | blame | history
SOURCES/0040-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0041-journalctl-1-s-adm-systemd-journal.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0041-localed-match-converted-keymaps-before-legacy.patch 324 ●●●●● patch | view | raw | blame | history
SOURCES/0042-cgroup-if-we-do-a-cgroup-operation-then-do-something.patch 422 ●●●●● patch | view | raw | blame | history
SOURCES/0042-core-socket-fix-SO_REUSEPORT.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0043-activate-fix-crash-when-s-is-passed.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0043-core-rework-how-we-match-mount-units-against-each-ot.patch 1156 ●●●●● patch | view | raw | blame | history
SOURCES/0044-logind-never-consider-a-closing-session-relevant-for.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0044-systemd-python-fix-booted-and-add-two-functions-to-d.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0045-man-drop-references-to-cgroup-wher-appropriate.patch 436 ●●●●● patch | view | raw | blame | history
SOURCES/0045-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0046-activate-mention-E-in-the-help-text.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0046-systemctl-make-sure-set-property-mangles-unit-names.patch 36 ●●●●● patch | view | raw | blame | history
SOURCES/0047-dbus-fix-introspection-for-TimerSlackNSec.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0047-docs-remove-unneeded-the-s-in-gudev-docs.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0048-man-explicitly-say-when-multiple-units-can-be-specif.patch 235 ●●●●● patch | view | raw | blame | history
SOURCES/0048-swap-properly-expose-timeout-property-on-the-bus.patch 21 ●●●●● patch | view | raw | blame | history
SOURCES/0049-build-sys-restore-detection-of-sphinx.patch 29 ●●●●● patch | view | raw | blame | history
SOURCES/0049-util-fix-handling-of-trailing-whitespace-in-split_qu.patch 122 ●●●●● patch | view | raw | blame | history
SOURCES/0050-man-Improve-the-description-of-parameter-X-in-tmpfil.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0050-util-add-macro-for-iterating-through-all-prefixes-of.patch 119 ●●●●● patch | view | raw | blame | history
SOURCES/0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0051-util-properly-handle-the-root-dir-in-PATH_FOREACH_PR.patch 94 ●●●●● patch | view | raw | blame | history
SOURCES/0052-cgroup-get-rid-of-MemorySoftLimit.patch 245 ●●●●● patch | view | raw | blame | history
SOURCES/0052-udev-net_id-Introduce-predictable-network-names-for-.patch 142 ●●●●● patch | view | raw | blame | history
SOURCES/0053-set-IgnoreOnIsolate-true-for-systemd-cryptsetup-.ser.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0053-tmpfiles-don-t-allow-label_fix-to-print-ENOENT-when-.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0054-delta-ensure-that-d_type-will-be-set-on-every-fs.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0054-main-don-t-free-fds-array-twice.patch 21 ●●●●● patch | view | raw | blame | history
SOURCES/0055-local-fix-memory-leak-when-putting-together-locale-s.patch 147 ●●●●● patch | view | raw | blame | history
SOURCES/0055-shell-completion-dump-has-moved-to-systemd-analyze.patch 81 ●●●●● patch | view | raw | blame | history
SOURCES/0056-hashmap-size-hashmap-bucket-array-dynamically.patch 470 ●●●●● patch | view | raw | blame | history
SOURCES/0056-shell-completion-remove-load-from-systemctl.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/0057-Fix-SELinux-check-for-transient-units.-1008864.patch 105 ●●●●● patch | view | raw | blame | history
SOURCES/0057-smack-setup-fix-path-to-Smack-CIPSO-mappings.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0058-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0058-fix-lingering-references-to-var-lib-backlight-random.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/0059-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0059-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/0060-journald-add-missing-error-check.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0060-systemctl-fix-name-mangling-for-sysv-units.patch 131 ●●●●● patch | view | raw | blame | history
SOURCES/0061-bus-fix-potentially-uninitialized-memory-access.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0061-execute-more-debugging-messages.patch 121 ●●●●● patch | view | raw | blame | history
SOURCES/0062-dbus-fix-return-value-of-dispatch_rqueue.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0062-logind-fix-bus-introspection-data-for-TakeControl.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0063-modules-load-fix-error-handling.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0063-utf8-fix-utf8_is_printable.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/0064-efi-never-call-qsort-on-potentially-NULL-arrays.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0064-keymap-Fix-Samsung-900X-34-C.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/0065-do-not-accept-garbage-from-acpi-firmware-performance.patch 30 ●●●●● patch | view | raw | blame | history
SOURCES/0065-strv-don-t-access-potentially-NULL-string-arrays.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0066-login-fix-invalid-free-in-sd_session_get_vt.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0066-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0067-login-make-sd_session_get_vt-actually-work.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0067-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0068-Make-sure-that-we-don-t-dereference-NULL.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0068-gpt-auto-generator-exit-immediately-if-in-container.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0069-gitignore-ignore-clang-analyze-output.patch 21 ●●●●● patch | view | raw | blame | history
SOURCES/0069-systemd-order-remote-mounts-from-mountinfo-before-re.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0070-man-add-more-markup-to-udevadm-8.patch 94 ●●●●● patch | view | raw | blame | history
SOURCES/0070-manager-when-verifying-whether-clients-may-change-en.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0071-Fix-bad-assert-in-show_pid_array.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0071-mount-check-for-NULL-before-reading-pm-what.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0072-Never-call-qsort-on-potentially-NULL-arrays.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0072-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch 178 ●●●●● patch | view | raw | blame | history
SOURCES/0073-rules-expose-loop-block-devices-to-systemd.patch 32 ●●●●● patch | view | raw | blame | history
SOURCES/0073-systemd-serialize-deserialize-forbid_restart-value.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/0074-core-unify-the-way-we-denote-serialization-attribute.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0074-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0075-hwdb-update.patch 1629 ●●●●● patch | view | raw | blame | history
SOURCES/0075-journald-fix-minor-memory-leak.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0076-journald-remove-rotated-file-from-hashmap-when-rotat.patch 36 ●●●●● patch | view | raw | blame | history
SOURCES/0076-rules-remove-pointless-MODE-settings.patch 40 ●●●●● patch | view | raw | blame | history
SOURCES/0077-catalog-remove-links-to-non-existent-wiki-pages.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/0077-udevadm.xml-document-resolve-names-option-for-test.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0078-dbus-common-avoid-leak-in-error-path.patch 68 ●●●●● patch | view | raw | blame | history
SOURCES/0078-udev-builtin-path_id-add-support-for-bcma-bus.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/0079-drop-ins-check-return-value.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0079-libudev-default-log_priority-to-INFO.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0080-nspawn-only-pass-in-slice-setting-if-it-is-set.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0080-shared-util-Fix-glob_extend-argument.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0081-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0081-zsh-completion-add-systemd-run.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/0082-man-document-the-b-special-boot-option.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0082-systemctl-fix-typo-in-help-text.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0083-detect_virtualization-returns-NULL-pass-empty-string.patch 32 ●●●●● patch | view | raw | blame | history
SOURCES/0083-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0084-move-utf8-functions-from-libudev-private.h-to-utf8.h.patch 514 ●●●●● patch | view | raw | blame | history
SOURCES/0084-udev-builtin-keyboard-Fix-large-scan-codes-on-32-bit.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0085-Use-udev_encode_string-in-fstab_node_to_udev_node.patch 113 ●●●●● patch | view | raw | blame | history
SOURCES/0085-nspawn-log-out-of-memory-errors.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0086-Fix-buffer-overrun-when-enumerating-files.patch 173 ●●●●● patch | view | raw | blame | history
SOURCES/0086-man-fix-typo.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0087-man-do-not-use-term-in-para.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0087-shared-utf8-merge-implementations-remove-cruft.patch 401 ●●●●● patch | view | raw | blame | history
SOURCES/0088-device-nodes-move-device-node-specific-code-to-own-f.patch 418 ●●●●● patch | view | raw | blame | history
SOURCES/0088-shutdown-trim-the-cgroup-tree-on-loop-iteration.patch 65 ●●●●● patch | view | raw | blame | history
SOURCES/0089-run-support-system-to-match-other-commands-even-if-r.patch 112 ●●●●● patch | view | raw | blame | history
SOURCES/0089-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/0090-acpi-fpdt-break-on-zero-or-negative-length-read.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0090-udev-path_id-fix-by-path-link-generation-for-scm-dev.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0091-hashmap-randomize-hash-functions-a-bit.patch 374 ●●●●● patch | view | raw | blame | history
SOURCES/0091-man-add-rationale-into-systemd-halt-8.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0092-Configurable-Timeouts-Restarts-default-values.patch 293 ●●●●● patch | view | raw | blame | history
SOURCES/0092-systemd-python-convert-keyword-value-to-string.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0093-Make-hibernation-test-work-for-swap-files.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0093-manager-configurable-StartLimit-default-values.patch 161 ●●●●● patch | view | raw | blame | history
SOURCES/0094-man-add-docs-for-sd_is_special-and-some-man-page-sym.patch 134 ●●●●● patch | view | raw | blame | history
SOURCES/0094-sysctl-bring-back-etc-sysctl.conf.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0095-systemctl-return-r-instead-of-always-returning-0.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0095-tmpfiles-add-a-new-m-line-type-that-adjusts-user-gro.patch 158 ●●●●● patch | view | raw | blame | history
SOURCES/0096-journal-fix-minor-memory-leak.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0097-man-units-fix-installation-of-systemd-nspawn-.servic.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/0098-systemd-fix-memory-leak-in-cgroup-code.patch 65 ●●●●● patch | view | raw | blame | history
SOURCES/0099-button-don-t-exit-if-we-cannot-handle-a-button-press.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0100-timer-properly-format-relative-timestamps-in-the-fut.patch 120 ●●●●● patch | view | raw | blame | history
SOURCES/0101-timer-consider-usec_t-1-an-invalid-timestamp.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/0102-Resolve-dev-console-to-the-active-tty-instead-of-jus.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0103-Only-disable-output-on-console-during-boot-if-needed.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0104-Fix-possible-lack-of-status-messages-on-shutdown-reb.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0105-random-seed-improve-debugging-messages-a-bit.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/0106-Fix-RemainAfterExit-services-keeping-a-hold-on-conso.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/0107-keymap-Add-Toshiba-Satellite-U940.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0108-calendar-support-yearly-and-annually-names-the-same-.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0109-hashmap-be-a-bit-more-conservative-with-pre-allocati.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/0110-manager-don-t-do-plymouth-in-a-container.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0111-hwdb-Update-database-of-Bluetooth-company-identifier.patch 327 ●●●●● patch | view | raw | blame | history
SOURCES/0112-automount-log-info-about-triggering-process.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0113-hwdb-Update-database-of-Bluetooth-company-identifier.patch 147 ●●●●● patch | view | raw | blame | history
SOURCES/0114-journal-fail-silently-in-sd_j_sendv-if-journal-is-un.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0115-Fix-memory-leak-in-stdout-journal-streams.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0116-man-document-is-enabled-output.patch 92 ●●●●● patch | view | raw | blame | history
SOURCES/0117-hostnamed-avoid-using-NULL-in-error-path.patch 32 ●●●●● patch | view | raw | blame | history
SOURCES/0118-core-do-not-segfault-if-swap-activity-happens-when-p.patch 87 ●●●●● patch | view | raw | blame | history
SOURCES/0119-kernel-install-add-h-help.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/0120-kernel-install-fix-help-output.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0121-man-improve-wording-and-comma-usage-in-systemd.journ.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/0122-drop-several-entries-from-kbd-model-map-whose-kbd-la.patch 84 ●●●●● patch | view | raw | blame | history
SOURCES/0123-correct-name-of-Tajik-kbd-layout-in-kbd-model-map.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0124-hwdb-Update-database-of-Bluetooth-company-identifier.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0125-Ensure-unit-is-journaled-for-short-lived-or-oneshot-.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0126-core-manager-remove-infinite-loop.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0127-util-check-for-overflow-in-greedy_realloc.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/0128-journald-use-a-bit-more-cleanup-magic.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0129-activate-clean-up-inherited-descriptors.patch 77 ●●●●● patch | view | raw | blame | history
SOURCES/0130-man-explain-in-more-detail-how-SYSTEMD_READY-influen.patch 95 ●●●●● patch | view | raw | blame | history
SOURCES/0131-units-don-t-run-readahead-done-timers-in-containers.patch 36 ●●●●● patch | view | raw | blame | history
SOURCES/0132-nspawn-complain-and-continue-if-machine-has-same-id.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/0133-man-beef-up-ExecStart-description.patch 150 ●●●●● patch | view | raw | blame | history
SOURCES/0134-man-remove-advice-to-avoid-setting-the-same-var-more.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/0135-systemctl-add-the-plain-option-to-the-help-message.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0136-Fix-a-few-resource-leaks-in-error-paths.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/0137-Fix-a-few-signed-unsigned-format-string-issues.patch 81 ●●●●● patch | view | raw | blame | history
SOURCES/0138-journal-file-protect-against-alloca-0.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0139-man-describe-journalctl-show-cursor.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0140-journal-fix-against-theoretical-undefined-behavior.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/0141-journald-downgrade-warning-message-when-dev-kmsg-doe.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0142-journal-file.c-remove-redundant-assignment-of-variab.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0143-login-Don-t-stop-a-running-user-manager-from-garbage.patch 33 ●●●●● patch | view | raw | blame | history
SOURCES/0144-log-when-we-log-to-dev-console-and-got-disconnected-.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0145-loginctl-when-showing-device-tree-of-seats-with-no-d.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0146-man-be-more-explicit-about-option-arguments-that-tak.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/0147-man-add-DOI-for-refereed-article-on-Forward-Secure-S.patch 59 ●●●●● patch | view | raw | blame | history
SOURCES/0148-keymap-Refactor-Acer-tables.patch 145 ●●●●● patch | view | raw | blame | history
SOURCES/0149-logind-remove-dead-variable.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0150-hwdb-update.patch 4917 ●●●●● patch | view | raw | blame | history
SOURCES/0151-delta-replace-readdir_r-with-readdir.patch 31 ●●●●● patch | view | raw | blame | history
SOURCES/0152-delta-fix-delta-for-drop-ins.patch 375 ●●●●● patch | view | raw | blame | history
SOURCES/0153-delta-if-prefix-is-specified-only-show-overrides-the.patch 251 ●●●●● patch | view | raw | blame | history
SOURCES/0154-man-units-tmpfiles.d-5-cleanup.patch 401 ●●●●● patch | view | raw | blame | history
SOURCES/0155-tmpfiles-introduce-the-concept-of-unsafe-operations.patch 281 ●●●●● patch | view | raw | blame | history
SOURCES/0156-sleep-config-fix-useless-check-for-swapfile-type.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/0157-man-resolve-word-omissions.patch 725 ●●●●● patch | view | raw | blame | history
SOURCES/0158-man-improvements-to-comma-placement.patch 507 ●●●●● patch | view | raw | blame | history
SOURCES/0159-man-grammar-and-wording-improvements.patch 79 ●●●●● patch | view | raw | blame | history
SOURCES/0160-man-document-fail-nofail-auto-noauto.patch 130 ●●●●● patch | view | raw | blame | history
SOURCES/0161-man-fix-description-of-is-enabled-returned-value.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0162-man-fix-Type-reference.patch 23 ●●●●● patch | view | raw | blame | history
SOURCES/0163-man-fix-Type-reference-v2.patch 37 ●●●●● patch | view | raw | blame | history
SOURCES/0164-hwdb-Update-database-of-Bluetooth-company-identifier.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0165-man-add-a-note-about-propagating-signals.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/0166-man-include-autoconf-snippet-in-daemon-7.patch 41 ●●●●● patch | view | raw | blame | history
SOURCES/0167-systemd-python-fix-setting-of-exception-codes.patch 325 ●●●●● patch | view | raw | blame | history
SOURCES/0168-systemd-python-fix-listen_fds-under-Python-2.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0169-man-expand-on-some-more-subtle-points-in-systemd.soc.patch 120 ●●●●● patch | view | raw | blame | history
SOURCES/0170-tmpfiles-rename-unsafe-to-boot.patch 119 ●●●●● patch | view | raw | blame | history
SOURCES/0171-sleep-config-Dereference-pointer-before-check-for-NU.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/0172-sleep-config-fix-double-free.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/0173-core-service-check-if-mainpid-matches-only-if-it-is-.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0174-man-typo-fix.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0175-swap-remove-if-else-with-the-same-data-path.patch 29 ●●●●● patch | view | raw | blame | history
SOURCES/0176-hwdb-update.patch 769 ●●●●● patch | view | raw | blame | history
SOURCES/0177-journal-Add-missing-byte-order-conversions.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/0178-hwdb-change-key-mappings-for-Samsung-90X3A.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/0179-hwdb-add-Samsung-700G.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0180-hwdb-remove-duplicate-entry-for-Samsung-700Z.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0181-hwdb-fix-match-for-Thinkpad-X201-tablet.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0182-keymap-Recognize-different-Toshiba-Satellite-capital.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0183-sleep.c-fix-typo.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0184-man-mention-which-variables-will-be-expanded-in-Exec.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/0185-hwdb-Add-support-for-Toshiba-Satellite-P75-A7200-key.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0186-journal-fix-access-to-munmapped-memory-in-sd_journal.patch 320 ●●●●● patch | view | raw | blame | history
SOURCES/0187-gpt-auto-generator-skip-nonexistent-devices.patch 32 ●●●●● patch | view | raw | blame | history
SOURCES/0188-gpt-auto-generator-use-EBADSLT-code-when-unable-to-d.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0189-nspawn-explicitly-terminate-machines-when-we-exit-ns.patch 123 ●●●●● patch | view | raw | blame | history
SOURCES/0190-bash-completion-journalctl-file.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0191-journalctl-zsh-completion-fix-several-issues-in-help.patch 135 ●●●●● patch | view | raw | blame | history
SOURCES/0192-cgroup-run-PID-1-in-the-root-cgroup.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/0193-pam-retrieve-value-of-debug-param-first.patch 36 ●●●●● patch | view | raw | blame | history
SOURCES/0194-utils-silence-the-compiler-warning.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0195-s390-getty-generator-initialize-essential-system-ter.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/0196-pam-use-correct-log-level.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0197-pam-do-not-set-XDG_RUNTIME_DIR-unconditionally.patch 159 ●●●●● patch | view | raw | blame | history
SOURCES/0198-selinux-Don-t-attempt-to-load-policy-in-initramfs-if.patch 40 ●●●●● patch | view | raw | blame | history
SOURCES/0199-kernel-install-add-fedora-specific-callouts-to-new-k.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/0200-remove-user-.service.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/0201-Fix-bad-assert-in-show_pid_array.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0202-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/0203-udev-rules-setup-tty-permissions-and-group-for-sclp_.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0204-cdrom_id-use-the-old-MMC-fallback.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/0205-core-introduce-new-stop-protocol-for-unit-scopes.patch 265 ●●●●● patch | view | raw | blame | history
SOURCES/0206-core-watch-SIGCHLD-more-closely-to-track-processes-o.patch 716 ●●●●● patch | view | raw | blame | history
SOURCES/0207-logind-rework-session-shutdown-logic.patch 597 ●●●●● patch | view | raw | blame | history
SOURCES/0208-logind-order-all-scopes-after-both-systemd-logind.se.patch 87 ●●●●● patch | view | raw | blame | history
SOURCES/0209-logind-given-that-we-can-now-relatively-safely-shutd.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/0210-utmp-make-sure-we-don-t-write-the-utmp-reboot-record.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/0211-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch 28 ●●●●● patch | view | raw | blame | history
SOURCES/0212-logind-fix-reference-to-systemd-user-sessions.servic.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0213-logind-add-forgotten-call-to-user_send_changed.patch 21 ●●●●● patch | view | raw | blame | history
SOURCES/0214-logind-save-session-after-setting-the-stopping-flag.patch 25 ●●●●● patch | view | raw | blame | history
SOURCES/0215-logind-save-user-state-after-stopping-the-session.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0216-logind-initialize-timer_fd.patch 21 ●●●●● patch | view | raw | blame | history
SOURCES/0217-service-don-t-create-extra-cgroup-for-control-proces.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/0218-logind-pass-pointer-to-User-object-to-user_save.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0219-fstab-generator-When-parsing-the-root-cmdline-option.patch 26 ●●●●● patch | view | raw | blame | history
SOURCES/0220-gpt-auto-generator-Generate-explicit-dependencies-on.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/0221-fstab-generator-Generate-explicit-dependencies-on-sy.patch 108 ●●●●● patch | view | raw | blame | history
SOURCES/0222-fsck-root-only-run-when-requested-in-fstab.patch 92 ●●●●● patch | view | raw | blame | history
SOURCES/0223-core-allow-PIDs-to-be-watched-by-two-units-at-the-sa.patch 360 ●●●●● patch | view | raw | blame | history
SOURCES/0224-core-correctly-unregister-PIDs-from-PID-hashtables.patch 97 ●●●●● patch | view | raw | blame | history
SOURCES/0225-logind-uninitialized-timer_fd-is-set-to-1.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0226-logind-add-forgotten-return-statement.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0227-core-remove-extra-semicolon-and-make-gcc-shut-up.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0228-core-fix-detection-of-dead-processes.patch 87 ●●●●● patch | view | raw | blame | history
SOURCES/0229-Fix-prototype-of-get_process_state.patch 22 ●●●●● patch | view | raw | blame | history
SOURCES/0230-core-check-for-return-value-from-get_process_state.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/0231-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch 29 ●●●●● patch | view | raw | blame | history
SOURCES/0232-logind-session-save-stopping-flag.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/60-alias-kmsg.rules 10 ●●●●● patch | view | raw | blame | history
SOURCES/85-display-manager.preset 10 ●●●●● patch | view | raw | blame | history
SOURCES/90-default.preset 106 ●●●●● patch | view | raw | blame | history
SOURCES/rc.local 2 ●●● patch | view | raw | blame | history
SPECS/systemd.spec 534 ●●●●● patch | view | raw | blame | history
.systemd.metadata
@@ -1 +1 @@
ea1a538bc3d29f7c6f7f0a0aa5c070b9018c5527 SOURCES/systemd-207.tar.xz
e1a4e213d5d1e3498bca851347f2f07fdb9b4e1f SOURCES/systemd-208.tar.xz
SOURCES/0001-RHEL-units-add-Install-section-to-tmp.mount.patch
File was deleted
SOURCES/0001-units-add-Install-section-to-tmp.mount.patch
New file
@@ -0,0 +1,23 @@
From b4aeab33ff172b608930daf77a6f7af47bf2fdc9 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Fri, 15 Feb 2013 09:07:57 +0100
Subject: [PATCH] units: add [Install] section to tmp.mount
Change-Id: I2e6d129de00a9afaf7558006c886866f64394c29
Related: #908253
---
 units/tmp.mount | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/units/tmp.mount b/units/tmp.mount
index 99a3ba3..9e4803a 100644
--- a/units/tmp.mount
+++ b/units/tmp.mount
@@ -18,3 +18,7 @@ What=tmpfs
 Where=/tmp
 Type=tmpfs
 Options=mode=1777,strictatime
+
+# Make 'systemctl enable tmp.mount' work:
+[Install]
+WantedBy=local-fs.target
SOURCES/0002-kernel-install-add-fedora-specific-callouts-to-new-k.patch
File was deleted
SOURCES/0002-man-explain-NAME-in-systemctl-man-page.patch
New file
@@ -0,0 +1,33 @@
From bc7d6c8e11a22d29b14b6070117f261961eadb23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= <vpavlin@redhat.com>
Date: Thu, 31 Oct 2013 14:36:41 +0100
Subject: [PATCH] man: explain NAME in systemctl man page
---
 man/systemctl.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/man/systemctl.xml b/man/systemctl.xml
index e789d4b..166282c 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -63,6 +63,19 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     introspect and control the state of the
     <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     system and service manager.</para>
+
+    <para>For Unit Commands the <replaceable>NAME</replaceable> represents full name of unit.
+    <programlisting>
+systemctl start foo.service
+    </programlisting>
+    For Unit File Commands the <replaceable>NAME</replaceable> represents full name of the unit file, or absolute path to the unit file.
+    <programlisting>
+systemctl start /path/to/foo.service
+    </programlisting>
+    While working with services/service files, <command>systemctl</command> is able to append .service suffix when it is missing.
+    <programlisting>
+systemctl start foo
+    </programlisting></para>
   </refsect1>
   <refsect1>
SOURCES/0003-core-cgroup-first-print-then-free.patch
File was deleted
SOURCES/0003-fix-lingering-references-to-var-lib-backlight-random.patch
New file
@@ -0,0 +1,51 @@
From 635ba7207a9afa3fa1b0c4e804c6823d71c04d1c Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 2 Oct 2013 07:46:24 -0400
Subject: [PATCH] fix lingering references to /var/lib/{backlight,random-seed}
This should have been part of ef5bfcf668e6029faa78534dfe.
---
 man/systemd-backlight@.service.xml  | 2 +-
 man/systemd-random-seed.service.xml | 2 +-
 units/systemd-backlight@.service.in | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/systemd-backlight@.service.xml b/man/systemd-backlight@.service.xml
index 2b73625..4318964 100644
--- a/man/systemd-backlight@.service.xml
+++ b/man/systemd-backlight@.service.xml
@@ -58,7 +58,7 @@
                 is a service that restores the display backlight
                 brightness at early-boot and saves it at shutdown. On
                 disk, the backlight brightness is stored in
-                <filename>/var/lib/backlight/</filename>. Note that by
+                <filename>/var/lib/systemd/backlight/</filename>. Note that by
                 default, only firmware backlight devices are
                 saved/restored.</para>
         </refsect1>
diff --git a/man/systemd-random-seed.service.xml b/man/systemd-random-seed.service.xml
index 8cd14b7..e5cd037 100644
--- a/man/systemd-random-seed.service.xml
+++ b/man/systemd-random-seed.service.xml
@@ -61,7 +61,7 @@
                 for details. Saving/restoring the random seed across
                 boots increases the amount of available entropy early
                 at boot. On disk the random seed is stored in
-                <filename>/var/lib/random-seed</filename>.</para>
+                <filename>/var/lib/systemd/random-seed</filename>.</para>
         </refsect1>
         <refsect1>
diff --git a/units/systemd-backlight@.service.in b/units/systemd-backlight@.service.in
index b0e75db..5caa5d5 100644
--- a/units/systemd-backlight@.service.in
+++ b/units/systemd-backlight@.service.in
@@ -9,7 +9,7 @@
 Description=Load/Save Screen Backlight Brightness of %I
 Documentation=man:systemd-backlight@.service(8)
 DefaultDependencies=no
-RequiresMountsFor=/var/lib/backlight
+RequiresMountsFor=/var/lib/systemd/backlight
 Conflicts=shutdown.target
 After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
 Before=sysinit.target shutdown.target
SOURCES/0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch
New file
@@ -0,0 +1,45 @@
From cfb20c251cb79820ddf7507f9f4a54cc3f18b121 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:36:28 +0200
Subject: [PATCH] cryptsetup: fix OOM handling when parsing mount options
---
 src/cryptsetup/cryptsetup.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 22b5eea..769c3e4 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -74,7 +74,7 @@ static int parse_one_option(const char *option) {
                 t = strdup(option+7);
                 if (!t)
-                        return -ENOMEM;
+                        return log_oom();
                 free(opt_cipher);
                 opt_cipher = t;
@@ -89,9 +89,10 @@ static int parse_one_option(const char *option) {
         } else if (startswith(option, "tcrypt-keyfile=")) {
                 opt_type = CRYPT_TCRYPT;
-                if (path_is_absolute(option+15))
-                        opt_tcrypt_keyfiles = strv_append(opt_tcrypt_keyfiles, strdup(option+15));
-                else
+                if (path_is_absolute(option+15)) {
+                        if (strv_extend(&opt_tcrypt_keyfiles, option + 15) < 0)
+                                return log_oom();
+                } else
                         log_error("Key file path '%s' is not absolute. Ignoring.", option+15);
         } else if (startswith(option, "keyfile-size=")) {
@@ -113,7 +114,7 @@ static int parse_one_option(const char *option) {
                 t = strdup(option+5);
                 if (!t)
-                        return -ENOMEM;
+                        return log_oom();
                 free(opt_hash);
                 opt_hash = t;
SOURCES/0004-swap-fix-reverse-dependencies.patch
File was deleted
SOURCES/0005-journald-add-missing-error-check.patch
New file
@@ -0,0 +1,22 @@
From dc74e25f66f2aa56b6c6fa2fd51fd1ee02a4b770 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:36:43 +0200
Subject: [PATCH] journald: add missing error check
---
 src/journal/journal-file.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 1236403..81c344f 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -907,6 +907,8 @@ static int journal_file_append_field(
         osize = offsetof(Object, field.payload) + size;
         r = journal_file_append_object(f, OBJECT_FIELD, osize, &o, &p);
+        if (r < 0)
+                return r;
         o->field.hash = htole64(hash);
         memcpy(o->field.payload, field, size);
SOURCES/0005-update-TODO.patch
File was deleted
SOURCES/0006-bus-fix-potentially-uninitialized-memory-access.patch
New file
@@ -0,0 +1,31 @@
From 4b3825ff691103634adc77a4d3ffc7128923fae7 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:11 +0200
Subject: [PATCH] bus: fix potentially uninitialized memory access
---
 src/libsystemd-bus/bus-internal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c
index 0e66f3d..cac948e 100644
--- a/src/libsystemd-bus/bus-internal.c
+++ b/src/libsystemd-bus/bus-internal.c
@@ -63,7 +63,7 @@ bool object_path_is_valid(const char *p) {
 bool interface_name_is_valid(const char *p) {
         const char *q;
-        bool dot, found_dot;
+        bool dot, found_dot = false;
         if (isempty(p))
                 return false;
@@ -103,7 +103,7 @@ bool interface_name_is_valid(const char *p) {
 bool service_name_is_valid(const char *p) {
         const char *q;
-        bool dot, found_dot, unique;
+        bool dot, found_dot = false, unique;
         if (isempty(p))
                 return false;
SOURCES/0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch
File was deleted
SOURCES/0007-cryptsetup-generator-allow-specifying-options-in-pro.patch
File was deleted
SOURCES/0007-dbus-fix-return-value-of-dispatch_rqueue.patch
New file
@@ -0,0 +1,27 @@
From b8e064bd25ccd701a8249a9c9b59049f8c055b93 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:30 +0200
Subject: [PATCH] dbus: fix return value of dispatch_rqueue()
---
 src/libsystemd-bus/sd-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 3f766fb..db0880f 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1215,11 +1215,11 @@ static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
                 if (r == 0)
                         return ret;
-                r = 1;
+                ret = 1;
         } while (!z);
         *m = z;
-        return 1;
+        return ret;
 }
 int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) {
SOURCES/0008-automount-rename-repeat_unmont-to-repeat_unmount.patch
File was deleted
SOURCES/0008-modules-load-fix-error-handling.patch
New file
@@ -0,0 +1,24 @@
From 15010ca4aa6627c7bcfe8106fa45c4408443d5f2 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:44 +0200
Subject: [PATCH] modules-load: fix error handling
---
 src/modules-load/modules-load.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 7b19ee0..49ee420 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -302,8 +302,8 @@ int main(int argc, char *argv[]) {
                 STRV_FOREACH(i, arg_proc_cmdline_modules) {
                         k = load_module(ctx, *i);
-                        if (k < 0)
-                                r = EXIT_FAILURE;
+                        if (k < 0 && r == 0)
+                                r = k;
                 }
                 r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
SOURCES/0009-cgroup-add-the-missing-setting-of-variable-s-value.patch
File was deleted
SOURCES/0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch
New file
@@ -0,0 +1,23 @@
From 650948f16d92ce6b55e01ff2c24ea00766d38474 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:09 +0200
Subject: [PATCH] efi: never call qsort on potentially NULL arrays
---
 src/shared/efivars.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index 1d5b6f9..c015b16 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -384,7 +384,8 @@ int efi_get_boot_options(uint16_t **options) {
                 list[count ++] = id;
         }
-        qsort(list, count, sizeof(uint16_t), cmp_uint16);
+        if (list)
+                qsort(list, count, sizeof(uint16_t), cmp_uint16);
         *options = list;
         return count;
SOURCES/0010-cgroup-correct-the-log-information.patch
File was deleted
SOURCES/0010-strv-don-t-access-potentially-NULL-string-arrays.patch
New file
@@ -0,0 +1,24 @@
From c6d39712453c53e8c859d6682f65d8129afc35a3 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:28 +0200
Subject: [PATCH] strv: don't access potentially NULL string arrays
---
 src/shared/env-util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index 5e29629..7976881 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -405,7 +405,9 @@ char **strv_env_clean_log(char **e, const char *message) {
                 e[k++] = *p;
         }
-        e[k] = NULL;
+        if (e)
+                e[k] = NULL;
+
         return e;
 }
SOURCES/0011-cgroup-fix-incorrectly-setting-memory-cgroup.patch
File was deleted
SOURCES/0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch
New file
@@ -0,0 +1,22 @@
From 510cc2c4bc293002629547e1f5826d7a0ad92101 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:52 +0200
Subject: [PATCH] mkdir: pass a proper function pointer to mkdir_safe_internal
---
 src/shared/mkdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c
index b7e5c6e..43c6ea6 100644
--- a/src/shared/mkdir.c
+++ b/src/shared/mkdir.c
@@ -53,7 +53,7 @@ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkd
 }
 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) {
-        return mkdir_safe_internal(path, mode, uid, gid, false);
+        return mkdir_safe_internal(path, mode, uid, gid, mkdir);
 }
 static int is_dir(const char* path) {
SOURCES/0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch
File was deleted
SOURCES/0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch
New file
@@ -0,0 +1,23 @@
From 4092dd8187d9ff8d42d7f05b4a95816b575f67ff Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 2 Oct 2013 15:35:16 -0400
Subject: [PATCH] tmpfiles.d: include setgid perms for /run/log/journal
4608af4333d0f7f5 set permissions for journal storage on persistent disk
but not the volatile storage.
ref: https://bugs.archlinux.org/task/37170
---
 tmpfiles.d/systemd.conf | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
index b630440..a05c657 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf
@@ -26,3 +26,5 @@ F /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
 m /var/log/journal 2755 root systemd-journal - -
 m /var/log/journal/%m 2755 root systemd-journal - -
+m /run/log/journal 2755 root systemd-journal - -
+m /run/log/journal/%m 2755 root systemd-journal - -
SOURCES/0013-gpt-auto-generator-exit-immediately-if-in-container.patch
New file
@@ -0,0 +1,37 @@
From 650b4c3e4e004acfe7c201fd8a3e9d9c87824593 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 3 Oct 2013 22:13:01 -0400
Subject: [PATCH] gpt-auto-generator: exit immediately if in container
Otherwise we get an ugly warning when running systemd in
a container.
---
 src/gpt-auto-generator/gpt-auto-generator.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index ca54925..d2b4213 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -38,6 +38,7 @@
 #include "libudev.h"
 #include "special.h"
 #include "unit-name.h"
+#include "virt.h"
 /* TODO:
  *
@@ -481,6 +482,13 @@ int main(int argc, char *argv[]) {
         umask(0022);
         if (in_initrd()) {
+                log_debug("In initrd, exiting.");
+                r = 0;
+                goto finish;
+        }
+
+        if (detect_container(NULL) > 0) {
+                log_debug("In a container, exiting.");
                 r = 0;
                 goto finish;
         }
SOURCES/0013-update-TODO.patch
File was deleted
SOURCES/0014-libudev-fix-move_later-comparison.patch
File was deleted
SOURCES/0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch
New file
@@ -0,0 +1,38 @@
From d41259fcb7dac4f1bb02dbc743d5372827d3c01a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 3 Oct 2013 22:15:08 -0400
Subject: [PATCH] systemd: order remote mounts from mountinfo before
 remote-fs.target
Usually the network is stopped before filesystems are umounted.
Ordering network filesystems before remote-fs.target means that their
unmounting will be performed earlier, and can terminate sucessfully.
https://bugs.freedesktop.org/show_bug.cgi?id=70002
---
 src/core/mount.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 3d46557..93bfa99 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1440,6 +1440,9 @@ static int mount_add_one(
         u = manager_get_unit(m, e);
         if (!u) {
+                const char* const target =
+                        fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
+
                 delete = true;
                 u = unit_new(m, sizeof(Mount));
@@ -1466,7 +1469,7 @@ static int mount_add_one(
                         goto fail;
                 }
-                r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
+                r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
                 if (r < 0)
                         goto fail;
SOURCES/0015-man-document-luks.options-kernel-commandline.patch
File was deleted
SOURCES/0015-manager-when-verifying-whether-clients-may-change-en.patch
New file
@@ -0,0 +1,42 @@
From f4d7751752e7d2d2393078daef342e54368468d7 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Oct 2013 17:01:37 +0200
Subject: [PATCH] manager: when verifying whether clients may change
 environment using selinux check for "reload" rather "reboot"
This appears to be a copy/paste error.
---
 src/core/dbus-manager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 676a07f..8f4d017 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1397,7 +1397,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
                 _cleanup_strv_free_ char **l = NULL;
                 char **e = NULL;
-                SELINUX_ACCESS_CHECK(connection, message, "reboot");
+                SELINUX_ACCESS_CHECK(connection, message, "reload");
                 r = bus_parse_strv(message, &l);
                 if (r == -ENOMEM)
@@ -1424,7 +1424,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
                 _cleanup_strv_free_ char **l = NULL;
                 char **e = NULL;
-                SELINUX_ACCESS_CHECK(connection, message, "reboot");
+                SELINUX_ACCESS_CHECK(connection, message, "reload");
                 r = bus_parse_strv(message, &l);
                 if (r == -ENOMEM)
@@ -1452,7 +1452,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
                 char **f = NULL;
                 DBusMessageIter iter;
-                SELINUX_ACCESS_CHECK(connection, message, "reboot");
+                SELINUX_ACCESS_CHECK(connection, message, "reload");
                 if (!dbus_message_iter_init(message, &iter))
                         goto oom;
SOURCES/0016-keymap-remove-some-commented-out-lines.patch
File was deleted
SOURCES/0016-mount-check-for-NULL-before-reading-pm-what.patch
New file
@@ -0,0 +1,26 @@
From 172b60ee7366d5e46b240386824682e4c051ad9e Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Fri, 4 Oct 2013 18:22:40 -0400
Subject: [PATCH] mount: check for NULL before reading pm->what
Since a57f7e2c828b85, a mount unit with garbage in it would cause
systemd to crash on loading it.
ref: https://bugs.freedesktop.org/show_bug.cgi?id=70148
---
 src/core/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 93bfa99..db055f0 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -182,7 +182,7 @@ static int mount_add_mount_links(Mount *m) {
          * for the source path (if this is a bind mount) to be
          * available. */
         pm = get_mount_parameters_fragment(m);
-        if (pm && path_is_absolute(pm->what)) {
+        if (pm && pm->what && path_is_absolute(pm->what)) {
                 r = unit_require_mounts_for(UNIT(m), pm->what);
                 if (r < 0)
                         return r;
SOURCES/0017-Advertise-hibernation-only-if-there-s-enough-free-sw.patch
File was deleted
SOURCES/0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch
New file
@@ -0,0 +1,178 @@
From 980112adcce965de6808390330750aaf11c165ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 5 Oct 2013 13:09:43 -0400
Subject: [PATCH] core: do not add "what" to RequiresMountsFor for network
 mounts
For cifs mount like //server/share, we would get
RequiresMountsFor=/server/share, which probably isn't
harmful, but quite confusing.
Unfortunately a bunch of static functions had to be moved
up, but patch is really one line.
---
 src/core/mount.c | 137 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 70 insertions(+), 67 deletions(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index db055f0..70cd372 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -59,6 +59,72 @@ static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
         [MOUNT_FAILED] = UNIT_FAILED
 };
+static char* mount_test_option(const char *haystack, const char *needle) {
+        struct mntent me = { .mnt_opts = (char*) haystack };
+
+        assert(needle);
+
+        /* Like glibc's hasmntopt(), but works on a string, not a
+         * struct mntent */
+
+        if (!haystack)
+                return NULL;
+
+        return hasmntopt(&me, needle);
+}
+
+static bool mount_is_network(MountParameters *p) {
+        assert(p);
+
+        if (mount_test_option(p->options, "_netdev"))
+                return true;
+
+        if (p->fstype && fstype_is_network(p->fstype))
+                return true;
+
+        return false;
+}
+
+static bool mount_is_bind(MountParameters *p) {
+        assert(p);
+
+        if (mount_test_option(p->options, "bind"))
+                return true;
+
+        if (p->fstype && streq(p->fstype, "bind"))
+                return true;
+
+        if (mount_test_option(p->options, "rbind"))
+                return true;
+
+        if (p->fstype && streq(p->fstype, "rbind"))
+                return true;
+
+        return false;
+}
+
+static bool mount_is_auto(MountParameters *p) {
+        assert(p);
+
+        return !mount_test_option(p->options, "noauto");
+}
+
+static bool needs_quota(MountParameters *p) {
+        assert(p);
+
+        if (mount_is_network(p))
+                return false;
+
+        if (mount_is_bind(p))
+                return false;
+
+        return mount_test_option(p->options, "usrquota") ||
+                mount_test_option(p->options, "grpquota") ||
+                mount_test_option(p->options, "quota") ||
+                mount_test_option(p->options, "usrjquota") ||
+                mount_test_option(p->options, "grpjquota");
+}
+
 static void mount_init(Unit *u) {
         Mount *m = MOUNT(u);
@@ -182,7 +248,10 @@ static int mount_add_mount_links(Mount *m) {
          * for the source path (if this is a bind mount) to be
          * available. */
         pm = get_mount_parameters_fragment(m);
-        if (pm && pm->what && path_is_absolute(pm->what)) {
+        if (pm && pm->what &&
+            path_is_absolute(pm->what) &&
+            !mount_is_network(pm)) {
+
                 r = unit_require_mounts_for(UNIT(m), pm->what);
                 if (r < 0)
                         return r;
@@ -214,72 +283,6 @@ static int mount_add_mount_links(Mount *m) {
         return 0;
 }
-static char* mount_test_option(const char *haystack, const char *needle) {
-        struct mntent me = { .mnt_opts = (char*) haystack };
-
-        assert(needle);
-
-        /* Like glibc's hasmntopt(), but works on a string, not a
-         * struct mntent */
-
-        if (!haystack)
-                return NULL;
-
-        return hasmntopt(&me, needle);
-}
-
-static bool mount_is_network(MountParameters *p) {
-        assert(p);
-
-        if (mount_test_option(p->options, "_netdev"))
-                return true;
-
-        if (p->fstype && fstype_is_network(p->fstype))
-                return true;
-
-        return false;
-}
-
-static bool mount_is_bind(MountParameters *p) {
-        assert(p);
-
-        if (mount_test_option(p->options, "bind"))
-                return true;
-
-        if (p->fstype && streq(p->fstype, "bind"))
-                return true;
-
-        if (mount_test_option(p->options, "rbind"))
-                return true;
-
-        if (p->fstype && streq(p->fstype, "rbind"))
-                return true;
-
-        return false;
-}
-
-static bool mount_is_auto(MountParameters *p) {
-        assert(p);
-
-        return !mount_test_option(p->options, "noauto");
-}
-
-static bool needs_quota(MountParameters *p) {
-        assert(p);
-
-        if (mount_is_network(p))
-                return false;
-
-        if (mount_is_bind(p))
-                return false;
-
-        return mount_test_option(p->options, "usrquota") ||
-                mount_test_option(p->options, "grpquota") ||
-                mount_test_option(p->options, "quota") ||
-                mount_test_option(p->options, "usrjquota") ||
-                mount_test_option(p->options, "grpjquota");
-}
-
 static int mount_add_device_links(Mount *m) {
         MountParameters *p;
         bool device_wants_mount = false;
SOURCES/0018-README-add-SCSI-BSG-option.patch
File was deleted
SOURCES/0018-systemd-serialize-deserialize-forbid_restart-value.patch
New file
@@ -0,0 +1,48 @@
From d5a7089608ccde2302b185ec367165c8b5623a12 Mon Sep 17 00:00:00 2001
From: Sylvia Else <sylviabz1@cryogenic.net>
Date: Sun, 6 Oct 2013 23:06:35 -0400
Subject: [PATCH] systemd: serialize/deserialize forbid_restart value
The Service type's forbid_restart field was not preserved by
serialization/deserialization, so the fact that the service should not
be restarted after stopping was lost.
If a systemctl stop foo command has been given, but the foo service
has not yet stopped, and then the systemctl --system daemon-reload was
given, then when the foo service eventually stopped, systemd would
restart it.
https://bugs.freedesktop.org/show_bug.cgi?id=69800
---
 src/core/service.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/src/core/service.c b/src/core/service.c
index 6792024..98b1599 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2651,6 +2651,9 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
         if (s->exec_context.var_tmp_dir)
                 unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
+        if (s->forbid_restart)
+                unit_serialize_item(u, f, "forbid_restart", yes_no(s->forbid_restart));
+
         return 0;
 }
@@ -2787,6 +2790,14 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                         return log_oom();
                 s->exec_context.var_tmp_dir = t;
+        } else if (streq(key, "forbid_restart")) {
+                int b;
+
+                b = parse_boolean(value);
+                if (b < 0)
+                        log_debug_unit(u->id, "Failed to parse forbid_restart value %s", value);
+                else
+                        s->forbid_restart = b;
         } else
                 log_debug_unit(u->id, "Unknown serialization key '%s'", key);
SOURCES/0019-core-unify-the-way-we-denote-serialization-attribute.patch
New file
@@ -0,0 +1,37 @@
From e409d591e0d9ae65d351cf32ae7cb79def50f009 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Oct 2013 00:13:55 +0200
Subject: [PATCH] core: unify the way we denote serialization attributes
---
 src/core/service.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/service.c b/src/core/service.c
index 98b1599..96ed2d3 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2652,7 +2652,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
                 unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
         if (s->forbid_restart)
-                unit_serialize_item(u, f, "forbid_restart", yes_no(s->forbid_restart));
+                unit_serialize_item(u, f, "forbid-restart", yes_no(s->forbid_restart));
         return 0;
 }
@@ -2790,12 +2790,12 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                         return log_oom();
                 s->exec_context.var_tmp_dir = t;
-        } else if (streq(key, "forbid_restart")) {
+        } else if (streq(key, "forbid-restart")) {
                 int b;
                 b = parse_boolean(value);
                 if (b < 0)
-                        log_debug_unit(u->id, "Failed to parse forbid_restart value %s", value);
+                        log_debug_unit(u->id, "Failed to parse forbid-restart value %s", value);
                 else
                         s->forbid_restart = b;
         } else
SOURCES/0019-swap-create-.wants-symlink-to-auto-swap-devices.patch
File was deleted
SOURCES/0020-cgroup-add-missing-equals-for-BlockIOWeight.patch
File was deleted
SOURCES/0020-journald-fix-minor-memory-leak.patch
New file
@@ -0,0 +1,22 @@
From dac4b2528173c73473b0bf6a147e47170fd344d6 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Oct 2013 04:03:45 +0200
Subject: [PATCH] journald: fix minor memory leak
---
 src/journal/journal-vacuum.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index c73ad8f..8d5effb 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -278,6 +278,8 @@ int journal_directory_vacuum(
                         } else if (errno != ENOENT)
                                 log_warning("Failed to delete %s/%s: %m", directory, p);
+                        free(p);
+
                         continue;
                 }
SOURCES/0021-Assume-that-proc-meminfo-can-be-missing.patch
File was deleted
SOURCES/0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch
New file
@@ -0,0 +1,36 @@
From c10d51e51388a133d1e0a656f9f69c3d2ca79f09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 9 Oct 2013 22:13:13 -0400
Subject: [PATCH] journald: remove rotated file from hashmap when rotation
 fails
Before, when the user journal file was rotated, journal_file_rotate
could close the old file and fail to open the new file. In that
case, we would leave the old (deallocated) file in the hashmap.
On subsequent accesses, we could retrieve this stale entry, leading
to a segfault.
When journal_file_rotate fails with the file pointer set to 0,
old file is certainly gone, and cannot be used anymore.
https://bugzilla.redhat.com/show_bug.cgi?id=890463
---
 src/journal/journald-server.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 4f47eb1..e03e413 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -321,8 +321,10 @@ void server_rotate(Server *s) {
                 if (r < 0)
                         if (f)
                                 log_error("Failed to rotate %s: %s", f->path, strerror(-r));
-                        else
+                        else {
                                 log_error("Failed to create user journal: %s", strerror(-r));
+                                hashmap_remove(s->user_journals, k);
+                        }
                 else {
                         hashmap_replace(s->user_journals, k, f);
                         server_fix_perms(s, f, PTR_TO_UINT32(k));
SOURCES/0022-transaction.c-do-not-point-users-to-logs-when-unit-n.patch
File was deleted
SOURCES/0022-udevadm.xml-document-resolve-names-option-for-test.patch
New file
@@ -0,0 +1,31 @@
From 46ae516340261691a08f64439dfd7aafa43b7467 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 13 Oct 2013 17:42:51 -0400
Subject: [PATCH] udevadm.xml: document --resolve-names option for test
And remove documentation of the --subsystem flag which doesn't actually
exist.
---
 man/udevadm.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/man/udevadm.xml b/man/udevadm.xml
index d0b257d..b959216 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -462,9 +462,13 @@
           </listitem>
         </varlistentry>
         <varlistentry>
-          <term><option>--subsystem=<replaceable>string</replaceable></option></term>
+          <term><option>--resolve-names=<replaceable>early|late|never</replaceable></option></term>
           <listitem>
-            <para>The subsystem string.</para>
+            <para>Specify when udevadm should resolve names of users and groups.
+              When set to early (the default) names will be resolved when the
+              rules are parsed. When set to late names will be resolved for
+              every event. When set to never names will never be resolved and
+              all devices will be owned by root.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
SOURCES/0023-Verify-validity-of-session-name-when-received-from-o.patch
File was deleted
SOURCES/0023-dbus-common-avoid-leak-in-error-path.patch
New file
@@ -0,0 +1,68 @@
From 10725a4ee35e5d1d97c2f9bc72010c5c0210cd6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:20 -0400
Subject: [PATCH] dbus-common: avoid leak in error path
src/shared/dbus-common.c:968:33: warning: Potential leak of memory pointed to by 'l'
                        return -EINVAL;
                                ^~~~~~
---
 src/shared/dbus-common.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
index c727cae..3ba2d87 100644
--- a/src/shared/dbus-common.c
+++ b/src/shared/dbus-common.c
@@ -934,7 +934,7 @@ int bus_parse_strv_iter(DBusMessageIter *iter, char ***_l) {
 int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
         DBusMessageIter sub, sub2;
         unsigned n = 0, i = 0;
-        char **l;
+        _cleanup_strv_free_ char **l = NULL;
         assert(iter);
         assert(_l);
@@ -953,6 +953,7 @@ int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
         l = new(char*, n*2+1);
         if (!l)
                 return -ENOMEM;
+        l[0] = NULL; /* make sure that l is properly terminated at all times */
         dbus_message_iter_recurse(iter, &sub);
@@ -968,26 +969,25 @@ int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
                         return -EINVAL;
                 l[i] = strdup(a);
-                if (!l[i]) {
-                        strv_free(l);
+                if (!l[i])
                         return -ENOMEM;
-                }
+                i++;
-                l[++i] = strdup(b);
-                if (!l[i]) {
-                        strv_free(l);
+                l[i] = strdup(b);
+                if (!l[i])
                         return -ENOMEM;
-                }
-
                 i++;
+
                 dbus_message_iter_next(&sub);
         }
         assert(i == n*2);
         l[i] = NULL;
-        if (_l)
+        if (_l) {
                 *_l = l;
+                l = NULL; /* avoid freeing */
+        }
         return 0;
 }
SOURCES/0024-drop-ins-check-return-value.patch
New file
@@ -0,0 +1,26 @@
From 0b344626698e0c42a7da558783d70207f8aed05e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:36 -0400
Subject: [PATCH] drop-ins: check return value
If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.
---
 src/core/unit.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/src/core/unit.c b/src/core/unit.c
index 4b97710..1db7d06 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2908,6 +2908,9 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) {
                 return 0;
         r = drop_in_file(u, mode, name, &p, &q);
+        if (r < 0)
+                return r;
+
         if (unlink(q) < 0)
                 r = errno == ENOENT ? 0 : -errno;
         else
SOURCES/0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch
File was deleted
SOURCES/0025-keymap-Add-Samsung-Series-5-Ultra.patch
File was deleted
SOURCES/0025-shared-util-Fix-glob_extend-argument.patch
New file
@@ -0,0 +1,25 @@
From 18f14dc669bfda1131e31f9818eabd962bda631d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 14 Oct 2013 08:15:51 +0200
Subject: [PATCH] shared/util: Fix glob_extend() argument
glob_extend() would completely fail to work, or return incorrect
data if it wasn't being passed the current getopt "optarg" variable
as it used the global variable, instead of the passed parameters.
---
 src/shared/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 9be6acf..48adc83 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4391,7 +4391,7 @@ int glob_extend(char ***strv, const char *path) {
         char **p;
         errno = 0;
-        k = glob(optarg, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
+        k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
         if (k == GLOB_NOMATCH)
                 return -ENOENT;
SOURCES/0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch
New file
@@ -0,0 +1,31 @@
From 63d689541fd7e70e83de425986182ee488e14a0f Mon Sep 17 00:00:00 2001
From: Igor Zhbanov <i.zhbanov@samsung.com>
Date: Tue, 15 Oct 2013 14:35:13 +0400
Subject: [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living
 processes
The function svg_ps_bars() dereferencess NULL pointer in the line
    endtime = ps->last->sampledata->sampletime;
because of partially initialized ps_struct (ps->last == NULL).
If some process terminates between scaning /proc directory in the log_sample()
function and reading additional information from /proc/PID/... files,
the files couldn't be read, the loop will be continued and partially
initialized structure returned.
---
 src/bootchart/store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootchart/store.c b/src/bootchart/store.c
index f8c97c2..7f86cfe 100644
--- a/src/bootchart/store.c
+++ b/src/bootchart/store.c
@@ -275,7 +275,7 @@ schedstat_next:
                         pscount++;
                         /* mark our first sample */
-                        ps->first = ps->sample;
+                        ps->first = ps->last = ps->sample;
                         ps->sample->runtime = atoll(rt);
                         ps->sample->waittime = atoll(wt);
SOURCES/0026-login-fix-login_is_valid-test.patch
File was deleted
SOURCES/0027-man-document-the-b-special-boot-option.patch
New file
@@ -0,0 +1,34 @@
From fb31ccf54084efe2264c0960feb5ed2edb5256b3 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 15 Oct 2013 08:58:50 +0200
Subject: [PATCH] man: document the -b special boot option
---
 man/kernel-command-line.xml | 1 +
 man/systemd.xml             | 1 +
 2 files changed, 2 insertions(+)
diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml
index cc267a3..abe68e5 100644
--- a/man/kernel-command-line.xml
+++ b/man/kernel-command-line.xml
@@ -123,6 +123,7 @@
                         </varlistentry>
                         <varlistentry>
+                                <term><varname>-b</varname></term>
                                 <term><varname>emergency</varname></term>
                                 <term><varname>single</varname></term>
                                 <term><varname>s</varname></term>
diff --git a/man/systemd.xml b/man/systemd.xml
index fe6e331..85c06d3 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -1149,6 +1149,7 @@
                         </varlistentry>
                         <varlistentry>
+                                <term><varname>-b</varname></term>
                                 <term><varname>emergency</varname></term>
                                 <listitem><para>Boot into emergency
SOURCES/0027-polkit-Avoid-race-condition-in-scraping-proc.patch
File was deleted
SOURCES/0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch
File was deleted
SOURCES/0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch
New file
@@ -0,0 +1,34 @@
From 710be393ae8d15a274f376677aa68c27cd107356 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 17 Oct 2013 03:20:46 +0200
Subject: [PATCH] tmpfiles: log unaccessible FUSE mount points only as debug
 message
---
 src/tmpfiles/tmpfiles.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 8122d6a..239e56b 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -275,12 +275,15 @@ static int dir_cleanup(
                         continue;
                 if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
+                        if (errno == ENOENT)
+                                continue;
-                        if (errno != ENOENT) {
+                        /* FUSE, NFS mounts, SELinux might return EACCES */
+                        if (errno == EACCES)
+                                log_debug("stat(%s/%s) failed: %m", p, dent->d_name);
+                        else
                                 log_error("stat(%s/%s) failed: %m", p, dent->d_name);
-                                r = -errno;
-                        }
-
+                        r = -errno;
                         continue;
                 }
SOURCES/0029-remove-user-.service.patch
File was deleted
SOURCES/0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
New file
@@ -0,0 +1,47 @@
From 2f7ce3bd875000149a0868b0652d40406c534f8b Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 6 Oct 2013 18:26:23 -0400
Subject: [PATCH] shared/util: fix off-by-one error in tag_to_udev_node
Triggered false negatives when encoding a string which needed every
character to be escaped, e.g. "LABEL=/".
---
 src/shared/util.c            | 2 +-
 src/test/test-device-nodes.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 48adc83..6c88040 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3527,7 +3527,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
         if (u == NULL)
                 return NULL;
-        enc_len = strlen(u) * 4;
+        enc_len = strlen(u) * 4 + 1;
         t = new(char, enc_len);
         if (t == NULL)
                 return NULL;
diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c
index 2f3dedb..59ba4be 100644
--- a/src/test/test-device-nodes.c
+++ b/src/test/test-device-nodes.c
@@ -26,7 +26,7 @@
 /* helpers for test_encode_devnode_name */
 static char *do_encode_string(const char *in) {
-        size_t out_len = strlen(in) * 4;
+        size_t out_len = strlen(in) * 4 + 1;
         char *out = malloc(out_len);
         assert_se(out);
@@ -46,6 +46,8 @@ static void test_encode_devnode_name(void) {
         assert_se(expect_encoded_as("pinkiepie", "pinkiepie"));
         assert_se(expect_encoded_as("valíd\\ųtf8", "valíd\\x5cųtf8"));
         assert_se(expect_encoded_as("s/ash/ng", "s\\x2fash\\x2fng"));
+        assert_se(expect_encoded_as("/", "\\x2f"));
+        assert_se(expect_encoded_as("!", "\\x21"));
 }
 int main(int argc, char *argv[]) {
SOURCES/0030-Configurable-Timeouts-Restarts-default-values.patch
New file
@@ -0,0 +1,293 @@
From cd1c485f2fc5b23c7cdccb0dd852c7228fc79868 Mon Sep 17 00:00:00 2001
From: Oleksii Shevchuk <alxchk@gmail.com>
Date: Mon, 4 Nov 2013 18:47:43 +0200
Subject: [PATCH] Configurable Timeouts/Restarts default values
https://bugs.freedesktop.org/show_bug.cgi?id=71132
Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec
configuration options to manager configuration file.
---
 man/systemd-system.conf.xml | 24 +++++++++++++++++++++++-
 man/systemd.mount.xml       |  4 ++--
 man/systemd.service.xml     |  6 ++++--
 man/systemd.socket.xml      |  4 ++--
 man/systemd.swap.xml        |  4 ++--
 src/core/device.c           |  2 +-
 src/core/main.c             |  9 +++++++++
 src/core/manager.h          |  3 +++
 src/core/mount.c            |  2 +-
 src/core/scope.c            |  2 +-
 src/core/service.c          |  6 +++---
 src/core/socket.c           |  2 +-
 src/core/swap.c             |  2 +-
 src/core/system.conf        |  3 +++
 src/core/user.conf          |  3 +++
 15 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index e8cf8a9..c1f2648 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -61,7 +61,6 @@
                 otherwise <filename>user.conf</filename>. These
                 configuration files contain a few settings controlling
                 basic manager operations.</para>
-
         </refsect1>
         <refsect1>
@@ -95,6 +94,29 @@
                         </varlistentry>
                         <varlistentry>
+                                <term><varname>DefaultTimeoutStartSec=</varname></term>
+                                <term><varname>DefaultTimeoutStopSec=</varname></term>
+                                <term><varname>DefaultRestartSec=</varname></term>
+
+                                <listitem><para>Configures the default
+                                time-outs for starting and stopping of
+                                units, as well as the default time to
+                                sleep between automatic restarts of a
+                                units, as configured per-unit in
+                                <varname>TimeoutStartSec=</varname>,
+                                <varname>TimeoutStopSec=</varname> and
+                                <varname>RestartSec=</varname> (for
+                                service units see
+                                <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                for details on the per-unit
+                                settings). For non-service units
+                                <varname>DefaultTimeoutStartSec=</varname>
+                                sets the default
+                                <varname>TimeoutSec=</varname> value.
+                                </para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><varname>CPUAffinity=</varname></term>
                                 <listitem><para>Configures the initial
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index 48af1ca..71a5736 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -260,8 +260,8 @@
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
                                 20s". Pass 0 to disable the timeout
-                                logic. Defaults to
-                                90s.</para></listitem>
+                                logic. Default value is setted up in manager configuration
+                                file via <term><varname>DefaultTimeoutStart=</varname></term>.</para></listitem>
                         </varlistentry>
                 </variablelist>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 5e1ddf7..df04048 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -524,7 +524,8 @@
                                 Takes a unit-less value in seconds, or a
                                 time span value such as "5min
                                 20s". Pass 0 to disable the timeout
-                                logic. Defaults to 90s, except when
+                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
+                                manager configuration file, except when
                                 <varname>Type=oneshot</varname> is
                                 used in which case the timeout
                                 is disabled by default.
@@ -545,7 +546,8 @@
                                 Takes a unit-less value in seconds, or a
                                 time span value such as "5min
                                 20s". Pass 0 to disable the timeout
-                                logic. Defaults to 90s.
+                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
+                                manager configuration file.
                                 </para></listitem>
                         </varlistentry>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 8c88d9f..1c78562 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -679,8 +679,8 @@
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
                                 20s". Pass 0 to disable the timeout
-                                logic. Defaults to
-                                90s.</para></listitem>
+                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
+                                manager configuration file.</para></listitem>
                         </varlistentry>
                         <varlistentry>
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index 813ae6c..13f6c84 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -186,8 +186,8 @@
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
                                 20s". Pass 0 to disable the timeout
-                                logic. Defaults to
-                                90s.</para></listitem>
+                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
+                                manager configuration file.</para></listitem>
                         </varlistentry>
                 </variablelist>
diff --git a/src/core/device.c b/src/core/device.c
index 9fca82a..5397bd6 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -70,7 +70,7 @@ static void device_init(Unit *u) {
          * indefinitely for plugged in devices, something which cannot
          * happen for the other units since their operations time out
          * anyway. */
-        UNIT(d)->job_timeout = DEFAULT_TIMEOUT_USEC;
+        UNIT(d)->job_timeout = u->manager->default_timeout_start_usec;
         UNIT(d)->ignore_on_isolate = true;
         UNIT(d)->ignore_on_snapshot = true;
diff --git a/src/core/main.c b/src/core/main.c
index fe291f8..937994c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -90,6 +90,9 @@ static bool arg_switched_root = false;
 static char ***arg_join_controllers = NULL;
 static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
 static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
+static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC;
+static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC;
+static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
 static usec_t arg_runtime_watchdog = 0;
 static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
 static char **arg_default_environment = NULL;
@@ -636,6 +639,9 @@ static int parse_config_file(void) {
                 { "Manager", "CPUAffinity",           config_parse_cpu_affinity2, 0, NULL                    },
                 { "Manager", "DefaultStandardOutput", config_parse_output,       0, &arg_default_std_output  },
                 { "Manager", "DefaultStandardError",  config_parse_output,       0, &arg_default_std_error   },
+                { "Manager", "DefaultTimeoutStartSec", config_parse_sec,         0, &arg_default_timeout_start_usec },
+                { "Manager", "DefaultTimeoutStopSec", config_parse_sec,          0, &arg_default_timeout_stop_usec  },
+                { "Manager", "DefaultRestartSec",     config_parse_sec,          0, &arg_default_restart_usec  },
                 { "Manager", "JoinControllers",       config_parse_join_controllers, 0, &arg_join_controllers },
                 { "Manager", "RuntimeWatchdogSec",    config_parse_sec,          0, &arg_runtime_watchdog    },
                 { "Manager", "ShutdownWatchdogSec",   config_parse_sec,          0, &arg_shutdown_watchdog   },
@@ -1542,6 +1548,9 @@ int main(int argc, char *argv[]) {
         m->confirm_spawn = arg_confirm_spawn;
         m->default_std_output = arg_default_std_output;
         m->default_std_error = arg_default_std_error;
+        m->default_restart_usec = arg_default_restart_usec;
+        m->default_timeout_start_usec = arg_default_timeout_start_usec;
+        m->default_timeout_stop_usec = arg_default_timeout_stop_usec;
         m->runtime_watchdog = arg_runtime_watchdog;
         m->shutdown_watchdog = arg_shutdown_watchdog;
         m->userspace_timestamp = userspace_timestamp;
diff --git a/src/core/manager.h b/src/core/manager.h
index a3049b5..e74c609 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -230,6 +230,9 @@ struct Manager {
         ExecOutput default_std_output, default_std_error;
+        usec_t default_restart_usec, default_timeout_start_usec,
+                default_timeout_stop_usec;
+
         struct rlimit *rlimit[RLIMIT_NLIMITS];
         /* non-zero if we are reloading or reexecuting, */
diff --git a/src/core/mount.c b/src/core/mount.c
index 70cd372..c0445a6 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -131,7 +131,7 @@ static void mount_init(Unit *u) {
         assert(u);
         assert(u->load_state == UNIT_STUB);
-        m->timeout_usec = DEFAULT_TIMEOUT_USEC;
+        m->timeout_usec = u->manager->default_timeout_start_usec;
         m->directory_mode = 0755;
         exec_context_init(&m->exec_context);
diff --git a/src/core/scope.c b/src/core/scope.c
index 50e5dba..41da3b9 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -46,7 +46,7 @@ static void scope_init(Unit *u) {
         assert(u);
         assert(u->load_state == UNIT_STUB);
-        s->timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
+        s->timeout_stop_usec = u->manager->default_timeout_stop_usec;
         watch_init(&s->timer_watch);
diff --git a/src/core/service.c b/src/core/service.c
index 96ed2d3..e81aa1f 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -124,9 +124,9 @@ static void service_init(Unit *u) {
         assert(u);
         assert(u->load_state == UNIT_STUB);
-        s->timeout_start_usec = DEFAULT_TIMEOUT_USEC;
-        s->timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
-        s->restart_usec = DEFAULT_RESTART_USEC;
+        s->timeout_start_usec = u->manager->default_timeout_start_usec;
+        s->timeout_stop_usec = u->manager->default_timeout_stop_usec;
+        s->restart_usec = u->manager->default_restart_usec;
         s->type = _SERVICE_TYPE_INVALID;
         watch_init(&s->watchdog_watch);
diff --git a/src/core/socket.c b/src/core/socket.c
index 6c0ac1a..d368f7e 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -73,7 +73,7 @@ static void socket_init(Unit *u) {
         assert(u->load_state == UNIT_STUB);
         s->backlog = SOMAXCONN;
-        s->timeout_usec = DEFAULT_TIMEOUT_USEC;
+        s->timeout_usec = u->manager->default_timeout_start_usec;
         s->directory_mode = 0755;
         s->socket_mode = 0666;
diff --git a/src/core/swap.c b/src/core/swap.c
index a68ab7c..147f710 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -86,7 +86,7 @@ static void swap_init(Unit *u) {
         assert(s);
         assert(UNIT(s)->load_state == UNIT_STUB);
-        s->timeout_usec = DEFAULT_TIMEOUT_USEC;
+        s->timeout_usec = u->manager->default_timeout_start_usec;
         exec_context_init(&s->exec_context);
         s->exec_context.std_output = u->manager->default_std_output;
diff --git a/src/core/system.conf b/src/core/system.conf
index 7b03c87..3c6cc03 100644
--- a/src/core/system.conf
+++ b/src/core/system.conf
@@ -24,6 +24,9 @@
 #ShutdownWatchdogSec=10min
 #CapabilityBoundingSet=
 #TimerSlackNSec=
+#DefaultTimeoutStartSec=90s
+#DefaultTimeoutStopSec=90s
+#DefaultRestartSec=100ms
 #DefaultEnvironment=
 #DefaultLimitCPU=
 #DefaultLimitFSIZE=
diff --git a/src/core/user.conf b/src/core/user.conf
index 4a0129a..b030701 100644
--- a/src/core/user.conf
+++ b/src/core/user.conf
@@ -14,3 +14,6 @@
 #LogLocation=no
 #DefaultStandardOutput=inherit
 #DefaultStandardError=inherit
+#DefaultTimeoutStartSec=90s
+#DefaultTimeoutStopSec=90s
+#DefaultRestartSec=100ms
SOURCES/0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch
File was deleted
SOURCES/0031-logind-return-EINVAL-when-PID-is-wrong.patch
File was deleted
SOURCES/0031-manager-configurable-StartLimit-default-values.patch
New file
@@ -0,0 +1,161 @@
From 409dbe76d743448629167f4412f290bba1aae11e Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 8 Nov 2013 16:01:22 +0100
Subject: [PATCH] manager: configurable StartLimit default values
https://bugzilla.redhat.com/show_bug.cgi?id=821723
---
 man/systemd-system.conf.xml | 13 +++++++++++++
 man/systemd.service.xml     |  9 ++++++---
 src/core/main.c             |  6 ++++++
 src/core/manager.h          |  3 +++
 src/core/service.c          |  4 +++-
 src/core/system.conf        |  2 ++
 src/core/user.conf          |  2 ++
 src/shared/def.h            |  3 +++
 8 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index c1f2648..9a1a99f 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -115,6 +115,19 @@
                                 <varname>TimeoutSec=</varname> value.
                                 </para></listitem>
                         </varlistentry>
+                        <varlistentry>
+                                <term><varname>DefaultStartLimitInterval=</varname></term>
+                                <term><varname>DefaultStartLimitBurst=</varname></term>
+
+                                <listitem><para>Configure the default start rate
+                                limiting, as configured per-service by
+                                <varname>StartLimitInterval=</varname> and
+                                <varname>StartLimitBurst=</varname>. See
+                                <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                for details on the per-service
+                                settings).
+                                </para></listitem>
+                        </varlistentry>
                         <varlistentry>
                                 <term><varname>CPUAffinity=</varname></term>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index df04048..3f31c11 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -863,12 +863,15 @@
                                 these two options, this rate limiting
                                 may be modified. Use
                                 <varname>StartLimitInterval=</varname>
-                                to configure the checking interval
-                                (defaults to 10s, set to 0 to disable
+                                to configure the checking interval (defaults to
+                                <varname>DefaultStartLimitInterval=</varname> in
+                                manager configuration file, set to 0 to disable
                                 any kind of rate limiting). Use
                                 <varname>StartLimitBurst=</varname> to
                                 configure how many starts per interval
-                                are allowed (defaults to 5). These
+                                are allowed (defaults to
+                                <varname>DefaultStartLimitBurst=</varname> in
+                                manager configuration file). These
                                 configuration options are particularly
                                 useful in conjunction with
                                 <varname>Restart=</varname>, however
diff --git a/src/core/main.c b/src/core/main.c
index 937994c..00fd394 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -93,6 +93,8 @@ static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
 static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC;
 static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC;
 static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
+static usec_t arg_default_start_limit_interval = DEFAULT_START_LIMIT_INTERVAL;
+static unsigned arg_default_start_limit_burst = DEFAULT_START_LIMIT_BURST;
 static usec_t arg_runtime_watchdog = 0;
 static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
 static char **arg_default_environment = NULL;
@@ -642,6 +644,8 @@ static int parse_config_file(void) {
                 { "Manager", "DefaultTimeoutStartSec", config_parse_sec,         0, &arg_default_timeout_start_usec },
                 { "Manager", "DefaultTimeoutStopSec", config_parse_sec,          0, &arg_default_timeout_stop_usec  },
                 { "Manager", "DefaultRestartSec",     config_parse_sec,          0, &arg_default_restart_usec  },
+                { "Manager", "DefaultStartLimitInterval", config_parse_sec,      0, &arg_default_start_limit_interval },
+                { "Manager", "DefaultStartLimitBurst", config_parse_unsigned,    0, &arg_default_start_limit_burst },
                 { "Manager", "JoinControllers",       config_parse_join_controllers, 0, &arg_join_controllers },
                 { "Manager", "RuntimeWatchdogSec",    config_parse_sec,          0, &arg_runtime_watchdog    },
                 { "Manager", "ShutdownWatchdogSec",   config_parse_sec,          0, &arg_shutdown_watchdog   },
@@ -1551,6 +1555,8 @@ int main(int argc, char *argv[]) {
         m->default_restart_usec = arg_default_restart_usec;
         m->default_timeout_start_usec = arg_default_timeout_start_usec;
         m->default_timeout_stop_usec = arg_default_timeout_stop_usec;
+        m->default_start_limit_interval = arg_default_start_limit_interval;
+        m->default_start_limit_burst = arg_default_start_limit_burst;
         m->runtime_watchdog = arg_runtime_watchdog;
         m->shutdown_watchdog = arg_shutdown_watchdog;
         m->userspace_timestamp = userspace_timestamp;
diff --git a/src/core/manager.h b/src/core/manager.h
index e74c609..ee42c5e 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -233,6 +233,9 @@ struct Manager {
         usec_t default_restart_usec, default_timeout_start_usec,
                 default_timeout_stop_usec;
+        usec_t default_start_limit_interval;
+        unsigned default_start_limit_burst;
+
         struct rlimit *rlimit[RLIMIT_NLIMITS];
         /* non-zero if we are reloading or reexecuting, */
diff --git a/src/core/service.c b/src/core/service.c
index e81aa1f..5662180 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -143,7 +143,9 @@ static void service_init(Unit *u) {
         kill_context_init(&s->kill_context);
         cgroup_context_init(&s->cgroup_context);
-        RATELIMIT_INIT(s->start_limit, 10*USEC_PER_SEC, 5);
+        RATELIMIT_INIT(s->start_limit,
+                       u->manager->default_start_limit_interval,
+                       u->manager->default_start_limit_burst);
         s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID;
 }
diff --git a/src/core/system.conf b/src/core/system.conf
index 3c6cc03..38bbca5 100644
--- a/src/core/system.conf
+++ b/src/core/system.conf
@@ -27,6 +27,8 @@
 #DefaultTimeoutStartSec=90s
 #DefaultTimeoutStopSec=90s
 #DefaultRestartSec=100ms
+#DefaultStartLimitInterval=10s
+#DefaultStartLimitBurst=5
 #DefaultEnvironment=
 #DefaultLimitCPU=
 #DefaultLimitFSIZE=
diff --git a/src/core/user.conf b/src/core/user.conf
index b030701..923ca66 100644
--- a/src/core/user.conf
+++ b/src/core/user.conf
@@ -17,3 +17,5 @@
 #DefaultTimeoutStartSec=90s
 #DefaultTimeoutStopSec=90s
 #DefaultRestartSec=100ms
+#DefaultStartLimitInterval=10s
+#DefaultStartLimitBurst=5
diff --git a/src/shared/def.h b/src/shared/def.h
index edd0bcf..e4ef735 100644
--- a/src/shared/def.h
+++ b/src/shared/def.h
@@ -27,6 +27,9 @@
 #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
 #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC)
+#define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
+#define DEFAULT_START_LIMIT_BURST 5
+
 #define DEFAULT_EXIT_USEC (5*USEC_PER_MINUTE)
 #define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
SOURCES/0032-core-drop-some-out-of-date-references-to-cgroup-sett.patch
File was deleted
SOURCES/0032-sysctl-bring-back-etc-sysctl.conf.patch
New file
@@ -0,0 +1,25 @@
From 9944a5e77f0ad03742a1582cd51cc5ebbdd487ed Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 11 Nov 2013 11:17:57 +0100
Subject: [PATCH] sysctl: bring back /etc/sysctl.conf
Read /etc/sysctl.conf as the last file, overwriting everything.
---
 src/sysctl/sysctl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index b5670db..878c923 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -311,6 +311,10 @@ int main(int argc, char *argv[]) {
                         if (k < 0 && r == 0)
                                 r = k;
                 }
+
+                k = parse_file(sysctl_options, "/etc/sysctl.conf", true);
+                if (k < 0 && r == 0)
+                        r = k;
         }
         k = apply_all(sysctl_options);
SOURCES/0033-man-explain-NAME-in-systemctl-man-page.patch
File was deleted
SOURCES/0033-systemd-treat-reload-failure-as-failure.patch
New file
@@ -0,0 +1,90 @@
From b659126834756a4476a5b020bcece486be1edb85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 2 Dec 2013 21:52:51 -0500
Subject: [PATCH] systemd: treat reload failure as failure
systemctl reload "suceeded" on stopped units, but it is documented
to fail in this case.
https://bugzilla.redhat.com/show_bug.cgi?id=1036845
---
 src/core/job.c  | 11 +++++++----
 src/core/job.h  |  3 ++-
 src/core/unit.c |  5 ++++-
 3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/core/job.c b/src/core/job.c
index bf1d956..5ea9803 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -528,7 +528,7 @@ int job_run_and_invalidate(Job *j) {
                         else if (t == UNIT_ACTIVATING)
                                 r = -EAGAIN;
                         else
-                                r = -ENOEXEC;
+                                r = -EBADR;
                         break;
                 }
@@ -557,8 +557,10 @@ int job_run_and_invalidate(Job *j) {
         if (j) {
                 if (r == -EALREADY)
                         r = job_finish_and_invalidate(j, JOB_DONE, true);
-                else if (r == -ENOEXEC)
+                else if (r == -EBADR)
                         r = job_finish_and_invalidate(j, JOB_SKIPPED, true);
+                else if (r == -ENOEXEC)
+                        r = job_finish_and_invalidate(j, JOB_INVALID, true);
                 else if (r == -EAGAIN) {
                         j->state = JOB_WAITING;
                         m->n_running_jobs--;
@@ -784,7 +786,7 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive) {
                 goto finish;
         }
-        if (result == JOB_FAILED)
+        if (result == JOB_FAILED || result == JOB_INVALID)
                 j->manager->n_failed_jobs ++;
         job_uninstall(j);
@@ -1140,7 +1142,8 @@ static const char* const job_result_table[_JOB_RESULT_MAX] = {
         [JOB_TIMEOUT] = "timeout",
         [JOB_FAILED] = "failed",
         [JOB_DEPENDENCY] = "dependency",
-        [JOB_SKIPPED] = "skipped"
+        [JOB_SKIPPED] = "skipped",
+        [JOB_INVALID] = "invalid",
 };
 DEFINE_STRING_TABLE_LOOKUP(job_result, JobResult);
diff --git a/src/core/job.h b/src/core/job.h
index d90bc96..4237529 100644
--- a/src/core/job.h
+++ b/src/core/job.h
@@ -97,7 +97,8 @@ enum JobResult {
         JOB_TIMEOUT,             /* JobTimeout elapsed */
         JOB_FAILED,              /* Job failed */
         JOB_DEPENDENCY,          /* A required dependency job did not result in JOB_DONE */
-        JOB_SKIPPED,             /* JOB_RELOAD of inactive unit; negative result of JOB_VERIFY_ACTIVE */
+        JOB_SKIPPED,             /* Negative result of JOB_VERIFY_ACTIVE */
+        JOB_INVALID,             /* JOB_RELOAD of inactive unit */
         _JOB_RESULT_MAX,
         _JOB_RESULT_INVALID = -1
 };
diff --git a/src/core/unit.c b/src/core/unit.c
index 1db7d06..0f57b06 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1239,8 +1239,11 @@ int unit_reload(Unit *u) {
         if (state == UNIT_RELOADING)
                 return -EALREADY;
-        if (state != UNIT_ACTIVE)
+        if (state != UNIT_ACTIVE) {
+                log_warning_unit(u->id, "Unit %s cannot be reloaded because it is inactive.",
+                                 u->id);
                 return -ENOEXEC;
+        }
         if ((following = unit_following(u))) {
                 log_debug_unit(u->id, "Redirecting reload request from %s to %s.",
SOURCES/0034-journal-when-appending-to-journal-file-allocate-larg.patch
New file
@@ -0,0 +1,135 @@
From eb38fb593b201a97620555c0aca83ff487a50748 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 26 Nov 2013 18:39:42 +0100
Subject: [PATCH] journal: when appending to journal file, allocate larger
 blocks at once
Conflicts:
    src/journal/journal-file.c
---
 src/journal/journal-file.c | 51 +++++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 81c344f..4062a83 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -68,6 +68,9 @@
 /* How many entries to keep in the entry array chain cache at max */
 #define CHAIN_CACHE_MAX 20
+/* How much to increase the journal file size at once each time we allocate something new. */
+#define FILE_SIZE_INCREASE (8ULL*1024ULL*1024ULL)              /* 8MB */
+
 int journal_file_set_online(JournalFile *f) {
         assert(f);
@@ -218,8 +221,7 @@ static int journal_file_refresh_header(JournalFile *f) {
         journal_file_set_online(f);
         /* Sync the online state to disk */
-        msync(f->header, PAGE_ALIGN(sizeof(Header)), MS_SYNC);
-        fdatasync(f->fd);
+        fsync(f->fd);
         return 0;
 }
@@ -313,7 +315,7 @@ static int journal_file_verify_header(JournalFile *f) {
 }
 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
-        uint64_t old_size, new_size;
+        uint64_t old_size, new_size, file_size;
         int r;
         assert(f);
@@ -333,12 +335,10 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
         if (new_size <= old_size)
                 return 0;
-        if (f->metrics.max_size > 0 &&
-            new_size > f->metrics.max_size)
+        if (f->metrics.max_size > 0 && new_size > f->metrics.max_size)
                 return -E2BIG;
-        if (new_size > f->metrics.min_size &&
-            f->metrics.keep_free > 0) {
+        if (new_size > f->metrics.min_size && f->metrics.keep_free > 0) {
                 struct statvfs svfs;
                 if (fstatvfs(f->fd, &svfs) >= 0) {
@@ -363,8 +363,16 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
         if (r != 0)
                 return -r;
-        if (fstat(f->fd, &f->last_stat) < 0)
-                return -errno;
+        /* Increase the file size a bit further than this, so that we
+         * we can create larger memory maps to cache */
+        file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
+        if (file_size > (uint64_t) f->last_stat.st_size) {
+                if (file_size > new_size)
+                        ftruncate(f->fd, file_size);
+
+                if (fstat(f->fd, &f->last_stat) < 0)
+                        return -errno;
+        }
         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
@@ -1344,7 +1352,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
         /* Order by the position on disk, in order to improve seek
          * times for rotating media. */
-        qsort(items, n_iovec, sizeof(EntryItem), entry_item_cmp);
+        qsort_safe(items, n_iovec, sizeof(EntryItem), entry_item_cmp);
         r = journal_file_append_entry_internal(f, ts, xor_hash, items, n_iovec, seqnum, ret, offset);
@@ -2551,7 +2559,7 @@ fail:
 }
 int journal_file_rotate(JournalFile **f, bool compress, bool seal) {
-        char *p;
+        _cleanup_free_ char *p = NULL;
         size_t l;
         JournalFile *old_file, *new_file = NULL;
         int r;
@@ -2568,22 +2576,15 @@ int journal_file_rotate(JournalFile **f, bool compress, bool seal) {
                 return -EINVAL;
         l = strlen(old_file->path);
-
-        p = new(char, l + 1 + 32 + 1 + 16 + 1 + 16 + 1);
-        if (!p)
+        r = asprintf(&p, "%.*s@" SD_ID128_FORMAT_STR "-%016"PRIx64"-%016"PRIx64".journal",
+                     (int) l - 8, old_file->path,
+                     SD_ID128_FORMAT_VAL(old_file->header->seqnum_id),
+                     le64toh((*f)->header->head_entry_seqnum),
+                     le64toh((*f)->header->head_entry_realtime));
+        if (r < 0)
                 return -ENOMEM;
-        memcpy(p, old_file->path, l - 8);
-        p[l-8] = '@';
-        sd_id128_to_string(old_file->header->seqnum_id, p + l - 8 + 1);
-        snprintf(p + l - 8 + 1 + 32, 1 + 16 + 1 + 16 + 8 + 1,
-                 "-%016"PRIx64"-%016"PRIx64".journal",
-                 le64toh((*f)->header->head_entry_seqnum),
-                 le64toh((*f)->header->head_entry_realtime));
-
         r = rename(old_file->path, p);
-        free(p);
-
         if (r < 0)
                 return -errno;
@@ -2634,7 +2635,7 @@ int journal_file_open_reliably(
         l = strlen(fname);
         if (asprintf(&p, "%.*s@%016llx-%016llx.journal~",
-                     (int) (l-8), fname,
+                     (int) l - 8, fname,
                      (unsigned long long) now(CLOCK_REALTIME),
                      random_ull()) < 0)
                 return -ENOMEM;
SOURCES/0034-journald-accept-EPOLLERR-from-dev-kmsg.patch
File was deleted
SOURCES/0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch
New file
@@ -0,0 +1,244 @@
From 563bf9e9305aa88ad403a81c0c91418b7846f465 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 26 Nov 2013 20:37:53 +0100
Subject: [PATCH] journal: optimize bisection logic a bit by caching the last
 position
This way we can do a quick restart limiting a bit how wildly we need to
jump around during the bisection process.
---
 src/journal/journal-file.c | 134 +++++++++++++++++++++++++++++++++------------
 1 file changed, 99 insertions(+), 35 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 4062a83..7adb1b5 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1366,6 +1366,7 @@ typedef struct ChainCacheItem {
         uint64_t array; /* the cached array */
         uint64_t begin; /* the first item in the cached array */
         uint64_t total; /* the total number of items in all arrays before this one in the chain */
+        uint64_t last_index; /* the last index we looked at, to optimize locality when bisecting */
 } ChainCacheItem;
 static void chain_cache_put(
@@ -1374,7 +1375,8 @@ static void chain_cache_put(
                 uint64_t first,
                 uint64_t array,
                 uint64_t begin,
-                uint64_t total) {
+                uint64_t total,
+                uint64_t last_index) {
         if (!ci) {
                 /* If the chain item to cache for this chain is the
@@ -1402,12 +1404,14 @@ static void chain_cache_put(
         ci->array = array;
         ci->begin = begin;
         ci->total = total;
+        ci->last_index = last_index;
 }
-static int generic_array_get(JournalFile *f,
-                             uint64_t first,
-                             uint64_t i,
-                             Object **ret, uint64_t *offset) {
+static int generic_array_get(
+                JournalFile *f,
+                uint64_t first,
+                uint64_t i,
+                Object **ret, uint64_t *offset) {
         Object *o;
         uint64_t p = 0, a, t = 0;
@@ -1448,7 +1452,7 @@ static int generic_array_get(JournalFile *f,
 found:
         /* Let's cache this item for the next invocation */
-        chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t);
+        chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t, i);
         r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
         if (r < 0)
@@ -1463,11 +1467,12 @@ found:
         return 1;
 }
-static int generic_array_get_plus_one(JournalFile *f,
-                                      uint64_t extra,
-                                      uint64_t first,
-                                      uint64_t i,
-                                      Object **ret, uint64_t *offset) {
+static int generic_array_get_plus_one(
+                JournalFile *f,
+                uint64_t extra,
+                uint64_t first,
+                uint64_t i,
+                Object **ret, uint64_t *offset) {
         Object *o;
@@ -1498,17 +1503,18 @@ enum {
         TEST_RIGHT
 };
-static int generic_array_bisect(JournalFile *f,
-                                uint64_t first,
-                                uint64_t n,
-                                uint64_t needle,
-                                int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
-                                direction_t direction,
-                                Object **ret,
-                                uint64_t *offset,
-                                uint64_t *idx) {
-
-        uint64_t a, p, t = 0, i = 0, last_p = 0;
+static int generic_array_bisect(
+                JournalFile *f,
+                uint64_t first,
+                uint64_t n,
+                uint64_t needle,
+                int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
+                direction_t direction,
+                Object **ret,
+                uint64_t *offset,
+                uint64_t *idx) {
+
+        uint64_t a, p, t = 0, i = 0, last_p = 0, last_index = (uint64_t) -1;
         bool subtract_one = false;
         Object *o, *array = NULL;
         int r;
@@ -1533,7 +1539,7 @@ static int generic_array_bisect(JournalFile *f,
                         return r;
                 if (r == TEST_LEFT) {
-                        /* OK, what we are looking for is right of th
+                        /* OK, what we are looking for is right of the
                          * begin of this EntryArray, so let's jump
                          * straight to previously cached array in the
                          * chain */
@@ -1541,6 +1547,7 @@ static int generic_array_bisect(JournalFile *f,
                         a = ci->array;
                         n -= ci->total;
                         t = ci->total;
+                        last_index = ci->last_index;
                 }
         }
@@ -1571,6 +1578,60 @@ static int generic_array_bisect(JournalFile *f,
                 if (r == TEST_RIGHT) {
                         left = 0;
                         right -= 1;
+
+                        if (last_index != (uint64_t) -1) {
+                                assert(last_index <= right);
+
+                                /* If we cached the last index we
+                                 * looked at, let's try to not to jump
+                                 * too wildly around and see if we can
+                                 * limit the range to look at early to
+                                 * the immediate neighbors of the last
+                                 * index we looked at. */
+
+                                if (last_index > 0) {
+                                        uint64_t x = last_index - 1;
+
+                                        p = le64toh(array->entry_array.items[x]);
+                                        if (p <= 0)
+                                                return -EBADMSG;
+
+                                        r = test_object(f, p, needle);
+                                        if (r < 0)
+                                                return r;
+
+                                        if (r == TEST_FOUND)
+                                                r = direction == DIRECTION_DOWN ? TEST_RIGHT : TEST_LEFT;
+
+                                        if (r == TEST_RIGHT)
+                                                right = x;
+                                        else
+                                                left = x + 1;
+                                }
+
+                                if (last_index < right) {
+                                        uint64_t y = last_index + 1;
+
+                                        p = le64toh(array->entry_array.items[y]);
+                                        if (p <= 0)
+                                                return -EBADMSG;
+
+                                        r = test_object(f, p, needle);
+                                        if (r < 0)
+                                                return r;
+
+                                        if (r == TEST_FOUND)
+                                                r = direction == DIRECTION_DOWN ? TEST_RIGHT : TEST_LEFT;
+
+                                        if (r == TEST_RIGHT)
+                                                right = y;
+                                        else
+                                                left = y + 1;
+                                }
+
+                                last_index = (uint64_t) -1;
+                        }
+
                         for (;;) {
                                 if (left == right) {
                                         if (direction == DIRECTION_UP)
@@ -1581,8 +1642,8 @@ static int generic_array_bisect(JournalFile *f,
                                 }
                                 assert(left < right);
-
                                 i = (left + right) / 2;
+
                                 p = le64toh(array->entry_array.items[i]);
                                 if (p <= 0)
                                         return -EBADMSG;
@@ -1615,6 +1676,7 @@ static int generic_array_bisect(JournalFile *f,
                 n -= k;
                 t += k;
+                last_index = (uint64_t) -1;
                 a = le64toh(array->entry_array.next_entry_array_offset);
         }
@@ -1625,7 +1687,7 @@ found:
                 return 0;
         /* Let's cache this item for the next invocation */
-        chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t);
+        chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, i + (subtract_one ? -1 : 0));
         if (subtract_one && i == 0)
                 p = last_p;
@@ -1650,16 +1712,18 @@ found:
         return 1;
 }
-static int generic_array_bisect_plus_one(JournalFile *f,
-                                         uint64_t extra,
-                                         uint64_t first,
-                                         uint64_t n,
-                                         uint64_t needle,
-                                         int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
-                                         direction_t direction,
-                                         Object **ret,
-                                         uint64_t *offset,
-                                         uint64_t *idx) {
+
+static int generic_array_bisect_plus_one(
+                JournalFile *f,
+                uint64_t extra,
+                uint64_t first,
+                uint64_t n,
+                uint64_t needle,
+                int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
+                direction_t direction,
+                Object **ret,
+                uint64_t *offset,
+                uint64_t *idx) {
         int r;
         bool step_back = false;
SOURCES/0035-journald-avoid-NSS-in-journald.patch
File was deleted
SOURCES/0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch
New file
@@ -0,0 +1,23 @@
From 5284c03b3bc881c4b79b1afb32284dd86ab836f5 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 00:58:39 +0100
Subject: [PATCH] journal: fix iteration when we go backwards from the
 beginning of an array chain element
---
 src/journal/journal-file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 7adb1b5..53dd0c3 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1687,7 +1687,7 @@ found:
                 return 0;
         /* Let's cache this item for the next invocation */
-        chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, i + (subtract_one ? -1 : 0));
+        chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i);
         if (subtract_one && i == 0)
                 p = last_p;
SOURCES/0036-libudev-add-missing-global-to-symbol-export.patch
File was deleted
SOURCES/0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch
File was deleted
SOURCES/0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch
New file
@@ -0,0 +1,25 @@
From 0badfa6266d2b5116a14fe2eebcf55f6a072332b Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 00:59:07 +0100
Subject: [PATCH] journal: allow journal_file_copy_entry() to work on non-local
 files
---
 src/journal/journal-file.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 53dd0c3..94e3921 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2732,10 +2732,6 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
         ts.monotonic = le64toh(o->entry.monotonic);
         ts.realtime = le64toh(o->entry.realtime);
-        if (to->tail_entry_monotonic_valid &&
-            ts.monotonic < le64toh(to->header->tail_entry_monotonic))
-                return -EINVAL;
-
         n = journal_file_entry_n_items(o);
         items = alloca(sizeof(EntryItem) * n);
SOURCES/0038-journal-simplify-pre-allocation-logic.patch
New file
@@ -0,0 +1,58 @@
From 2d9a810729f9c209cab7aa6bf50ec5f749ebff82 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 01:44:52 +0100
Subject: [PATCH] journal: simplify pre-allocation logic
let's just do a single fallocate() as far as possible, and don't
distuingish between allocated space and file size.
This way we can save a syscall for each append, which makes quite some
benefits.
---
 src/journal/journal-file.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 94e3921..962cdd6 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -315,7 +315,7 @@ static int journal_file_verify_header(JournalFile *f) {
 }
 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
-        uint64_t old_size, new_size, file_size;
+        uint64_t old_size, new_size;
         int r;
         assert(f);
@@ -356,6 +356,11 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
                 }
         }
+        /* Increase by larger blocks at once */
+        new_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
+        if (f->metrics.max_size > 0 && new_size > f->metrics.max_size)
+                new_size = f->metrics.max_size;
+
         /* Note that the glibc fallocate() fallback is very
            inefficient, hence we try to minimize the allocation area
            as we can. */
@@ -363,16 +368,8 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
         if (r != 0)
                 return -r;
-        /* Increase the file size a bit further than this, so that we
-         * we can create larger memory maps to cache */
-        file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
-        if (file_size > (uint64_t) f->last_stat.st_size) {
-                if (file_size > new_size)
-                        ftruncate(f->fd, file_size);
-
-                if (fstat(f->fd, &f->last_stat) < 0)
-                        return -errno;
-        }
+        if (fstat(f->fd, &f->last_stat) < 0)
+                return -errno;
         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
SOURCES/0038-logind-put-correct-user-object-paths-in-introspectio.patch
File was deleted
SOURCES/0039-Fix-obsolete-references-to-systemd-random-seed-load..patch
File was deleted
SOURCES/0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch
New file
@@ -0,0 +1,55 @@
From 29323cff9feac15e1871a10e727690ac0ed1007d Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 01:54:25 +0100
Subject: [PATCH] journald: mention how long we needed to flush to /var in the
 logs
---
 src/journal/journald-server.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index e03e413..a0a8e9c 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -968,9 +968,12 @@ static int system_journal_open(Server *s) {
 }
 int server_flush_to_var(Server *s) {
-        int r;
         sd_id128_t machine;
         sd_journal *j = NULL;
+        char ts[FORMAT_TIMESPAN_MAX];
+        usec_t start;
+        unsigned n = 0;
+        int r;
         assert(s);
@@ -988,6 +991,8 @@ int server_flush_to_var(Server *s) {
         log_debug("Flushing to /var...");
+        start = now(CLOCK_MONOTONIC);
+
         r = sd_id128_get_machine(&machine);
         if (r < 0)
                 return r;
@@ -1007,6 +1012,8 @@ int server_flush_to_var(Server *s) {
                 f = j->current_file;
                 assert(f && f->current_offset > 0);
+                n++;
+
                 r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
                 if (r < 0) {
                         log_error("Can't read entry: %s", strerror(-r));
@@ -1050,6 +1057,8 @@ finish:
         sd_journal_close(j);
+        server_driver_message(s, SD_ID128_NULL, "Time spent on flushing to /var is %s for %u entries.", format_timespan(ts, sizeof(ts), now(CLOCK_MONOTONIC) - start, 0), n);
+
         return r;
 }
SOURCES/0040-Never-call-qsort-on-potentially-NULL-arrays.patch
New file
@@ -0,0 +1,368 @@
From 43406f091aaa58ed23250a9967f46ad9cfa0b007 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:13 -0400
Subject: [PATCH] Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.
---
 src/analyze/systemd-analyze.c     |  2 +-
 src/cgtop/cgtop.c                 |  2 +-
 src/core/namespace.c              | 38 ++++++++++++++++++++------------------
 src/journal/catalog.c             |  2 +-
 src/journal/journal-vacuum.c      |  3 +--
 src/journal/journalctl.c          |  2 +-
 src/libsystemd-bus/bus-match.c    |  2 +-
 src/libudev/libudev-enumerate.c   |  2 +-
 src/nss-myhostname/netlink.c      |  3 ++-
 src/readahead/readahead-collect.c | 39 ++++++++++++++++++++++-----------------
 src/shared/cgroup-show.c          |  2 ++
 src/shared/conf-files.c           |  2 +-
 src/shared/efivars.c              |  3 +--
 src/shared/fileio.c               |  1 +
 src/shared/util.h                 | 12 ++++++++++++
 src/systemctl/systemctl.c         | 10 +++++-----
 16 files changed, 73 insertions(+), 52 deletions(-)
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index 27d063c..a4f15eb 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -768,7 +768,7 @@ static int list_dependencies_one(DBusConnection *bus, const char *name, unsigned
         if (r < 0)
                 return r;
-        qsort(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
+        qsort_safe(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
         r = acquire_boot_times(bus, &boot);
         if (r < 0)
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index cacf705..293a211 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -461,7 +461,7 @@ static int display(Hashmap *a) {
                 if (g->n_tasks_valid || g->cpu_valid || g->memory_valid || g->io_valid)
                         array[n++] = g;
-        qsort(array, n, sizeof(Group*), group_compare);
+        qsort_safe(array, n, sizeof(Group*), group_compare);
         /* Find the longest names in one run */
         for (j = 0; j < n; j++) {
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 16b132b..936f368 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -222,7 +222,7 @@ int setup_namespace(char** read_write_dirs,
                      strv_length(read_only_dirs) +
                      strv_length(inaccessible_dirs) +
                      (private_tmp ? 2 : 0);
-        BindMount *m, *mounts;
+        BindMount *m, *mounts = NULL;
         int r = 0;
         if (!mount_flags)
@@ -231,27 +231,29 @@ int setup_namespace(char** read_write_dirs,
         if (unshare(CLONE_NEWNS) < 0)
                 return -errno;
-        m = mounts = (BindMount *) alloca(n * sizeof(BindMount));
-        if ((r = append_mounts(&m, read_write_dirs, READWRITE)) < 0 ||
-                (r = append_mounts(&m, read_only_dirs, READONLY)) < 0 ||
-                (r = append_mounts(&m, inaccessible_dirs, INACCESSIBLE)) < 0)
-                return r;
+        if (n) {
+                m = mounts = (BindMount *) alloca(n * sizeof(BindMount));
+                if ((r = append_mounts(&m, read_write_dirs, READWRITE)) < 0 ||
+                    (r = append_mounts(&m, read_only_dirs, READONLY)) < 0 ||
+                    (r = append_mounts(&m, inaccessible_dirs, INACCESSIBLE)) < 0)
+                        return r;
+
+                if (private_tmp) {
+                        m->path = "/tmp";
+                        m->mode = PRIVATE_TMP;
+                        m++;
+
+                        m->path = "/var/tmp";
+                        m->mode = PRIVATE_VAR_TMP;
+                        m++;
+                }
-        if (private_tmp) {
-                m->path = "/tmp";
-                m->mode = PRIVATE_TMP;
-                m++;
+                assert(mounts + n == m);
-                m->path = "/var/tmp";
-                m->mode = PRIVATE_VAR_TMP;
-                m++;
+                qsort(mounts, n, sizeof(BindMount), mount_path_compare);
+                drop_duplicates(mounts, &n);
         }
-        assert(mounts + n == m);
-
-        qsort(mounts, n, sizeof(BindMount), mount_path_compare);
-        drop_duplicates(mounts, &n);
-
         /* Remount / as SLAVE so that nothing now mounted in the namespace
            shows up in the parent */
         if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0)
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
index 7738d24..90ca008 100644
--- a/src/journal/catalog.c
+++ b/src/journal/catalog.c
@@ -399,7 +399,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
         }
         assert(n == hashmap_size(h));
-        qsort(items, n, sizeof(CatalogItem), catalog_compare_func);
+        qsort_safe(items, n, sizeof(CatalogItem), catalog_compare_func);
         r = write_catalog(database, h, sb, items, n);
         if (r < 0)
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index 8d5effb..d4a1c6c 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -299,8 +299,7 @@ int journal_directory_vacuum(
                 n_list ++;
         }
-        if (n_list > 0)
-                qsort(list, n_list, sizeof(struct vacuum_info), vacuum_compare);
+        qsort_safe(list, n_list, sizeof(struct vacuum_info), vacuum_compare);
         for (i = 0; i < n_list; i++) {
                 struct statvfs ss;
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 9a2d255..0876ee6 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -755,7 +755,7 @@ static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative
                 sd_journal_flush_matches(j);
         }
-        qsort(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
+        qsort_safe(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
         if (sd_id128_equal(*boot_id, SD_ID128_NULL)) {
                 if (relative > (int) count || relative <= -(int)count)
diff --git a/src/libsystemd-bus/bus-match.c b/src/libsystemd-bus/bus-match.c
index 1411167..916682a 100644
--- a/src/libsystemd-bus/bus-match.c
+++ b/src/libsystemd-bus/bus-match.c
@@ -768,7 +768,7 @@ int bus_match_parse(
         }
         /* Order the whole thing, so that we always generate the same tree */
-        qsort(components, n_components, sizeof(struct bus_match_component), match_component_compare);
+        qsort_safe(components, n_components, sizeof(struct bus_match_component), match_component_compare);
         /* Check for duplicates */
         for (i = 0; i+1 < n_components; i++)
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index 8146f27..e71d766 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -276,7 +276,7 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume
                 size_t move_later_prefix = 0;
                 udev_list_cleanup(&udev_enumerate->devices_list);
-                qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp);
+                qsort_safe(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp);
                 max = udev_enumerate->devices_cur;
                 for (i = 0; i < max; i++) {
diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
index b1ef912..47a41f5 100644
--- a/src/nss-myhostname/netlink.c
+++ b/src/nss-myhostname/netlink.c
@@ -197,7 +197,8 @@ finish:
                 return r;
         }
-        qsort(list, n_list, sizeof(struct address), address_compare);
+        if (n_list)
+                qsort(list, n_list, sizeof(struct address), address_compare);
         *_list = list;
         *_n_list = n_list;
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index 32888ad..6b74866 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -536,8 +536,7 @@ done:
                 HASHMAP_FOREACH_KEY(q, p, files, i)
                         pack_file(pack, p, on_btrfs);
         } else {
-                struct item *ordered, *j;
-                unsigned k, n;
+                unsigned n;
                 /* On rotating media, order things by the block
                  * numbers */
@@ -545,25 +544,31 @@ done:
                 log_debug("Ordering...");
                 n = hashmap_size(files);
-                if (!(ordered = new(struct item, n))) {
-                        r = log_oom();
-                        goto finish;
-                }
-
-                j = ordered;
-                HASHMAP_FOREACH_KEY(q, p, files, i) {
-                        memcpy(j, q, sizeof(struct item));
-                        j++;
-                }
+                if (n) {
+                        _cleanup_free_ struct item *ordered;
+                        struct item *j;
+                        unsigned k;
+
+                        ordered = new(struct item, n);
+                        if (!ordered) {
+                                r = log_oom();
+                                goto finish;
+                        }
-                assert(ordered + n == j);
+                        j = ordered;
+                        HASHMAP_FOREACH_KEY(q, p, files, i) {
+                                memcpy(j, q, sizeof(struct item));
+                                j++;
+                        }
-                qsort(ordered, n, sizeof(struct item), qsort_compare);
+                        assert(ordered + n == j);
-                for (k = 0; k < n; k++)
-                        pack_file(pack, ordered[k].path, on_btrfs);
+                        qsort(ordered, n, sizeof(struct item), qsort_compare);
-                free(ordered);
+                        for (k = 0; k < n; k++)
+                                pack_file(pack, ordered[k].path, on_btrfs);
+                } else
+                        log_warning("No pack files");
         }
         log_debug("Finalizing...");
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index e971f36..cc44ab4 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -44,6 +44,8 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
         unsigned i, m, pid_width;
         pid_t biggest = 0;
+        assert(n_pids > 0);
+
         /* Filter duplicates */
         m = 0;
         for (i = 0; i < n_pids; i++) {
diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c
index 6d99739..ed4070c 100644
--- a/src/shared/conf-files.c
+++ b/src/shared/conf-files.c
@@ -127,7 +127,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const
                 return -ENOMEM;
         }
-        qsort(files, hashmap_size(fh), sizeof(char *), base_cmp);
+        qsort_safe(files, hashmap_size(fh), sizeof(char *), base_cmp);
         *strv = files;
         hashmap_free(fh);
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index c015b16..f3eb6a6 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -384,8 +384,7 @@ int efi_get_boot_options(uint16_t **options) {
                 list[count ++] = id;
         }
-        if (list)
-                qsort(list, count, sizeof(uint16_t), cmp_uint16);
+        qsort_safe(list, count, sizeof(uint16_t), cmp_uint16);
         *options = list;
         return count;
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index 603a1c7..733b320 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c