diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch')
-rw-r--r-- | meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch new file mode 100644 index 000000000..e32b5c00d --- /dev/null +++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 27 Jun 2017 07:32:09 -0700 | ||
4 | Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error () | ||
5 | |||
6 | This fixes format errors with -Werror=format-security | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/nm-manager.c | 6 ++++++ | ||
11 | 1 file changed, 6 insertions(+) | ||
12 | |||
13 | diff --git a/src/nm-manager.c b/src/nm-manager.c | ||
14 | index c3d65cd..e814912 100644 | ||
15 | --- a/src/nm-manager.c | ||
16 | +++ b/src/nm-manager.c | ||
17 | @@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
18 | if (error || (result != NM_AUTH_CALL_RESULT_YES)) { | ||
19 | reply = g_dbus_message_new_method_error (pfd->message, | ||
20 | NM_PERM_DENIED_ERROR, | ||
21 | + "%s", | ||
22 | (error_message = "Not authorized to perform this operation")); | ||
23 | if (error) | ||
24 | error_message = error->message; | ||
25 | @@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
26 | if (!object) { | ||
27 | reply = g_dbus_message_new_method_error (pfd->message, | ||
28 | "org.freedesktop.DBus.Error.UnknownObject", | ||
29 | + "%s", | ||
30 | (error_message = "Object doesn't exist.")); | ||
31 | goto done; | ||
32 | } | ||
33 | @@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
34 | if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) { | ||
35 | reply = g_dbus_message_new_method_error (pfd->message, | ||
36 | "org.freedesktop.DBus.Error.InvalidArgs", | ||
37 | + "%s", | ||
38 | (error_message = "Object is of unexpected type.")); | ||
39 | goto done; | ||
40 | } | ||
41 | @@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
42 | if (global_dns && !nm_global_dns_config_is_internal (global_dns)) { | ||
43 | reply = g_dbus_message_new_method_error (pfd->message, | ||
44 | NM_PERM_DENIED_ERROR, | ||
45 | + "%s", | ||
46 | (error_message = "Global DNS configuration already set via configuration file")); | ||
47 | goto done; | ||
48 | } | ||
49 | @@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data) | ||
50 | if (!pfd->subject) { | ||
51 | reply = g_dbus_message_new_method_error (pfd->message, | ||
52 | NM_PERM_DENIED_ERROR, | ||
53 | + "%s", | ||
54 | (error_message = "Could not determine request UID.")); | ||
55 | goto out; | ||
56 | } | ||
57 | @@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data) | ||
58 | if (!chain) { | ||
59 | reply = g_dbus_message_new_method_error (pfd->message, | ||
60 | NM_PERM_DENIED_ERROR, | ||
61 | + "%s", | ||
62 | (error_message = "Could not authenticate request.")); | ||
63 | goto out; | ||
64 | } | ||
65 | -- | ||
66 | 2.13.2 | ||
67 | |||