Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
SUMMARY = "Connman config to ignore wired interface on qemu machines"
|
||||
DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \
|
||||
network interface inside qemu machines."
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
|
||||
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = "file://main.conf \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/*"
|
||||
|
||||
# Kernel IP-Config is perfectly capable of setting up networking passed in via ip=
|
||||
do_install:append:qemuall() {
|
||||
mkdir -p ${D}${sysconfdir}/connman
|
||||
cp ${S}/main.conf ${D}${sysconfdir}/connman/main.conf
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
[General]
|
||||
NetworkInterfaceBlacklist = eth0
|
||||
@@ -0,0 +1,277 @@
|
||||
From a59b0fac02e74a971ac3f08bf28c17ce361a9526 Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
Date: Wed, 2 Mar 2016 15:47:49 +0200
|
||||
Subject: [PATCH] Port to Gtk3
|
||||
|
||||
Some unused (or not useful) code was removed, functionality should stay
|
||||
the same.
|
||||
|
||||
Code still contains quite a few uses of deprecated API.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
||||
---
|
||||
applet/agent.c | 3 +--
|
||||
applet/main.c | 43 -------------------------------------------
|
||||
applet/status.c | 8 --------
|
||||
configure.ac | 3 +--
|
||||
properties/ethernet.c | 14 +++++++-------
|
||||
properties/main.c | 2 +-
|
||||
properties/wifi.c | 12 ++++++------
|
||||
7 files changed, 16 insertions(+), 69 deletions(-)
|
||||
|
||||
diff --git a/applet/agent.c b/applet/agent.c
|
||||
index 65bed08..04fe86a 100644
|
||||
--- a/applet/agent.c
|
||||
+++ b/applet/agent.c
|
||||
@@ -126,7 +126,6 @@ static void request_input_dialog(GHashTable *request,
|
||||
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
|
||||
gtk_window_set_urgency_hint(GTK_WINDOW(dialog), TRUE);
|
||||
- gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
|
||||
input->dialog = dialog;
|
||||
|
||||
gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
@@ -139,7 +138,7 @@ static void request_input_dialog(GHashTable *request,
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 4);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 20);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(table), 12);
|
||||
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table);
|
||||
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area (GTK_DIALOG(dialog))), table);
|
||||
|
||||
label = gtk_label_new(_("Please provide some network information:"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index f12d371..cd16285 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -157,46 +157,6 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
|
||||
}
|
||||
}
|
||||
|
||||
-static void open_uri(GtkWindow *parent, const char *uri)
|
||||
-{
|
||||
- GtkWidget *dialog;
|
||||
- GdkScreen *screen;
|
||||
- GError *error = NULL;
|
||||
- gchar *cmdline;
|
||||
-
|
||||
- screen = gtk_window_get_screen(parent);
|
||||
-
|
||||
- cmdline = g_strconcat("xdg-open ", uri, NULL);
|
||||
-
|
||||
- if (gdk_spawn_command_line_on_screen(screen,
|
||||
- cmdline, &error) == FALSE) {
|
||||
- dialog = gtk_message_dialog_new(parent,
|
||||
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
|
||||
- GTK_BUTTONS_CLOSE, "%s", error->message);
|
||||
- gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
- gtk_widget_destroy(dialog);
|
||||
- g_error_free(error);
|
||||
- }
|
||||
-
|
||||
- g_free(cmdline);
|
||||
-}
|
||||
-
|
||||
-static void about_url_hook(GtkAboutDialog *dialog,
|
||||
- const gchar *url, gpointer data)
|
||||
-{
|
||||
- open_uri(GTK_WINDOW(dialog), url);
|
||||
-}
|
||||
-
|
||||
-static void about_email_hook(GtkAboutDialog *dialog,
|
||||
- const gchar *email, gpointer data)
|
||||
-{
|
||||
- gchar *uri;
|
||||
-
|
||||
- uri = g_strconcat("mailto:", email, NULL);
|
||||
- open_uri(GTK_WINDOW(dialog), uri);
|
||||
- g_free(uri);
|
||||
-}
|
||||
-
|
||||
static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
{
|
||||
const gchar *authors[] = {
|
||||
@@ -204,9 +164,6 @@ static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
NULL
|
||||
};
|
||||
|
||||
- gtk_about_dialog_set_url_hook(about_url_hook, NULL, NULL);
|
||||
- gtk_about_dialog_set_email_hook(about_email_hook, NULL, NULL);
|
||||
-
|
||||
gtk_show_about_dialog(NULL, "version", VERSION,
|
||||
"copyright", "Copyright \xc2\xa9 2008 Intel Corporation",
|
||||
"comments", _("A connection manager for the GNOME desktop"),
|
||||
diff --git a/applet/status.c b/applet/status.c
|
||||
index aed6f1e..015ff29 100644
|
||||
--- a/applet/status.c
|
||||
+++ b/applet/status.c
|
||||
@@ -102,8 +102,6 @@ static void icon_animation_start(IconAnimation *animation,
|
||||
{
|
||||
available = TRUE;
|
||||
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
-
|
||||
animation->start = start;
|
||||
animation->end = (end == 0) ? animation->count - 1 : end;
|
||||
|
||||
@@ -120,8 +118,6 @@ static void icon_animation_stop(IconAnimation *animation)
|
||||
{
|
||||
available = TRUE;
|
||||
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
-
|
||||
if (animation->id > 0)
|
||||
g_source_remove(animation->id);
|
||||
|
||||
@@ -251,8 +247,6 @@ void status_unavailable(void)
|
||||
available = FALSE;
|
||||
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_notifier);
|
||||
- gtk_status_icon_set_tooltip(statusicon,
|
||||
- "Connection Manager daemon is not running");
|
||||
|
||||
gtk_status_icon_set_visible(statusicon, TRUE);
|
||||
}
|
||||
@@ -299,7 +293,6 @@ static void set_ready(gint signal)
|
||||
|
||||
if (signal < 0) {
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_wired);
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,7 +304,6 @@ static void set_ready(gint signal)
|
||||
index = 4;
|
||||
|
||||
gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_signal[index]);
|
||||
- gtk_status_icon_set_tooltip(statusicon, NULL);
|
||||
}
|
||||
|
||||
struct timeout_data {
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b972e07..a4dad5d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -55,8 +55,7 @@ AC_SUBST(DBUS_LIBS)
|
||||
DBUS_BINDING_TOOL="dbus-binding-tool"
|
||||
AC_SUBST(DBUS_BINDING_TOOL)
|
||||
|
||||
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8, dummy=yes,
|
||||
- AC_MSG_ERROR(gtk+ >= 2.8 is required))
|
||||
+PKG_CHECK_MODULES(GTK, gtk+-3.0)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
diff --git a/properties/ethernet.c b/properties/ethernet.c
|
||||
index 31db7a0..0b6b423 100644
|
||||
--- a/properties/ethernet.c
|
||||
+++ b/properties/ethernet.c
|
||||
@@ -82,7 +82,7 @@ void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(1, 1, TRUE);
|
||||
+ table = gtk_table_new(1, 1, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -136,7 +136,7 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(5, 5, TRUE);
|
||||
+ table = gtk_table_new(5, 5, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -144,9 +144,9 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
|
||||
label = gtk_label_new(_("Configuration:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 0, 1);
|
||||
|
||||
- combo = gtk_combo_box_new_text();
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "MANUAL");
|
||||
+ combo = gtk_combo_box_text_new();
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "MANUAL");
|
||||
gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
|
||||
separator_function, NULL, NULL);
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), combo, 2, 4, 0, 1);
|
||||
@@ -219,7 +219,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_DHCP:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
|
||||
gtk_widget_set_sensitive(entry[i], 0);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry[i]), _(""));
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_MANUAL:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
|
||||
gtk_widget_set_sensitive(entry[i], 1);
|
||||
}
|
||||
break;
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index c05f443..6f76361 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -429,7 +429,7 @@ static GtkWidget *create_interfaces(GtkWidget *window)
|
||||
|
||||
scrolled = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
|
||||
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
|
||||
GTK_SHADOW_OUT);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), scrolled, FALSE, TRUE, 0);
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index bd325ef..a5827e0 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -125,7 +125,7 @@ void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
- table = gtk_table_new(1, 1, TRUE);
|
||||
+ table = gtk_table_new(1, 1, FALSE);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
@@ -185,9 +185,9 @@ static void wifi_ipconfig(GtkWidget *table, struct config_data *data, GtkTreeIte
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 3, 4);
|
||||
data->ipv4.label[0] = label;
|
||||
|
||||
- combo = gtk_combo_box_new_text();
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
|
||||
- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Manual");
|
||||
+ combo = gtk_combo_box_text_new();
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
|
||||
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Manual");
|
||||
|
||||
gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
|
||||
separator_function, NULL, NULL);
|
||||
@@ -335,14 +335,14 @@ void update_wifi_ipv4(struct config_data *data, guint policy)
|
||||
case CONNMAN_POLICY_DHCP:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
|
||||
gtk_widget_set_sensitive(entry[i], 0);
|
||||
}
|
||||
break;
|
||||
case CONNMAN_POLICY_MANUAL:
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
|
||||
for (i = 0; i < 3; i++) {
|
||||
- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
|
||||
+ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
|
||||
gtk_widget_set_sensitive(entry[i], 1);
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.8.1
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 5907a23ad2f49702960a33f9e2039552673eabc7 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
Date: Mon, 17 Dec 2012 14:01:18 +0200
|
||||
Subject: [PATCH] Removed icon from connman-gnome "about" applet
|
||||
|
||||
The connman-gnome "about" applet showed a picture that
|
||||
can not be displayed. There is no designated picture
|
||||
in connman-gnome to be used in the about section, so
|
||||
it was removed.
|
||||
|
||||
[OE-Core #2509]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
---
|
||||
applet/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index f12d371..c7b3c7f 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -212,7 +212,7 @@ static void about_callback(GtkWidget *item, gpointer user_data)
|
||||
"comments", _("A connection manager for the GNOME desktop"),
|
||||
"authors", authors,
|
||||
"translator-credits", _("translator-credits"),
|
||||
- "logo-icon-name", "network-wireless", NULL);
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
static void settings_callback(GtkWidget *item, gpointer user_data)
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
connman-gnome: fix dbus interface name
|
||||
|
||||
This patch resolves following error:
|
||||
|
||||
"connman-dbus.xml": "connman" is not a valid D-Bus interface name
|
||||
|
||||
https://502552.bugs.gentoo.org/attachment.cgi?id=380652
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
common/connman-client.c | 24 ++++++++++++------------
|
||||
common/connman-client.h | 4 ++--
|
||||
common/connman-dbus.c | 6 +++---
|
||||
common/connman-dbus.xml | 2 +-
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index c55e25c..9d818b2 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -289,7 +289,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
|
||||
g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
|
||||
g_value_set_boxed(&value, ipv4);
|
||||
- ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
+ ret = net_connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -317,7 +317,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
g_value_set_boolean(&value, powered);
|
||||
|
||||
error = NULL;
|
||||
- connman_set_property(proxy, "Powered", &value, &error);
|
||||
+ net_connman_set_property(proxy, "Powered", &value, &error);
|
||||
if( error )
|
||||
fprintf (stderr, "error: %s\n", error->message);
|
||||
|
||||
@@ -325,7 +325,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
}
|
||||
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data)
|
||||
+ net_connman_scan_reply callback, gpointer user_data)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -339,7 +339,7 @@ void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_scan_async(proxy, callback, user_data);
|
||||
+ net_connman_scan_async(proxy, callback, user_data);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -353,7 +353,7 @@ gboolean connman_client_get_offline_status(ConnmanClient *client)
|
||||
|
||||
DBG("client %p", client);
|
||||
|
||||
- ret = connman_get_properties(priv->manager, &hash, NULL);
|
||||
+ ret = net_connman_get_properties(priv->manager, &hash, NULL);
|
||||
|
||||
if (ret == FALSE)
|
||||
goto done;
|
||||
@@ -375,7 +375,7 @@ void connman_client_set_offlinemode(ConnmanClient *client, gboolean status)
|
||||
g_value_init(&value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean(&value, status);
|
||||
|
||||
- connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
+ net_connman_set_property(priv->manager, "OfflineMode", &value, NULL);
|
||||
}
|
||||
|
||||
static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
@@ -398,7 +398,7 @@ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
|
||||
return TRUE;
|
||||
|
||||
if (type == CONNMAN_TYPE_WIFI)
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
|
||||
@@ -422,13 +422,13 @@ void connman_client_connect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_connect(proxy, NULL);
|
||||
+ net_connman_connect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata)
|
||||
+ net_connman_connect_reply callback, gpointer userdata)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
@@ -446,7 +446,7 @@ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
if (proxy == NULL)
|
||||
goto done;
|
||||
|
||||
- connman_connect_async(proxy, callback, userdata);
|
||||
+ net_connman_connect_async(proxy, callback, userdata);
|
||||
|
||||
done:
|
||||
return;
|
||||
@@ -476,7 +476,7 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_disconnect(proxy, NULL);
|
||||
+ net_connman_disconnect(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
@@ -532,7 +532,7 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_remove(proxy, NULL);
|
||||
+ net_connman_remove(proxy, NULL);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 9e2e6d5..98241de 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -70,13 +70,13 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config);
|
||||
void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
- connman_scan_reply callback, gpointer user_data);
|
||||
+ net_connman_scan_reply callback, gpointer user_data);
|
||||
|
||||
void connman_client_connect(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_disconnect(ConnmanClient *client, const gchar *network);
|
||||
gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
- connman_connect_reply callback, gpointer userdata);
|
||||
+ net_connman_connect_reply callback, gpointer userdata);
|
||||
void connman_client_set_remember(ConnmanClient *client, const gchar *network,
|
||||
gboolean remember);
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index b82b3e1..543eb43 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -655,15 +655,15 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
|
||||
DBG("getting manager properties");
|
||||
|
||||
- connman_get_properties_async(proxy, manager_properties, store);
|
||||
+ net_connman_get_properties_async(proxy, manager_properties, store);
|
||||
|
||||
DBG("getting technologies");
|
||||
|
||||
- connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
+ net_connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
|
||||
DBG("getting services");
|
||||
|
||||
- connman_get_services_async(proxy, manager_services, store);
|
||||
+ net_connman_get_services_async(proxy, manager_services, store);
|
||||
|
||||
return proxy;
|
||||
}
|
||||
diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
|
||||
index 56b9582..0199d52 100644
|
||||
--- a/common/connman-dbus.xml
|
||||
+++ b/common/connman-dbus.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<node name="/">
|
||||
- <interface name="connman">
|
||||
+ <interface name="net.connman">
|
||||
<method name="GetProperties">
|
||||
<arg type="a{sv}" direction="out"/>
|
||||
</method>
|
||||
--
|
||||
1.9.1
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
Binary file not shown.
|
After Width: | Height: | Size: 496 B |
Binary file not shown.
|
After Width: | Height: | Size: 492 B |
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
Binary file not shown.
|
After Width: | Height: | Size: 419 B |
@@ -0,0 +1,36 @@
|
||||
In networks that don't have a DHCP server configured, ipv4 address
|
||||
allocation fails and the ipv4 structure doesn't get populated. When
|
||||
the GUI is trying to read the ipv4_config.method field to see whether
|
||||
it contains "dhcp" string, a segmentation fault is generated.
|
||||
|
||||
Ethernet manual configuration behavior remains unchanged after this fix.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
|
||||
Index: git/properties/ethernet.c
|
||||
===================================================================
|
||||
--- git.orig/properties/ethernet.c
|
||||
+++ git/properties/ethernet.c
|
||||
@@ -194,7 +194,7 @@ void add_ethernet_service(GtkWidget *mai
|
||||
|
||||
data->button = button;
|
||||
|
||||
- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
update_ethernet_ipv4(data, CONNMAN_POLICY_DHCP);
|
||||
else
|
||||
update_ethernet_ipv4(data, CONNMAN_POLICY_MANUAL);
|
||||
Index: git/properties/wifi.c
|
||||
===================================================================
|
||||
--- git.orig/properties/wifi.c
|
||||
+++ git/properties/wifi.c
|
||||
@@ -230,7 +230,7 @@ static void wifi_ipconfig(GtkWidget *tab
|
||||
|
||||
data->ipv4_config = ipv4_config;
|
||||
|
||||
- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
|
||||
update_wifi_ipv4(data, CONNMAN_POLICY_DHCP);
|
||||
else
|
||||
update_wifi_ipv4(data, CONNMAN_POLICY_MANUAL);
|
||||
@@ -0,0 +1,30 @@
|
||||
SUMMARY = "GTK+ frontend for the ConnMan network connection manager"
|
||||
HOMEPAGE = "http://connman.net/"
|
||||
SECTION = "libs/network"
|
||||
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \
|
||||
file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a"
|
||||
|
||||
DEPENDS = "gtk+3 dbus-glib dbus-glib-native intltool-native gettext-native"
|
||||
|
||||
# 0.7 tag
|
||||
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
|
||||
SRC_URI = "git://github.com/connectivity/connman-gnome.git;branch=master;protocol=https \
|
||||
file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
|
||||
file://null_check_for_ipv4_config.patch \
|
||||
file://images/ \
|
||||
file://connman-gnome-fix-dbus-interface-name.patch \
|
||||
file://0001-Port-to-Gtk3.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep gtk-icon-cache pkgconfig features_check
|
||||
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
|
||||
|
||||
RDEPENDS:${PN} = "connman"
|
||||
|
||||
do_install:append() {
|
||||
install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
SUMMARY = "A daemon for managing internet connections within embedded devices"
|
||||
DESCRIPTION = "The ConnMan project provides a daemon for managing \
|
||||
internet connections within embedded devices running the Linux \
|
||||
operating system. The Connection Manager is designed to be slim and \
|
||||
to use as few resources as possible, so it can be easily integrated. \
|
||||
It is a fully modular system that can be extended, through plug-ins, \
|
||||
to support all kinds of wired or wireless technologies. Also, \
|
||||
configuration methods, like DHCP and domain name resolving, are \
|
||||
implemented using plug-ins."
|
||||
HOMEPAGE = "http://connman.net/"
|
||||
BUGTRACKER = "https://01.org/jira/browse/CM"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
|
||||
|
||||
inherit autotools pkgconfig systemd update-rc.d update-alternatives
|
||||
|
||||
CVE_PRODUCT = "connman connection_manager"
|
||||
|
||||
DEPENDS = "dbus glib-2.0 ppp"
|
||||
|
||||
EXTRA_OECONF += "\
|
||||
ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
|
||||
ac_cv_path_PPPD=${sbindir}/pppd \
|
||||
--enable-debug \
|
||||
--enable-loopback \
|
||||
--enable-ethernet \
|
||||
--enable-tools \
|
||||
--disable-polkit \
|
||||
--runstatedir=/run \
|
||||
"
|
||||
# For smooth operation it would be best to start only one wireless daemon at a time.
|
||||
# If wpa-supplicant is running, connman will use it preferentially.
|
||||
# Select either wpa-supplicant or iwd
|
||||
WIRELESS_DAEMON ??= "wpa-supplicant"
|
||||
|
||||
PACKAGECONFIG ??= "wispr iptables client\
|
||||
${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
|
||||
"
|
||||
|
||||
# If you want ConnMan to support VPN, add following statement into
|
||||
# local.conf or distro config
|
||||
# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
|
||||
|
||||
PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
|
||||
PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
|
||||
PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
|
||||
PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
|
||||
PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
|
||||
PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
|
||||
PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
|
||||
PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
|
||||
PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
|
||||
PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
|
||||
PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
|
||||
# WISPr support for logging into hotspots, requires TLS
|
||||
PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
|
||||
PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
|
||||
PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
|
||||
PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
|
||||
PACKAGECONFIG[client] = "--enable-client,--disable-client,readline"
|
||||
PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl"
|
||||
|
||||
INITSCRIPT_NAME = "connman"
|
||||
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
|
||||
|
||||
python __anonymous () {
|
||||
systemd_packages = "${PN} ${PN}-wait-online"
|
||||
pkgconfig = d.getVar('PACKAGECONFIG')
|
||||
if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
|
||||
systemd_packages += " ${PN}-vpn"
|
||||
d.setVar('SYSTEMD_PACKAGES', systemd_packages)
|
||||
}
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "connman.service"
|
||||
SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
|
||||
SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
|
||||
ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
|
||||
ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
|
||||
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
|
||||
sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman
|
||||
fi
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/tools/*-test ${D}${bindir}
|
||||
if [ -e ${B}/tools/wispr ]; then
|
||||
install -m 0755 ${B}/tools/wispr ${D}${bindir}
|
||||
fi
|
||||
|
||||
# We don't need to package an empty directory
|
||||
rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts
|
||||
|
||||
# Automake 1.12 won't install empty directories, but we need the
|
||||
# plugins directory to be present for ownership
|
||||
mkdir -p ${D}${libdir}/connman/plugins
|
||||
|
||||
# For read-only filesystem, do not create links during bootup
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
|
||||
fi
|
||||
}
|
||||
|
||||
# These used to be plugins, but now they are core
|
||||
RPROVIDES:${PN} = "\
|
||||
connman-plugin-loopback \
|
||||
connman-plugin-ethernet \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} = "\
|
||||
dbus \
|
||||
"
|
||||
|
||||
PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
|
||||
|
||||
def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
|
||||
plugintype = pkg.split( '-' )[-1]
|
||||
if plugintype in depmap:
|
||||
rdepends = map(lambda x: multilib_prefix + x, \
|
||||
depmap[plugintype].split())
|
||||
d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
|
||||
if add_insane_skip:
|
||||
d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
|
||||
|
||||
python populate_packages:prepend() {
|
||||
depmap = dict(pppd="ppp")
|
||||
multilib_prefix = (d.getVar("MLPREFIX") or "")
|
||||
|
||||
hook = lambda file,pkg,x,y,z: \
|
||||
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
|
||||
plugin_dir = d.expand('${libdir}/connman/plugins/')
|
||||
plugin_name = d.expand('${PN}-plugin-%s')
|
||||
do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
|
||||
'${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
|
||||
|
||||
hook = lambda file,pkg,x,y,z: \
|
||||
add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
|
||||
plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
|
||||
plugin_name = d.expand('${PN}-plugin-vpn-%s')
|
||||
do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
|
||||
'${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
|
||||
|
||||
FILES:${PN}-tools = "${bindir}/wispr"
|
||||
RDEPENDS:${PN}-tools ="${PN}"
|
||||
|
||||
FILES:${PN}-tests = "${bindir}/*-test"
|
||||
|
||||
FILES:${PN}-client = "${bindir}/connmanctl"
|
||||
RDEPENDS:${PN}-client ="${PN}"
|
||||
|
||||
FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
|
||||
${libdir}/connman/plugins \
|
||||
${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
|
||||
${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
|
||||
${datadir}/dbus-1/system-services/* \
|
||||
${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
|
||||
|
||||
FILES:${PN}-dev += "${libdir}/connman/*/*.la"
|
||||
|
||||
PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
|
||||
|
||||
SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
|
||||
DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
|
||||
managing VPN connections within embedded devices running the Linux \
|
||||
operating system. The connman-vpnd handles all the VPN connections \
|
||||
and starts/stops VPN client processes when necessary. The connman-vpnd \
|
||||
provides a DBus API for managing VPN connections. All the different \
|
||||
VPN technogies are implemented using plug-ins."
|
||||
FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
|
||||
${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
|
||||
${datadir}/dbus-1/system-services/net.connman.vpn.service \
|
||||
${systemd_system_unitdir}/connman-vpn.service"
|
||||
|
||||
SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
|
||||
DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
|
||||
the system waits until a network connection is established."
|
||||
FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
|
||||
${systemd_system_unitdir}/connman-wait-online.service"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
|
||||
to create a VPN connection to OpenVPN server."
|
||||
FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
|
||||
${libdir}/connman/plugins-vpn/openvpn.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
|
||||
to create a VPN connection to Cisco3000 VPN Concentrator."
|
||||
FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
|
||||
${libdir}/connman/plugins-vpn/vpnc.so \
|
||||
${libdir}/connman/scripts/vpn-script"
|
||||
RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
|
||||
to create a VPN connection to L2TP server."
|
||||
FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
|
||||
${libdir}/connman/plugins-vpn/l2tp.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
|
||||
|
||||
SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
|
||||
DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
|
||||
to create a VPN connection to PPTP server."
|
||||
FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
|
||||
${libdir}/connman/plugins-vpn/pptp.so"
|
||||
RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001
|
||||
From: "Maxin B. John" <maxin.john@intel.com>
|
||||
Date: Mon, 12 Jun 2017 16:52:39 +0300
|
||||
Subject: [PATCH] connman.service: stop systemd-resolved when we use connman
|
||||
|
||||
Stop systemd-resolved service when we use connman as network manager.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
---
|
||||
src/connman.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/connman.service.in b/src/connman.service.in
|
||||
index 9f5c10f..dab48bc 100644
|
||||
--- a/src/connman.service.in
|
||||
+++ b/src/connman.service.in
|
||||
@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman
|
||||
After=dbus.service network-pre.target systemd-sysusers.service
|
||||
Before=network.target multi-user.target shutdown.target
|
||||
Wants=network.target
|
||||
+Conflicts=systemd-resolved.service
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
--
|
||||
2.4.0
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 11 Apr 2023 08:12:56 +0200
|
||||
Subject: [PATCH] gdhcp: Verify and sanitize packet length first
|
||||
|
||||
Avoid overwriting the read packet length after the initial test. Thus
|
||||
move all the length checks which depends on the total length first
|
||||
and do not use the total lenght from the IP packet afterwards.
|
||||
|
||||
Fixes CVE-2023-28488
|
||||
|
||||
Reported by Polina Smirnova <moe.hwr@gmail.com>
|
||||
|
||||
CVE: CVE-2023-28488
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
---
|
||||
gdhcp/client.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
||||
index 7efa7e45..82017692 100644
|
||||
--- a/gdhcp/client.c
|
||||
+++ b/gdhcp/client.c
|
||||
@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet *packet, int bytes)
|
||||
static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
struct sockaddr_in *dst_addr)
|
||||
{
|
||||
- int bytes;
|
||||
struct ip_udp_dhcp_packet packet;
|
||||
uint16_t check;
|
||||
+ int bytes, tot_len;
|
||||
|
||||
memset(&packet, 0, sizeof(packet));
|
||||
|
||||
@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd,
|
||||
if (bytes < 0)
|
||||
return -1;
|
||||
|
||||
- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
- return -1;
|
||||
-
|
||||
- if (bytes < ntohs(packet.ip.tot_len))
|
||||
+ tot_len = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes > tot_len) {
|
||||
+ /* ignore any extra garbage bytes */
|
||||
+ bytes = tot_len;
|
||||
+ } else if (bytes < tot_len) {
|
||||
/* packet is bigger than sizeof(packet), we did partial read */
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
- /* ignore any extra garbage bytes */
|
||||
- bytes = ntohs(packet.ip.tot_len);
|
||||
+ if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp)))
|
||||
+ return -1;
|
||||
|
||||
if (!sanity_check(&packet, bytes))
|
||||
return -1;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 7 Apr 2012 18:52:12 -0700
|
||||
Subject: [PATCH] plugin.h: Change visibility to default for debug symbols
|
||||
|
||||
gold refuses to link in undefined weak symbols which
|
||||
have hidden visibility
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
include/plugin.h | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/plugin.h b/include/plugin.h
|
||||
index 692a4e5..a9361c3 100644
|
||||
--- a/include/plugin.h
|
||||
+++ b/include/plugin.h
|
||||
@@ -89,9 +89,9 @@ struct connman_plugin_desc {
|
||||
#else
|
||||
#define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
|
||||
extern struct connman_debug_desc __start___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_debug_desc __stop___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_plugin_desc connman_plugin_desc \
|
||||
__attribute__ ((visibility("default"))); \
|
||||
struct connman_plugin_desc connman_plugin_desc = { \
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
From 5f373f373f5baccc282dce257b7b16c8bb4a82c4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
|
||||
Date: Sat, 25 Mar 2023 20:51:52 +0000
|
||||
Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release
|
||||
|
||||
The API has gone through a significant overhaul, and this change fixes any compile issues.
|
||||
1) Fixes to configure.ac itself
|
||||
2) Cleanup in pppd plugin itself
|
||||
|
||||
Adding a libppp-compat.h file to mask for any differences in the version.
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f]
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
---
|
||||
configure.ac | 42 ++++++++-----
|
||||
scripts/libppp-compat.h | 127 ++++++++++++++++++++++++++++++++++++++++
|
||||
scripts/libppp-plugin.c | 15 +++--
|
||||
3 files changed, 161 insertions(+), 23 deletions(-)
|
||||
create mode 100644 scripts/libppp-compat.h
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a573cef..f34bb38 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -135,14 +135,6 @@ AC_ARG_ENABLE(l2tp,
|
||||
AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
|
||||
[enable_l2tp=${enableval}], [enable_l2tp="no"])
|
||||
if (test "${enable_l2tp}" != "no"); then
|
||||
- if (test -z "${path_pppd}"); then
|
||||
- AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
|
||||
- else
|
||||
- PPPD="${path_pppd}"
|
||||
- AC_SUBST(PPPD)
|
||||
- fi
|
||||
- AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
|
||||
- AC_MSG_ERROR(ppp header files are required))
|
||||
if (test -z "${path_l2tp}"); then
|
||||
AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
|
||||
else
|
||||
@@ -160,6 +152,18 @@ AC_ARG_ENABLE(pptp,
|
||||
AC_HELP_STRING([--enable-pptp], [enable pptp support]),
|
||||
[enable_pptp=${enableval}], [enable_pptp="no"])
|
||||
if (test "${enable_pptp}" != "no"); then
|
||||
+ if (test -z "${path_pptp}"); then
|
||||
+ AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
|
||||
+ else
|
||||
+ PPTP="${path_pptp}"
|
||||
+ AC_SUBST(PPTP)
|
||||
+ fi
|
||||
+fi
|
||||
+AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
|
||||
+AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
|
||||
+
|
||||
+if (test "${enable_pptp}" != "no" || test "${enable_l2tp}" != "no"); then
|
||||
+
|
||||
if (test -z "${path_pppd}"); then
|
||||
AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
|
||||
else
|
||||
@@ -168,15 +172,23 @@ if (test "${enable_pptp}" != "no"); then
|
||||
fi
|
||||
AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
|
||||
AC_MSG_ERROR(ppp header files are required))
|
||||
- if (test -z "${path_pptp}"); then
|
||||
- AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
|
||||
- else
|
||||
- PPTP="${path_pptp}"
|
||||
- AC_SUBST(PPTP)
|
||||
+ AC_CHECK_HEADERS([pppd/chap.h pppd/chap-new.h pppd/chap_ms.h])
|
||||
+
|
||||
+ PKG_CHECK_EXISTS([pppd],
|
||||
+ [AS_VAR_SET([pppd_pkgconfig_support],[yes])])
|
||||
+
|
||||
+ PPPD_VERSION=2.4.9
|
||||
+ if test x"$pppd_pkgconfig_support" = xyes; then
|
||||
+ PPPD_VERSION=`$PKG_CONFIG --modversion pppd`
|
||||
fi
|
||||
+
|
||||
+ AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)],
|
||||
+ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)],
|
||||
+ [Macro to help determine the particular version of pppd])
|
||||
+ PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g")
|
||||
+ AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION),
|
||||
+ [The real version of pppd represented as an int])
|
||||
fi
|
||||
-AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
|
||||
-AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
|
||||
|
||||
AC_CHECK_HEADERS(resolv.h, dummy=yes,
|
||||
AC_MSG_ERROR(resolver header files are required))
|
||||
diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h
|
||||
new file mode 100644
|
||||
index 0000000..eee1d09
|
||||
--- /dev/null
|
||||
+++ b/scripts/libppp-compat.h
|
||||
@@ -0,0 +1,127 @@
|
||||
+/* Copyright (C) Eivind Naess, eivnaes@yahoo.com */
|
||||
+/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
+
|
||||
+#ifndef __LIBPPP_COMPAT_H__
|
||||
+#define __LIBPPP_COMPAT_H__
|
||||
+
|
||||
+/* Define USE_EAPTLS compile with EAP TLS support against older pppd headers,
|
||||
+ * pppd >= 2.5.0 use PPP_WITH_EAPTLS and is defined in pppdconf.h */
|
||||
+#define USE_EAPTLS 1
|
||||
+
|
||||
+/* Define INET6 to compile with IPv6 support against older pppd headers,
|
||||
+ * pppd >= 2.5.0 use PPP_WITH_IPV6CP and is defined in pppdconf.h */
|
||||
+#define INET6 1
|
||||
+
|
||||
+/* PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define.
|
||||
+ * this silly macro magic is to work around that. */
|
||||
+#undef VERSION
|
||||
+#include <pppd/pppd.h>
|
||||
+
|
||||
+#ifndef PPPD_VERSION
|
||||
+#define PPPD_VERSION VERSION
|
||||
+#endif
|
||||
+
|
||||
+#include <pppd/fsm.h>
|
||||
+#include <pppd/ccp.h>
|
||||
+#include <pppd/eui64.h>
|
||||
+#include <pppd/ipcp.h>
|
||||
+#include <pppd/ipv6cp.h>
|
||||
+#include <pppd/eap.h>
|
||||
+#include <pppd/upap.h>
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_H
|
||||
+#include <pppd/chap.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_NEW_H
|
||||
+#include <pppd/chap-new.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_MS_H
|
||||
+#include <pppd/chap_ms.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_CHAP
|
||||
+#define PPP_PROTO_CHAP 0xc223
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_EAP
|
||||
+#define PPP_PROTO_EAP 0xc227
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
|
||||
+
|
||||
+static inline bool
|
||||
+debug_on (void)
|
||||
+{
|
||||
+ return debug;
|
||||
+}
|
||||
+
|
||||
+static inline const char
|
||||
+*ppp_ipparam (void)
|
||||
+{
|
||||
+ return ipparam;
|
||||
+}
|
||||
+
|
||||
+static inline int
|
||||
+ppp_ifunit (void)
|
||||
+{
|
||||
+ return ifunit;
|
||||
+}
|
||||
+
|
||||
+static inline const char *
|
||||
+ppp_ifname (void)
|
||||
+{
|
||||
+ return ifname;
|
||||
+}
|
||||
+
|
||||
+static inline int
|
||||
+ppp_get_mtu (int idx)
|
||||
+{
|
||||
+ return netif_get_mtu(idx);
|
||||
+}
|
||||
+
|
||||
+typedef enum ppp_notify
|
||||
+{
|
||||
+ NF_PID_CHANGE,
|
||||
+ NF_PHASE_CHANGE,
|
||||
+ NF_EXIT,
|
||||
+ NF_SIGNALED,
|
||||
+ NF_IP_UP,
|
||||
+ NF_IP_DOWN,
|
||||
+ NF_IPV6_UP,
|
||||
+ NF_IPV6_DOWN,
|
||||
+ NF_AUTH_UP,
|
||||
+ NF_LINK_DOWN,
|
||||
+ NF_FORK,
|
||||
+ NF_MAX_NOTIFY
|
||||
+} ppp_notify_t;
|
||||
+
|
||||
+typedef void (ppp_notify_fn) (void *ctx, int arg);
|
||||
+
|
||||
+static inline void
|
||||
+ppp_add_notify (ppp_notify_t type, ppp_notify_fn *func, void *ctx)
|
||||
+{
|
||||
+ struct notifier **list[NF_MAX_NOTIFY] = {
|
||||
+ [NF_PID_CHANGE ] = &pidchange,
|
||||
+ [NF_PHASE_CHANGE] = &phasechange,
|
||||
+ [NF_EXIT ] = &exitnotify,
|
||||
+ [NF_SIGNALED ] = &sigreceived,
|
||||
+ [NF_IP_UP ] = &ip_up_notifier,
|
||||
+ [NF_IP_DOWN ] = &ip_down_notifier,
|
||||
+ [NF_IPV6_UP ] = &ipv6_up_notifier,
|
||||
+ [NF_IPV6_DOWN ] = &ipv6_down_notifier,
|
||||
+ [NF_AUTH_UP ] = &auth_up_notifier,
|
||||
+ [NF_LINK_DOWN ] = &link_down_notifier,
|
||||
+ [NF_FORK ] = &fork_notifier,
|
||||
+ };
|
||||
+
|
||||
+ struct notifier **notify = list[type];
|
||||
+ if (notify) {
|
||||
+ add_notifier(notify, func, ctx);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#endif /* #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) */
|
||||
+#endif /* #if__LIBPPP_COMPAT_H__ */
|
||||
diff --git a/scripts/libppp-plugin.c b/scripts/libppp-plugin.c
|
||||
index 0dd8b47..61641b5 100644
|
||||
--- a/scripts/libppp-plugin.c
|
||||
+++ b/scripts/libppp-plugin.c
|
||||
@@ -29,14 +29,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
-#include <pppd/pppd.h>
|
||||
-#include <pppd/fsm.h>
|
||||
-#include <pppd/ipcp.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
+#include "libppp-compat.h"
|
||||
+
|
||||
#define INET_ADDRES_LEN (INET_ADDRSTRLEN + 5)
|
||||
#define INET_DNS_LEN (2*INET_ADDRSTRLEN + 9)
|
||||
|
||||
@@ -47,7 +46,7 @@ static char *path;
|
||||
static DBusConnection *connection;
|
||||
static int prev_phase;
|
||||
|
||||
-char pppd_version[] = VERSION;
|
||||
+char pppd_version[] = PPPD_VERSION;
|
||||
|
||||
int plugin_init(void);
|
||||
|
||||
@@ -170,7 +169,7 @@ static void ppp_up(void *data, int arg)
|
||||
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING
|
||||
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
|
||||
|
||||
- append(&dict, "INTERNAL_IFNAME", ifname);
|
||||
+ append(&dict, "INTERNAL_IFNAME", ppp_ifname());
|
||||
|
||||
inet_ntop(AF_INET, &ipcp_gotoptions[0].ouraddr, buf, INET_ADDRSTRLEN);
|
||||
append(&dict, "INTERNAL_IP4_ADDRESS", buf);
|
||||
@@ -309,9 +308,9 @@ int plugin_init(void)
|
||||
chap_check_hook = ppp_have_secret;
|
||||
pap_check_hook = ppp_have_secret;
|
||||
|
||||
- add_notifier(&ip_up_notifier, ppp_up, NULL);
|
||||
- add_notifier(&phasechange, ppp_phase_change, NULL);
|
||||
- add_notifier(&exitnotify, ppp_exit, connection);
|
||||
+ ppp_add_notify(NF_IP_UP, ppp_up, NULL);
|
||||
+ ppp_add_notify(NF_PHASE_CHANGE, ppp_phase_change, NULL);
|
||||
+ ppp_add_notify(NF_EXIT, ppp_exit, connection);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
From 01974865e4d331eeaf25248bee1bb96539c450d9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 6 Apr 2015 23:02:21 -0700
|
||||
Subject: [PATCH] resolve: musl does not implement res_ninit
|
||||
|
||||
ported from
|
||||
http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
gweb/gresolv.c | 34 +++++++++++++---------------------
|
||||
1 file changed, 13 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gweb/gresolv.c b/gweb/gresolv.c
|
||||
index 954e7cf..2a9bc51 100644
|
||||
--- a/gweb/gresolv.c
|
||||
+++ b/gweb/gresolv.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <net/if.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "gresolv.h"
|
||||
|
||||
@@ -878,8 +879,6 @@ GResolv *g_resolv_new(int index)
|
||||
resolv->index = index;
|
||||
resolv->nameserver_list = NULL;
|
||||
|
||||
- res_ninit(&resolv->res);
|
||||
-
|
||||
return resolv;
|
||||
}
|
||||
|
||||
@@ -919,8 +918,6 @@ void g_resolv_unref(GResolv *resolv)
|
||||
|
||||
flush_nameservers(resolv);
|
||||
|
||||
- res_nclose(&resolv->res);
|
||||
-
|
||||
g_free(resolv);
|
||||
}
|
||||
|
||||
@@ -1023,24 +1020,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
|
||||
debug(resolv, "hostname %s", hostname);
|
||||
|
||||
if (!resolv->nameserver_list) {
|
||||
- int i;
|
||||
-
|
||||
- for (i = 0; i < resolv->res.nscount; i++) {
|
||||
- char buf[100];
|
||||
- int family = resolv->res.nsaddr_list[i].sin_family;
|
||||
- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
|
||||
-
|
||||
- if (family != AF_INET &&
|
||||
- resolv->res._u._ext.nsaddrs[i]) {
|
||||
- family = AF_INET6;
|
||||
- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
|
||||
+ FILE *f = fopen("/etc/resolv.conf", "r");
|
||||
+ if (f) {
|
||||
+ char line[256], *s;
|
||||
+ int i;
|
||||
+ while (fgets(line, sizeof(line), f)) {
|
||||
+ if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
|
||||
+ continue;
|
||||
+ for (s = &line[11]; isspace(s[0]); s++);
|
||||
+ for (i = 0; s[i] && !isspace(s[i]); i++);
|
||||
+ s[i] = 0;
|
||||
+ g_resolv_add_nameserver(resolv, s, 53, 0);
|
||||
}
|
||||
-
|
||||
- if (family != AF_INET && family != AF_INET6)
|
||||
- continue;
|
||||
-
|
||||
- if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
|
||||
- g_resolv_add_nameserver(resolv, buf, 53, 0);
|
||||
+ fclose(f);
|
||||
}
|
||||
|
||||
if (!resolv->nameserver_list)
|
||||
@@ -0,0 +1,37 @@
|
||||
From d1a5ede5d255bde8ef707f8441b997563b9312bd Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Crandall <ncrandall@tesla.com>
|
||||
Date: Tue, 12 Jul 2022 08:56:34 +0200
|
||||
Subject: gweb: Fix OOB write in received_data()
|
||||
|
||||
There is a mismatch of handling binary vs. C-string data with memchr
|
||||
and strlen, resulting in pos, count, and bytes_read to become out of
|
||||
sync and result in a heap overflow. Instead, do not treat the buffer
|
||||
as an ASCII C-string. We calculate the count based on the return value
|
||||
of memchr, instead of strlen.
|
||||
|
||||
Fixes: CVE-2022-32292
|
||||
|
||||
CVE: CVE-2022-32292
|
||||
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d1a5ede5d255bde8ef707f8441b997563b9312bd]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
gweb/gweb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gweb/gweb.c b/gweb/gweb.c
|
||||
index 12fcb1d8..13c6c5f2 100644
|
||||
--- a/gweb/gweb.c
|
||||
+++ b/gweb/gweb.c
|
||||
@@ -918,7 +918,7 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
|
||||
}
|
||||
|
||||
*pos = '\0';
|
||||
- count = strlen((char *) ptr);
|
||||
+ count = pos - ptr;
|
||||
if (count > 0 && ptr[count - 1] == '\r') {
|
||||
ptr[--count] = '\0';
|
||||
bytes_read--;
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
From 72343929836de80727a27d6744c869dff045757c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 5 Jul 2022 08:32:12 +0200
|
||||
Subject: wispr: Add reference counter to portal context
|
||||
|
||||
Track the connman_wispr_portal_context live time via a
|
||||
refcounter. This only adds the infrastructure to do proper reference
|
||||
counting.
|
||||
|
||||
Fixes: CVE-2022-32293
|
||||
CVE: CVE-2022-32293
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=416bfaff988882c553c672e5bfc2d4f648d29e8a]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/wispr.c | 52 ++++++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 42 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/wispr.c b/src/wispr.c
|
||||
index a07896ca..bde7e63b 100644
|
||||
--- a/src/wispr.c
|
||||
+++ b/src/wispr.c
|
||||
@@ -56,6 +56,7 @@ struct wispr_route {
|
||||
};
|
||||
|
||||
struct connman_wispr_portal_context {
|
||||
+ int refcount;
|
||||
struct connman_service *service;
|
||||
enum connman_ipconfig_type type;
|
||||
struct connman_wispr_portal *wispr_portal;
|
||||
@@ -97,6 +98,11 @@ static char *online_check_ipv4_url = NULL;
|
||||
static char *online_check_ipv6_url = NULL;
|
||||
static bool enable_online_to_ready_transition = false;
|
||||
|
||||
+#define wispr_portal_context_ref(wp_context) \
|
||||
+ wispr_portal_context_ref_debug(wp_context, __FILE__, __LINE__, __func__)
|
||||
+#define wispr_portal_context_unref(wp_context) \
|
||||
+ wispr_portal_context_unref_debug(wp_context, __FILE__, __LINE__, __func__)
|
||||
+
|
||||
static void connman_wispr_message_init(struct connman_wispr_message *msg)
|
||||
{
|
||||
DBG("");
|
||||
@@ -162,9 +168,6 @@ static void free_connman_wispr_portal_context(
|
||||
{
|
||||
DBG("context %p", wp_context);
|
||||
|
||||
- if (!wp_context)
|
||||
- return;
|
||||
-
|
||||
if (wp_context->wispr_portal) {
|
||||
if (wp_context->wispr_portal->ipv4_context == wp_context)
|
||||
wp_context->wispr_portal->ipv4_context = NULL;
|
||||
@@ -201,9 +204,38 @@ static void free_connman_wispr_portal_context(
|
||||
g_free(wp_context);
|
||||
}
|
||||
|
||||
+static struct connman_wispr_portal_context *
|
||||
+wispr_portal_context_ref_debug(struct connman_wispr_portal_context *wp_context,
|
||||
+ const char *file, int line, const char *caller)
|
||||
+{
|
||||
+ DBG("%p ref %d by %s:%d:%s()", wp_context,
|
||||
+ wp_context->refcount + 1, file, line, caller);
|
||||
+
|
||||
+ __sync_fetch_and_add(&wp_context->refcount, 1);
|
||||
+
|
||||
+ return wp_context;
|
||||
+}
|
||||
+
|
||||
+static void wispr_portal_context_unref_debug(
|
||||
+ struct connman_wispr_portal_context *wp_context,
|
||||
+ const char *file, int line, const char *caller)
|
||||
+{
|
||||
+ if (!wp_context)
|
||||
+ return;
|
||||
+
|
||||
+ DBG("%p ref %d by %s:%d:%s()", wp_context,
|
||||
+ wp_context->refcount - 1, file, line, caller);
|
||||
+
|
||||
+ if (__sync_fetch_and_sub(&wp_context->refcount, 1) != 1)
|
||||
+ return;
|
||||
+
|
||||
+ free_connman_wispr_portal_context(wp_context);
|
||||
+}
|
||||
+
|
||||
static struct connman_wispr_portal_context *create_wispr_portal_context(void)
|
||||
{
|
||||
- return g_try_new0(struct connman_wispr_portal_context, 1);
|
||||
+ return wispr_portal_context_ref(
|
||||
+ g_new0(struct connman_wispr_portal_context, 1));
|
||||
}
|
||||
|
||||
static void free_connman_wispr_portal(gpointer data)
|
||||
@@ -215,8 +247,8 @@ static void free_connman_wispr_portal(gpointer data)
|
||||
if (!wispr_portal)
|
||||
return;
|
||||
|
||||
- free_connman_wispr_portal_context(wispr_portal->ipv4_context);
|
||||
- free_connman_wispr_portal_context(wispr_portal->ipv6_context);
|
||||
+ wispr_portal_context_unref(wispr_portal->ipv4_context);
|
||||
+ wispr_portal_context_unref(wispr_portal->ipv6_context);
|
||||
|
||||
g_free(wispr_portal);
|
||||
}
|
||||
@@ -452,7 +484,7 @@ static void portal_manage_status(GWebResult *result,
|
||||
connman_info("Client-Timezone: %s", str);
|
||||
|
||||
if (!enable_online_to_ready_transition)
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
|
||||
__connman_service_ipconfig_indicate_state(service,
|
||||
CONNMAN_SERVICE_STATE_ONLINE, type);
|
||||
@@ -616,7 +648,7 @@ static void wispr_portal_request_wispr_login(struct connman_service *service,
|
||||
return;
|
||||
}
|
||||
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -952,7 +984,7 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
|
||||
|
||||
if (wp_context->token == 0) {
|
||||
err = -EINVAL;
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
} else if (wp_context->timeout == 0) {
|
||||
wp_context->timeout = g_idle_add(no_proxy_callback, wp_context);
|
||||
@@ -1001,7 +1033,7 @@ int __connman_wispr_start(struct connman_service *service,
|
||||
|
||||
/* If there is already an existing context, we wipe it */
|
||||
if (wp_context)
|
||||
- free_connman_wispr_portal_context(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
|
||||
wp_context = create_wispr_portal_context();
|
||||
if (!wp_context)
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
From 416bfaff988882c553c672e5bfc2d4f648d29e8a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <wagi@monom.org>
|
||||
Date: Tue, 5 Jul 2022 09:11:09 +0200
|
||||
Subject: wispr: Update portal context references
|
||||
|
||||
Maintain proper portal context references to avoid UAF.
|
||||
|
||||
Fixes: CVE-2022-32293
|
||||
CVE: CVE-2022-32293
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=72343929836de80727a27d6744c869dff045757c]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/wispr.c | 34 ++++++++++++++++++++++------------
|
||||
1 file changed, 22 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/wispr.c b/src/wispr.c
|
||||
index bde7e63b..84bed33f 100644
|
||||
--- a/src/wispr.c
|
||||
+++ b/src/wispr.c
|
||||
@@ -105,8 +105,6 @@ static bool enable_online_to_ready_transition = false;
|
||||
|
||||
static void connman_wispr_message_init(struct connman_wispr_message *msg)
|
||||
{
|
||||
- DBG("");
|
||||
-
|
||||
msg->has_error = false;
|
||||
msg->current_element = NULL;
|
||||
|
||||
@@ -166,8 +164,6 @@ static void free_wispr_routes(struct connman_wispr_portal_context *wp_context)
|
||||
static void free_connman_wispr_portal_context(
|
||||
struct connman_wispr_portal_context *wp_context)
|
||||
{
|
||||
- DBG("context %p", wp_context);
|
||||
-
|
||||
if (wp_context->wispr_portal) {
|
||||
if (wp_context->wispr_portal->ipv4_context == wp_context)
|
||||
wp_context->wispr_portal->ipv4_context = NULL;
|
||||
@@ -483,9 +479,6 @@ static void portal_manage_status(GWebResult *result,
|
||||
&str))
|
||||
connman_info("Client-Timezone: %s", str);
|
||||
|
||||
- if (!enable_online_to_ready_transition)
|
||||
- wispr_portal_context_unref(wp_context);
|
||||
-
|
||||
__connman_service_ipconfig_indicate_state(service,
|
||||
CONNMAN_SERVICE_STATE_ONLINE, type);
|
||||
|
||||
@@ -546,14 +539,17 @@ static void wispr_portal_request_portal(
|
||||
{
|
||||
DBG("");
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
wp_context->request_id = g_web_request_get(wp_context->web,
|
||||
wp_context->status_url,
|
||||
wispr_portal_web_result,
|
||||
wispr_route_request,
|
||||
wp_context);
|
||||
|
||||
- if (wp_context->request_id == 0)
|
||||
+ if (wp_context->request_id == 0) {
|
||||
wispr_portal_error(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
+ }
|
||||
}
|
||||
|
||||
static bool wispr_input(const guint8 **data, gsize *length,
|
||||
@@ -618,13 +614,15 @@ static void wispr_portal_browser_reply_cb(struct connman_service *service,
|
||||
return;
|
||||
|
||||
if (!authentication_done) {
|
||||
- wispr_portal_error(wp_context);
|
||||
free_wispr_routes(wp_context);
|
||||
+ wispr_portal_error(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Restarting the test */
|
||||
__connman_service_wispr_start(service, wp_context->type);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
|
||||
static void wispr_portal_request_wispr_login(struct connman_service *service,
|
||||
@@ -700,11 +698,13 @@ static bool wispr_manage_message(GWebResult *result,
|
||||
|
||||
wp_context->wispr_result = CONNMAN_WISPR_RESULT_LOGIN;
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
if (__connman_agent_request_login_input(wp_context->service,
|
||||
wispr_portal_request_wispr_login,
|
||||
- wp_context) != -EINPROGRESS)
|
||||
+ wp_context) != -EINPROGRESS) {
|
||||
wispr_portal_error(wp_context);
|
||||
- else
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
+ } else
|
||||
return true;
|
||||
|
||||
break;
|
||||
@@ -753,6 +753,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
if (length > 0) {
|
||||
g_web_parser_feed_data(wp_context->wispr_parser,
|
||||
chunk, length);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -770,6 +771,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
switch (status) {
|
||||
case 000:
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -781,11 +783,14 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
if (g_web_result_get_header(result, "X-ConnMan-Status",
|
||||
&str)) {
|
||||
portal_manage_status(result, wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return false;
|
||||
- } else
|
||||
+ } else {
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->redirect_url, wp_context);
|
||||
+ }
|
||||
|
||||
break;
|
||||
case 300:
|
||||
@@ -798,6 +803,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
!g_web_result_get_header(result, "Location",
|
||||
&redirect)) {
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -808,6 +814,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
wp_context->redirect_url = g_strdup(redirect);
|
||||
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
wp_context->request_id = g_web_request_get(wp_context->web,
|
||||
redirect, wispr_portal_web_result,
|
||||
wispr_route_request, wp_context);
|
||||
@@ -820,6 +827,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
|
||||
break;
|
||||
case 505:
|
||||
+ wispr_portal_context_ref(wp_context);
|
||||
__connman_agent_request_browser(wp_context->service,
|
||||
wispr_portal_browser_reply_cb,
|
||||
wp_context->status_url, wp_context);
|
||||
@@ -832,6 +840,7 @@ static bool wispr_portal_web_result(GWebResult *result, gpointer user_data)
|
||||
wp_context->request_id = 0;
|
||||
done:
|
||||
wp_context->wispr_msg.message_type = -1;
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -890,6 +899,7 @@ static void proxy_callback(const char *proxy, void *user_data)
|
||||
xml_wispr_parser_callback, wp_context);
|
||||
|
||||
wispr_portal_request_portal(wp_context);
|
||||
+ wispr_portal_context_unref(wp_context);
|
||||
}
|
||||
|
||||
static gboolean no_proxy_callback(gpointer user_data)
|
||||
--
|
||||
cgit
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON=/usr/sbin/connmand
|
||||
PIDFILE=/var/run/connmand.pid
|
||||
DESC="Connection Manager"
|
||||
|
||||
if [ -f /etc/default/connman ] ; then
|
||||
. /etc/default/connman
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
do_start() {
|
||||
if [ -f @DATADIR@/connman/wired-setup ] ; then
|
||||
. @DATADIR@/connman/wired-setup
|
||||
fi
|
||||
$DAEMON
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
start-stop-daemon --stop --name connmand --quiet
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC"
|
||||
do_start
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $DESC"
|
||||
do_stop
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo "Restarting $DESC"
|
||||
do_stop
|
||||
sleep 1
|
||||
do_start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,27 @@
|
||||
With binutils 2.27 on at least MIPS, connmand will crash on startup. This
|
||||
appears to be due to the symbol visibilty scripts hiding symbols that stdio
|
||||
looks up at runtime, resulting in it segfaulting.
|
||||
|
||||
This certainly appears to be a bug in binutils 2.27 although the problem has
|
||||
been known about for some time:
|
||||
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=17908
|
||||
|
||||
As the version scripts are only used to hide symbols from plugins we can safely
|
||||
remove the scripts to work around the problem until binutils is fixed.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index d70725c..76ae432 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
|
||||
-src_connmand_LDFLAGS = -Wl,--export-dynamic \
|
||||
- -Wl,--version-script=$(srcdir)/src/connman.ver
|
||||
+src_connmand_LDFLAGS = -Wl,--export-dynamic
|
||||
@@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
|
||||
-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
|
||||
- -Wl,--version-script=$(srcdir)/vpn/vpn.ver
|
||||
+vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic
|
||||
@@ -0,0 +1,20 @@
|
||||
require connman.inc
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
|
||||
file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
|
||||
file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
|
||||
file://connman \
|
||||
file://no-version-scripts.patch \
|
||||
file://CVE-2022-32293_p1.patch \
|
||||
file://CVE-2022-32293_p2.patch \
|
||||
file://CVE-2022-32292.patch \
|
||||
file://0001-gdhcp-Verify-and-sanitize-packet-length-first.patch \
|
||||
file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "79fb40f4fdd5530c45aa8e592fb16ba23d3674f3a98cf10b89a6576f198de589"
|
||||
|
||||
RRECOMMENDS:${PN} = "connman-conf"
|
||||
RCONFLICTS:${PN} = "networkmanager"
|
||||
Reference in New Issue
Block a user