core: remove internal API refs. to user settings
Remove all references to connection scope and user-settings services from the various internal APIs of the daemon. The external DBus API remains unchanged, albeit in stub form for scope stuff.
This commit is contained in:
@@ -406,16 +406,12 @@ nm_utils_call_dispatcher (const char *action,
|
|||||||
|
|
||||||
connection_props = value_hash_create ();
|
connection_props = value_hash_create ();
|
||||||
|
|
||||||
/* Service name */
|
/* Backwards compatibility for the days of user settings services:
|
||||||
if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_USER) {
|
* Claim that this connection is from the system settings service.
|
||||||
value_hash_add_str (connection_props,
|
*/
|
||||||
NMD_CONNECTION_PROPS_SERVICE_NAME,
|
value_hash_add_str (connection_props,
|
||||||
NM_DBUS_SERVICE_USER_SETTINGS);
|
NMD_CONNECTION_PROPS_SERVICE_NAME,
|
||||||
} else if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) {
|
NM_DBUS_SERVICE_SYSTEM_SETTINGS);
|
||||||
value_hash_add_str (connection_props,
|
|
||||||
NMD_CONNECTION_PROPS_SERVICE_NAME,
|
|
||||||
NM_DBUS_SERVICE_SYSTEM_SETTINGS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* path */
|
/* path */
|
||||||
value_hash_add_object_path (connection_props,
|
value_hash_add_object_path (connection_props,
|
||||||
|
@@ -257,7 +257,8 @@ get_property (GObject *object, guint prop_id,
|
|||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_SERVICE_NAME:
|
case PROP_SERVICE_NAME:
|
||||||
nm_active_connection_scope_to_value (priv->connection, value);
|
/* TODO Remove this propery. */
|
||||||
|
g_value_set_string (value, NM_DBUS_SERVICE_SYSTEM_SETTINGS);
|
||||||
break;
|
break;
|
||||||
case PROP_CONNECTION:
|
case PROP_CONNECTION:
|
||||||
g_value_set_boxed (value, nm_connection_get_path (priv->connection));
|
g_value_set_boxed (value, nm_connection_get_path (priv->connection));
|
||||||
|
@@ -39,25 +39,3 @@ nm_active_connection_install_type_info (GObjectClass *klass)
|
|||||||
&dbus_glib_nm_active_connection_object_info);
|
&dbus_glib_nm_active_connection_object_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nm_active_connection_scope_to_value (NMConnection *connection, GValue *value)
|
|
||||||
{
|
|
||||||
if (!connection) {
|
|
||||||
g_value_set_string (value, "");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (nm_connection_get_scope (connection)) {
|
|
||||||
case NM_CONNECTION_SCOPE_SYSTEM:
|
|
||||||
g_value_set_string (value, NM_DBUS_SERVICE_SYSTEM_SETTINGS);
|
|
||||||
break;
|
|
||||||
case NM_CONNECTION_SCOPE_USER:
|
|
||||||
g_value_set_string (value, NM_DBUS_SERVICE_USER_SETTINGS);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
nm_log_err (LOGD_CORE, "unknown connection scope!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -37,6 +37,4 @@ char *nm_active_connection_get_next_object_path (void);
|
|||||||
|
|
||||||
void nm_active_connection_install_type_info (GObjectClass *klass);
|
void nm_active_connection_install_type_info (GObjectClass *klass);
|
||||||
|
|
||||||
void nm_active_connection_scope_to_value (NMConnection *connection, GValue *value);
|
|
||||||
|
|
||||||
#endif /* NM_ACTIVE_CONNECTION_H */
|
#endif /* NM_ACTIVE_CONNECTION_H */
|
||||||
|
@@ -3295,10 +3295,8 @@ dispose (GObject *object)
|
|||||||
NMSettingIP4Config *s_ip4;
|
NMSettingIP4Config *s_ip4;
|
||||||
const char *method = NULL;
|
const char *method = NULL;
|
||||||
|
|
||||||
/* Only system connections can be left up */
|
|
||||||
connection = nm_act_request_get_connection (priv->act_request);
|
connection = nm_act_request_get_connection (priv->act_request);
|
||||||
if ( connection
|
if (connection) {
|
||||||
&& (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM)) {
|
|
||||||
|
|
||||||
/* Only static or DHCP IPv4 connections can be left up.
|
/* Only static or DHCP IPv4 connections can be left up.
|
||||||
* All IPv6 connections can be left up, so we don't have
|
* All IPv6 connections can be left up, so we don't have
|
||||||
|
@@ -337,66 +337,3 @@ out:
|
|||||||
g_free (sender);
|
g_free (sender);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
nm_auth_uid_authorized (gulong uid,
|
|
||||||
NMDBusManager *dbus_mgr,
|
|
||||||
DBusGProxy *user_proxy,
|
|
||||||
const char **out_error_desc)
|
|
||||||
{
|
|
||||||
DBusConnection *connection;
|
|
||||||
DBusError dbus_error;
|
|
||||||
char *service_owner = NULL;
|
|
||||||
const char *service_name;
|
|
||||||
gulong service_uid = G_MAXULONG;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dbus_mgr != NULL, FALSE);
|
|
||||||
g_return_val_if_fail (out_error_desc != NULL, FALSE);
|
|
||||||
|
|
||||||
/* Ensure the request to activate the user connection came from the
|
|
||||||
* same session as the user settings service. FIXME: use ConsoleKit
|
|
||||||
* too.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!user_proxy) {
|
|
||||||
*out_error_desc = "No user settings service available";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
service_name = dbus_g_proxy_get_bus_name (user_proxy);
|
|
||||||
if (!service_name) {
|
|
||||||
*out_error_desc = "Could not determine user settings service name";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
connection = nm_dbus_manager_get_dbus_connection (dbus_mgr);
|
|
||||||
if (!connection) {
|
|
||||||
*out_error_desc = "Could not get the D-Bus system bus";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
service_owner = nm_dbus_manager_get_name_owner (dbus_mgr, service_name, NULL);
|
|
||||||
if (!service_owner) {
|
|
||||||
*out_error_desc = "Could not determine D-Bus owner of the user settings service";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
dbus_error_init (&dbus_error);
|
|
||||||
service_uid = dbus_bus_get_unix_user (connection, service_owner, &dbus_error);
|
|
||||||
g_free (service_owner);
|
|
||||||
|
|
||||||
if (dbus_error_is_set (&dbus_error)) {
|
|
||||||
dbus_error_free (&dbus_error);
|
|
||||||
*out_error_desc = "Could not determine the Unix UID of the sender of the request";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* And finally, the actual UID check */
|
|
||||||
if (uid != service_uid) {
|
|
||||||
*out_error_desc = "Requestor UID does not match the UID of the user settings service";
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -80,10 +80,5 @@ gboolean nm_auth_get_caller_uid (DBusGMethodInvocation *context,
|
|||||||
gulong *out_uid,
|
gulong *out_uid,
|
||||||
const char **out_error_desc);
|
const char **out_error_desc);
|
||||||
|
|
||||||
gboolean nm_auth_uid_authorized (gulong uid,
|
|
||||||
NMDBusManager *dbus_mgr,
|
|
||||||
DBusGProxy *user_proxy,
|
|
||||||
const char **out_error_desc);
|
|
||||||
|
|
||||||
#endif /* NM_MANAGER_AUTH_H */
|
#endif /* NM_MANAGER_AUTH_H */
|
||||||
|
|
||||||
|
@@ -572,9 +572,7 @@ emit_removed (gpointer key, gpointer value, gpointer user_data)
|
|||||||
NMManager *manager = NM_MANAGER (user_data);
|
NMManager *manager = NM_MANAGER (user_data);
|
||||||
NMConnection *connection = NM_CONNECTION (value);
|
NMConnection *connection = NM_CONNECTION (value);
|
||||||
|
|
||||||
g_signal_emit (manager, signals[CONNECTION_REMOVED], 0,
|
g_signal_emit (manager, signals[CONNECTION_REMOVED], 0, connection);
|
||||||
connection,
|
|
||||||
nm_connection_get_scope (connection));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PendingActivation *
|
static PendingActivation *
|
||||||
@@ -755,9 +753,7 @@ remove_connection (NMManager *manager,
|
|||||||
*/
|
*/
|
||||||
g_object_ref (connection);
|
g_object_ref (connection);
|
||||||
g_hash_table_remove (hash, nm_connection_get_path (connection));
|
g_hash_table_remove (hash, nm_connection_get_path (connection));
|
||||||
g_signal_emit (manager, signals[CONNECTION_REMOVED], 0,
|
g_signal_emit (manager, signals[CONNECTION_REMOVED], 0, connection);
|
||||||
connection,
|
|
||||||
nm_connection_get_scope (connection));
|
|
||||||
g_object_unref (connection);
|
g_object_unref (connection);
|
||||||
|
|
||||||
bluez_manager_resync_devices (manager);
|
bluez_manager_resync_devices (manager);
|
||||||
@@ -797,8 +793,7 @@ system_connection_updated_cb (NMSettingsConnectionInterface *connection,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_emit (manager, signals[CONNECTION_UPDATED], 0,
|
g_signal_emit (manager, signals[CONNECTION_UPDATED], 0, existing);
|
||||||
existing, NM_CONNECTION_SCOPE_SYSTEM);
|
|
||||||
|
|
||||||
bluez_manager_resync_devices (manager);
|
bluez_manager_resync_devices (manager);
|
||||||
}
|
}
|
||||||
@@ -1056,7 +1051,7 @@ manager_hidden_ap_found (NMDeviceInterface *device,
|
|||||||
|
|
||||||
/* Look for this AP's BSSID in the seen-bssids list of a connection,
|
/* Look for this AP's BSSID in the seen-bssids list of a connection,
|
||||||
* and if a match is found, copy over the SSID */
|
* and if a match is found, copy over the SSID */
|
||||||
connections = nm_manager_get_connections (manager, NM_CONNECTION_SCOPE_SYSTEM);
|
connections = nm_manager_get_connections (manager);
|
||||||
|
|
||||||
for (iter = connections; iter && !done; iter = g_slist_next (iter)) {
|
for (iter = connections; iter && !done; iter = g_slist_next (iter)) {
|
||||||
NMConnection *connection = NM_CONNECTION (iter->data);
|
NMConnection *connection = NM_CONNECTION (iter->data);
|
||||||
@@ -1515,7 +1510,7 @@ bluez_manager_find_connection (NMManager *manager,
|
|||||||
NMConnection *found = NULL;
|
NMConnection *found = NULL;
|
||||||
GSList *connections, *l;
|
GSList *connections, *l;
|
||||||
|
|
||||||
connections = nm_manager_get_connections (manager, NM_CONNECTION_SCOPE_SYSTEM);
|
connections = nm_manager_get_connections (manager);
|
||||||
|
|
||||||
for (l = connections; l != NULL; l = l->next) {
|
for (l = connections; l != NULL; l = l->next) {
|
||||||
NMConnection *candidate = NM_CONNECTION (l->data);
|
NMConnection *candidate = NM_CONNECTION (l->data);
|
||||||
@@ -1967,8 +1962,6 @@ provider_get_secrets (NMSecretsProviderInterface *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Build up the new secrets request */
|
/* Build up the new secrets request */
|
||||||
g_assert (nm_connection_get_scope (connection) ==
|
|
||||||
NM_CONNECTION_SCOPE_SYSTEM);
|
|
||||||
info = system_get_secrets (self, provider, connection, setting_name,
|
info = system_get_secrets (self, provider, connection, setting_name,
|
||||||
request_new, caller_id, hint1, hint2);
|
request_new, caller_id, hint1, hint2);
|
||||||
|
|
||||||
@@ -2139,9 +2132,7 @@ check_pending_ready (NMManager *self, PendingActivation *pending)
|
|||||||
|
|
||||||
/* Ok, we're authorized */
|
/* Ok, we're authorized */
|
||||||
|
|
||||||
connection = nm_manager_get_connection_by_object_path (self,
|
connection = nm_manager_get_connection_by_object_path (self, pending->connection_path);
|
||||||
NM_CONNECTION_SCOPE_SYSTEM,
|
|
||||||
pending->connection_path);
|
|
||||||
if (!connection) {
|
if (!connection) {
|
||||||
error = g_error_new_literal (NM_MANAGER_ERROR,
|
error = g_error_new_literal (NM_MANAGER_ERROR,
|
||||||
NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
|
NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
|
||||||
@@ -2859,8 +2850,7 @@ connections_to_slist (gpointer key, gpointer value, gpointer user_data)
|
|||||||
* unref the connections in the list and destroy the list.
|
* unref the connections in the list and destroy the list.
|
||||||
*/
|
*/
|
||||||
GSList *
|
GSList *
|
||||||
nm_manager_get_connections (NMManager *manager,
|
nm_manager_get_connections (NMManager *manager)
|
||||||
NMConnectionScope scope)
|
|
||||||
{
|
{
|
||||||
NMManagerPrivate *priv;
|
NMManagerPrivate *priv;
|
||||||
GSList *list = NULL;
|
GSList *list = NULL;
|
||||||
@@ -2868,16 +2858,12 @@ nm_manager_get_connections (NMManager *manager,
|
|||||||
g_return_val_if_fail (NM_IS_MANAGER (manager), NULL);
|
g_return_val_if_fail (NM_IS_MANAGER (manager), NULL);
|
||||||
|
|
||||||
priv = NM_MANAGER_GET_PRIVATE (manager);
|
priv = NM_MANAGER_GET_PRIVATE (manager);
|
||||||
if (scope == NM_CONNECTION_SCOPE_SYSTEM)
|
g_hash_table_foreach (priv->system_connections, connections_to_slist, &list);
|
||||||
g_hash_table_foreach (priv->system_connections, connections_to_slist, &list);
|
|
||||||
else
|
|
||||||
nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope);
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
NMConnection *
|
NMConnection *
|
||||||
nm_manager_get_connection_by_object_path (NMManager *manager,
|
nm_manager_get_connection_by_object_path (NMManager *manager,
|
||||||
NMConnectionScope scope,
|
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
NMManagerPrivate *priv;
|
NMManagerPrivate *priv;
|
||||||
@@ -2887,10 +2873,7 @@ nm_manager_get_connection_by_object_path (NMManager *manager,
|
|||||||
g_return_val_if_fail (path != NULL, NULL);
|
g_return_val_if_fail (path != NULL, NULL);
|
||||||
|
|
||||||
priv = NM_MANAGER_GET_PRIVATE (manager);
|
priv = NM_MANAGER_GET_PRIVATE (manager);
|
||||||
if (scope == NM_CONNECTION_SCOPE_SYSTEM)
|
connection = (NMConnection *) g_hash_table_lookup (priv->system_connections, path);
|
||||||
connection = (NMConnection *) g_hash_table_lookup (priv->system_connections, path);
|
|
||||||
else
|
|
||||||
nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope);
|
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3474,8 +3457,8 @@ nm_manager_class_init (NMManagerClass *manager_class)
|
|||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMManagerClass, connections_added),
|
G_STRUCT_OFFSET (NMManagerClass, connections_added),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__UINT,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 1, G_TYPE_UINT);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
signals[CONNECTION_ADDED] =
|
signals[CONNECTION_ADDED] =
|
||||||
g_signal_new ("connection-added",
|
g_signal_new ("connection-added",
|
||||||
@@ -3483,8 +3466,8 @@ nm_manager_class_init (NMManagerClass *manager_class)
|
|||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMManagerClass, connection_added),
|
G_STRUCT_OFFSET (NMManagerClass, connection_added),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
_nm_marshal_VOID__OBJECT_UINT,
|
g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT);
|
G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||||
|
|
||||||
signals[CONNECTION_UPDATED] =
|
signals[CONNECTION_UPDATED] =
|
||||||
g_signal_new ("connection-updated",
|
g_signal_new ("connection-updated",
|
||||||
@@ -3492,8 +3475,8 @@ nm_manager_class_init (NMManagerClass *manager_class)
|
|||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMManagerClass, connection_updated),
|
G_STRUCT_OFFSET (NMManagerClass, connection_updated),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
_nm_marshal_VOID__OBJECT_UINT,
|
g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT);
|
G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||||
|
|
||||||
signals[CONNECTION_REMOVED] =
|
signals[CONNECTION_REMOVED] =
|
||||||
g_signal_new ("connection-removed",
|
g_signal_new ("connection-removed",
|
||||||
@@ -3501,8 +3484,8 @@ nm_manager_class_init (NMManagerClass *manager_class)
|
|||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMManagerClass, connection_removed),
|
G_STRUCT_OFFSET (NMManagerClass, connection_removed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
_nm_marshal_VOID__OBJECT_UINT,
|
g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT);
|
G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||||
|
|
||||||
signals[CHECK_PERMISSIONS] =
|
signals[CHECK_PERMISSIONS] =
|
||||||
g_signal_new ("check-permissions",
|
g_signal_new ("check-permissions",
|
||||||
|
@@ -60,19 +60,16 @@ typedef struct {
|
|||||||
void (*state_changed) (NMManager *manager, guint state);
|
void (*state_changed) (NMManager *manager, guint state);
|
||||||
void (*properties_changed) (NMManager *manager, GHashTable *properties);
|
void (*properties_changed) (NMManager *manager, GHashTable *properties);
|
||||||
|
|
||||||
void (*connections_added) (NMManager *manager, NMConnectionScope scope);
|
void (*connections_added) (NMManager *manager);
|
||||||
|
|
||||||
void (*connection_added) (NMManager *manager,
|
void (*connection_added) (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection);
|
||||||
NMConnectionScope scope);
|
|
||||||
|
|
||||||
void (*connection_updated) (NMManager *manager,
|
void (*connection_updated) (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection);
|
||||||
NMConnectionScope scope);
|
|
||||||
|
|
||||||
void (*connection_removed) (NMManager *manager,
|
void (*connection_removed) (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection);
|
||||||
NMConnectionScope scope);
|
|
||||||
} NMManagerClass;
|
} NMManagerClass;
|
||||||
|
|
||||||
GType nm_manager_get_type (void);
|
GType nm_manager_get_type (void);
|
||||||
@@ -109,10 +106,9 @@ NMState nm_manager_get_state (NMManager *manager);
|
|||||||
|
|
||||||
/* Connections */
|
/* Connections */
|
||||||
|
|
||||||
GSList *nm_manager_get_connections (NMManager *manager, NMConnectionScope scope);
|
GSList *nm_manager_get_connections (NMManager *manager);
|
||||||
|
|
||||||
NMConnection * nm_manager_get_connection_by_object_path (NMManager *manager,
|
NMConnection * nm_manager_get_connection_by_object_path (NMManager *manager,
|
||||||
NMConnectionScope scope,
|
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|
||||||
GPtrArray * nm_manager_get_active_connections_by_connection (NMManager *manager,
|
GPtrArray * nm_manager_get_active_connections_by_connection (NMManager *manager,
|
||||||
|
@@ -731,7 +731,7 @@ auto_activate_device (gpointer user_data)
|
|||||||
if (nm_device_get_act_request (data->device))
|
if (nm_device_get_act_request (data->device))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
connections = nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_SYSTEM);
|
connections = nm_manager_get_connections (policy->manager);
|
||||||
|
|
||||||
/* Remove connections that are in the invalid list. */
|
/* Remove connections that are in the invalid list. */
|
||||||
iter = connections;
|
iter = connections;
|
||||||
@@ -822,7 +822,7 @@ sleeping_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data)
|
|||||||
|
|
||||||
/* Clear the invalid flag on all connections so they'll get retried on wakeup */
|
/* Clear the invalid flag on all connections so they'll get retried on wakeup */
|
||||||
if (sleeping || !enabled) {
|
if (sleeping || !enabled) {
|
||||||
connections = nm_manager_get_connections (manager, NM_CONNECTION_SCOPE_SYSTEM);
|
connections = nm_manager_get_connections (manager);
|
||||||
for (iter = connections; iter; iter = g_slist_next (iter))
|
for (iter = connections; iter; iter = g_slist_next (iter))
|
||||||
g_object_set_data (G_OBJECT (iter->data), INVALID_TAG, NULL);
|
g_object_set_data (G_OBJECT (iter->data), INVALID_TAG, NULL);
|
||||||
g_slist_free (connections);
|
g_slist_free (connections);
|
||||||
@@ -1036,7 +1036,6 @@ schedule_activate_all (NMPolicy *policy)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
connections_added (NMManager *manager,
|
connections_added (NMManager *manager,
|
||||||
NMConnectionScope scope,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
schedule_activate_all ((NMPolicy *) user_data);
|
schedule_activate_all ((NMPolicy *) user_data);
|
||||||
@@ -1045,7 +1044,6 @@ connections_added (NMManager *manager,
|
|||||||
static void
|
static void
|
||||||
connection_added (NMManager *manager,
|
connection_added (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
NMConnectionScope scope,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
schedule_activate_all ((NMPolicy *) user_data);
|
schedule_activate_all ((NMPolicy *) user_data);
|
||||||
@@ -1054,7 +1052,6 @@ connection_added (NMManager *manager,
|
|||||||
static void
|
static void
|
||||||
connection_updated (NMManager *manager,
|
connection_updated (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
NMConnectionScope scope,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
/* Clear the invalid tag on the connection if it got updated. */
|
/* Clear the invalid tag on the connection if it got updated. */
|
||||||
@@ -1066,7 +1063,6 @@ connection_updated (NMManager *manager,
|
|||||||
static void
|
static void
|
||||||
connection_removed (NMManager *manager,
|
connection_removed (NMManager *manager,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
NMConnectionScope scope,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMSettingConnection *s_con;
|
NMSettingConnection *s_con;
|
||||||
|
@@ -1312,6 +1312,7 @@ nm_sysconfig_settings_new (const char *config_file,
|
|||||||
NMSysconfigSettings *self;
|
NMSysconfigSettings *self;
|
||||||
NMSysconfigSettingsPrivate *priv;
|
NMSysconfigSettingsPrivate *priv;
|
||||||
|
|
||||||
|
/* TODO remove the scope parameter. */
|
||||||
self = g_object_new (NM_TYPE_SYSCONFIG_SETTINGS,
|
self = g_object_new (NM_TYPE_SYSCONFIG_SETTINGS,
|
||||||
NM_SETTINGS_SERVICE_BUS, bus,
|
NM_SETTINGS_SERVICE_BUS, bus,
|
||||||
NM_SETTINGS_SERVICE_SCOPE, NM_CONNECTION_SCOPE_SYSTEM,
|
NM_SETTINGS_SERVICE_SCOPE, NM_CONNECTION_SCOPE_SYSTEM,
|
||||||
|
@@ -1045,7 +1045,8 @@ get_property (GObject *object, guint prop_id,
|
|||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_SERVICE_NAME:
|
case PROP_SERVICE_NAME:
|
||||||
nm_active_connection_scope_to_value (priv->connection, value);
|
/* TODO remove this property */
|
||||||
|
g_value_set_string (value, NM_DBUS_SERVICE_SYSTEM_SETTINGS);
|
||||||
break;
|
break;
|
||||||
case PROP_CONNECTION:
|
case PROP_CONNECTION:
|
||||||
g_value_set_boxed (value, nm_connection_get_path (priv->connection));
|
g_value_set_boxed (value, nm_connection_get_path (priv->connection));
|
||||||
|
Reference in New Issue
Block a user