Merge remote branch 'origin/master' into zvm

This commit is contained in:
Dan Williams 2010-07-12 17:49:59 -07:00
commit ecb6c69d2b
14 changed files with 576 additions and 134 deletions

View file

@ -423,6 +423,16 @@ fi
AC_DEFINE_UNQUOTED(SYSTEM_CA_PATH, "$SYSTEM_CA_PATH", [Define to path to system CA certificates])
AC_SUBST(SYSTEM_CA_PATH)
AC_ARG_WITH(kernel-firmware-dir, AS_HELP_STRING([--with-kernel-firmware-dir=DIR], [where kernel firmware directory is (default is /lib/firmware)]))
if test -n "$with_kernel_firmware_dir" ; then
KERNEL_FIRMWARE_DIR="$with_kernel_firmware_dir"
else
KERNEL_FIRMWARE_DIR="/lib/firmware"
fi
AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory])
AC_SUBST(KERNEL_FIRMWARE_DIR)
NM_COMPILER_WARNINGS
GTK_DOC_CHECK(1.0)

View file

@ -48,6 +48,7 @@
#define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings"
#define NM_DBUS_SERVICE_SYSTEM_SETTINGS "org.freedesktop.NetworkManagerSystemSettings"
#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManagerSettings"
#define NM_DBUS_IFACE_SETTINGS_SECRETS "org.freedesktop.NetworkManagerSettings.Secrets"
#define NM_DBUS_IFACE_SETTINGS_SYSTEM "org.freedesktop.NetworkManagerSettings.System"
#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManagerSettings"

View file

@ -43,5 +43,54 @@
</signal>
</interface>
<interface name="org.freedesktop.NetworkManagerSettings.Secrets">
<tp:docstring>
Secrets have a separate interface so that they can be locked down via
D-Bus policy configuration.
</tp:docstring>
<method name="GetSecretsForConnection">
<tp:docstring>
Get the secrets for the requested connection. If the connection is
provided by the settings service, it should save the updated secrets
if they are changed by the user. If the connection is not provided
by the settings service, the new secrets will be saved by the settings
service that provides the connection.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_get_secrets_for_connection"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="service_name" type="s" direction="in">
<tp:docstring>
The D-Bus service name of the settings service that provides this connection.
</tp:docstring>
</arg>
<arg name="connection" type="o" direction="in">
<tp:docstring>
Object path of the connection.
</tp:docstring>
</arg>
<arg name="setting_name" type="s" direction="in">
<tp:docstring>
Name of the setting for which secrets are requested.
</tp:docstring>
</arg>
<arg name="hints" type="as" direction="in">
<tp:docstring>
Array of strings of key names in the Setting for which NM thinks
a secrets may be required.
</tp:docstring>
</arg>
<arg name="secrets" type="a{sa{sv}}" direction="out" tp:type="String_String_Variant_Map_Map">
<tp:docstring>
Nested settings maps containing secrets. Each setting MUST contain at
least the 'name' field, containing the name of the setting, and one or
more secrets.
</tp:docstring>
</arg>
</method>
</interface>
</node>

View file

@ -139,6 +139,7 @@ global:
nm_settings_interface_error_get_type;
nm_settings_interface_error_quark;
nm_settings_interface_get_connection_by_path;
nm_settings_interface_get_secrets_for_connection;
nm_settings_interface_get_type;
nm_settings_interface_list_connections;
nm_settings_service_export;

View file

@ -143,6 +143,48 @@ nm_settings_interface_add_connection (NMSettingsInterface *settings,
return FALSE;
}
/**
* nm_settings_interface_get_secrets_for_connection:
* @settings: a object implementing %NMSettingsInterface
* @settings_service: name of the settings service providing this connection
* @connection_path: object path of the connection provided by @settings_service
* @setting_name: the name of the setting for which to get secrets
* @hints: a list of hints
* @callback: function to call when the operation is complete
* @user_data: context-specific data passed to @callback
*
* Requests that the settings service get the secrets for the requested connection.
*
* Returns: TRUE if the request was successful, FALSE if it failed
**/
gboolean
nm_settings_interface_get_secrets_for_connection (NMSettingsInterface *settings,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
NMSettingsGetSecretsForConnectionFunc callback,
gpointer user_data)
{
g_return_val_if_fail (settings != NULL, FALSE);
g_return_val_if_fail (NM_IS_SETTINGS_INTERFACE (settings), FALSE);
g_return_val_if_fail (connection_path != NULL, FALSE);
g_return_val_if_fail (setting_name != NULL, FALSE);
g_return_val_if_fail (hints != NULL, FALSE);
g_return_val_if_fail (callback != NULL, FALSE);
if (NM_SETTINGS_INTERFACE_GET_INTERFACE (settings)->get_secrets_for_connection) {
return NM_SETTINGS_INTERFACE_GET_INTERFACE (settings)->get_secrets_for_connection (settings,
settings_service,
connection_path,
setting_name,
hints,
callback,
user_data);
}
return FALSE;
}
/*****************************************************************/
static void

View file

@ -60,6 +60,11 @@ typedef void (*NMSettingsAddConnectionFunc) (NMSettingsInterface *settings,
GError *error,
gpointer user_data);
typedef void (*NMSettingsGetSecretsForConnectionFunc) (NMSettingsInterface *settings,
GHashTable *secrets,
GError *error,
gpointer user_data);
struct _NMSettingsInterface {
GTypeInterface g_iface;
@ -81,13 +86,21 @@ struct _NMSettingsInterface {
void (*connections_read) (NMSettingsInterface *settings);
/* Function */
gboolean (*get_secrets_for_connection) (NMSettingsInterface *self,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
NMSettingsGetSecretsForConnectionFunc callback,
gpointer user_data);
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
};
GType nm_settings_interface_get_type (void);
@ -103,6 +116,14 @@ gboolean nm_settings_interface_add_connection (NMSettingsInterface *settings,
NMSettingsAddConnectionFunc callback,
gpointer user_data);
gboolean nm_settings_interface_get_secrets_for_connection (NMSettingsInterface *settings,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
NMSettingsGetSecretsForConnectionFunc callback,
gpointer user_data);
G_END_DECLS
#endif /* NM_SETTINGS_INTERFACE_H */

View file

@ -36,6 +36,13 @@ static void impl_settings_add_connection (NMSettingsService *self,
GHashTable *settings,
DBusGMethodInvocation *context);
static void impl_settings_get_secrets_for_connection (NMSettingsService *self,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
DBusGMethodInvocation *context);
#include "nm-settings-glue.h"
static void settings_interface_init (NMSettingsInterface *class);
@ -219,6 +226,49 @@ impl_settings_add_connection (NMSettingsService *self,
g_object_unref (tmp);
}
static void
dbus_get_secrets_cb (NMSettingsInterface *settings,
GHashTable *secrets,
GError *error,
gpointer user_data)
{
DBusGMethodInvocation *context = user_data;
if (error)
dbus_g_method_return_error (context, error);
else
dbus_g_method_return (context, secrets);
}
static void
impl_settings_get_secrets_for_connection (NMSettingsService *self,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
DBusGMethodInvocation *context)
{
GError *error = NULL;
if (NM_SETTINGS_SERVICE_GET_CLASS (self)->get_secrets_for_connection)
NM_SETTINGS_SERVICE_GET_CLASS (self)->get_secrets_for_connection (self,
settings_service,
connection_path,
setting_name,
hints,
context,
dbus_get_secrets_cb,
context);
else {
error = g_error_new (NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
"%s: %s:%d get_secrets_for_connection() not implemented",
__func__, __FILE__, __LINE__);
dbus_g_method_return_error (context, error);
g_error_free (error);
}
}
void
nm_settings_service_export_connection (NMSettingsService *self,
NMSettingsConnectionInterface *connection)

View file

@ -58,13 +58,21 @@ typedef struct {
NMSettingsAddConnectionFunc callback,
gpointer user_data);
void (*get_secrets_for_connection) (NMSettingsService *self,
const char *settings_service,
const char *connection_path,
const char *setting_name,
const char **hints,
DBusGMethodInvocation *context,
NMSettingsGetSecretsForConnectionFunc callback,
gpointer user_data);
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
} NMSettingsServiceClass;
GType nm_settings_service_get_type (void);

266
po/es.po
View file

@ -7,16 +7,18 @@
# Antonio Ognio <antonio@linux.org.pe>, 2004.
# Francisco Javier F. Serrador <serrador@cvs.gnome.org>, 2004, 2005, 2006.
# Lucas Vieites Fariña <lucas@asixinformatica.com>, 2005, 2006.
# Jorge González <jorgegonz@svn.gnome.org>, 2007, 2008, 2010.
# Gladys Guerrero <gguerrer@redhat.com>, 2010.
# Jorge González <jorgegonz@svn.gnome.org>, 2007, 2008, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: es\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-06 14:31+0530\n"
"PO-Revision-Date: 2010-05-07 14:32+1000\n"
"Last-Translator: Gladys Guerrero <gguerrer@redhat.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"Project-Id-Version: NetworkManager.HEAD\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=NetworkManager&component=general\n"
"POT-Creation-Date: 2010-06-28 08:52+0000\n"
"PO-Revision-Date: 2010-07-11 10:42+0200\n"
"Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n"
"Language-Team: Español <gnome-es-list@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -146,19 +148,19 @@ msgstr "nunca"
#: ../cli/src/connections.c:602 ../cli/src/connections.c:605
#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539
#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542
#: ../cli/src/devices.c:543 ../cli/src/settings.c:504
#: ../cli/src/settings.c:544 ../cli/src/settings.c:643
#: ../cli/src/settings.c:912 ../cli/src/settings.c:913
#: ../cli/src/settings.c:915 ../cli/src/settings.c:917
#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043
#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123
#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125
#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127
#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129
#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131
#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133
#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135
#: ../cli/src/settings.c:1210
#: ../cli/src/devices.c:543 ../cli/src/settings.c:508
#: ../cli/src/settings.c:551 ../cli/src/settings.c:652
#: ../cli/src/settings.c:926 ../cli/src/settings.c:927
#: ../cli/src/settings.c:929 ../cli/src/settings.c:931
#: ../cli/src/settings.c:1056 ../cli/src/settings.c:1057
#: ../cli/src/settings.c:1058 ../cli/src/settings.c:1137
#: ../cli/src/settings.c:1138 ../cli/src/settings.c:1139
#: ../cli/src/settings.c:1140 ../cli/src/settings.c:1141
#: ../cli/src/settings.c:1142 ../cli/src/settings.c:1143
#: ../cli/src/settings.c:1144 ../cli/src/settings.c:1145
#: ../cli/src/settings.c:1146 ../cli/src/settings.c:1147
#: ../cli/src/settings.c:1148 ../cli/src/settings.c:1149
#: ../cli/src/settings.c:1224
msgid "yes"
msgstr "sí"
@ -166,19 +168,19 @@ msgstr "sí"
#: ../cli/src/connections.c:602 ../cli/src/connections.c:605
#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539
#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542
#: ../cli/src/devices.c:543 ../cli/src/settings.c:504
#: ../cli/src/settings.c:506 ../cli/src/settings.c:544
#: ../cli/src/settings.c:643 ../cli/src/settings.c:912
#: ../cli/src/settings.c:913 ../cli/src/settings.c:915
#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042
#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044
#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124
#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126
#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128
#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130
#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132
#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134
#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210
#: ../cli/src/devices.c:543 ../cli/src/settings.c:508
#: ../cli/src/settings.c:510 ../cli/src/settings.c:551
#: ../cli/src/settings.c:652 ../cli/src/settings.c:926
#: ../cli/src/settings.c:927 ../cli/src/settings.c:929
#: ../cli/src/settings.c:931 ../cli/src/settings.c:1056
#: ../cli/src/settings.c:1057 ../cli/src/settings.c:1058
#: ../cli/src/settings.c:1137 ../cli/src/settings.c:1138
#: ../cli/src/settings.c:1139 ../cli/src/settings.c:1140
#: ../cli/src/settings.c:1141 ../cli/src/settings.c:1142
#: ../cli/src/settings.c:1143 ../cli/src/settings.c:1144
#: ../cli/src/settings.c:1145 ../cli/src/settings.c:1146
#: ../cli/src/settings.c:1147 ../cli/src/settings.c:1148
#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1224
msgid "no"
msgstr "no"
@ -267,7 +269,7 @@ msgstr "activada"
#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125
#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224
#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92
#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469
#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:473
msgid "unknown"
msgstr "desconocido"
@ -1066,78 +1068,79 @@ msgstr "Error: No se pudo conectar al NetworkManager."
msgid "Success"
msgstr "Éxito"
#: ../cli/src/settings.c:407
#: ../cli/src/settings.c:411
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (clave-hex-ascii)"
#: ../cli/src/settings.c:409
#: ../cli/src/settings.c:413
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (frase de acceso 104/128-bits)"
#: ../cli/src/settings.c:412
#: ../cli/src/settings.c:416
#, c-format
msgid "%d (unknown)"
msgstr "%d (desconocido)"
#: ../cli/src/settings.c:438
#: ../cli/src/settings.c:442
msgid "0 (unknown)"
msgstr "0 (desconocido)"
#: ../cli/src/settings.c:444
#: ../cli/src/settings.c:448
msgid "any, "
msgstr "cualquiera,"
#: ../cli/src/settings.c:446
#: ../cli/src/settings.c:450
msgid "900 MHz, "
msgstr "900 MHz, "
#: ../cli/src/settings.c:448
#: ../cli/src/settings.c:452
msgid "1800 MHz, "
msgstr "1800 MHz, "
#: ../cli/src/settings.c:450
#: ../cli/src/settings.c:454
msgid "1900 MHz, "
msgstr "1900 MHz, "
#: ../cli/src/settings.c:452
#: ../cli/src/settings.c:456
msgid "850 MHz, "
msgstr "850 MHz, "
#: ../cli/src/settings.c:454
#: ../cli/src/settings.c:458
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
#: ../cli/src/settings.c:456
#: ../cli/src/settings.c:460
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
#: ../cli/src/settings.c:458
#: ../cli/src/settings.c:462
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
#: ../cli/src/settings.c:460
#: ../cli/src/settings.c:464
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
#: ../cli/src/settings.c:462
#: ../cli/src/settings.c:466
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
#: ../cli/src/settings.c:464
#: ../cli/src/settings.c:468
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
#: ../cli/src/settings.c:466
#: ../cli/src/settings.c:470
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
#: ../cli/src/settings.c:546 ../cli/src/settings.c:708
#: ../cli/src/settings.c:554 ../cli/src/settings.c:721
msgid "auto"
msgstr "auto"
#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172
#: ../cli/src/settings.c:716 ../cli/src/settings.c:719
#: ../cli/src/settings.c:720 ../cli/src/utils.c:172
msgid "not set"
msgstr "no establecido"
@ -1199,7 +1202,8 @@ msgstr "Archivo PEM mal formado: no se encontró IV en la etiqueta DEK-Info."
#: ../libnm-util/crypto.c:190
#, c-format
msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
msgstr "Archivo PEM mal formado: formato de IV no válido en la etiqueta DEK-Info."
msgstr ""
"Archivo PEM mal formado: formato de IV no válido en la etiqueta DEK-Info."
#: ../libnm-util/crypto.c:203
#, c-format
@ -1495,13 +1499,114 @@ msgstr "No pudo asignar memoria para escribir IV al archivo PEM."
#: ../libnm-util/nm-utils.c:2059
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr "No se pudo asignar memoria para escribir llave encriptada al archivo PEM."
msgstr ""
"No se pudo asignar memoria para escribir llave encriptada al archivo PEM."
#: ../libnm-util/nm-utils.c:2078
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "No se pudo reservar memoria para el archivo de datos PEM."
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1
msgid "Connection sharing via a protected WiFi network"
msgstr "Compartir conexión a través de una red WIFI protegida"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2
msgid "Connection sharing via an open WiFi network"
msgstr "Compartir conexión a través de una red WIFI abierta"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3
msgid "Modify persistent system hostname"
msgstr "Modificar nombre de host de sistema persistente"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4
msgid "Modify system connections"
msgstr "Modificar conexiones de sistema"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5
msgid "System policy prevents modification of system settings"
msgstr "Política de sistema evita modificación de configuración de sistema"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6
msgid "System policy prevents modification of the persistent system hostname"
msgstr ""
"Política de sistema evita modificación de nombre de host de sistema "
"persistente"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7
msgid "System policy prevents sharing connections via a protected WiFi network"
msgstr ""
"Política de sistema evita compartir conexiones a través de una red WIFI "
"protegida"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8
msgid "System policy prevents sharing connections via an open WiFi network"
msgstr ""
"Política de sistema evita compartir conexiones a través de una red WIFI "
"abierta"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
msgid "Allow control of network connections"
msgstr "Permitir controlar las conexiones de red"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
msgid "Allow use of user-specific connections"
msgstr "Permitir el uso de conexiones específicas de usuario"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
msgid "Enable or disable WiFi devices"
msgstr "Activar o desactivar los dispositivos inalámbricos"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
msgid "Enable or disable mobile broadband devices"
msgstr "Activar o desactivar los dispositivos de banda ancha móvil"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
msgid "Enable or disable system networking"
msgstr "Activar o desactivar la red del sistema"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
msgid ""
"Put NetworkManager to sleep or wake it up (should only be used by system "
"power management)"
msgstr ""
"Poner NetworkManager a dormir o despertarlo (sólo lo debería usar el gestor "
"de energía del sistema)"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
#| msgid "System policy prevents modification of system settings"
msgid "System policy prevents control of network connections"
msgstr "La política de sistema evita el control de las conexiones de red"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
#| msgid "System policy prevents sharing connections via an open WiFi network"
msgid "System policy prevents enabling or disabling WiFi devices"
msgstr ""
"La política de sistema evita activar o desactivar los dispositivos "
"inalámbricos"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
msgid "System policy prevents enabling or disabling mobile broadband devices"
msgstr ""
"La política del sistema evita activar o desactivar los dispositivos de banda "
"ancha móvil"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
#| msgid "System policy prevents modification of system settings"
msgid "System policy prevents enabling or disabling system networking"
msgstr "La política del sistema evita activar o desactivar la red del sistema"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
msgid "System policy prevents putting NetworkManager to sleep or waking it up"
msgstr ""
"La política del sistema evita poner a NetworkManager a dormir o despertarlo"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
#| msgid "System policy prevents modification of system settings"
msgid "System policy prevents use of user-specific connections"
msgstr ""
"La política del sistema evita el uso de conexiones específicas de usuario"
#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
#: ../src/nm-netlink-monitor.c:653
#, c-format
@ -1515,7 +1620,8 @@ msgstr "ha ocurrido un error mientras esperaban datos en un socket"
#: ../src/nm-netlink-monitor.c:254
#, c-format
msgid "unable to connect to netlink for monitoring link status: %s"
msgstr "no se puede conectar con netlink para monitorizar el estado del enlace: %s"
msgstr ""
"no se puede conectar con netlink para monitorizar el estado del enlace: %s"
#: ../src/nm-netlink-monitor.c:265
#, c-format
@ -1549,9 +1655,10 @@ msgstr "error al actualizar el enlace caché: %s"
#: ../src/main.c:502
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr "Opción no válida. Use --help para ver una lista de las opciones válidas.\n"
msgstr ""
"Opción no válida. Use --help para ver una lista de las opciones válidas.\n"
#: ../src/main.c:562
#: ../src/main.c:568
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Por favor use --help para ver la lista de opciones válidas.\n"
@ -1596,13 +1703,13 @@ msgstr "Nivel de registro desconocido '%s'"
msgid "Unknown log domain '%s'"
msgstr "Dominio de registro desconocido '%s'"
#: ../src/named-manager/nm-named-manager.c:343
#: ../src/named-manager/nm-named-manager.c:350
msgid "NOTE: the libc resolver may not support more than 3 nameservers."
msgstr ""
"NOTA: el 'resolver' de nombres de libc puede que no soporte más de 3 "
"servidores de nombres."
#: ../src/named-manager/nm-named-manager.c:345
#: ../src/named-manager/nm-named-manager.c:352
msgid "The nameservers listed below may not be recognized."
msgstr "Puede que los servidores de nombres listados abajo no se reconozcan."
@ -1611,45 +1718,6 @@ msgstr "Puede que los servidores de nombres listados abajo no se reconozcan."
msgid "Auto %s"
msgstr "Auto %ss"
#: ../system-settings/plugins/ifcfg-rh/reader.c:3256
#: ../system-settings/plugins/ifcfg-rh/reader.c:3275
msgid "System"
msgstr "Sistema"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1
msgid "Connection sharing via a protected WiFi network"
msgstr "Compartir conexión a través de una red WIFI protegida"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2
msgid "Connection sharing via an open WiFi network"
msgstr "Compartir conexión a través de una red WIFI abierta"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3
msgid "Modify persistent system hostname"
msgstr "Modificar nombre de host de sistema persistente"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4
msgid "Modify system connections"
msgstr "Modificar conexiones de sistema"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5
msgid "System policy prevents modification of system settings"
msgstr "Política de sistema evita modificación de configuración de sistema"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6
msgid "System policy prevents modification of the persistent system hostname"
msgstr ""
"Política de sistema evita modificación de nombre de host de sistema "
"persistente"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7
msgid "System policy prevents sharing connections via a protected WiFi network"
msgstr ""
"Política de sistema evita compartir conexiones a través de una red WIFI "
"protegida"
#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8
msgid "System policy prevents sharing connections via an open WiFi network"
msgstr ""
"Política de sistema evita compartir conexiones a través de una red WIFI "
"abierta"

View file

@ -44,9 +44,7 @@ G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT)
#define NM_DHCP_DHCLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientPrivate))
#if defined(TARGET_DEBIAN)
#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp3"
#elif defined(TARGET_SUSE) || defined(TARGET_MANDRIVA)
#if defined(TARGET_DEBIAN) || defined(TARGET_SUSE) || defined(TARGET_MANDRIVA)
#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp"
#else
#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhclient"
@ -438,9 +436,7 @@ create_dhclient_config (const char *iface,
#if defined(TARGET_SUSE)
orig = g_strdup (SYSCONFDIR "/dhclient.conf");
#elif defined(TARGET_DEBIAN)
orig = g_strdup (SYSCONFDIR "/dhcp3/dhclient.conf");
#elif defined(TARGET_GENTOO)
#elif defined(TARGET_DEBIAN) || defined(TARGET_GENTOO)
orig = g_strdup (SYSCONFDIR "/dhcp/dhclient.conf");
#else
orig = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", iface);

View file

@ -42,4 +42,8 @@ void nm_device_handle_autoip4_event (NMDevice *self,
gboolean nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6);
gboolean nm_device_get_firmware_missing (NMDevice *self);
void nm_device_set_firmware_missing (NMDevice *self, gboolean missing);
#endif /* NM_DEVICE_PRIVATE_H */

View file

@ -2609,7 +2609,8 @@ supplicant_mgr_state_cb_handler (gpointer user_data)
dev_state = nm_device_get_state (dev);
if ( priv->enabled
&& !priv->supplicant.iface
&& (dev_state >= NM_DEVICE_STATE_UNAVAILABLE)) {
&& (dev_state >= NM_DEVICE_STATE_UNAVAILABLE)
&& (nm_device_get_firmware_missing (NM_DEVICE (self)) == FALSE)) {
/* request a supplicant interface from the supplicant manager */
supplicant_interface_acquire (self);
@ -3599,7 +3600,7 @@ device_state_changed (NMDevice *device,
* acquire a supplicant interface and transition to DISCONNECTED because
* the device is now ready to use.
*/
if (priv->enabled) {
if (priv->enabled && (nm_device_get_firmware_missing (device) == FALSE)) {
gboolean success;
struct iw_range range;
@ -3692,8 +3693,12 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled)
nm_log_dbg (LOGD_WIFI, "(%s): enable blocked by failure to bring device up",
nm_device_get_iface (NM_DEVICE (device)));
/* The device sucks, or HAL was lying to us about the killswitch state */
priv->enabled = FALSE;
if (no_firmware)
nm_device_set_firmware_missing (NM_DEVICE (device), TRUE);
else {
/* The device sucks, or the kernel was lying to us about the killswitch state */
priv->enabled = FALSE;
}
return;
}

View file

@ -3655,17 +3655,27 @@ unavailable_to_disconnected (gpointer user_data)
return FALSE;
}
static void
set_firmware_missing (NMDevice *self, gboolean new_missing)
void
nm_device_set_firmware_missing (NMDevice *self, gboolean new_missing)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMDevicePrivate *priv;
g_return_if_fail (self != NULL);
g_return_if_fail (NM_IS_DEVICE (self));
priv = NM_DEVICE_GET_PRIVATE (self);
if (priv->firmware_missing != new_missing) {
priv->firmware_missing = new_missing;
g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_FIRMWARE_MISSING);
}
}
gboolean
nm_device_get_firmware_missing (NMDevice *self)
{
return NM_DEVICE_GET_PRIVATE (self)->firmware_missing;
}
void
nm_device_state_changed (NMDevice *device,
NMDeviceState state,
@ -3678,7 +3688,12 @@ nm_device_state_changed (NMDevice *device,
g_return_if_fail (NM_IS_DEVICE (device));
if (priv->state == state)
/* Do nothing if state isn't changing, but as a special case allow
* re-setting UNAVAILABLE if the device is missing firmware so that we
* can retry device initialization.
*/
if ( (priv->state == state)
&& !(state == NM_DEVICE_STATE_UNAVAILABLE && priv->firmware_missing))
return;
old_state = priv->state;
@ -3698,16 +3713,15 @@ nm_device_state_changed (NMDevice *device,
*/
switch (state) {
case NM_DEVICE_STATE_UNMANAGED:
set_firmware_missing (device, FALSE);
nm_device_set_firmware_missing (device, FALSE);
if (old_state > NM_DEVICE_STATE_UNMANAGED)
nm_device_take_down (device, TRUE, reason);
break;
case NM_DEVICE_STATE_UNAVAILABLE:
if (old_state == NM_DEVICE_STATE_UNMANAGED) {
if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware) {
nm_log_warn (LOGD_HW, "%s: firmware may be missing.", nm_device_get_iface (device));
set_firmware_missing (device, TRUE);
}
if (old_state == NM_DEVICE_STATE_UNMANAGED || priv->firmware_missing) {
if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware)
nm_log_warn (LOGD_HW, "(%s): firmware may be missing.", nm_device_get_iface (device));
nm_device_set_firmware_missing (device, no_firmware ? TRUE : FALSE);
}
/* Ensure the device gets deactivated in response to stuff like
* carrier changes or rfkill. But don't deactivate devices that are

View file

@ -221,6 +221,11 @@ typedef struct {
guint auth_changed_id;
GSList *auth_chains;
/* Firmware dir monitor */
GFileMonitor *fw_monitor;
guint fw_monitor_id;
guint fw_changed_id;
gboolean disposed;
} NMManagerPrivate;
@ -2442,7 +2447,7 @@ typedef struct GetSecretsInfo {
guint32 idle_id;
char *hint1;
char *hint2;
char *connection_path;
NMConnection *connection;
} GetSecretsInfo;
static void
@ -2467,7 +2472,7 @@ free_get_secrets_info (gpointer data)
g_free (info->hint1);
g_free (info->hint2);
g_free (info->setting_name);
g_free (info->connection_path);
g_object_unref (info->connection);
memset (info, 0, sizeof (GetSecretsInfo));
g_free (info);
}
@ -2488,6 +2493,16 @@ provider_cancel_secrets (NMSecretsProviderInterface *provider, gpointer user_dat
}
}
static void
system_connection_update_cb (NMSettingsConnectionInterface *connection,
GError *error,
gpointer user_data)
{
if (error != NULL) {
nm_log_warn (LOGD_SYS_SET, "could not update system connection: %s", error->message);
}
}
static void
user_get_secrets_cb (DBusGProxy *proxy,
DBusGProxyCall *call,
@ -2512,6 +2527,14 @@ user_get_secrets_cb (DBusGProxy *proxy,
info->caller,
settings,
NULL);
/* If this connection is a system one, we need to update it on our end */
if (nm_connection_get_scope (info->connection) == NM_CONNECTION_SCOPE_SYSTEM) {
nm_settings_connection_interface_update (NM_SETTINGS_CONNECTION_INTERFACE (info->connection),
system_connection_update_cb,
NULL);
}
g_hash_table_destroy (settings);
} else {
nm_secrets_provider_interface_get_secrets_result (info->provider,
@ -2602,6 +2625,50 @@ system_get_secrets_reply_cb (NMSettingsConnectionInterface *connection,
g_object_unref (provider);
}
static gboolean
system_get_secrets_from_user (GetSecretsInfo *info)
{
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (info->manager);
DBusGConnection *g_connection;
GPtrArray *hints = NULL;
/* Only user settings services that are allowed to control the network
* are allowed to provide new secrets for system connections.
*/
if (priv->user_net_perm != NM_AUTH_CALL_RESULT_YES)
return FALSE;
g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr);
info->proxy = dbus_g_proxy_new_for_name (g_connection,
NM_DBUS_SERVICE_USER_SETTINGS,
NM_DBUS_PATH_SETTINGS,
NM_DBUS_IFACE_SETTINGS_SECRETS);
if (!info->proxy) {
nm_log_warn (LOGD_SYS_SET, "could not create user settings secrets proxy");
system_get_secrets_reply_cb (NULL, NULL, NULL, info); // FIXME pass error
return FALSE;
}
hints = g_ptr_array_sized_new (2);
if (info->hint1)
g_ptr_array_add (hints, (char *) info->hint1);
if (info->hint2)
g_ptr_array_add (hints, (char *) info->hint2);
info->call = dbus_g_proxy_begin_call_with_timeout (info->proxy, "GetSecretsForConnection",
user_get_secrets_cb,
info,
NULL,
G_MAXINT32,
G_TYPE_STRING, NM_DBUS_SERVICE_SYSTEM_SETTINGS,
DBUS_TYPE_G_OBJECT_PATH, nm_connection_get_path (info->connection),
G_TYPE_STRING, info->setting_name,
DBUS_TYPE_G_ARRAY_OF_STRING, hints,
G_TYPE_INVALID);
g_ptr_array_free (hints, TRUE);
return TRUE;
}
static gboolean
system_get_secrets_idle_cb (gpointer user_data)
{
@ -2609,12 +2676,12 @@ system_get_secrets_idle_cb (gpointer user_data)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (info->manager);
NMSettingsConnectionInterface *connection;
GError *error = NULL;
const char *hints[3] = { NULL, NULL, NULL };
gboolean success = FALSE;
info->idle_id = 0;
connection = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (priv->sys_settings),
info->connection_path);
nm_connection_get_path (info->connection));
if (!connection) {
error = g_error_new_literal (NM_MANAGER_ERROR,
NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
@ -2629,14 +2696,29 @@ system_get_secrets_idle_cb (gpointer user_data)
return FALSE;
}
hints[0] = info->hint1;
hints[1] = info->hint2;
nm_settings_connection_interface_get_secrets (connection,
info->setting_name,
hints,
info->request_new,
system_get_secrets_reply_cb,
info);
/* If new secrets are requested, try asking the user settings service for
* them since the system settings service can't interact with anything
* to get new secrets.
*/
if (info->request_new)
success = system_get_secrets_from_user (info);
/* If the user wasn't authorized, or we should retry using existing
* secrets, just ask the system settings service.
*/
if (!success) {
const char *hints[3] = { NULL, NULL, NULL };
hints[0] = info->hint1;
hints[1] = info->hint2;
nm_settings_connection_interface_get_secrets (connection,
info->setting_name,
hints,
info->request_new,
system_get_secrets_reply_cb,
info);
}
return FALSE;
}
@ -2659,7 +2741,7 @@ system_get_secrets (NMManager *self,
info->setting_name = g_strdup (setting_name);
info->hint1 = hint1 ? g_strdup (hint1) : NULL;
info->hint2 = hint2 ? g_strdup (hint2) : NULL;
info->connection_path = g_strdup (nm_connection_get_path (connection));
info->connection = g_object_ref (connection);
info->request_new = request_new;
g_object_weak_ref (G_OBJECT (provider), (GWeakNotify) free_get_secrets_info, info);
@ -3884,6 +3966,67 @@ nm_manager_start (NMManager *self)
bluez_manager_resync_devices (self);
}
static gboolean
handle_firmware_changed (gpointer user_data)
{
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
GSList *iter;
priv->fw_changed_id = 0;
if (manager_sleeping (self))
return FALSE;
/* Try to re-enable devices with missing firmware */
for (iter = priv->devices; iter; iter = iter->next) {
NMDevice *candidate = NM_DEVICE (iter->data);
NMDeviceState state = nm_device_get_state (candidate);
if ( nm_device_get_firmware_missing (candidate)
&& (state == NM_DEVICE_STATE_UNAVAILABLE)) {
nm_log_info (LOGD_CORE, "(%s): firmware may now be available",
nm_device_get_iface (candidate));
/* Re-set unavailable state to try bringing the device up again */
nm_device_state_changed (candidate,
NM_DEVICE_STATE_UNAVAILABLE,
NM_DEVICE_STATE_REASON_NONE);
}
}
return FALSE;
}
static void
firmware_dir_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
gpointer user_data)
{
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
switch (event_type) {
case G_FILE_MONITOR_EVENT_CREATED:
case G_FILE_MONITOR_EVENT_CHANGED:
#if GLIB_CHECK_VERSION(2,23,4)
case G_FILE_MONITOR_EVENT_MOVED:
#endif
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
if (!priv->fw_changed_id) {
priv->fw_changed_id = g_timeout_add_seconds (4, handle_firmware_changed, self);
nm_log_info (LOGD_CORE, "kernel firmware directory '%s' changed",
KERNEL_FIRMWARE_DIR);
}
break;
default:
break;
}
}
NMManager *
nm_manager_get (const char *config_file,
const char *plugins,
@ -4039,6 +4182,17 @@ dispose (GObject *object)
if (priv->bluez_mgr)
g_object_unref (priv->bluez_mgr);
if (priv->fw_monitor) {
if (priv->fw_monitor_id)
g_signal_handler_disconnect (priv->fw_monitor, priv->fw_monitor_id);
if (priv->fw_changed_id)
g_source_remove (priv->fw_changed_id);
g_file_monitor_cancel (priv->fw_monitor);
g_object_unref (priv->fw_monitor);
}
G_OBJECT_CLASS (nm_manager_parent_class)->dispose (object);
}
@ -4118,6 +4272,7 @@ nm_manager_init (NMManager *manager)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
DBusGConnection *g_connection;
guint id, i;
GFile *file;
/* Initialize rfkill structures and states */
memset (priv->radio_states, 0, sizeof (priv->radio_states));
@ -4208,6 +4363,24 @@ nm_manager_init (NMManager *manager)
manager);
} else
nm_log_warn (LOGD_CORE, "failed to create PolicyKit authority.");
/* Monitor the firmware directory */
if (strlen (KERNEL_FIRMWARE_DIR)) {
file = g_file_new_for_path (KERNEL_FIRMWARE_DIR "/");
priv->fw_monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL);
g_object_unref (file);
}
if (priv->fw_monitor) {
priv->fw_monitor_id = g_signal_connect (priv->fw_monitor, "changed",
G_CALLBACK (firmware_dir_changed),
manager);
nm_log_info (LOGD_CORE, "monitoring kernel firmware directory '%s'.",
KERNEL_FIRMWARE_DIR);
} else {
nm_log_warn (LOGD_CORE, "failed to monitor kernel firmware directory '%s'.",
KERNEL_FIRMWARE_DIR);
}
}
static void