From 626085807481d02cdf36432295e76b8bb6f25cdd Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 21 2023 14:54:21 +0000 Subject: import systemd-219-78.el7_9.8 --- diff --git a/SOURCES/0851-resolve-introduce-reference-counting-on-DnsStream.patch b/SOURCES/0851-resolve-introduce-reference-counting-on-DnsStream.patch new file mode 100644 index 0000000..9b16434 --- /dev/null +++ b/SOURCES/0851-resolve-introduce-reference-counting-on-DnsStream.patch @@ -0,0 +1,165 @@ +From 47ef5ccd0edbff6610badc8c0f543f0e1d18bdc2 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 4 Aug 2022 11:11:58 +0200 +Subject: [PATCH] resolve: introduce reference counting on DnsStream + +(cherry picked from commit b30bf55d5c9942f15f27a641c2c34bbb646ec981) + +Related: #2110544 + +[msekleta: in order to protect against freeing the DnsStream by the +callback we need to pin it by increasing the reference count. Reference +counting for DnsStream was introduced in the b30bf55d5c as part of the +much bigger change. We are very late in RHEL-7 release cycle and we want +to keep code changes to a minimum, so let's backport just relevant part +of that commit and leave everything else unchanged.] +--- + src/resolve/resolved-dns-stream.c | 27 ++++++++++++++++++++------ + src/resolve/resolved-dns-stream.h | 6 +++++- + src/resolve/resolved-dns-transaction.c | 8 ++++---- + src/resolve/resolved-manager.c | 2 +- + 4 files changed, 31 insertions(+), 12 deletions(-) + +diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c +index 7f47e7223a..8d898b4819 100644 +--- a/src/resolve/resolved-dns-stream.c ++++ b/src/resolve/resolved-dns-stream.c +@@ -55,8 +55,8 @@ static int dns_stream_complete(DnsStream *s, int error) { + + if (s->complete) + s->complete(s, error); +- else +- dns_stream_free(s); ++ else /* the default action if no completion function is set is to close the stream */ ++ dns_stream_unref(s); + + return 0; + } +@@ -322,10 +322,16 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use + return 0; + } + +-DnsStream *dns_stream_free(DnsStream *s) { ++DnsStream *dns_stream_unref(DnsStream *s) { + if (!s) + return NULL; + ++ assert(s->n_ref > 0); ++ s->n_ref--; ++ ++ if (s->n_ref > 0) ++ return NULL; ++ + dns_stream_stop(s); + + if (s->manager) { +@@ -338,14 +344,22 @@ DnsStream *dns_stream_free(DnsStream *s) { + + free(s); + +- return 0; ++ return NULL; + } + +-DEFINE_TRIVIAL_CLEANUP_FUNC(DnsStream*, dns_stream_free); ++DnsStream *dns_stream_ref(DnsStream *s) { ++ if (!s) ++ return NULL; ++ ++ assert(s->n_ref > 0); ++ s->n_ref++; ++ ++ return s; ++} + + int dns_stream_new(Manager *m, DnsStream **ret, DnsProtocol protocol, int fd) { + static const int one = 1; +- _cleanup_(dns_stream_freep) DnsStream *s = NULL; ++ _cleanup_(dns_stream_unrefp) DnsStream *s = NULL; + int r; + + assert(m); +@@ -358,6 +372,7 @@ int dns_stream_new(Manager *m, DnsStream **ret, DnsProtocol protocol, int fd) { + if (!s) + return -ENOMEM; + ++ s->n_ref = 1; + s->fd = -1; + s->protocol = protocol; + +diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h +index 46eae31c60..28aee48205 100644 +--- a/src/resolve/resolved-dns-stream.h ++++ b/src/resolve/resolved-dns-stream.h +@@ -31,6 +31,7 @@ typedef struct DnsStream DnsStream; + + struct DnsStream { + Manager *manager; ++ int n_ref; + + DnsProtocol protocol; + +@@ -59,6 +60,9 @@ struct DnsStream { + }; + + int dns_stream_new(Manager *m, DnsStream **s, DnsProtocol protocol, int fd); +-DnsStream *dns_stream_free(DnsStream *s); ++DnsStream *dns_stream_unref(DnsStream *s); ++DnsStream *dns_stream_ref(DnsStream *s); ++ ++DEFINE_TRIVIAL_CLEANUP_FUNC(DnsStream*, dns_stream_unref); + + int dns_stream_write_packet(DnsStream *s, DnsPacket *p); +diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c +index bc1a90db1b..6fa581b6a9 100644 +--- a/src/resolve/resolved-dns-transaction.c ++++ b/src/resolve/resolved-dns-transaction.c +@@ -37,7 +37,7 @@ DnsTransaction* dns_transaction_free(DnsTransaction *t) { + dns_packet_unref(t->received); + dns_answer_unref(t->cached); + +- dns_stream_free(t->stream); ++ dns_stream_unref(t->stream); + + if (t->scope) { + LIST_REMOVE(transactions_by_scope, t->scope->transactions, t); +@@ -114,7 +114,7 @@ static void dns_transaction_stop(DnsTransaction *t) { + assert(t); + + t->timeout_event_source = sd_event_source_unref(t->timeout_event_source); +- t->stream = dns_stream_free(t->stream); ++ t->stream = dns_stream_unref(t->stream); + } + + static void dns_transaction_tentative(DnsTransaction *t, DnsPacket *p) { +@@ -208,7 +208,7 @@ static int on_stream_complete(DnsStream *s, int error) { + t = s->transaction; + p = dns_packet_ref(s->read_packet); + +- t->stream = dns_stream_free(t->stream); ++ t->stream = dns_stream_unref(t->stream); + + if (error != 0) { + dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES); +@@ -279,7 +279,7 @@ static int dns_transaction_open_tcp(DnsTransaction *t) { + + r = dns_stream_write_packet(t->stream, t->sent); + if (r < 0) { +- t->stream = dns_stream_free(t->stream); ++ t->stream = dns_stream_unref(t->stream); + return r; + } + +diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c +index 173ab8a148..aa7aa68cab 100644 +--- a/src/resolve/resolved-manager.c ++++ b/src/resolve/resolved-manager.c +@@ -1531,7 +1531,7 @@ static int on_llmnr_stream_packet(DnsStream *s) { + } else + log_debug("Invalid LLMNR TCP packet."); + +- dns_stream_free(s); ++ dns_stream_unref(s); + return 0; + } + diff --git a/SOURCES/0852-resolved-pin-stream-while-calling-callbacks-for-it.patch b/SOURCES/0852-resolved-pin-stream-while-calling-callbacks-for-it.patch new file mode 100644 index 0000000..02fbae9 --- /dev/null +++ b/SOURCES/0852-resolved-pin-stream-while-calling-callbacks-for-it.patch @@ -0,0 +1,39 @@ +From 420ffdb2b6c0d445b2f911cddfbee0a0d94c013d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 4 Dec 2018 22:13:39 +0100 +Subject: [PATCH] resolved: pin stream while calling callbacks for it + +These callbacks might unref the stream, but we still have to access it, +let's hence ref it explicitly. + +Maybe fixes: #10725 + +(cherry picked from commit d973d94dec349fb676fdd844f6fe2ada3538f27c) + +Resolves: #2110544 +--- + src/resolve/resolved-dns-stream.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c +index 8d898b4819..1068a248ae 100644 +--- a/src/resolve/resolved-dns-stream.c ++++ b/src/resolve/resolved-dns-stream.c +@@ -49,6 +49,8 @@ static int dns_stream_update_io(DnsStream *s) { + } + + static int dns_stream_complete(DnsStream *s, int error) { ++ _cleanup_(dns_stream_unrefp) _unused_ DnsStream *ref = dns_stream_ref(s); /* Protect stream while we process it */ ++ + assert(s); + + dns_stream_stop(s); +@@ -195,7 +197,7 @@ static int on_stream_timeout(sd_event_source *es, usec_t usec, void *userdata) { + } + + static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *userdata) { +- DnsStream *s = userdata; ++ _cleanup_(dns_stream_unrefp) DnsStream *s = dns_stream_ref(userdata); /* Protect stream while we process it */ + int r; + + assert(s); diff --git a/SOURCES/0853-fstab-generator-Chase-symlinks-where-possible-6293.patch b/SOURCES/0853-fstab-generator-Chase-symlinks-where-possible-6293.patch new file mode 100644 index 0000000..644af2c --- /dev/null +++ b/SOURCES/0853-fstab-generator-Chase-symlinks-where-possible-6293.patch @@ -0,0 +1,174 @@ +From a4c51f1bb38f272fb9c3dbaa33f1f383639ce345 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Tue, 11 Jul 2017 12:48:57 -0400 +Subject: [PATCH] fstab-generator: Chase symlinks where possible (#6293) + +This has a long history; see see 5261ba901845c084de5a8fd06500ed09bfb0bd80 +which originally introduced the behavior. Unfortunately that commit +doesn't include any rationale, but IIRC the basic issue is that +systemd wants to model the real mount state as units, and symlinks +make canonicalization much more difficult. + +At the same time, on a RHEL6 system (upstart), one can make e.g. `/home` a +symlink, and things work as well as they always did; but one doesn't have +access to the sophistication of mount units (dependencies, introspection, etc.) +Supporting symlinks here will hence make it easier for people to do upgrades to +RHEL7 and beyond. + +The `/home` as symlink case also appears prominently for OSTree; see +https://ostree.readthedocs.io/en/latest/manual/adapting-existing/ + +Further work has landed in the nspawn case for this; see e.g. +d944dc9553009822deaddec76814f5642a6a8176 + +A basic limitation with doing this in the fstab generator (and that I hit while +doing some testing) is that we obviously can't chase symlinks into mounts, +since the generator runs early before mounts. Or at least - doing so would +require multiple passes over the fstab data (as well as looking at existing +mount units), and potentially doing multi-phase generation. I'm not sure it's +worth doing that without a real world use case. For now, this will fix at least +the OSTree + `/home` case +mentioned above, and in general anyone who for whatever reason has symlinks in +their `/etc/fstab`. + +(cherry picked from commit 634735b56b82bdde3c67193ba7b470bab80fdcbd) + +Resolves: RHEL-6223 +--- + man/systemd-fstab-generator.xml | 8 +++++ + man/systemd.mount.xml | 5 ++-- + src/fstab-generator/fstab-generator.c | 42 ++++++++++++++++++++++----- + 3 files changed, 45 insertions(+), 10 deletions(-) + +diff --git a/man/systemd-fstab-generator.xml b/man/systemd-fstab-generator.xml +index bdc2dc1d0e..6f45c680cc 100644 +--- a/man/systemd-fstab-generator.xml ++++ b/man/systemd-fstab-generator.xml +@@ -71,6 +71,14 @@ + for more information about special /etc/fstab + mount options this generator understands. + ++ One special topic is handling of symbolic links. Historical init ++ implementations supported symlinks in /etc/fstab. ++ Because mount units will refuse mounts where the target is a symbolic link, ++ this generator will resolve any symlinks as far as possible when processing ++ /etc/fstab in order to enhance backwards compatibility. ++ If a symlink target does not exist at the time that this generator runs, it ++ is assumed that the symlink target is the final target of the mount. ++ + systemd-fstab-generator implements + systemd.generator7. + +diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml +index 1590c44cec..5021db5584 100644 +--- a/man/systemd.mount.xml ++++ b/man/systemd.mount.xml +@@ -295,8 +295,9 @@ + + + Where= +- Takes an absolute path of a directory of the +- mount point. If the mount point does not exist at the time of ++ Takes an absolute path of a directory for the ++ mount point; in particular, the destination cannot be a symbolic ++ link. If the mount point does not exist at the time of + mounting, it is created. This string must be reflected in the + unit filename. (See above.) This option is + mandatory. +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 23b5457e43..91603b08f4 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -240,6 +240,7 @@ static int write_idle_timeout(FILE *f, const char *where, const char *opts) { + static int add_mount( + const char *what, + const char *where, ++ const char *original_where, + const char *fstype, + const char *opts, + int passno, +@@ -327,12 +328,14 @@ static int add_mount( + } + + fprintf(f, +- "\n" ++ "\n" + "[Mount]\n" +- "What=%s\n" +- "Where=%s\n", +- what, +- where); ++ "What=%s\n", ++ what); ++ ++ if (original_where) ++ fprintf(f, "# Canonicalized from %s\n", original_where); ++ fprintf(f, "Where=%s\n", where); + + if (!isempty(fstype) && !streq(fstype, "auto")) + fprintf(f, "Type=%s\n", fstype); +@@ -436,7 +439,7 @@ static int parse_fstab(bool initrd) { + } + + while ((me = getmntent(f))) { +- _cleanup_free_ char *where = NULL, *what = NULL; ++ _cleanup_free_ char *where = NULL, *what = NULL, *canonical_where = NULL; + bool noauto, nofail; + int k; + +@@ -456,8 +459,28 @@ static int parse_fstab(bool initrd) { + if (!where) + return log_oom(); + +- if (is_path(where)) ++ if (is_path(where)) { + path_kill_slashes(where); ++ /* Follow symlinks here; see 5261ba901845c084de5a8fd06500ed09bfb0bd80 which makes sense for ++ * mount units, but causes problems since it historically worked to have symlinks in e.g. ++ * /etc/fstab. So we canonicalize here. Note that we use CHASE_NONEXISTENT to handle the case ++ * where a symlink refers to another mount target; this works assuming the sub-mountpoint ++ * target is the final directory. ++ */ ++ r = chase_symlinks(where, initrd ? "/sysroot" : NULL, ++ CHASE_PREFIX_ROOT | CHASE_NONEXISTENT, ++ &canonical_where); ++ if (r < 0) ++ /* In this case for now we continue on as if it wasn't a symlink */ ++ log_warning_errno(r, "Failed to read symlink target for %s: %m", where); ++ else { ++ if (streq(canonical_where, where)) ++ canonical_where = mfree(canonical_where); ++ else ++ log_debug("Canonicalized what=%s where=%s to %s", ++ what, where, canonical_where); ++ } ++ } + + noauto = fstab_test_yes_no_option(me->mnt_opts, "noauto\0" "auto\0"); + nofail = fstab_test_yes_no_option(me->mnt_opts, "nofail\0" "fail\0"); +@@ -482,7 +505,8 @@ static int parse_fstab(bool initrd) { + post = SPECIAL_LOCAL_FS_TARGET; + + k = add_mount(what, +- where, ++ canonical_where ?: where, ++ canonical_where ? where: NULL, + me->mnt_type, + me->mnt_opts, + me->mnt_passno, +@@ -526,6 +550,7 @@ static int add_sysroot_mount(void) { + log_debug("Found entry what=%s where=/sysroot type=%s", what, strna(arg_root_fstype)); + return add_mount(what, + "/sysroot", ++ NULL, + arg_root_fstype, + opts, + 1, +@@ -583,6 +608,7 @@ static int add_sysroot_usr_mount(void) { + log_debug("Found entry what=%s where=/sysroot/usr type=%s", what, strna(arg_usr_fstype)); + return add_mount(what, + "/sysroot/usr", ++ NULL, + arg_usr_fstype, + opts, + 1, diff --git a/SOURCES/9000-resolved-pin-stream-while-calling-callbacks-for-it.patch b/SOURCES/9000-resolved-pin-stream-while-calling-callbacks-for-it.patch deleted file mode 100644 index 2cfd925..0000000 --- a/SOURCES/9000-resolved-pin-stream-while-calling-callbacks-for-it.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5b9f33c30309345738eedc226f6a667968949044 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 4 Dec 2018 22:13:39 +0100 -Subject: [PATCH] resolved: pin stream while calling callbacks for it - -These callbacks might unref the stream, but we still have to access it, -let's hence ref it explicitly. - -Maybe fixes: #10725 - -(cherry picked from commit d973d94dec349fb676fdd844f6fe2ada3538f27c) - -Resolves: #2110544 ---- - src/resolve/resolved-dns-stream.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c -index 7f47e7223a..f5faf154f2 100644 ---- a/src/resolve/resolved-dns-stream.c -+++ b/src/resolve/resolved-dns-stream.c -@@ -49,6 +49,8 @@ static int dns_stream_update_io(DnsStream *s) { - } - - static int dns_stream_complete(DnsStream *s, int error) { -+ _cleanup_(dns_stream_unrefp) _unused_ DnsStream *ref = dns_stream_ref(s); /* Protect stream while we process it */ -+ - assert(s); - - dns_stream_stop(s); -@@ -195,7 +197,7 @@ static int on_stream_timeout(sd_event_source *es, usec_t usec, void *userdata) { - } - - static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *userdata) { -- DnsStream *s = userdata; -+ _cleanup_(dns_stream_unrefp) DnsStream *s = dns_stream_ref(userdata); /* Protect stream while we process it */ - int r; - - assert(s); --- -2.37.1 - diff --git a/SOURCES/9001-resolve-introduce-reference-counting-on-DnsStream.patch b/SOURCES/9001-resolve-introduce-reference-counting-on-DnsStream.patch deleted file mode 100644 index 0a0c481..0000000 --- a/SOURCES/9001-resolve-introduce-reference-counting-on-DnsStream.patch +++ /dev/null @@ -1,168 +0,0 @@ -From d30e2a02f87a439367259c9f29abc80b989dae09 Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Thu, 4 Aug 2022 11:11:58 +0200 -Subject: [PATCH] resolve: introduce reference counting on DnsStream - -(cherry picked from commit b30bf55d5c9942f15f27a641c2c34bbb646ec981) - -Related: #2110544 - -[msekleta: in order to protect against freeing the DnsStream by the -callback we need to pin it by increasing the reference count. Reference -counting for DnsStream was introduced in the b30bf55d5c as part of the -much bigger change. We are very late in RHEL-7 release cycle and we want -to keep code changes to a minimum, so let's backport just relevant part -of that commit and leave everything else unchanged.] ---- - src/resolve/resolved-dns-stream.c | 27 ++++++++++++++++++++------ - src/resolve/resolved-dns-stream.h | 6 +++++- - src/resolve/resolved-dns-transaction.c | 8 ++++---- - src/resolve/resolved-manager.c | 2 +- - 4 files changed, 31 insertions(+), 12 deletions(-) - -diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c -index f5faf154f2..1068a248ae 100644 ---- a/src/resolve/resolved-dns-stream.c -+++ b/src/resolve/resolved-dns-stream.c -@@ -57,8 +57,8 @@ static int dns_stream_complete(DnsStream *s, int error) { - - if (s->complete) - s->complete(s, error); -- else -- dns_stream_free(s); -+ else /* the default action if no completion function is set is to close the stream */ -+ dns_stream_unref(s); - - return 0; - } -@@ -324,10 +324,16 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use - return 0; - } - --DnsStream *dns_stream_free(DnsStream *s) { -+DnsStream *dns_stream_unref(DnsStream *s) { - if (!s) - return NULL; - -+ assert(s->n_ref > 0); -+ s->n_ref--; -+ -+ if (s->n_ref > 0) -+ return NULL; -+ - dns_stream_stop(s); - - if (s->manager) { -@@ -340,14 +346,22 @@ DnsStream *dns_stream_free(DnsStream *s) { - - free(s); - -- return 0; -+ return NULL; - } - --DEFINE_TRIVIAL_CLEANUP_FUNC(DnsStream*, dns_stream_free); -+DnsStream *dns_stream_ref(DnsStream *s) { -+ if (!s) -+ return NULL; -+ -+ assert(s->n_ref > 0); -+ s->n_ref++; -+ -+ return s; -+} - - int dns_stream_new(Manager *m, DnsStream **ret, DnsProtocol protocol, int fd) { - static const int one = 1; -- _cleanup_(dns_stream_freep) DnsStream *s = NULL; -+ _cleanup_(dns_stream_unrefp) DnsStream *s = NULL; - int r; - - assert(m); -@@ -360,6 +374,7 @@ int dns_stream_new(Manager *m, DnsStream **ret, DnsProtocol protocol, int fd) { - if (!s) - return -ENOMEM; - -+ s->n_ref = 1; - s->fd = -1; - s->protocol = protocol; - -diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h -index 46eae31c60..28aee48205 100644 ---- a/src/resolve/resolved-dns-stream.h -+++ b/src/resolve/resolved-dns-stream.h -@@ -31,6 +31,7 @@ typedef struct DnsStream DnsStream; - - struct DnsStream { - Manager *manager; -+ int n_ref; - - DnsProtocol protocol; - -@@ -59,6 +60,9 @@ struct DnsStream { - }; - - int dns_stream_new(Manager *m, DnsStream **s, DnsProtocol protocol, int fd); --DnsStream *dns_stream_free(DnsStream *s); -+DnsStream *dns_stream_unref(DnsStream *s); -+DnsStream *dns_stream_ref(DnsStream *s); -+ -+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsStream*, dns_stream_unref); - - int dns_stream_write_packet(DnsStream *s, DnsPacket *p); -diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c -index bc1a90db1b..6fa581b6a9 100644 ---- a/src/resolve/resolved-dns-transaction.c -+++ b/src/resolve/resolved-dns-transaction.c -@@ -37,7 +37,7 @@ DnsTransaction* dns_transaction_free(DnsTransaction *t) { - dns_packet_unref(t->received); - dns_answer_unref(t->cached); - -- dns_stream_free(t->stream); -+ dns_stream_unref(t->stream); - - if (t->scope) { - LIST_REMOVE(transactions_by_scope, t->scope->transactions, t); -@@ -114,7 +114,7 @@ static void dns_transaction_stop(DnsTransaction *t) { - assert(t); - - t->timeout_event_source = sd_event_source_unref(t->timeout_event_source); -- t->stream = dns_stream_free(t->stream); -+ t->stream = dns_stream_unref(t->stream); - } - - static void dns_transaction_tentative(DnsTransaction *t, DnsPacket *p) { -@@ -208,7 +208,7 @@ static int on_stream_complete(DnsStream *s, int error) { - t = s->transaction; - p = dns_packet_ref(s->read_packet); - -- t->stream = dns_stream_free(t->stream); -+ t->stream = dns_stream_unref(t->stream); - - if (error != 0) { - dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES); -@@ -279,7 +279,7 @@ static int dns_transaction_open_tcp(DnsTransaction *t) { - - r = dns_stream_write_packet(t->stream, t->sent); - if (r < 0) { -- t->stream = dns_stream_free(t->stream); -+ t->stream = dns_stream_unref(t->stream); - return r; - } - -diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c -index 173ab8a148..aa7aa68cab 100644 ---- a/src/resolve/resolved-manager.c -+++ b/src/resolve/resolved-manager.c -@@ -1531,7 +1531,7 @@ static int on_llmnr_stream_packet(DnsStream *s) { - } else - log_debug("Invalid LLMNR TCP packet."); - -- dns_stream_free(s); -+ dns_stream_unref(s); - return 0; - } - --- -2.32.1 (Apple Git-133) - diff --git a/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch b/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch deleted file mode 100644 index c42f0b6..0000000 --- a/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c49c37d5e26bf71a97d5194d390f80d3e71758e1 Mon Sep 17 00:00:00 2001 -From: systemd team -Date: Tue, 23 Apr 2019 10:46:19 -0300 -Subject: [PATCH] Update kernel-install script by backporting fedora patches - ---- - src/kernel-install/kernel-install | 30 +++++++++++++++++------------- - 1 file changed, 17 insertions(+), 13 deletions(-) - -diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install -index f1c74de..d860701 100755 ---- a/src/kernel-install/kernel-install -+++ b/src/kernel-install/kernel-install -@@ -73,23 +73,27 @@ KERNEL_IMAGE="$2" - - if [[ -x /sbin/new-kernel-pkg ]]; then - KERNEL_DIR="${KERNEL_IMAGE%/*}" -- if [[ "${KERNEL_DIR}" != "/boot" ]]; then -- for i in \ -- "$KERNEL_IMAGE" \ -- "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \ -- "$KERNEL_DIR"/System.map \ -- "$KERNEL_DIR"/config \ -- "$KERNEL_DIR"/zImage.stub \ -- "$KERNEL_DIR"/dtb \ -- ; do -- [[ -e "$i" ]] || continue -- cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}" -- done -- fi - - [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" - case "$COMMAND" in - add) -+ if [[ "${KERNEL_DIR}" != "/boot" ]]; then -+ for i in \ -+ "$KERNEL_IMAGE" \ -+ "$KERNEL_DIR"/System.map \ -+ "$KERNEL_DIR"/config \ -+ "$KERNEL_DIR"/zImage.stub \ -+ "$KERNEL_DIR"/dtb \ -+ ; do -+ [[ -e "$i" ]] || continue -+ cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}" -+ done -+ # hmac is .vmlinuz-.hmac so needs a special treatment -+ i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" -+ if [[ -e "$i" ]]; then -+ cp -aT "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" -+ fi -+ fi - /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? --- -1.8.3.1 - diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index f4365f3..44be4bf 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -7,7 +7,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 219 -Release: 78%{?dist}.7 +Release: 78%{?dist}.8 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -889,11 +889,9 @@ Patch0847: 0847-strv-fix-buffer-size-calculation-in-strv_join_quoted.patch Patch0848: 0848-install-refactor-find_symlinks-and-don-t-search-for-.patch Patch0849: 0849-install-fix-a-potential-crash.patch Patch0850: 0850-acl-util-only-set-the-mask-if-not-present.patch - -Patch9000: 9000-resolved-pin-stream-while-calling-callbacks-for-it.patch -Patch9001: 9001-resolve-introduce-reference-counting-on-DnsStream.patch - -Patch9999: 9999-Update-kernel-install-script-by-backporting-fedora-p.patch +Patch0851: 0851-resolve-introduce-reference-counting-on-DnsStream.patch +Patch0852: 0852-resolved-pin-stream-while-calling-callbacks-for-it.patch +Patch0853: 0853-fstab-generator-Chase-symlinks-where-possible-6293.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -1871,6 +1869,9 @@ fi %{_mandir}/man8/systemd-resolved.* %changelog +* Tue Sep 26 2023 systemd maintenance team - 219-78.8 +- fstab-generator: Chase symlinks where possible (#6293) (RHEL-6223) + * Thu Aug 04 2022 systemd maintenance team - 219-78.7 - resolve: introduce reference counting on DnsStream (#2110544)