2008-08-26 Dan Williams <dcbw@redhat.com>

Add connection UUIDs, since connection names can be changed, and since
	old-style connection IDs could change over the life of the connection.  The
	UUID should be assigned at connection creation time, be stable for a given
	connection, and should be unique among all connections for a given settings
	service.

	* configure.in
	  libnm-util/Makefile.am
		- Require libuuid

	* introspection/nm-exported-connection.xml
		- Remove "GetID" method

	* libnm-glib/nm-dbus-connection.c
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Remove id-related stuff

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
	  libnm-util/libnm-util.ver
		- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
			utility functions to generate UUIDs

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Add 'uuid' member to the connection setting
		- (verify): require valid 'uuid' for a valid connection

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.c
		- Remove id-related stuff
		- Give connections UUIDs where needed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-08-27 02:57:21 +00:00
parent d7940bcb9b
commit 81f8f39920
18 changed files with 186 additions and 111 deletions

View File

@@ -1,3 +1,43 @@
2008-08-26 Dan Williams <dcbw@redhat.com>
Add connection UUIDs, since connection names can be changed, and since
old-style connection IDs could change over the life of the connection. The
UUID should be assigned at connection creation time, be stable for a given
connection, and should be unique among all connections for a given settings
service.
* configure.in
libnm-util/Makefile.am
- Require libuuid
* introspection/nm-exported-connection.xml
- Remove "GetID" method
* libnm-glib/nm-dbus-connection.c
libnm-glib/nm-settings.c
libnm-glib/nm-settings.h
- Remove id-related stuff
* libnm-util/nm-utils.c
libnm-util/nm-utils.h
libnm-util/libnm-util.ver
- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
utility functions to generate UUIDs
* libnm-util/nm-setting-connection.c
libnm-util/nm-setting-connection.h
- Add 'uuid' member to the connection setting
- (verify): require valid 'uuid' for a valid connection
* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-suse/nm-suse-connection.c
system-settings/plugins/ifcfg-suse/parser.c
system-settings/plugins/keyfile/nm-keyfile-connection.c
system-settings/src/main.c
- Remove id-related stuff
- Give connections UUIDs where needed
2008-08-25 Dan Williams <dcbw@redhat.com> 2008-08-25 Dan Williams <dcbw@redhat.com>
* libnm-util/crypto_gnutls.c * libnm-util/crypto_gnutls.c

View File

@@ -243,6 +243,10 @@ PKG_CHECK_MODULES(LIBNL, libnl-1 >= 1.0-pre8)
AC_SUBST(LIBNL_CFLAGS) AC_SUBST(LIBNL_CFLAGS)
AC_SUBST(LIBNL_LIBS) AC_SUBST(LIBNL_LIBS)
PKG_CHECK_MODULES(UUID, uuid)
AC_SUBST(UUID_CFLAGS)
AC_SUBST(UUID_LIBS)
PKG_CHECK_MODULES(POLKIT, polkit-dbus) PKG_CHECK_MODULES(POLKIT, polkit-dbus)
##### Find out the version of PolicyKit we're using ##### Find out the version of PolicyKit we're using

View File

@@ -6,17 +6,6 @@
<tp:docstring> <tp:docstring>
Represents a single network connection configuration. Represents a single network connection configuration.
</tp:docstring> </tp:docstring>
<method name="GetID">
<tp:docstring>
Obtain the ID of this connection.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_exported_connection_get_id"/>
<arg name="id" type="s" direction="out">
<tp:docstring>
The ID of this connection.
</tp:docstring>
</arg>
</method>
<method name="Update"> <method name="Update">
<tp:docstring> <tp:docstring>

View File

@@ -52,12 +52,6 @@ get_settings (NMExportedConnection *exported)
return nm_connection_to_hash (nm_exported_connection_get_connection (exported)); return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
} }
static const char *
get_id (NMExportedConnection *exported)
{
return NM_DBUS_CONNECTION_GET_PRIVATE (exported)->path;
}
static void static void
get_secrets (NMExportedConnection *connection, get_secrets (NMExportedConnection *connection,
const gchar *setting_name, const gchar *setting_name,
@@ -279,7 +273,6 @@ nm_dbus_connection_class_init (NMDBusConnectionClass *dbus_connection_class)
object_class->finalize = finalize; object_class->finalize = finalize;
connection_class->get_settings = get_settings; connection_class->get_settings = get_settings;
connection_class->get_id = get_id;
connection_class->get_secrets = get_secrets; connection_class->get_secrets = get_secrets;
connection_class->update = update; connection_class->update = update;
connection_class->delete = delete; connection_class->delete = delete;

View File

@@ -145,9 +145,6 @@ nm_settings_signal_new_connection (NMSettings *settings, NMExportedConnection *c
* NMExportedConnection implementation * NMExportedConnection implementation
*/ */
static gboolean impl_exported_connection_get_id (NMExportedConnection *connection,
gchar **id,
GError **error);
static gboolean impl_exported_connection_get_settings (NMExportedConnection *connection, static gboolean impl_exported_connection_get_settings (NMExportedConnection *connection,
GHashTable **settings, GHashTable **settings,
GError **error); GError **error);
@@ -205,43 +202,6 @@ nm_exported_connection_new (NMConnection *wrapped)
NULL); NULL);
} }
const char *
nm_exported_connection_get_id (NMExportedConnection *connection)
{
NMExportedConnectionPrivate *priv;
NMSettingConnection *s_con;
g_return_val_if_fail (NM_IS_EXPORTED_CONNECTION (connection), NULL);
priv = NM_EXPORTED_CONNECTION_GET_PRIVATE (connection);
if (EXPORTED_CONNECTION_CLASS (connection)->get_id)
return EXPORTED_CONNECTION_CLASS (connection)->get_id (connection);
s_con = (NMSettingConnection *) nm_connection_get_setting (priv->wrapped, NM_TYPE_SETTING_CONNECTION);
if (NM_IS_SETTING_CONNECTION (s_con))
return s_con->id;
return NULL;
}
static gboolean
impl_exported_connection_get_id (NMExportedConnection *connection,
gchar **id,
GError **error)
{
g_return_val_if_fail (NM_IS_EXPORTED_CONNECTION (connection), FALSE);
*id = g_strdup (nm_exported_connection_get_id (connection));
if (!*id) {
g_set_error (error, NM_SETTINGS_ERROR, 1,
"%s.%d - Could not get connection ID.",
__FILE__, __LINE__);
return FALSE;
}
return TRUE;
}
static gboolean static gboolean
impl_exported_connection_get_settings (NMExportedConnection *connection, impl_exported_connection_get_settings (NMExportedConnection *connection,
GHashTable **settings, GHashTable **settings,
@@ -406,7 +366,6 @@ nm_exported_connection_class_init (NMExportedConnectionClass *exported_connectio
object_class->get_property = get_property; object_class->get_property = get_property;
object_class->dispose = nm_exported_connection_dispose; object_class->dispose = nm_exported_connection_dispose;
exported_connection_class->get_id = NULL;
exported_connection_class->get_settings = NULL; exported_connection_class->get_settings = NULL;
exported_connection_class->get_secrets = NULL; exported_connection_class->get_secrets = NULL;

View File

@@ -32,9 +32,8 @@ typedef struct {
GObjectClass parent_class; GObjectClass parent_class;
/* virtual methods */ /* virtual methods */
const gchar *(* get_id) (NMExportedConnection *connection); GHashTable * (*get_settings) (NMExportedConnection *connection);
GHashTable * (* get_settings) (NMExportedConnection *connection); void (*get_secrets) (NMExportedConnection *connection,
void (* get_secrets) (NMExportedConnection *connection,
const gchar *setting_name, const gchar *setting_name,
const gchar **hints, const gchar **hints,
gboolean request_new, gboolean request_new,
@@ -62,8 +61,6 @@ void nm_exported_connection_register_object (NMExportedConnection *connection,
NMConnection *nm_exported_connection_get_connection (NMExportedConnection *connection); NMConnection *nm_exported_connection_get_connection (NMExportedConnection *connection);
const char *nm_exported_connection_get_id (NMExportedConnection *connection);
gboolean nm_exported_connection_update (NMExportedConnection *connection, gboolean nm_exported_connection_update (NMExportedConnection *connection,
GHashTable *new_settings, GHashTable *new_settings,
GError **err); GError **err);

View File

@@ -5,6 +5,7 @@ lib_LTLIBRARIES=libnm-util.la
libnm_util_la_CPPFLAGS = \ libnm_util_la_CPPFLAGS = \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \ $(DBUS_CFLAGS) \
$(UUID_CFLAGS) \
-DDBUS_API_SUBJECT_TO_CHANGE \ -DDBUS_API_SUBJECT_TO_CHANGE \
-DG_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED
@@ -49,7 +50,7 @@ libnm_util_la_SOURCES= \
nm-utils.c \ nm-utils.c \
$(libnm_util_include_HEADERS) $(libnm_util_include_HEADERS)
libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS)
libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver

View File

@@ -120,6 +120,8 @@ global:
nm_utils_string_in_list; nm_utils_string_in_list;
nm_utils_string_list_contains; nm_utils_string_list_contains;
nm_utils_string_slist_validate; nm_utils_string_slist_validate;
nm_utils_uuid_generate;
nm_utils_uuid_generate_from_string;
local: local:
*; *;
}; };

View File

@@ -67,6 +67,7 @@ G_DEFINE_TYPE (NMSettingConnection, nm_setting_connection, NM_TYPE_SETTING)
enum { enum {
PROP_0, PROP_0,
PROP_ID, PROP_ID,
PROP_UUID,
PROP_TYPE, PROP_TYPE,
PROP_AUTOCONNECT, PROP_AUTOCONNECT,
PROP_TIMESTAMP, PROP_TIMESTAMP,
@@ -107,6 +108,20 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
return FALSE; return FALSE;
} }
if (!self->uuid) {
g_set_error (error,
NM_SETTING_CONNECTION_ERROR,
NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
NM_SETTING_CONNECTION_UUID);
return FALSE;
} else if (!strlen (self->uuid)) {
g_set_error (error,
NM_SETTING_CONNECTION_ERROR,
NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
NM_SETTING_CONNECTION_UUID);
return FALSE;
}
if (!self->type) { if (!self->type) {
g_set_error (error, g_set_error (error,
NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR,
@@ -145,6 +160,7 @@ finalize (GObject *object)
NMSettingConnection *self = NM_SETTING_CONNECTION (object); NMSettingConnection *self = NM_SETTING_CONNECTION (object);
g_free (self->id); g_free (self->id);
g_free (self->uuid);
g_free (self->type); g_free (self->type);
G_OBJECT_CLASS (nm_setting_connection_parent_class)->finalize (object); G_OBJECT_CLASS (nm_setting_connection_parent_class)->finalize (object);
@@ -161,6 +177,10 @@ set_property (GObject *object, guint prop_id,
g_free (setting->id); g_free (setting->id);
setting->id = g_value_dup_string (value); setting->id = g_value_dup_string (value);
break; break;
case PROP_UUID:
g_free (setting->uuid);
setting->uuid = g_value_dup_string (value);
break;
case PROP_TYPE: case PROP_TYPE:
g_free (setting->type); g_free (setting->type);
setting->type = g_value_dup_string (value); setting->type = g_value_dup_string (value);
@@ -187,6 +207,9 @@ get_property (GObject *object, guint prop_id,
case PROP_ID: case PROP_ID:
g_value_set_string (value, setting->id); g_value_set_string (value, setting->id);
break; break;
case PROP_UUID:
g_value_set_string (value, setting->uuid);
break;
case PROP_TYPE: case PROP_TYPE:
g_value_set_string (value, setting->type); g_value_set_string (value, setting->type);
break; break;
@@ -223,6 +246,14 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
NULL, NULL,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
g_object_class_install_property
(object_class, PROP_UUID,
g_param_spec_string (NM_SETTING_CONNECTION_UUID,
"UUID",
"Universally unique connection identifier",
NULL,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
g_object_class_install_property g_object_class_install_property
(object_class, PROP_TYPE, (object_class, PROP_TYPE,
g_param_spec_string (NM_SETTING_CONNECTION_TYPE, g_param_spec_string (NM_SETTING_CONNECTION_TYPE,

View File

@@ -54,6 +54,7 @@ GType nm_setting_connection_error_get_type (void);
GQuark nm_setting_connection_error_quark (void); GQuark nm_setting_connection_error_quark (void);
#define NM_SETTING_CONNECTION_ID "id" #define NM_SETTING_CONNECTION_ID "id"
#define NM_SETTING_CONNECTION_UUID "uuid"
#define NM_SETTING_CONNECTION_TYPE "type" #define NM_SETTING_CONNECTION_TYPE "type"
#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect" #define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp" #define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
@@ -62,6 +63,7 @@ typedef struct {
NMSetting parent; NMSetting parent;
char *id; char *id;
char *uuid;
char *type; char *type;
gboolean autoconnect; gboolean autoconnect;
guint64 timestamp; guint64 timestamp;

View File

@@ -35,11 +35,14 @@
#include <glib.h> #include <glib.h>
#include <glib-object.h> #include <glib-object.h>
#include <dbus/dbus-glib.h> #include <dbus/dbus-glib.h>
#include <uuid/uuid.h>
#include "nm-utils.h" #include "nm-utils.h"
#include "NetworkManager.h" #include "NetworkManager.h"
#include "nm-dbus-glib-types.h" #include "nm-dbus-glib-types.h"
#include "nm-setting-ip4-config.h" #include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h" #include "nm-setting-ip6-config.h"
#include "crypto.h"
struct EncodingTriplet struct EncodingTriplet
{ {
@@ -1105,3 +1108,51 @@ nm_utils_ip6_dns_to_gvalue (GSList *list, GValue *value)
g_value_take_boxed (value, dns); g_value_take_boxed (value, dns);
} }
char *
nm_utils_uuid_generate (void)
{
uuid_t uuid;
char *buf;
buf = g_malloc0 (37);
uuid_generate_random (uuid);
uuid_unparse_lower (uuid, &buf[0]);
return buf;
}
char *
nm_utils_uuid_generate_from_string (const char *s)
{
GError *error = NULL;
uuid_t *uuid;
char *buf = NULL;
if (!crypto_init (&error)) {
nm_warning ("error initializing crypto: (%d) %s",
error ? error->code : 0,
error ? error->message : "unknown");
if (error)
g_error_free (error);
return NULL;
}
uuid = g_malloc0 (sizeof (uuid));
if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (uuid), &error)) {
nm_warning ("error generating UUID: (%d) %s",
error ? error->code : 0,
error ? error->message : "unknown");
if (error)
g_error_free (error);
goto out;
}
buf = g_malloc0 (37);
uuid_unparse_lower (*uuid, &buf[0]);
out:
g_free (uuid);
crypto_deinit ();
return buf;
}

View File

@@ -196,4 +196,7 @@ void nm_utils_ip6_addresses_to_gvalue (GSList *list, GValue *value);
GSList *nm_utils_ip6_dns_from_gvalue (const GValue *value); GSList *nm_utils_ip6_dns_from_gvalue (const GValue *value);
void nm_utils_ip6_dns_to_gvalue (GSList *list, GValue *value); void nm_utils_ip6_dns_to_gvalue (GSList *list, GValue *value);
char *nm_utils_uuid_generate (void);
char *nm_utils_uuid_generate_from_string (const char *s);
#endif /* NM_UTILS_H */ #endif /* NM_UTILS_H */

View File

@@ -318,12 +318,6 @@ get_settings (NMExportedConnection *exported)
return nm_connection_to_hash (nm_exported_connection_get_connection (exported)); return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
} }
static const char *
get_id (NMExportedConnection *exported)
{
return NM_IFCFG_CONNECTION_GET_PRIVATE (exported)->filename;
}
static gboolean static gboolean
update (NMExportedConnection *exported, GHashTable *new_settings, GError **error) update (NMExportedConnection *exported, GHashTable *new_settings, GError **error)
{ {
@@ -448,7 +442,6 @@ nm_ifcfg_connection_class_init (NMIfcfgConnectionClass *ifcfg_connection_class)
object_class->finalize = finalize; object_class->finalize = finalize;
connection_class->get_settings = get_settings; connection_class->get_settings = get_settings;
connection_class->get_id = get_id;
connection_class->update = update; connection_class->update = update;
connection_class->delete = delete; connection_class->delete = delete;

View File

@@ -111,6 +111,8 @@ make_connection_setting (const char *file,
s_con->type = g_strdup (type); s_con->type = g_strdup (type);
s_con->uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName);
/* Be somewhat conservative about autoconnect */ /* Be somewhat conservative about autoconnect */
if (svTrueValue (ifcfg, "ONBOOT", FALSE)) if (svTrueValue (ifcfg, "ONBOOT", FALSE))
s_con->autoconnect = TRUE; s_con->autoconnect = TRUE;

View File

@@ -100,12 +100,6 @@ get_settings (NMExportedConnection *exported)
return nm_connection_to_hash (nm_exported_connection_get_connection (exported)); return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
} }
static const char *
get_id (NMExportedConnection *exported)
{
return NM_SUSE_CONNECTION_GET_PRIVATE (exported)->filename;
}
static gboolean static gboolean
update (NMExportedConnection *exported, update (NMExportedConnection *exported,
GHashTable *new_settings, GHashTable *new_settings,
@@ -165,7 +159,6 @@ nm_suse_connection_class_init (NMSuseConnectionClass *suse_connection_class)
object_class->finalize = finalize; object_class->finalize = finalize;
connection_class->get_settings = get_settings; connection_class->get_settings = get_settings;
connection_class->get_id = get_id;
connection_class->update = update; connection_class->update = update;
connection_class->delete = delete; connection_class->delete = delete;
} }

View File

@@ -85,6 +85,8 @@ make_connection_setting (shvarFile *file,
s_con->type = g_strdup (type); s_con->type = g_strdup (type);
s_con->uuid = nm_utils_uuid_generate_from_string (file->fileName);
str = svGetValue (file, "STARTMODE"); str = svGetValue (file, "STARTMODE");
if (str && !g_ascii_strcasecmp (str, "manual")) if (str && !g_ascii_strcasecmp (str, "manual"))
s_con->autoconnect = FALSE; s_con->autoconnect = FALSE;

View File

@@ -3,6 +3,9 @@
#include <string.h> #include <string.h>
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include <NetworkManager.h> #include <NetworkManager.h>
#include <nm-setting-connection.h>
#include <nm-utils.h>
#include "nm-keyfile-connection.h" #include "nm-keyfile-connection.h"
#include "reader.h" #include "reader.h"
#include "writer.h" #include "writer.h"
@@ -46,12 +49,6 @@ get_settings (NMExportedConnection *exported)
return nm_connection_to_hash (nm_exported_connection_get_connection (exported)); return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
} }
static const char *
get_id (NMExportedConnection *exported)
{
return NM_KEYFILE_CONNECTION_GET_PRIVATE (exported)->filename;
}
static gboolean static gboolean
update (NMExportedConnection *exported, update (NMExportedConnection *exported,
GHashTable *new_settings, GHashTable *new_settings,
@@ -95,6 +92,7 @@ constructor (GType type,
GObject *object; GObject *object;
NMKeyfileConnectionPrivate *priv; NMKeyfileConnectionPrivate *priv;
NMConnection *wrapped; NMConnection *wrapped;
NMSettingConnection *s_con;
object = G_OBJECT_CLASS (nm_keyfile_connection_parent_class)->constructor (type, n_construct_params, construct_params); object = G_OBJECT_CLASS (nm_keyfile_connection_parent_class)->constructor (type, n_construct_params, construct_params);
@@ -112,6 +110,20 @@ constructor (GType type,
if (!wrapped) if (!wrapped)
goto err; goto err;
/* if for some reason the connection didn't have a UUID, add one */
s_con = (NMSettingConnection *) nm_connection_get_setting (wrapped, NM_TYPE_SETTING_CONNECTION);
if (s_con && !s_con->uuid) {
GError *error = NULL;
s_con->uuid = nm_utils_uuid_generate ();
if (!write_connection (wrapped, &error)) {
g_warning ("Couldn't update connection %s with a UUID: (%d) %s",
s_con->id, error ? error->code : 0,
error ? error->message : "unknown");
g_error_free (error);
}
}
g_object_set (object, NM_EXPORTED_CONNECTION_CONNECTION, wrapped, NULL); g_object_set (object, NM_EXPORTED_CONNECTION_CONNECTION, wrapped, NULL);
g_object_unref (wrapped); g_object_unref (wrapped);
@@ -181,7 +193,6 @@ nm_keyfile_connection_class_init (NMKeyfileConnectionClass *keyfile_connection_c
object_class->finalize = finalize; object_class->finalize = finalize;
connection_class->get_settings = get_settings; connection_class->get_settings = get_settings;
connection_class->get_id = get_id;
connection_class->update = update; connection_class->update = update;
connection_class->delete = delete; connection_class->delete = delete;

View File

@@ -40,6 +40,7 @@
#include <nm-setting-wired.h> #include <nm-setting-wired.h>
#include <nm-setting-pppoe.h> #include <nm-setting-pppoe.h>
#include <nm-settings.h> #include <nm-settings.h>
#include <nm-utils.h>
#include <NetworkManager.h> #include <NetworkManager.h>
#include "dbus-settings.h" #include "dbus-settings.h"
@@ -365,6 +366,7 @@ add_default_dhcp_connection (gpointer user_data)
s_con->id = g_strdup_printf (_("Auto %s"), info->iface); s_con->id = g_strdup_printf (_("Auto %s"), info->iface);
s_con->type = g_strdup (NM_SETTING_WIRED_SETTING_NAME); s_con->type = g_strdup (NM_SETTING_WIRED_SETTING_NAME);
s_con->autoconnect = TRUE; s_con->autoconnect = TRUE;
s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (wrapped, NM_SETTING (s_con)); nm_connection_add_setting (wrapped, NM_SETTING (s_con));
g_message ("Adding default connection '%s' for %s", s_con->id, info->udi); g_message ("Adding default connection '%s' for %s", s_con->id, info->udi);