From 20be233a72a33761967d487ba30516cceea7c2e46d99d16f47c43551da6691be Mon Sep 17 00:00:00 2001 From: Clemens Famulla-Conrad Date: Tue, 5 Jul 2022 13:43:43 +0000 Subject: [PATCH] Accepting request 986868 from home:cfconrad:branches:hardware - Add dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch (bsc#1201219) OBS-URL: https://build.opensuse.org/request/show/986868 OBS-URL: https://build.opensuse.org/package/show/hardware/wpa_supplicant?expand=0&rev=137 --- ...rty-DebugShowKeys-and-DebugTimestamp.patch | 46 +++++++++++++++++++ wpa_supplicant.changes | 6 +++ wpa_supplicant.spec | 1 + 3 files changed, 53 insertions(+) create mode 100644 dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch diff --git a/dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch b/dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch new file mode 100644 index 0000000..4c47707 --- /dev/null +++ b/dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch @@ -0,0 +1,46 @@ +From 903f0848ce7d67c99eb5a2569aa5c31bcd7adbc1 Mon Sep 17 00:00:00 2001 +From: Clemens Famulla-Conrad +Date: Tue, 5 Jul 2022 13:04:52 +0200 +Subject: [PATCH] dbus: Fix property DebugShowKeys and DebugTimestamp + +It is possible to specify -t or -K multiple times. With this the +value isn't boolean anymore and we hit a assert in libdbus +function `dbus_message_iter_append_basic()`, which expect 0 or 1 +for DBUS_TYPE_BOOLEAN. + +Signed-off-by: Clemens Famulla-Conrad +--- + wpa_supplicant/dbus/dbus_new_handlers.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c +index 0b1002bf1..de82930e8 100644 +--- a/wpa_supplicant/dbus/dbus_new_handlers.c ++++ b/wpa_supplicant/dbus/dbus_new_handlers.c +@@ -908,8 +908,10 @@ dbus_bool_t wpas_dbus_getter_debug_timestamp( + const struct wpa_dbus_property_desc *property_desc, + DBusMessageIter *iter, DBusError *error, void *user_data) + { ++ dbus_bool_t b = wpa_debug_timestamp ? TRUE : FALSE; ++ + return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_BOOLEAN, +- &wpa_debug_timestamp, error); ++ &b, error); + + } + +@@ -927,8 +929,10 @@ dbus_bool_t wpas_dbus_getter_debug_show_keys( + const struct wpa_dbus_property_desc *property_desc, + DBusMessageIter *iter, DBusError *error, void *user_data) + { ++ dbus_bool_t b = wpa_debug_timestamp ? TRUE : FALSE; ++ + return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_BOOLEAN, +- &wpa_debug_show_keys, error); ++ &b, error); + + } + +-- +2.35.3 + diff --git a/wpa_supplicant.changes b/wpa_supplicant.changes index 984c180..e198581 100644 --- a/wpa_supplicant.changes +++ b/wpa_supplicant.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 5 11:29:50 UTC 2022 - Clemens Famulla-Conrad + +- Add dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch + (bsc#1201219) + ------------------------------------------------------------------- Tue Jun 21 07:29:22 UTC 2022 - Stefan Schubert diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index 7771ebc..5431088 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -38,6 +38,7 @@ Patch1: wpa_supplicant-flush-debug-output.patch Patch2: wpa_supplicant-sigusr1-changes-debuglevel.patch Patch3: wpa_supplicant-alloc_size.patch Patch5: wpa_supplicant-dump-certificate-as-PEM-in-debug-mode.diff +Patch6: dbus-Fix-property-DebugShowKeys-and-DebugTimestamp.patch BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: systemd-rpm-macros