From 3856bb52b7d520faf442af8adda518d0f33aa347c681005baed02a0c79159a22 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Tue, 15 Oct 2013 14:15:10 +0000 Subject: [PATCH] Accepting request 203387 from home:fcrozat:branches:Base:System (please also push to 13.1, I want the same version as F20) - Add 0001-gpt-auto-generator-exit-immediately-if-in-container.patch: don't start gpt auto-generator in container (git). - Add 0001-manager-when-verifying-whether-clients-may-change-en.patch: fix reload check in selinux case (git). - Add 0001-logind-fix-bus-introspection-data-for-TakeControl.patch: fix introspection for TakeControl (git). - Add 0001-mount-check-for-NULL-before-reading-pm-what.patch: fix crash when parsing some incorrect unit (git). - Add 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch: Fix udev rules parsing (git). - Add 0001-systemd-serialize-deserialize-forbid_restart-value.patch: Fix incorrect deserialization for forbid_restart (git). - Add 0001-core-unify-the-way-we-denote-serialization-attribute.patch: Ensure forbid_restart is named like other attributes (git). - Add 0001-journald-fix-minor-memory-leak.patch: fix memleak in journald (git). - Add 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch: Improve ACPI firmware performance parsing (git). - Add 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch: Fix journal rotation (git). - Add 0001-login-fix-invalid-free-in-sd_session_get_vt.patch: Fix memory corruption in sd_session_get_vt (git). OBS-URL: https://build.opensuse.org/request/show/203387 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=454 --- 0001-Fix-bad-assert-in-show_pid_array.patch | 35 ++ ...all-qsort-on-potentially-NULL-arrays.patch | 385 ++++++++++++++++++ ...ay-we-denote-serialization-attribute.patch | 40 ++ ...dbus-common-avoid-leak-in-error-path.patch | 71 ++++ ...rbage-from-acpi-firmware-performance.patch | 33 ++ 0001-drop-ins-check-return-value.patch | 29 ++ ...tor-exit-immediately-if-in-container.patch | 40 ++ 0001-journald-fix-minor-memory-leak.patch | 25 ++ ...rotated-file-from-hashmap-when-rotat.patch | 39 ++ ...ix-invalid-free-in-sd_session_get_vt.patch | 27 ++ ...make-sd_session_get_vt-actually-work.patch | 27 ++ ...s-introspection-data-for-TakeControl.patch | 25 ++ ...ifying-whether-clients-may-change-en.patch | 45 ++ ...heck-for-NULL-before-reading-pm-what.patch | 29 ++ ...shared-util-Fix-glob_extend-argument.patch | 28 ++ ...off-by-one-error-in-tag_to_udev_node.patch | 50 +++ ...ize-deserialize-forbid_restart-value.patch | 51 +++ systemd-mini.changes | 47 +++ systemd-mini.spec | 51 +++ systemd.changes | 47 +++ systemd.spec | 51 +++ 21 files changed, 1175 insertions(+) create mode 100644 0001-Fix-bad-assert-in-show_pid_array.patch create mode 100644 0001-Never-call-qsort-on-potentially-NULL-arrays.patch create mode 100644 0001-core-unify-the-way-we-denote-serialization-attribute.patch create mode 100644 0001-dbus-common-avoid-leak-in-error-path.patch create mode 100644 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch create mode 100644 0001-drop-ins-check-return-value.patch create mode 100644 0001-gpt-auto-generator-exit-immediately-if-in-container.patch create mode 100644 0001-journald-fix-minor-memory-leak.patch create mode 100644 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch create mode 100644 0001-login-fix-invalid-free-in-sd_session_get_vt.patch create mode 100644 0001-login-make-sd_session_get_vt-actually-work.patch create mode 100644 0001-logind-fix-bus-introspection-data-for-TakeControl.patch create mode 100644 0001-manager-when-verifying-whether-clients-may-change-en.patch create mode 100644 0001-mount-check-for-NULL-before-reading-pm-what.patch create mode 100644 0001-shared-util-Fix-glob_extend-argument.patch create mode 100644 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch create mode 100644 0001-systemd-serialize-deserialize-forbid_restart-value.patch diff --git a/0001-Fix-bad-assert-in-show_pid_array.patch b/0001-Fix-bad-assert-in-show_pid_array.patch new file mode 100644 index 00000000..e62ab8b5 --- /dev/null +++ b/0001-Fix-bad-assert-in-show_pid_array.patch @@ -0,0 +1,35 @@ +From a0551d26ab5c6e0d5089b42a6319baef0e28ad92 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 14 Oct 2013 19:15:24 -0400 +Subject: [PATCH] Fix bad assert in show_pid_array + +This function should get the same treatment as other qsort uses +did in 7ff7394 "Never call qsort on potentially NULL arrays". + +Reported-by: Oleksii Shevchuk +--- + src/shared/cgroup-show.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +Index: systemd-208/src/shared/cgroup-show.c +=================================================================== +--- systemd-208.orig/src/shared/cgroup-show.c ++++ systemd-208/src/shared/cgroup-show.c +@@ -44,8 +44,6 @@ static void show_pid_array(int pids[], u + unsigned i, m, pid_width; + pid_t biggest = 0; + +- assert(n_pids > 0); +- + /* Filter duplicates */ + m = 0; + for (i = 0; i < n_pids; i++) { +@@ -65,7 +63,7 @@ static void show_pid_array(int pids[], u + pid_width = DECIMAL_STR_WIDTH(biggest); + + /* And sort */ +- qsort(pids, n_pids, sizeof(pid_t), compare); ++ qsort_safe(pids, n_pids, sizeof(pid_t), compare); + + if(flags & OUTPUT_FULL_WIDTH) + n_columns = 0; diff --git a/0001-Never-call-qsort-on-potentially-NULL-arrays.patch b/0001-Never-call-qsort-on-potentially-NULL-arrays.patch new file mode 100644 index 00000000..515348fb --- /dev/null +++ b/0001-Never-call-qsort-on-potentially-NULL-arrays.patch @@ -0,0 +1,385 @@ +From 7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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-file.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 +++++----- + 17 files changed, 74 insertions(+), 53 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-file.c b/src/journal/journal-file.c +index 78b937b..901e71b 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1344,7 +1344,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); + +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 2f8be1b..275458c 100644 +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -761,7 +761,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 +@@ -662,6 +662,7 @@ int get_status_field(const char *filename, const char *pattern, char **field) { + int r; + + assert(filename); ++ assert(pattern); + assert(field); + + r = read_full_file(filename, &status, NULL); +diff --git a/src/shared/util.h b/src/shared/util.h +index 26af5b3..09e556d 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -772,3 +772,15 @@ bool id128_is_valid(const char *s) _pure_; + void parse_user_at_host(char *arg, char **user, char **host); + + int split_pair(const char *s, const char *sep, char **l, char **r); ++ ++/** ++ * Normal qsort requires base to be nonnull. Here were require ++ * that only if nmemb > 0. ++ */ ++static inline void qsort_safe(void *base, size_t nmemb, size_t size, ++ int (*compar)(const void *, const void *)) { ++ if (nmemb) { ++ assert(base); ++ qsort(base, nmemb, size, compar); ++ } ++} +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index d75281f..036828b 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -471,7 +471,7 @@ static int list_units(DBusConnection *bus, char **args) { + if (r < 0) + return r; + +- qsort(unit_infos, c, sizeof(struct unit_info), compare_unit_info); ++ qsort_safe(unit_infos, c, sizeof(struct unit_info), compare_unit_info); + + output_units_list(unit_infos, c); + +@@ -733,8 +733,8 @@ static int list_sockets(DBusConnection *bus, char **args) { + listen = triggered = NULL; /* avoid cleanup */ + } + +- qsort(socket_infos, cs, sizeof(struct socket_info), +- (__compar_fn_t) socket_info_compare); ++ qsort_safe(socket_infos, cs, sizeof(struct socket_info), ++ (__compar_fn_t) socket_info_compare); + + output_sockets_list(socket_infos, cs); + +@@ -1108,7 +1108,7 @@ static int list_dependencies_one(DBusConnection *bus, const char *name, int leve + 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); + + STRV_FOREACH(c, deps) { + if (strv_contains(u, *c)) { +@@ -3532,7 +3532,7 @@ static int show_all(const char* verb, + if (r < 0) + return r; + +- qsort(unit_infos, c, sizeof(struct unit_info), compare_unit_info); ++ qsort_safe(unit_infos, c, sizeof(struct unit_info), compare_unit_info); + + for (u = unit_infos; u < unit_infos + c; u++) { + _cleanup_free_ char *p = NULL; +-- +1.8.4 + diff --git a/0001-core-unify-the-way-we-denote-serialization-attribute.patch b/0001-core-unify-the-way-we-denote-serialization-attribute.patch new file mode 100644 index 00000000..e33e45d8 --- /dev/null +++ b/0001-core-unify-the-way-we-denote-serialization-attribute.patch @@ -0,0 +1,40 @@ +From 8d1a28020409ee4afea6ef8c1c4d3522a209284e Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 +-- +1.8.4 + diff --git a/0001-dbus-common-avoid-leak-in-error-path.patch b/0001-dbus-common-avoid-leak-in-error-path.patch new file mode 100644 index 00000000..e2ac93f4 --- /dev/null +++ b/0001-dbus-common-avoid-leak-in-error-path.patch @@ -0,0 +1,71 @@ +From 74dcc2df7b2a340c3e1fe9e61e5c8deb324c83d7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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; + } +-- +1.8.4 + diff --git a/0001-do-not-accept-garbage-from-acpi-firmware-performance.patch b/0001-do-not-accept-garbage-from-acpi-firmware-performance.patch new file mode 100644 index 00000000..53e8253f --- /dev/null +++ b/0001-do-not-accept-garbage-from-acpi-firmware-performance.patch @@ -0,0 +1,33 @@ +From 6c7980093c4e39d07bf06484f96f489e236c7c29 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 10 Oct 2013 01:38:11 +0200 +Subject: [PATCH] do not accept "garbage" from acpi firmware performance data + (FPDT) + +00000000 46 42 50 54 38 00 00 00 02 00 30 02 00 00 00 00 |FBPT8.....0.....| +00000010 23 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |#E..............| +00000020 f5 6a 51 00 00 00 00 00 00 00 00 00 00 00 00 00 |.jQ.............| +00000030 00 00 00 00 00 00 00 00 70 74 61 6c 58 00 00 00 |........ptalX...| +--- + src/shared/acpi-fpdt.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c +index af58c7c..75648b4 100644 +--- a/src/shared/acpi-fpdt.c ++++ b/src/shared/acpi-fpdt.c +@@ -146,6 +146,11 @@ int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) { + if (brec.type != ACPI_FPDT_BOOT_REC) + return -EINVAL; + ++ if (brec.startup_start == 0 || brec.exit_services_exit < brec.startup_start) ++ return -EINVAL; ++ if (brec.exit_services_exit > NSEC_PER_HOUR) ++ return -EINVAL; ++ + if (loader_start) + *loader_start = brec.startup_start / 1000; + if (loader_exit) +-- +1.8.4 + diff --git a/0001-drop-ins-check-return-value.patch b/0001-drop-ins-check-return-value.patch new file mode 100644 index 00000000..35a0f708 --- /dev/null +++ b/0001-drop-ins-check-return-value.patch @@ -0,0 +1,29 @@ +From 6891529fe1176c046ece579807ff48e3191692f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 +-- +1.8.4 + diff --git a/0001-gpt-auto-generator-exit-immediately-if-in-container.patch b/0001-gpt-auto-generator-exit-immediately-if-in-container.patch new file mode 100644 index 00000000..4d1fee23 --- /dev/null +++ b/0001-gpt-auto-generator-exit-immediately-if-in-container.patch @@ -0,0 +1,40 @@ +From 9a5cb1371b6d8b0a04bd08665bcf9b06cb40c64c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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; + } +-- +1.8.4 + diff --git a/0001-journald-fix-minor-memory-leak.patch b/0001-journald-fix-minor-memory-leak.patch new file mode 100644 index 00000000..10df2c01 --- /dev/null +++ b/0001-journald-fix-minor-memory-leak.patch @@ -0,0 +1,25 @@ +From 2ee0591d12b9e725c4585502285fd91cde682d9b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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; + } + +-- +1.8.4 + diff --git a/0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch b/0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch new file mode 100644 index 00000000..0ed6caa1 --- /dev/null +++ b/0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch @@ -0,0 +1,39 @@ +From 2b98f75a63e6022bf74a7d678c47faa5208c794f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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)); +-- +1.8.4 + diff --git a/0001-login-fix-invalid-free-in-sd_session_get_vt.patch b/0001-login-fix-invalid-free-in-sd_session_get_vt.patch new file mode 100644 index 00000000..7a7551ec --- /dev/null +++ b/0001-login-fix-invalid-free-in-sd_session_get_vt.patch @@ -0,0 +1,27 @@ +From 3f4fee033bf0f623de74f3e8a14c42b8ff81c36e Mon Sep 17 00:00:00 2001 +From: David Herrmann +Date: Thu, 10 Oct 2013 13:09:37 +0200 +Subject: [PATCH] login: fix invalid free() in sd_session_get_vt() + +We need to clear variables markes as _cleanup_free_. Otherwise, our +error-paths might corrupt random memory. +--- + src/login/sd-login.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/sd-login.c b/src/login/sd-login.c +index 71d8c29..6c27dfe 100644 +--- a/src/login/sd-login.c ++++ b/src/login/sd-login.c +@@ -350,7 +350,7 @@ _public_ int sd_session_get_tty(const char *session, char **tty) { + } + + _public_ int sd_session_get_vt(const char *session, unsigned *vtnr) { +- _cleanup_free_ char *vtnr_string; ++ _cleanup_free_ char *vtnr_string = NULL; + unsigned u; + int r; + +-- +1.8.4 + diff --git a/0001-login-make-sd_session_get_vt-actually-work.patch b/0001-login-make-sd_session_get_vt-actually-work.patch new file mode 100644 index 00000000..49a0a13c --- /dev/null +++ b/0001-login-make-sd_session_get_vt-actually-work.patch @@ -0,0 +1,27 @@ +From 0581dac2c146cef0f55841a4c136dc48409c8eaa Mon Sep 17 00:00:00 2001 +From: David Herrmann +Date: Thu, 10 Oct 2013 13:11:27 +0200 +Subject: [PATCH] login: make sd_session_get_vt() actually work + +We use VTNR, not VTNr as key. Until now sd_session_get_vt() just returns +an error. +--- + src/login/sd-login.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/sd-login.c b/src/login/sd-login.c +index 6c27dfe..7e25041 100644 +--- a/src/login/sd-login.c ++++ b/src/login/sd-login.c +@@ -354,7 +354,7 @@ _public_ int sd_session_get_vt(const char *session, unsigned *vtnr) { + unsigned u; + int r; + +- r = session_get_string(session, "VTNr", &vtnr_string); ++ r = session_get_string(session, "VTNR", &vtnr_string); + if (r < 0) + return r; + +-- +1.8.4 + diff --git a/0001-logind-fix-bus-introspection-data-for-TakeControl.patch b/0001-logind-fix-bus-introspection-data-for-TakeControl.patch new file mode 100644 index 00000000..829333e3 --- /dev/null +++ b/0001-logind-fix-bus-introspection-data-for-TakeControl.patch @@ -0,0 +1,25 @@ +From 660ea9620f7b8f99d08a2770d4e81acfd8aea02e Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 4 Oct 2013 21:16:40 +0200 +Subject: [PATCH] logind: fix bus introspection data for TakeControl() + +--- + src/login/logind-session-dbus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c +index 5f6bafb..be4e01c 100644 +--- a/src/login/logind-session-dbus.c ++++ b/src/login/logind-session-dbus.c +@@ -41,7 +41,7 @@ + " \n" \ + " \n" \ + " \n" \ +- " \n" \ ++ " \n" \ + " \n" \ + " \n" \ + " \n" \ +-- +1.8.4 + diff --git a/0001-manager-when-verifying-whether-clients-may-change-en.patch b/0001-manager-when-verifying-whether-clients-may-change-en.patch new file mode 100644 index 00000000..57bb3648 --- /dev/null +++ b/0001-manager-when-verifying-whether-clients-may-change-en.patch @@ -0,0 +1,45 @@ +From a316932f5a627c1ef78f568fd5dfa579f12e76b2 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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; +-- +1.8.4 + diff --git a/0001-mount-check-for-NULL-before-reading-pm-what.patch b/0001-mount-check-for-NULL-before-reading-pm-what.patch new file mode 100644 index 00000000..e8c830f1 --- /dev/null +++ b/0001-mount-check-for-NULL-before-reading-pm-what.patch @@ -0,0 +1,29 @@ +From 9c03872bc8fb2a381eafe7301ef9811b641686dd Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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; +-- +1.8.4 + diff --git a/0001-shared-util-Fix-glob_extend-argument.patch b/0001-shared-util-Fix-glob_extend-argument.patch new file mode 100644 index 00000000..4695547d --- /dev/null +++ b/0001-shared-util-Fix-glob_extend-argument.patch @@ -0,0 +1,28 @@ +From a8ccacf5344c4434b1d5ff3837307acb8fcf93d2 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +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 54dbace..1822770 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -4461,7 +4461,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; +-- +1.8.4 + diff --git a/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch b/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch new file mode 100644 index 00000000..eb6dedd0 --- /dev/null +++ b/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch @@ -0,0 +1,50 @@ +From 1d5989fd803d2019de0f6aaaf3cfb1cb2bbc3cdb Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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 82f4221..31cea79 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[]) { +-- +1.8.4 + diff --git a/0001-systemd-serialize-deserialize-forbid_restart-value.patch b/0001-systemd-serialize-deserialize-forbid_restart-value.patch new file mode 100644 index 00000000..6184c9a1 --- /dev/null +++ b/0001-systemd-serialize-deserialize-forbid_restart-value.patch @@ -0,0 +1,51 @@ +From 6aca9a587d4ad40b1c044f99e3714022201b9fd4 Mon Sep 17 00:00:00 2001 +From: Sylvia Else +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); + +-- +1.8.4 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 68686869..653cdbdb 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Tue Oct 15 13:50:52 CEST 2013 - fcrozat@suse.com + +- Add + 0001-gpt-auto-generator-exit-immediately-if-in-container.patch: + don't start gpt auto-generator in container (git). +- Add + 0001-manager-when-verifying-whether-clients-may-change-en.patch: + fix reload check in selinux case (git). +- Add 0001-logind-fix-bus-introspection-data-for-TakeControl.patch: + fix introspection for TakeControl (git). +- Add 0001-mount-check-for-NULL-before-reading-pm-what.patch: fix + crash when parsing some incorrect unit (git). +- Add + 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch: + Fix udev rules parsing (git). +- Add + 0001-systemd-serialize-deserialize-forbid_restart-value.patch: + Fix incorrect deserialization for forbid_restart (git). +- Add + 0001-core-unify-the-way-we-denote-serialization-attribute.patch: + Ensure forbid_restart is named like other attributes (git). +- Add 0001-journald-fix-minor-memory-leak.patch: fix memleak in + journald (git). +- Add + 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch: + Improve ACPI firmware performance parsing (git). +- Add + 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch: + Fix journal rotation (git). +- Add + 0001-login-fix-invalid-free-in-sd_session_get_vt.patch: + Fix memory corruption in sd_session_get_vt (git). +- Add 0001-login-make-sd_session_get_vt-actually-work.patch: Ensure + sd_session_get_vt returns correct value (git). +- Add 0001-Never-call-qsort-on-potentially-NULL-arrays.patch: Don't + call qsort on NULL arrays (git). +- Add 0001-dbus-common-avoid-leak-in-error-path.patch: Fix memleak + in dbus-common code (git). +- Add 0001-drop-ins-check-return-value.patch: Fix return value for + drop-ins checks (git). +- Add 0001-shared-util-Fix-glob_extend-argument.patch: Fix + glob_extend argument (git). +- Add 0001-Fix-bad-assert-in-show_pid_array.patch: Fix bad assert + in show_pid_array (git). + + ------------------------------------------------------------------- Thu Oct 3 08:43:51 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 46a37f39..e00c4fcb 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -205,6 +205,40 @@ Patch59: 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch Patch60: 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch # PATCH-FIX-UPSTREAM 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch fcrozat@suse.com -- order remote mount points properly before remote-fs.target Patch61: 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch +# PATCH-FIX-UPSTREAM 0001-gpt-auto-generator-exit-immediately-if-in-container.patch fcrozat@suse.com -- don't start gpt auto-generator in container +Patch62: 0001-gpt-auto-generator-exit-immediately-if-in-container.patch +# PATCH-FIX-UPSTREAM 0001-manager-when-verifying-whether-clients-may-change-en.patch fcrozat@suse.com -- fix reload check in selinux case +Patch63: 0001-manager-when-verifying-whether-clients-may-change-en.patch +# PATCH-FIX-UPSTREAM 0001-logind-fix-bus-introspection-data-for-TakeControl.patch fcrozat@suse.com -- fix introspection for TakeControl +Patch64: 0001-logind-fix-bus-introspection-data-for-TakeControl.patch +# PATCH-FIX-UPSTREAM 0001-mount-check-for-NULL-before-reading-pm-what.patch fcrozat@suse.com -- fix crash when parsing some incorrect unit +Patch65: 0001-mount-check-for-NULL-before-reading-pm-what.patch +# PATCH-FIX-UPSTREAM 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch fcrozat@suse.com -- Fix udev rules parsing +Patch66: 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch +# PATCH-FIX-UPSTREAM 0001-systemd-serialize-deserialize-forbid_restart-value.patch fcrozat@suse.com -- Fix incorrect deserialization for forbid_restart +Patch67: 0001-systemd-serialize-deserialize-forbid_restart-value.patch +# PATCH-FIX-UPSTREAM 0001-core-unify-the-way-we-denote-serialization-attribute.patch fcrozat@suse.com -- Ensure forbid_restart is named like other attributes +Patch68: 0001-core-unify-the-way-we-denote-serialization-attribute.patch +# PATCH-FIX-UPSTREAM 0001-journald-fix-minor-memory-leak.patch fcrozat@suse.com -- fix memleak in journald +Patch69: 0001-journald-fix-minor-memory-leak.patch +# PATCH-FIX-UPSTREAM 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch fcrozat@suse.com -- Improve ACPI firmware performance parsing +Patch70: 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch +# PATCH-FIX-UPSTREAM 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch fcrozat@suse.com -- Fix journal rotation +Patch71: 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch +# PATCH-FIX-UPSTREAM 0001-login-fix-invalid-free-in-sd_session_get_vt.patchfcrozat@suse.com -- Fix memory corruption in sd_session_get_vt +Patch72: 0001-login-fix-invalid-free-in-sd_session_get_vt.patch +# PATCH-FIX-UPSTREAM 0001-login-make-sd_session_get_vt-actually-work.patch fcrozat@suse.com -- Ensure sd_session_get_vt returns correct value +Patch73: 0001-login-make-sd_session_get_vt-actually-work.patch +# PATCH-FIX-UPSTREAM 0001-Never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- Don't call qsort on NULL arrays +Patch74: 0001-Never-call-qsort-on-potentially-NULL-arrays.patch +# PATCH-FIX-UPSTREAM 0001-dbus-common-avoid-leak-in-error-path.patch fcrozat@suse.com -- Fix memleak in dbus-common code +Patch75: 0001-dbus-common-avoid-leak-in-error-path.patch +# PATCH-FIX-UPSTREAM 0001-drop-ins-check-return-value.patch fcrozat@suse.com -- Fix return value for drop-ins checks +Patch76: 0001-drop-ins-check-return-value.patch +# PATCH-FIX-UPSTREAM 0001-shared-util-Fix-glob_extend-argument.patch fcrozat@suse.com -- Fix glob_extend argument +Patch77: 0001-shared-util-Fix-glob_extend-argument.patch +# PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array +Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -464,6 +498,23 @@ cp %{SOURCE7} m4/ %patch59 -p1 %patch60 -p1 %patch61 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 +%patch65 -p1 +%patch66 -p1 +%patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -p1 +%patch72 -p1 +%patch73 -p1 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 +%patch77 -p1 +%patch78 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index 68686869..653cdbdb 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Tue Oct 15 13:50:52 CEST 2013 - fcrozat@suse.com + +- Add + 0001-gpt-auto-generator-exit-immediately-if-in-container.patch: + don't start gpt auto-generator in container (git). +- Add + 0001-manager-when-verifying-whether-clients-may-change-en.patch: + fix reload check in selinux case (git). +- Add 0001-logind-fix-bus-introspection-data-for-TakeControl.patch: + fix introspection for TakeControl (git). +- Add 0001-mount-check-for-NULL-before-reading-pm-what.patch: fix + crash when parsing some incorrect unit (git). +- Add + 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch: + Fix udev rules parsing (git). +- Add + 0001-systemd-serialize-deserialize-forbid_restart-value.patch: + Fix incorrect deserialization for forbid_restart (git). +- Add + 0001-core-unify-the-way-we-denote-serialization-attribute.patch: + Ensure forbid_restart is named like other attributes (git). +- Add 0001-journald-fix-minor-memory-leak.patch: fix memleak in + journald (git). +- Add + 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch: + Improve ACPI firmware performance parsing (git). +- Add + 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch: + Fix journal rotation (git). +- Add + 0001-login-fix-invalid-free-in-sd_session_get_vt.patch: + Fix memory corruption in sd_session_get_vt (git). +- Add 0001-login-make-sd_session_get_vt-actually-work.patch: Ensure + sd_session_get_vt returns correct value (git). +- Add 0001-Never-call-qsort-on-potentially-NULL-arrays.patch: Don't + call qsort on NULL arrays (git). +- Add 0001-dbus-common-avoid-leak-in-error-path.patch: Fix memleak + in dbus-common code (git). +- Add 0001-drop-ins-check-return-value.patch: Fix return value for + drop-ins checks (git). +- Add 0001-shared-util-Fix-glob_extend-argument.patch: Fix + glob_extend argument (git). +- Add 0001-Fix-bad-assert-in-show_pid_array.patch: Fix bad assert + in show_pid_array (git). + + ------------------------------------------------------------------- Thu Oct 3 08:43:51 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 5d4272ce..3664bc2e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -200,6 +200,40 @@ Patch59: 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch Patch60: 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch # PATCH-FIX-UPSTREAM 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch fcrozat@suse.com -- order remote mount points properly before remote-fs.target Patch61: 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch +# PATCH-FIX-UPSTREAM 0001-gpt-auto-generator-exit-immediately-if-in-container.patch fcrozat@suse.com -- don't start gpt auto-generator in container +Patch62: 0001-gpt-auto-generator-exit-immediately-if-in-container.patch +# PATCH-FIX-UPSTREAM 0001-manager-when-verifying-whether-clients-may-change-en.patch fcrozat@suse.com -- fix reload check in selinux case +Patch63: 0001-manager-when-verifying-whether-clients-may-change-en.patch +# PATCH-FIX-UPSTREAM 0001-logind-fix-bus-introspection-data-for-TakeControl.patch fcrozat@suse.com -- fix introspection for TakeControl +Patch64: 0001-logind-fix-bus-introspection-data-for-TakeControl.patch +# PATCH-FIX-UPSTREAM 0001-mount-check-for-NULL-before-reading-pm-what.patch fcrozat@suse.com -- fix crash when parsing some incorrect unit +Patch65: 0001-mount-check-for-NULL-before-reading-pm-what.patch +# PATCH-FIX-UPSTREAM 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch fcrozat@suse.com -- Fix udev rules parsing +Patch66: 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch +# PATCH-FIX-UPSTREAM 0001-systemd-serialize-deserialize-forbid_restart-value.patch fcrozat@suse.com -- Fix incorrect deserialization for forbid_restart +Patch67: 0001-systemd-serialize-deserialize-forbid_restart-value.patch +# PATCH-FIX-UPSTREAM 0001-core-unify-the-way-we-denote-serialization-attribute.patch fcrozat@suse.com -- Ensure forbid_restart is named like other attributes +Patch68: 0001-core-unify-the-way-we-denote-serialization-attribute.patch +# PATCH-FIX-UPSTREAM 0001-journald-fix-minor-memory-leak.patch fcrozat@suse.com -- fix memleak in journald +Patch69: 0001-journald-fix-minor-memory-leak.patch +# PATCH-FIX-UPSTREAM 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch fcrozat@suse.com -- Improve ACPI firmware performance parsing +Patch70: 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch +# PATCH-FIX-UPSTREAM 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch fcrozat@suse.com -- Fix journal rotation +Patch71: 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch +# PATCH-FIX-UPSTREAM 0001-login-fix-invalid-free-in-sd_session_get_vt.patchfcrozat@suse.com -- Fix memory corruption in sd_session_get_vt +Patch72: 0001-login-fix-invalid-free-in-sd_session_get_vt.patch +# PATCH-FIX-UPSTREAM 0001-login-make-sd_session_get_vt-actually-work.patch fcrozat@suse.com -- Ensure sd_session_get_vt returns correct value +Patch73: 0001-login-make-sd_session_get_vt-actually-work.patch +# PATCH-FIX-UPSTREAM 0001-Never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- Don't call qsort on NULL arrays +Patch74: 0001-Never-call-qsort-on-potentially-NULL-arrays.patch +# PATCH-FIX-UPSTREAM 0001-dbus-common-avoid-leak-in-error-path.patch fcrozat@suse.com -- Fix memleak in dbus-common code +Patch75: 0001-dbus-common-avoid-leak-in-error-path.patch +# PATCH-FIX-UPSTREAM 0001-drop-ins-check-return-value.patch fcrozat@suse.com -- Fix return value for drop-ins checks +Patch76: 0001-drop-ins-check-return-value.patch +# PATCH-FIX-UPSTREAM 0001-shared-util-Fix-glob_extend-argument.patch fcrozat@suse.com -- Fix glob_extend argument +Patch77: 0001-shared-util-Fix-glob_extend-argument.patch +# PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array +Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch # udev patches # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch @@ -459,6 +493,23 @@ cp %{SOURCE7} m4/ %patch59 -p1 %patch60 -p1 %patch61 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 +%patch65 -p1 +%patch66 -p1 +%patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -p1 +%patch72 -p1 +%patch73 -p1 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 +%patch77 -p1 +%patch78 -p1 # udev patches %patch1001 -p1