From e22c6e05e9ebc6cce941762020c5710b8014677b Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 18 Mar 2011 20:17:47 +0100 Subject: Imported Upstream version 0.8.3.998 --- Makefile.in | 5 + NEWS | 22 + callouts/Makefile.in | 5 + cli/Makefile.in | 5 + cli/src/Makefile.in | 5 + cli/src/connections.c | 114 +- cli/src/devices.c | 82 +- cli/src/network-manager.c | 53 +- cli/src/nmcli.c | 8 +- cli/src/nmcli.h | 7 +- cli/src/utils.c | 57 +- cli/src/utils.h | 3 +- config.h.in | 6 + configure | 203 +- configure.ac | 72 +- data/Makefile.in | 5 + docs/Makefile.in | 5 + docs/libnm-glib/Makefile.am | 10 +- docs/libnm-glib/Makefile.in | 12 +- docs/libnm-glib/html/NMAccessPoint.html | 6 +- docs/libnm-glib/html/NMActiveConnection.html | 11 +- docs/libnm-glib/html/NMCdmaDevice.html | 6 +- docs/libnm-glib/html/NMClient.html | 4 +- docs/libnm-glib/html/NMDHCP4Config.html | 2 +- docs/libnm-glib/html/NMDHCP6Config.html | 24 +- docs/libnm-glib/html/NMDevice.html | 14 +- docs/libnm-glib/html/NMDeviceBt.html | 262 ++ docs/libnm-glib/html/NMDeviceEthernet.html | 2 +- docs/libnm-glib/html/NMDeviceWifi.html | 2 +- docs/libnm-glib/html/NMExportedConnection.html | 139 ++ docs/libnm-glib/html/NMGsmDevice.html | 2 +- docs/libnm-glib/html/NMIP4Config.html | 2 +- docs/libnm-glib/html/NMIP6Config.html | 6 +- docs/libnm-glib/html/NMObject.html | 12 +- docs/libnm-glib/html/NMRemoteConnection.html | 163 ++ docs/libnm-glib/html/NMRemoteSettings.html | 189 ++ docs/libnm-glib/html/NMSerialDevice.html | 4 +- docs/libnm-glib/html/NMVPNConnection.html | 265 +++ docs/libnm-glib/html/ch01.html | 22 +- docs/libnm-glib/html/index.html | 20 +- docs/libnm-glib/html/index.sgml | 141 +- docs/libnm-glib/html/libnm-glib-NMDeviceBt.html | 215 -- .../html/libnm-glib-NMExportedConnection.html | 124 - .../html/libnm-glib-NMRemoteConnection.html | 123 - .../html/libnm-glib-NMRemoteSettings.html | 142 -- .../html/libnm-glib-NMRemoteSettingsSystem.html | 8 +- docs/libnm-glib/html/libnm-glib-NMSettings.html | 100 +- .../html/libnm-glib-NMSettingsConnection.html | 119 +- .../html/libnm-glib-NMSettingsService.html | 14 +- .../html/libnm-glib-NMSettingsSystem.html | 10 +- .../html/libnm-glib-NMVPNConnection.html | 183 -- docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html | 8 +- docs/libnm-glib/html/libnm-glib-NMVpnPluginUi.html | 38 +- docs/libnm-glib/html/libnm-glib-nm-types.html | 8 +- docs/libnm-glib/html/libnm-glib.devhelp | 91 +- docs/libnm-glib/html/libnm-glib.devhelp2 | 91 +- docs/libnm-glib/libnm-glib-sections.txt | 906 ++++--- docs/libnm-glib/libnm-glib.types | 21 +- docs/libnm-glib/tmpl/libnm-glib-unused.sgml | 666 ------ docs/libnm-glib/tmpl/libnm_glib.sgml | 22 - docs/libnm-glib/tmpl/nm-access-point.sgml | 2 + docs/libnm-glib/tmpl/nm-active-connection.sgml | 2 + docs/libnm-glib/tmpl/nm-cdma-device.sgml | 2 + docs/libnm-glib/tmpl/nm-client.sgml | 2 + docs/libnm-glib/tmpl/nm-dbus-connection.sgml | 19 - docs/libnm-glib/tmpl/nm-dbus-settings-system.sgml | 19 - docs/libnm-glib/tmpl/nm-dbus-settings.sgml | 19 - docs/libnm-glib/tmpl/nm-device-bt-bindings.sgml | 26 - docs/libnm-glib/tmpl/nm-device-bt.sgml | 18 +- docs/libnm-glib/tmpl/nm-device-ethernet.sgml | 2 + docs/libnm-glib/tmpl/nm-device-wifi.sgml | 2 + docs/libnm-glib/tmpl/nm-device.sgml | 7 + docs/libnm-glib/tmpl/nm-dhcp4-config.sgml | 2 + docs/libnm-glib/tmpl/nm-dhcp6-config-bindings.sgml | 26 - docs/libnm-glib/tmpl/nm-dhcp6-config.sgml | 7 + docs/libnm-glib/tmpl/nm-exported-connection.sgml | 3 +- docs/libnm-glib/tmpl/nm-gsm-device.sgml | 2 + docs/libnm-glib/tmpl/nm-ip4-config.sgml | 2 + docs/libnm-glib/tmpl/nm-ip6-config-bindings.sgml | 26 - docs/libnm-glib/tmpl/nm-ip6-config.sgml | 2 + docs/libnm-glib/tmpl/nm-object.sgml | 2 + .../tmpl/nm-remote-connection-private.sgml | 35 - docs/libnm-glib/tmpl/nm-remote-connection.sgml | 13 +- .../libnm-glib/tmpl/nm-remote-settings-system.sgml | 2 + docs/libnm-glib/tmpl/nm-remote-settings.sgml | 18 +- docs/libnm-glib/tmpl/nm-serial-device.sgml | 2 + .../tmpl/nm-settings-connection-interface.sgml | 17 +- docs/libnm-glib/tmpl/nm-settings-interface.sgml | 16 +- docs/libnm-glib/tmpl/nm-settings-service.sgml | 2 + .../tmpl/nm-settings-system-interface.sgml | 4 +- docs/libnm-glib/tmpl/nm-settings.sgml | 35 - .../tmpl/nm-sysconfig-connection-bindings.sgml | 173 -- docs/libnm-glib/tmpl/nm-types.sgml | 2 + docs/libnm-glib/tmpl/nm-vpn-connection.sgml | 22 +- .../tmpl/nm-vpn-plugin-ui-interface.sgml | 4 +- docs/libnm-glib/tmpl/nm-vpn-plugin.sgml | 2 + docs/libnm-glib/tmpl/nm-wimax-device-bindings.sgml | 69 - docs/libnm-util/Makefile.am | 11 +- docs/libnm-util/Makefile.in | 12 +- docs/libnm-util/html/NMConnection.html | 59 +- docs/libnm-util/html/NMSetting.html | 96 +- docs/libnm-util/html/NMSetting8021x.html | 2 +- docs/libnm-util/html/NMSettingBluetooth.html | 2 +- docs/libnm-util/html/NMSettingCdma.html | 2 +- docs/libnm-util/html/NMSettingConnection.html | 2 +- docs/libnm-util/html/NMSettingGsm.html | 6 +- docs/libnm-util/html/NMSettingIP4Config.html | 4 +- docs/libnm-util/html/NMSettingIP6Config.html | 2 +- docs/libnm-util/html/NMSettingOlpcMesh.html | 2 +- docs/libnm-util/html/NMSettingPPP.html | 2 +- docs/libnm-util/html/NMSettingPPPOE.html | 2 +- docs/libnm-util/html/NMSettingSerial.html | 2 +- docs/libnm-util/html/NMSettingVPN.html | 2 +- docs/libnm-util/html/NMSettingWired.html | 2 +- docs/libnm-util/html/NMSettingWireless.html | 2 +- .../libnm-util/html/NMSettingWirelessSecurity.html | 2 +- docs/libnm-util/html/annotation-glossary.html | 36 + docs/libnm-util/html/api-index-full.html | 17 +- docs/libnm-util/html/ch01.html | 4 +- docs/libnm-util/html/index.html | 3 +- docs/libnm-util/html/index.sgml | 7 + docs/libnm-util/html/libnm-util-nm-utils.html | 2 +- docs/libnm-util/html/libnm-util.devhelp | 4 + docs/libnm-util/html/libnm-util.devhelp2 | 7 + docs/libnm-util/html/object-tree.html | 2 +- docs/libnm-util/libnm-util-sections.txt | 1143 ++++----- docs/libnm-util/tmpl/libnm-util-unused.sgml | 564 ----- docs/libnm-util/tmpl/nm-connection.sgml | 16 +- docs/libnm-util/tmpl/nm-setting-8021x.sgml | 2 + docs/libnm-util/tmpl/nm-setting-bluetooth.sgml | 2 + docs/libnm-util/tmpl/nm-setting-bridge.sgml | 160 -- docs/libnm-util/tmpl/nm-setting-cdma.sgml | 2 + docs/libnm-util/tmpl/nm-setting-connection.sgml | 2 + docs/libnm-util/tmpl/nm-setting-gsm.sgml | 2 + docs/libnm-util/tmpl/nm-setting-ip4-config.sgml | 2 + docs/libnm-util/tmpl/nm-setting-ip6-config.sgml | 2 + docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml | 2 + docs/libnm-util/tmpl/nm-setting-ppp.sgml | 2 + docs/libnm-util/tmpl/nm-setting-pppoe.sgml | 2 + docs/libnm-util/tmpl/nm-setting-serial.sgml | 2 + docs/libnm-util/tmpl/nm-setting-vpn.sgml | 2 + docs/libnm-util/tmpl/nm-setting-wimax.sgml | 136 -- docs/libnm-util/tmpl/nm-setting-wired.sgml | 2 + .../tmpl/nm-setting-wireless-security.sgml | 2 + docs/libnm-util/tmpl/nm-setting-wireless.sgml | 2 + docs/libnm-util/tmpl/nm-setting.sgml | 24 + docs/libnm-util/tmpl/nm-utils.sgml | 2 + docs/settings-spec.html | 6 +- docs/spec.html | 81 +- examples/Makefile.in | 5 + examples/python/Makefile.am | 1 + examples/python/Makefile.in | 14 +- examples/python/add-system-wifi-connection.py | 64 + examples/python/disconnect-device.py | 62 - examples/python/list-connections.py | 112 - examples/python/nm-state.py | 6 +- examples/python/show-bssids.py | 78 - examples/python/vpn.py | 152 -- include/Makefile.am | 6 +- include/Makefile.in | 17 +- include/NetworkManager.h | 2 + include/nm-version.h | 63 + include/nm-version.h.in | 63 + initscript/Arch/Makefile.in | 5 + initscript/Arch/networkmanager | 1 + initscript/Arch/networkmanager.in | 1 + initscript/Debian/Makefile.in | 5 + initscript/Gentoo/Makefile.in | 5 + initscript/Makefile.in | 5 + initscript/Mandriva/Makefile.in | 5 + initscript/RedHat/Makefile.in | 5 + initscript/SUSE/Makefile.in | 5 + initscript/Slackware/Makefile.in | 5 + initscript/Slackware/rc.networkmanager | 6 +- initscript/Slackware/rc.networkmanager.in | 6 +- initscript/linexa/Makefile.in | 5 + initscript/paldo/Makefile.in | 5 + introspection/Makefile.in | 5 + introspection/all.xml | 1 + introspection/nm-device.xml | 7 + introspection/nm-vpn-connection.xml | 42 +- libnm-glib/Makefile.am | 4 +- libnm-glib/Makefile.in | 9 +- libnm-glib/libnm-glib-test.c | 5 +- libnm-glib/libnm-glib.ver | 5 + libnm-glib/nm-client.c | 4 +- libnm-glib/nm-device.c | 14 + libnm-glib/nm-exported-connection.c | 21 +- libnm-util/Makefile.am | 2 +- libnm-util/Makefile.in | 7 +- libnm-util/libnm-util.ver | 2 + libnm-util/nm-connection.c | 98 +- libnm-util/nm-connection.h | 7 +- libnm-util/nm-setting-bluetooth.c | 4 +- libnm-util/nm-setting-cdma.c | 22 +- libnm-util/nm-setting-gsm.c | 22 +- libnm-util/nm-setting-ip4-config.c | 2 +- libnm-util/nm-setting-serial.c | 24 +- libnm-util/nm-setting.c | 202 +- libnm-util/nm-setting.h | 20 + libnm-util/nm-utils.c | 38 +- libnm-util/tests/Makefile.am | 14 +- libnm-util/tests/Makefile.in | 61 +- libnm-util/tests/certs/Makefile.in | 5 + libnm-util/tests/test-general.c | 241 ++ libnm-util/tests/test-need-secrets.c | 566 ----- libnm-util/tests/test-secrets.c | 672 ++++++ m4/compiler_warnings.m4 | 2 +- man/Makefile.in | 5 + man/NetworkManager.8 | 2 + man/NetworkManager.8.in | 2 + man/NetworkManager.conf.5 | 12 +- man/NetworkManager.conf.5.in | 12 +- marshallers/Makefile.in | 5 + po/LINGUAS | 1 + po/POTFILES.in | 1 + po/bg.po | 1694 +++++-------- po/ca.po | 2499 +++++++++++++------- po/da.po | 2303 +++++++++++++----- po/eo.po | 1766 ++++++++++++++ po/fr.po | 156 +- po/sv.po | 412 ++-- policy/Makefile.in | 5 + policy/org.freedesktop.NetworkManager.policy | 36 + ...edesktop.network-manager-settings.system.policy | 24 + src/Makefile.am | 2 + src/Makefile.in | 7 + src/NetworkManagerUtils.c | 32 +- src/backends/Makefile.am | 4 + src/backends/Makefile.in | 25 +- src/backends/NetworkManagerExherbo.c | 64 + src/backends/NetworkManagerGentoo.c | 34 +- src/bluez-manager/Makefile.in | 5 + src/dhcp-manager/Makefile.am | 38 +- src/dhcp-manager/Makefile.in | 308 ++- src/dhcp-manager/nm-dhcp-client.c | 12 +- src/dhcp-manager/nm-dhcp-dhclient-utils.c | 217 ++ src/dhcp-manager/nm-dhcp-dhclient-utils.h | 35 + src/dhcp-manager/nm-dhcp-dhclient.c | 97 +- src/dhcp-manager/nm-dhcp-dhcpcd.c | 2 + src/dhcp-manager/nm-dhcp-manager.c | 15 +- src/dhcp-manager/tests/Makefile.am | 28 + src/dhcp-manager/tests/Makefile.in | 610 +++++ src/dhcp-manager/tests/test-dhcp-dhclient.c | 249 ++ src/dns-manager/Makefile.am | 4 +- src/dns-manager/Makefile.in | 21 +- src/dns-manager/nm-dns-dnsmasq.c | 22 +- src/dns-manager/nm-dns-manager.c | 9 +- src/dns-manager/nm-dns-utils.c | 99 + src/dns-manager/nm-dns-utils.h | 28 + src/dnsmasq-manager/Makefile.in | 5 + src/dnsmasq-manager/nm-dnsmasq-manager.c | 12 +- src/ip6-manager/Makefile.in | 5 + src/ip6-manager/nm-ip6-manager.c | 415 +++- src/ip6-manager/nm-ip6-manager.h | 2 +- src/logging/Makefile.in | 5 + src/logging/nm-logging.c | 8 +- src/main.c | 6 +- src/modem-manager/Makefile.in | 5 + src/modem-manager/nm-modem.c | 6 + src/nm-activation-request.c | 73 +- src/nm-active-connection.c | 78 +- src/nm-active-connection.h | 12 +- src/nm-device-ethernet.c | 39 +- src/nm-device-wifi.c | 9 + src/nm-device.c | 32 +- src/nm-manager.c | 100 +- src/nm-policy-hostname.c | 56 +- src/nm-policy-hostname.h | 5 +- src/nm-policy-hosts.c | 520 +--- src/nm-policy-hosts.h | 20 +- src/nm-policy.c | 51 +- src/nm-system.c | 11 +- src/nm-system.h | 2 +- src/ppp-manager/Makefile.am | 4 + src/ppp-manager/Makefile.in | 49 +- src/ppp-manager/nm-ppp-manager.c | 14 +- src/supplicant-manager/Makefile.in | 5 + src/supplicant-manager/tests/Makefile.in | 5 + src/system-settings/Makefile.in | 5 + src/system-settings/nm-default-wired-connection.c | 2 +- src/system-settings/nm-sysconfig-settings.c | 62 +- src/system-settings/nm-sysconfig-settings.h | 2 + src/system-settings/nm-system-config-interface.c | 3 +- src/system-settings/nm-system-config-interface.h | 15 +- src/tests/Makefile.in | 5 + src/tests/test-policy-hosts.c | 761 +----- src/vpn-manager/Makefile.am | 18 +- src/vpn-manager/Makefile.in | 31 +- src/vpn-manager/nm-vpn-connection-base.c | 199 ++ src/vpn-manager/nm-vpn-connection-base.h | 54 + src/vpn-manager/nm-vpn-connection.c | 185 +- src/vpn-manager/nm-vpn-connection.h | 5 +- system-settings/Makefile.in | 5 + system-settings/plugins/Makefile.in | 5 + system-settings/plugins/ifcfg-rh/Makefile.in | 5 + system-settings/plugins/ifcfg-rh/plugin.c | 18 +- system-settings/plugins/ifcfg-rh/reader.c | 85 +- system-settings/plugins/ifcfg-rh/tests/Makefile.in | 5 + .../ifcfg-rh/tests/network-scripts/Makefile.in | 5 + .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 10 - system-settings/plugins/ifcfg-rh/writer.c | 21 +- system-settings/plugins/ifcfg-suse/Makefile.in | 5 + system-settings/plugins/ifnet/Makefile.am | 10 +- system-settings/plugins/ifnet/Makefile.in | 11 +- system-settings/plugins/ifnet/net_utils.c | 60 +- system-settings/plugins/ifnet/plugin.c | 2 +- system-settings/plugins/ifnet/tests/Makefile.am | 3 +- system-settings/plugins/ifnet/tests/Makefile.in | 13 +- system-settings/plugins/ifnet/tests/test_all.c | 77 +- system-settings/plugins/ifupdown/Makefile.in | 5 + .../plugins/ifupdown/interface_parser.c | 6 + system-settings/plugins/ifupdown/plugin.c | 51 +- system-settings/plugins/ifupdown/tests/Makefile.in | 5 + system-settings/plugins/keyfile/Makefile.am | 4 + system-settings/plugins/keyfile/Makefile.in | 20 +- system-settings/plugins/keyfile/common.h | 3 + system-settings/plugins/keyfile/plugin.c | 40 +- system-settings/plugins/keyfile/reader.c | 257 +- system-settings/plugins/keyfile/tests/Makefile.in | 5 + .../plugins/keyfile/tests/keyfiles/Makefile.am | 14 +- .../plugins/keyfile/tests/keyfiles/Makefile.in | 18 +- .../keyfile/tests/keyfiles/Test_Wired_TLS_New | 22 + .../keyfile/tests/keyfiles/Test_Wired_TLS_Old | 22 + .../keyfile/tests/keyfiles/test-ca-cert.pem | 27 + .../keyfile/tests/keyfiles/test-key-and-cert.pem | 118 + .../plugins/keyfile/tests/test-keyfile.c | 401 +++- system-settings/plugins/keyfile/utils.c | 97 + system-settings/plugins/keyfile/utils.h | 30 + system-settings/plugins/keyfile/writer.c | 308 ++- test/Makefile.am | 4 +- test/Makefile.in | 9 +- tools/Makefile.in | 5 + 333 files changed, 15723 insertions(+), 10660 deletions(-) create mode 100644 docs/libnm-glib/html/NMDeviceBt.html create mode 100644 docs/libnm-glib/html/NMExportedConnection.html create mode 100644 docs/libnm-glib/html/NMRemoteConnection.html create mode 100644 docs/libnm-glib/html/NMRemoteSettings.html create mode 100644 docs/libnm-glib/html/NMVPNConnection.html delete mode 100644 docs/libnm-glib/html/libnm-glib-NMDeviceBt.html delete mode 100644 docs/libnm-glib/html/libnm-glib-NMExportedConnection.html delete mode 100644 docs/libnm-glib/html/libnm-glib-NMRemoteConnection.html delete mode 100644 docs/libnm-glib/html/libnm-glib-NMRemoteSettings.html delete mode 100644 docs/libnm-glib/html/libnm-glib-NMVPNConnection.html delete mode 100644 docs/libnm-glib/tmpl/libnm_glib.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-dbus-connection.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-dbus-settings-system.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-dbus-settings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-device-bt-bindings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-dhcp6-config-bindings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-ip6-config-bindings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-remote-connection-private.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-settings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-sysconfig-connection-bindings.sgml delete mode 100644 docs/libnm-glib/tmpl/nm-wimax-device-bindings.sgml create mode 100644 docs/libnm-util/html/annotation-glossary.html delete mode 100644 docs/libnm-util/tmpl/nm-setting-bridge.sgml delete mode 100644 docs/libnm-util/tmpl/nm-setting-wimax.sgml create mode 100755 examples/python/add-system-wifi-connection.py delete mode 100755 examples/python/disconnect-device.py delete mode 100644 examples/python/list-connections.py delete mode 100644 examples/python/show-bssids.py delete mode 100644 examples/python/vpn.py create mode 100644 include/nm-version.h create mode 100644 include/nm-version.h.in delete mode 100644 libnm-util/tests/test-need-secrets.c create mode 100644 libnm-util/tests/test-secrets.c create mode 100644 po/eo.po create mode 100644 src/backends/NetworkManagerExherbo.c create mode 100644 src/dhcp-manager/nm-dhcp-dhclient-utils.c create mode 100644 src/dhcp-manager/nm-dhcp-dhclient-utils.h create mode 100644 src/dhcp-manager/tests/Makefile.am create mode 100644 src/dhcp-manager/tests/Makefile.in create mode 100644 src/dhcp-manager/tests/test-dhcp-dhclient.c create mode 100644 src/dns-manager/nm-dns-utils.c create mode 100644 src/dns-manager/nm-dns-utils.h create mode 100644 src/vpn-manager/nm-vpn-connection-base.c create mode 100644 src/vpn-manager/nm-vpn-connection-base.h create mode 100644 system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_New create mode 100644 system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_Old create mode 100644 system-settings/plugins/keyfile/tests/keyfiles/test-ca-cert.pem create mode 100644 system-settings/plugins/keyfile/tests/keyfiles/test-key-and-cert.pem create mode 100644 system-settings/plugins/keyfile/utils.c create mode 100644 system-settings/plugins/keyfile/utils.h diff --git a/Makefile.in b/Makefile.in index 41eff2d9..6820d9a2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -229,6 +229,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -243,6 +247,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/NEWS b/NEWS index 9eb102bf..951482e4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,25 @@ +============================================== +NetworkManager-0.8.4 +Overview of changes since NetworkManager-0.8.2 +============================================== + +This is a new stable release of NetworkManager. Notable changes include: + +* Preliminary support for Exherbo Linux +* Logging fixes to suppress unnecessary messages +* Ensure removed devices are cleaned up +* Fix potential 64-bit crash updating timestamps +* IPv6 setup, routing, and compliance fixes +* Handle reverse DNS lookups with local caching nameserver configurations +* No longer updates /etc/hosts when hostname changes +* Request WPAD option from DHCP servers +* Shutdown crash fixes +* nmcli support for WWAN connections +* Persistent hostname sent to DHCP servers by default +* Allow disabing PPP support at build time +* Memory leak fixes +* and much more... + ============================================== NetworkManager-0.8.2 Overview of changes since NetworkManager-0.8.1 diff --git a/callouts/Makefile.in b/callouts/Makefile.in index bd594a46..5b8c1151 100644 --- a/callouts/Makefile.in +++ b/callouts/Makefile.in @@ -227,6 +227,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -241,6 +245,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/cli/Makefile.in b/cli/Makefile.in index 5fdb04bb..b2356ac1 100644 --- a/cli/Makefile.in +++ b/cli/Makefile.in @@ -189,6 +189,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -203,6 +207,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/cli/src/Makefile.in b/cli/src/Makefile.in index 47421660..bdf4128e 100644 --- a/cli/src/Makefile.in +++ b/cli/src/Makefile.in @@ -187,6 +187,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -201,6 +205,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/cli/src/connections.c b/cli/src/connections.c index e0b94ceb..88a5df49 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #include @@ -634,12 +634,6 @@ do_connections_status (NmCli *nmc, int argc, char **argv) nmc->should_wait = FALSE; - /* create NMClient */ - if (!nmc->get_client (nmc)) - return nmc->return_value; - - active_cons = nm_client_get_active_connections (nmc->client); - if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) fields_str = fields_common; else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) @@ -660,10 +654,25 @@ do_connections_status (NmCli *nmc, int argc, char **argv) goto error; } + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } + goto error; + } + + /* Print headers */ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("Active connections"); print_fields (nmc->print_fields, nmc->allowed_fields); + nmc->get_client (nmc); + active_cons = nm_client_get_active_connections (nmc->client); if (active_cons && active_cons->len) { info = g_malloc0 (sizeof (StatusInfo)); info->nmc = nmc; @@ -675,7 +684,6 @@ do_connections_status (NmCli *nmc, int argc, char **argv) } error: - return nmc->return_value; } @@ -885,6 +893,60 @@ check_olpc_mesh_compatible (NMDeviceOlpcMesh *device, NMConnection *connection, } #endif +static gboolean +check_gsm_compatible (NMGsmDevice *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingGsm *s_gsm; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_GSM_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a GSM connection."); + return FALSE; + } + + s_gsm = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM)); + if (!s_gsm) { + g_set_error (error, 0, 0, + "The connection was not a valid GSM connection."); + return FALSE; + } + + return TRUE; +} + +static gboolean +check_cdma_compatible (NMCdmaDevice *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingCdma *s_cdma; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a CDMA connection."); + return FALSE; + } + + s_cdma = NM_SETTING_CDMA (nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA)); + if (!s_cdma) { + g_set_error (error, 0, 0, + "The connection was not a valid CDMA connection."); + return FALSE; + } + + return TRUE; +} + static gboolean nm_device_is_connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -899,6 +961,10 @@ nm_device_is_connection_compatible (NMDevice *device, NMConnection *connection, return check_bt_compatible (NM_DEVICE_BT (device), connection, error); // else if (NM_IS_DEVICE_OLPC_MESH (device)) // return check_olpc_mesh_compatible (NM_DEVICE_OLPC_MESH (device), connection, error); + else if (NM_IS_GSM_DEVICE (device)) + return check_gsm_compatible (NM_GSM_DEVICE (device), connection, error); + else if (NM_IS_CDMA_DEVICE (device)) + return check_cdma_compatible (NM_CDMA_DEVICE (device), connection, error); g_set_error (error, 0, 0, "unhandled device type '%s'", G_OBJECT_TYPE_NAME (device)); return FALSE; @@ -1401,9 +1467,20 @@ do_connection_up (NmCli *nmc, int argc, char **argv) goto error; } - /* create NMClient */ - if (!nmc->get_client (nmc)) + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } goto error; + } + + /* create NMClient */ + nmc->get_client (nmc); is_system = (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) ? TRUE : FALSE; con_path = nm_connection_get_path (connection); @@ -1420,6 +1497,7 @@ do_connection_up (NmCli *nmc, int argc, char **argv) else g_string_printf (nmc->return_text, _("Error: No suitable device found.")); nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + g_clear_error (&error); goto error; } @@ -1446,6 +1524,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv) { NMConnection *connection = NULL; NMActiveConnection *active = NULL; + GError *error = NULL; const GPtrArray *active_cons; const char *con_path; const char *active_path; @@ -1491,9 +1570,20 @@ do_connection_down (NmCli *nmc, int argc, char **argv) goto error; } - /* create NMClient */ - if (!nmc->get_client (nmc)) + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } goto error; + } + + /* create NMClient */ + nmc->get_client (nmc); con_path = nm_connection_get_path (connection); con_scope = nm_connection_get_scope (connection); diff --git a/cli/src/devices.c b/cli/src/devices.c index 436b4b6e..d314928a 100644 --- a/cli/src/devices.c +++ b/cli/src/devices.c @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #include @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include @@ -184,9 +182,10 @@ static NmcOutputField nmc_fields_dev_wifi_list[] = { {"RSN-FLAGS", N_("RSN-FLAGS"), 25, NULL, 0}, /* 9 */ {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 10 */ {"ACTIVE", N_("ACTIVE"), 8, NULL, 0}, /* 11 */ + {"DBUS-PATH", N_("DBUS-PATH"), 46, NULL, 0}, /* 12 */ {NULL, NULL, 0, NULL, 0} }; -#define NMC_FIELDS_DEV_WIFI_LIST_ALL "SSID,BSSID,MODE,FREQ,RATE,SIGNAL,SECURITY,WPA-FLAGS,RSN-FLAGS,DEVICE,ACTIVE" +#define NMC_FIELDS_DEV_WIFI_LIST_ALL "SSID,BSSID,MODE,FREQ,RATE,SIGNAL,SECURITY,WPA-FLAGS,RSN-FLAGS,DEVICE,ACTIVE,DBUS-PATH" #define NMC_FIELDS_DEV_WIFI_LIST_COMMON "SSID,BSSID,MODE,FREQ,RATE,SIGNAL,SECURITY,ACTIVE" #define NMC_FIELDS_DEV_WIFI_LIST_FOR_DEV_LIST "NAME,"NMC_FIELDS_DEV_WIFI_LIST_COMMON @@ -431,6 +430,7 @@ detail_access_point (gpointer data, gpointer user_data) info->nmc->allowed_fields[9].value = rsn_flags_str; info->nmc->allowed_fields[10].value = info->device; info->nmc->allowed_fields[11].value = active ? _("yes") : _("no"); + info->nmc->allowed_fields[12].value = nm_object_get_path (NM_OBJECT (ap)); info->nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */ print_fields (info->nmc->print_fields, info->nmc->allowed_fields); @@ -789,12 +789,6 @@ do_devices_status (NmCli *nmc, int argc, char **argv) argv++; } - /* create NMClient */ - if (!nmc->get_client (nmc)) - goto error; - - devices = nm_client_get_devices (nmc->client); - if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) fields_str = fields_common; else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) @@ -815,10 +809,25 @@ do_devices_status (NmCli *nmc, int argc, char **argv) goto error; } + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } + goto error; + } + + /* Print headers */ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("Status of devices"); print_fields (nmc->print_fields, nmc->allowed_fields); + nmc->get_client (nmc); + devices = nm_client_get_devices (nmc->client); for (i = 0; devices && (i < devices->len); i++) { NMDevice *device = g_ptr_array_index (devices, i); show_device_status (device, nmc); @@ -834,6 +843,7 @@ static NMCResultCode do_devices_list (NmCli *nmc, int argc, char **argv) { const GPtrArray *devices; + GError *error = NULL; NMDevice *device = NULL; const char *iface = NULL; gboolean iface_specified = FALSE; @@ -858,10 +868,19 @@ do_devices_list (NmCli *nmc, int argc, char **argv) argv++; } - /* create NMClient */ - if (!nmc->get_client (nmc)) + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } goto error; + } + nmc->get_client (nmc); devices = nm_client_get_devices (nmc->client); if (iface_specified) { @@ -947,6 +966,7 @@ static NMCResultCode do_device_disconnect (NmCli *nmc, int argc, char **argv) { const GPtrArray *devices; + GError *error = NULL; NMDevice *device = NULL; const char *iface = NULL; gboolean iface_specified = FALSE; @@ -998,10 +1018,19 @@ do_device_disconnect (NmCli *nmc, int argc, char **argv) goto error; } - /* create NMClient */ - if (!nmc->get_client (nmc)) + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } goto error; + } + nmc->get_client (nmc); devices = nm_client_get_devices (nmc->client); for (i = 0; devices && (i < devices->len); i++) { NMDevice *candidate = g_ptr_array_index (devices, i); @@ -1093,11 +1122,6 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) argv++; } - /* create NMClient */ - if (!nmc->get_client (nmc)) - goto error; - - devices = nm_client_get_devices (nmc->client); if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) fields_str = fields_common; @@ -1119,9 +1143,24 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) goto error; } + if (!nmc_is_nm_running (nmc, &error)) { + if (error) { + g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_error_free (error); + } else { + g_string_printf (nmc->return_text, _("Error: NetworkManager is not running.")); + nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; + } + goto error; + } + + /* Print headers */ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("WiFi scan list"); + nmc->get_client (nmc); + devices = nm_client_get_devices (nmc->client); if (iface) { /* Device specified - list only APs of this interface */ for (i = 0; devices && (i < devices->len); i++) { @@ -1250,10 +1289,6 @@ do_devices (NmCli *nmc, int argc, char **argv) { GError *error = NULL; - /* create NMClient */ - if (!nmc->get_client (nmc)) - goto end; - if (argc == 0) { if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) goto opt_error; @@ -1288,7 +1323,6 @@ do_devices (NmCli *nmc, int argc, char **argv) } } -end: return nmc->return_value; opt_error: diff --git a/cli/src/network-manager.c b/cli/src/network-manager.c index 23a2ef11..e695c0e4 100644 --- a/cli/src/network-manager.c +++ b/cli/src/network-manager.c @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #include @@ -99,8 +99,8 @@ static NMCResultCode show_nm_status (NmCli *nmc) { gboolean nm_running; - gboolean net_enabled; - NMState state; + NMState state = NM_STATE_UNKNOWN; + const char *net_enabled_str; const char *wireless_hw_enabled_str, *wireless_enabled_str; const char *wwan_hw_enabled_str, *wwan_enabled_str; GError *error = NULL; @@ -111,8 +111,6 @@ show_nm_status (NmCli *nmc) guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; - g_return_val_if_fail (nmc->client != NULL, NMC_RESULT_ERROR_UNKNOWN); - if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) fields_str = fields_common; else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) @@ -137,21 +135,22 @@ show_nm_status (NmCli *nmc) nmc->print_fields.header_name = _("NetworkManager status"); print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ - nm_running = nm_client_get_manager_running (nmc->client); - state = nm_client_get_state (nmc->client); - net_enabled = nm_client_networking_get_enabled (nmc->client); + nm_running = nmc_is_nm_running (nmc, NULL); if (nm_running) { + nmc->get_client (nmc); /* create NMClient */ + state = nm_client_get_state (nmc->client); + net_enabled_str = nm_client_networking_get_enabled (nmc->client) ? _("enabled") : _("disabled"); wireless_hw_enabled_str = nm_client_wireless_hardware_get_enabled (nmc->client) ? _("enabled") : _("disabled"); wireless_enabled_str = nm_client_wireless_get_enabled (nmc->client) ? _("enabled") : _("disabled"); wwan_hw_enabled_str = nm_client_wwan_hardware_get_enabled (nmc->client) ? _("enabled") : _("disabled"); wwan_enabled_str = nm_client_wwan_get_enabled (nmc->client) ? _("enabled") : _("disabled"); } else { - wireless_hw_enabled_str = wireless_enabled_str = wwan_hw_enabled_str = wwan_enabled_str = _("unknown"); + net_enabled_str = wireless_hw_enabled_str = wireless_enabled_str = wwan_hw_enabled_str = wwan_enabled_str = _("unknown"); } nmc->allowed_fields[0].value = nm_running ? _("running") : _("not running"); nmc->allowed_fields[1].value = nm_state_to_string (state); - nmc->allowed_fields[2].value = net_enabled ? _("enabled") : _("disabled"); + nmc->allowed_fields[2].value = net_enabled_str; nmc->allowed_fields[3].value = wireless_hw_enabled_str; nmc->allowed_fields[4].value = wireless_enabled_str; nmc->allowed_fields[5].value = wwan_hw_enabled_str; @@ -212,10 +211,6 @@ do_network_manager (NmCli *nmc, int argc, char **argv) guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; - /* create NMClient */ - if (!nmc->get_client (nmc)) - goto end; - if (argc == 0) { if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) goto opt_error; @@ -244,9 +239,14 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("Networking enabled"); print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ - nmc->allowed_fields[2].value = nm_client_networking_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + + if (nmc_is_nm_running (nmc, NULL)) { + nmc->get_client (nmc); /* create NMClient */ + nmc->allowed_fields[2].value = nm_client_networking_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + } else + nmc->allowed_fields[2].value = _("unknown"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; - print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ } else { if (!strcmp (*argv, "true")) enable_net = TRUE; @@ -257,6 +257,7 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; goto end; } + nmc->get_client (nmc); /* create NMClient */ nm_client_networking_set_enabled (nmc->client, enable_net); } } @@ -293,9 +294,14 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("WiFi enabled"); print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ - nmc->allowed_fields[4].value = nm_client_wireless_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + + if (nmc_is_nm_running (nmc, NULL)) { + nmc->get_client (nmc); /* create NMClient */ + nmc->allowed_fields[4].value = nm_client_wireless_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + } else + nmc->allowed_fields[4].value = _("unknown"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; - print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ } else { if (!strcmp (*argv, "on")) enable_wifi = TRUE; @@ -306,6 +312,7 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; goto end; } + nmc->get_client (nmc); /* create NMClient */ nm_client_wireless_set_enabled (nmc->client, enable_wifi); } } @@ -325,9 +332,14 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; nmc->print_fields.header_name = _("WWAN enabled"); print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ - nmc->allowed_fields[6].value = nm_client_wwan_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + + if (nmc_is_nm_running (nmc, NULL)) { + nmc->get_client (nmc); /* create NMClient */ + nmc->allowed_fields[6].value = nm_client_wwan_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + } else + nmc->allowed_fields[6].value = _("unknown"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; - print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ } else { if (!strcmp (*argv, "on")) enable_wwan = TRUE; @@ -338,6 +350,7 @@ do_network_manager (NmCli *nmc, int argc, char **argv) nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; goto end; } + nmc->get_client (nmc); /* create NMClient */ nm_client_wwan_set_enabled (nmc->client, enable_wwan); } } diff --git a/cli/src/nmcli.c b/cli/src/nmcli.c index d416952c..4a548024 100644 --- a/cli/src/nmcli.c +++ b/cli/src/nmcli.c @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ /* Generated configuration file */ @@ -30,8 +30,6 @@ #include #include -#include -#include #include #include #include @@ -256,8 +254,8 @@ nmc_get_client (NmCli *nmc) if (!nmc->client) { nmc->client = nm_client_new (); if (!nmc->client) { - g_string_printf (nmc->return_text, _("Error: Could not connect to NetworkManager.")); - nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_critical (_("Error: Could not create NMClient object.")); + exit (NMC_RESULT_ERROR_UNKNOWN); } } diff --git a/cli/src/nmcli.h b/cli/src/nmcli.h index 9788ef08..a208e79e 100644 --- a/cli/src/nmcli.h +++ b/cli/src/nmcli.h @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #ifndef NMC_NMCLI_H @@ -47,7 +47,10 @@ typedef enum { NMC_RESULT_ERROR_CON_DEACTIVATION = 5, /* Error in device disconnect */ - NMC_RESULT_ERROR_DEV_DISCONNECT = 6 + NMC_RESULT_ERROR_DEV_DISCONNECT = 6, + + /* NetworkManager is not running */ + NMC_RESULT_ERROR_NM_NOT_RUNNING = 7 } NMCResultCode; typedef enum { diff --git a/cli/src/utils.c b/cli/src/utils.c index 0096a0ae..bcc51bbd 100644 --- a/cli/src/utils.c +++ b/cli/src/utils.c @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #include @@ -22,6 +22,7 @@ #include #include +#include #include "utils.h" @@ -296,3 +297,57 @@ print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]) g_string_free (str, TRUE); } +/* + * Find out whether NetworkManager is running (via D-Bus NameHasOwner), assuring + * NetworkManager won't be autostart (by D-Bus) if not running. + * We can't use NMClient (nm_client_get_manager_running()) because NMClient + * constructor calls GetPermissions of NM_DBUS_SERVICE, which would autostart + * NetworkManger if it is configured as D-Bus launchable service. + */ +gboolean +nmc_is_nm_running (NmCli *nmc, GError **error) +{ + DBusGConnection *connection = NULL; + DBusGProxy *proxy = NULL; + GError *err = NULL; + gboolean has_owner = FALSE; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); + if (!connection) { + g_string_printf (nmc->return_text, _("Error: Couldn't connect to system bus: %s"), err->message); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_propagate_error (error, err); + goto done; + } + + proxy = dbus_g_proxy_new_for_name (connection, + "org.freedesktop.DBus", + "/org/freedesktop/DBus", + "org.freedesktop.DBus"); + if (!proxy) { + g_string_printf (nmc->return_text, _("Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + if (error) + g_set_error (error, 0, 0, "%s", nmc->return_text->str); + goto done; + } + + if (!org_freedesktop_DBus_name_has_owner (proxy, NM_DBUS_SERVICE, &has_owner, &err)) { + g_string_printf (nmc->return_text, _("Error: NameHasOwner request failed: %s"), + (err && err->message) ? err->message : _("(unknown)")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + g_propagate_error (error, err); + goto done; + } + +done: + if (connection) + dbus_g_connection_unref (connection); + if (proxy) + g_object_unref (proxy); + + return has_owner; +} + diff --git a/cli/src/utils.h b/cli/src/utils.h index 308f6401..da058f27 100644 --- a/cli/src/utils.h +++ b/cli/src/utils.h @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2010 Red Hat, Inc. + * (C) Copyright 2010 - 2011 Red Hat, Inc. */ #ifndef NMC_UTILS_H @@ -32,5 +32,6 @@ int nmc_string_screen_width (const char *start, const char *end); GArray *parse_output_fields (const char *fields_str, const NmcOutputField fields_array[], GError **error); gboolean nmc_terse_option_check (NMCPrintOutput print_output, const char *fields, GError **error); void print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]); +gboolean nmc_is_nm_running (NmCli *nmc, GError **error); #endif /* NMC_UTILS_H */ diff --git a/config.h.in b/config.h.in index 206f64a6..a8f78646 100644 --- a/config.h.in +++ b/config.h.in @@ -149,6 +149,9 @@ /* Define if you have Debian */ #undef TARGET_DEBIAN +/* Define if you have Exherbo */ +#undef TARGET_EXHERBO + /* Define if you have Frugalware */ #undef TARGET_FRUGALWARE @@ -204,6 +207,9 @@ /* Version number of package */ #undef VERSION +/* Define if you have PPP support */ +#undef WITH_PPP + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD diff --git a/configure b/configure index b9b10217..b62f55e4 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for NetworkManager 0.8.2. +# Generated by GNU Autoconf 2.66 for NetworkManager 0.8.3.998. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -238,7 +238,8 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and dcbw@redhat.com + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -562,9 +563,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='NetworkManager' PACKAGE_TARNAME='NetworkManager' -PACKAGE_VERSION='0.8.2' -PACKAGE_STRING='NetworkManager 0.8.2' -PACKAGE_BUGREPORT='dcbw@redhat.com' +PACKAGE_VERSION='0.8.3.998' +PACKAGE_STRING='NetworkManager 0.8.3.998' +PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager' PACKAGE_URL='' # Factoring default headers for most tests. @@ -630,6 +631,8 @@ DHCPCD_PATH DHCLIENT_VERSION DHCLIENT_PATH PPPD_PLUGIN_DIR +WITH_PPP_FALSE +WITH_PPP_TRUE DBUS_SYS_DIR GLIB_GENMARSHAL WITH_GNUTLS_FALSE @@ -641,6 +644,7 @@ LIBGCRYPT_CFLAGS LIBGCRYPT_CONFIG GNUTLS_LIBS GNUTLS_CFLAGS +PKGCONFIG_PATH NSS_LIBS NSS_CFLAGS POLKIT_LIBS @@ -668,6 +672,8 @@ PKG_CONFIG_PATH PKG_CONFIG LIBDL LIBM +TARGET_EXHERBO_FALSE +TARGET_EXHERBO_TRUE TARGET_LINEXA_FALSE TARGET_LINEXA_TRUE TARGET_PARDUS_FALSE @@ -735,6 +741,10 @@ INTLTOOL_UPDATE USE_NLS GETTEXT_PACKAGE LIBOBJS +NM_VERSION +NM_MICRO_VERSION +NM_MINOR_VERSION +NM_MAJOR_VERSION DISABLE_DEPRECATED ACLOCAL_AMFLAGS OTOOL64 @@ -866,6 +876,7 @@ with_udev_dir with_systemdsystemunitdir with_crypto with_dbus_sys_dir +enable_ppp with_pppd_plugin_dir with_dhclient with_dhcpcd @@ -889,11 +900,6 @@ LDFLAGS LIBS CPPFLAGS CPP -CPPFLAGS -CC -LDFLAGS -LIBS -CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1458,7 +1464,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures NetworkManager 0.8.2 to adapt to many kinds of systems. +\`configure' configures NetworkManager 0.8.3.998 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1528,7 +1534,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of NetworkManager 0.8.2:";; + short | recursive ) echo "Configuration of NetworkManager 0.8.3.998:";; esac cat <<\_ACEOF @@ -1548,6 +1554,7 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support + --enable-ppp enable PPP/PPPoE support --enable-more-warnings Maximum compiler warnings --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] @@ -1562,7 +1569,7 @@ Optional Packages: --with-docs Build NetworkManager documentation --with-distro=DISTRO Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, - paldo, mandriva, pardus or linexa + paldo, mandriva, pardus, linexa or exherbo --with-dist-version= Define the NM's distribution version string --with-udev-dir=DIR where the udev base directory is @@ -1634,7 +1641,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1697,7 +1704,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -NetworkManager configure 0.8.2 +NetworkManager configure 0.8.3.998 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1856,9 +1863,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------ ## -## Report this to dcbw@redhat.com ## -## ------------------------------ ##" +( $as_echo "## ----------------------------------------------------------------------------- ## +## Report this to http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager ## +## ----------------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2120,7 +2127,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by NetworkManager $as_me 0.8.2, which was +It was created by NetworkManager $as_me 0.8.3.998, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2935,7 +2942,7 @@ fi # Define the identity of the package. PACKAGE='NetworkManager' - VERSION='0.8.2' + VERSION='0.8.3.998' cat >>confdefs.h <<_ACEOF @@ -11828,12 +11835,21 @@ fi if test $USE_MAINTAINER_MODE = yes; then - DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED" + DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED" else DISABLE_DEPRECATED="" fi +NM_MAJOR_VERSION=0 +NM_MINOR_VERSION=8 +NM_MICRO_VERSION=3 +NM_VERSION=0.8.3.998 + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : @@ -13869,6 +13885,25 @@ if test "x$ac_cv_file__etc_linexa_release" = x""yes; then : with_distro="linexa" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /etc/exherbo-release" >&5 +$as_echo_n "checking for /etc/exherbo-release... " >&6; } +if test "${ac_cv_file__etc_exherbo_release+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "/etc/exherbo-release"; then + ac_cv_file__etc_exherbo_release=yes +else + ac_cv_file__etc_exherbo_release=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__etc_exherbo_release" >&5 +$as_echo "$ac_cv_file__etc_exherbo_release" >&6; } +if test "x$ac_cv_file__etc_exherbo_release" = x""yes; then : + with_distro="exherbo" +fi + if test "z$with_distro" = "z"; then with_distro=`lsb_release -is` fi @@ -13880,7 +13915,7 @@ if test "z$with_distro" = "z"; then exit 1 else case $with_distro in - redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa) ;; + redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;; *) echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" exit 1 @@ -14040,6 +14075,20 @@ if test x"$with_distro" = xlinexa; then $as_echo "#define TARGET_LINEXA 1" >>confdefs.h +fi + + if test x"$with_distro" = xexherbo; then + TARGET_EXHERBO_TRUE= + TARGET_EXHERBO_FALSE='#' +else + TARGET_EXHERBO_TRUE='#' + TARGET_EXHERBO_FALSE= +fi + +if test x"$with_distro" = xexherbo; then + +$as_echo "#define TARGET_EXHERBO 1" >>confdefs.h + fi @@ -15463,6 +15512,60 @@ $as_echo "yes" >&6; } fi + # Work around a pkg-config bug (fdo #29801) where exists != usable + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKGCONFIG_PATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG_PATH="$PKGCONFIG_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKGCONFIG_PATH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKGCONFIG_PATH" && ac_cv_path_PKGCONFIG_PATH="no" + ;; +esac +fi +PKGCONFIG_PATH=$ac_cv_path_PKGCONFIG_PATH +if test -n "$PKGCONFIG_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG_PATH" >&5 +$as_echo "$PKGCONFIG_PATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$PKGCONFIG_PATH" = xno; then + as_fn_error $? "pkgconfig required but not found" "$LINENO" 5 + else + FOO=`$PKGCONFIG_PATH --cflags --libs nss` + if test x"$?" != "x0"; then + as_fn_error $? "No usable NSS found" "$LINENO" 5 + fi + fi + + + + $as_echo "#define HAVE_NSS 1" >>confdefs.h with_nss=yes @@ -15612,7 +15715,7 @@ $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h with_gnutls=yes fi else - as_fn_error $? "Please choose either 'nss' or 'gnutls' for certificate and key operations" "$LINENO" 5 + as_fn_error $? "Please choose either 'nss' or 'gnutls' for certificate and crypto operations" "$LINENO" 5 fi if test x"$with_nss" != xno; then WITH_NSS_TRUE= @@ -15653,8 +15756,16 @@ else fi -# PPPD -for ac_header in pppd/pppd.h +# pppd +# Check whether --enable-ppp was given. +if test "${enable_ppp+set}" = set; then : + enableval=$enable_ppp; enable_ppp=${enableval} +else + enable_ppp=yes +fi + +if (test "${enable_ppp}" = "yes"); then + for ac_header in pppd/pppd.h do : ac_fn_c_check_header_mongrel "$LINENO" "pppd/pppd.h" "ac_cv_header_pppd_pppd_h" "$ac_includes_default" if test "x$ac_cv_header_pppd_pppd_h" = x""yes; then : @@ -15670,6 +15781,19 @@ done +$as_echo "#define WITH_PPP 1" >>confdefs.h + +fi + if test "${enable_ppp}" = "yes"; then + WITH_PPP_TRUE= + WITH_PPP_FALSE='#' +else + WITH_PPP_TRUE='#' + WITH_PPP_FALSE= +fi + + + # Check whether --with-pppd-plugin-dir was given. if test "${with_pppd_plugin_dir+set}" = set; then : withval=$with_pppd_plugin_dir; @@ -15683,6 +15807,7 @@ else fi + # dhclient support # Check whether --with-dhclient was given. @@ -15946,7 +16071,7 @@ $as_echo "yes" >&6; } for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \ -Wdeclaration-after-statement -Wstrict-prototypes \ -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \ - -fno-strict-aliasing; do + -fno-strict-aliasing -Wno-unused-but-set-variable; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 @@ -16235,7 +16360,7 @@ case $with_tests in esac -ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/tests/Makefile marshallers/Makefile src/logging/Makefile src/dns-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/ip6-manager/Makefile src/supplicant-manager/Makefile src/supplicant-manager/tests/Makefile src/ppp-manager/Makefile src/dnsmasq-manager/Makefile src/modem-manager/Makefile src/bluez-manager/Makefile src/system-settings/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile libnm-util/tests/Makefile libnm-util/tests/certs/Makefile libnm-glib/libnm-glib.pc libnm-glib/libnm-glib-vpn.pc libnm-glib/Makefile callouts/Makefile tools/Makefile system-settings/Makefile system-settings/plugins/Makefile system-settings/plugins/ifupdown/Makefile system-settings/plugins/ifupdown/tests/Makefile system-settings/plugins/ifnet/Makefile system-settings/plugins/ifnet/tests/Makefile system-settings/plugins/ifcfg-rh/Makefile system-settings/plugins/ifcfg-rh/tests/Makefile system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile system-settings/plugins/ifcfg-suse/Makefile system-settings/plugins/keyfile/Makefile system-settings/plugins/keyfile/tests/Makefile system-settings/plugins/keyfile/tests/keyfiles/Makefile cli/Makefile cli/src/Makefile test/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Debian/NetworkManager initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/Arch/Makefile initscript/Arch/networkmanager initscript/paldo/Makefile initscript/paldo/NetworkManager initscript/Mandriva/Makefile initscript/Mandriva/networkmanager initscript/linexa/Makefile initscript/linexa/networkmanager introspection/Makefile man/Makefile man/NetworkManager.8 man/NetworkManager.conf.5 man/nm-system-settings.conf.5 man/nm-tool.1 man/nm-online.1 man/nmcli.1 po/Makefile.in policy/Makefile data/Makefile docs/Makefile docs/libnm-glib/Makefile docs/libnm-util/Makefile NetworkManager.pc examples/Makefile examples/python/Makefile" +ac_config_files="$ac_config_files Makefile include/Makefile include/nm-version.h src/Makefile src/tests/Makefile marshallers/Makefile src/logging/Makefile src/dns-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/dhcp-manager/tests/Makefile src/ip6-manager/Makefile src/supplicant-manager/Makefile src/supplicant-manager/tests/Makefile src/ppp-manager/Makefile src/dnsmasq-manager/Makefile src/modem-manager/Makefile src/bluez-manager/Makefile src/system-settings/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile libnm-util/tests/Makefile libnm-util/tests/certs/Makefile libnm-glib/libnm-glib.pc libnm-glib/libnm-glib-vpn.pc libnm-glib/Makefile callouts/Makefile tools/Makefile system-settings/Makefile system-settings/plugins/Makefile system-settings/plugins/ifupdown/Makefile system-settings/plugins/ifupdown/tests/Makefile system-settings/plugins/ifnet/Makefile system-settings/plugins/ifnet/tests/Makefile system-settings/plugins/ifcfg-rh/Makefile system-settings/plugins/ifcfg-rh/tests/Makefile system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile system-settings/plugins/ifcfg-suse/Makefile system-settings/plugins/keyfile/Makefile system-settings/plugins/keyfile/tests/Makefile system-settings/plugins/keyfile/tests/keyfiles/Makefile cli/Makefile cli/src/Makefile test/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Debian/NetworkManager initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/Arch/Makefile initscript/Arch/networkmanager initscript/paldo/Makefile initscript/paldo/NetworkManager initscript/Mandriva/Makefile initscript/Mandriva/networkmanager initscript/linexa/Makefile initscript/linexa/networkmanager introspection/Makefile man/Makefile man/NetworkManager.8 man/NetworkManager.conf.5 man/nm-system-settings.conf.5 man/nm-tool.1 man/nm-online.1 man/nmcli.1 po/Makefile.in policy/Makefile data/Makefile docs/Makefile docs/libnm-glib/Makefile docs/libnm-util/Makefile NetworkManager.pc examples/Makefile examples/python/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16412,6 +16537,10 @@ if test -z "${TARGET_LINEXA_TRUE}" && test -z "${TARGET_LINEXA_FALSE}"; then as_fn_error $? "conditional \"TARGET_LINEXA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${TARGET_EXHERBO_TRUE}" && test -z "${TARGET_EXHERBO_FALSE}"; then + as_fn_error $? "conditional \"TARGET_EXHERBO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16424,6 +16553,10 @@ if test -z "${WITH_GNUTLS_TRUE}" && test -z "${WITH_GNUTLS_FALSE}"; then as_fn_error $? "conditional \"WITH_GNUTLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_PPP_TRUE}" && test -z "${WITH_PPP_FALSE}"; then + as_fn_error $? "conditional \"WITH_PPP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16856,7 +16989,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by NetworkManager $as_me 0.8.2, which was +This file was extended by NetworkManager $as_me 0.8.3.998, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16916,13 +17049,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -NetworkManager config.status 0.8.2 +NetworkManager config.status 0.8.3.998 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" @@ -17312,6 +17445,7 @@ do "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/nm-version.h") CONFIG_FILES="$CONFIG_FILES include/nm-version.h" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "marshallers/Makefile") CONFIG_FILES="$CONFIG_FILES marshallers/Makefile" ;; @@ -17319,6 +17453,7 @@ do "src/dns-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/dns-manager/Makefile" ;; "src/vpn-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/vpn-manager/Makefile" ;; "src/dhcp-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/dhcp-manager/Makefile" ;; + "src/dhcp-manager/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/dhcp-manager/tests/Makefile" ;; "src/ip6-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/ip6-manager/Makefile" ;; "src/supplicant-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/supplicant-manager/Makefile" ;; "src/supplicant-manager/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/supplicant-manager/tests/Makefile" ;; @@ -18804,6 +18939,12 @@ else echo systemd support: no fi +if test "${enable_ppp}" = "yes"; then + echo PPP support: yes +else + echo PPP support: no +fi + echo echo Building documentation: ${with_docs} echo Building tests: ${with_tests} diff --git a/configure.ac b/configure.ac index 6bbfd993..ebb2aa9e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,16 @@ AC_PREREQ(2.52) -AC_INIT(NetworkManager, 0.8.2, dcbw@redhat.com, NetworkManager) +dnl The NM version number +m4_define([nm_major_version], [0]) +m4_define([nm_minor_version], [8]) +m4_define([nm_micro_version], [3]) +m4_define([nm_nano_version], [998]) +m4_define([nm_version], + [nm_major_version.nm_minor_version.nm_micro_version.nm_nano_version]) + +AC_INIT([NetworkManager], [nm_version], + [http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager], + [NetworkManager]) AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) AM_MAINTAINER_MODE @@ -30,12 +40,22 @@ AC_SUBST([ACLOCAL_AMFLAGS]) dnl maintainer mode stuff if test $USE_MAINTAINER_MODE = yes; then - DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED" + DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED" else DISABLE_DEPRECATED="" fi AC_SUBST(DISABLE_DEPRECATED) +dnl Version stuff +NM_MAJOR_VERSION=nm_major_version +NM_MINOR_VERSION=nm_minor_version +NM_MICRO_VERSION=nm_micro_version +NM_VERSION=nm_version +AC_SUBST(NM_MAJOR_VERSION) +AC_SUBST(NM_MINOR_VERSION) +AC_SUBST(NM_MICRO_VERSION) +AC_SUBST(NM_VERSION) + dnl dnl Required headers dnl @@ -84,7 +104,7 @@ dnl Make sha1.c happy on big endian systems dnl AC_C_BIGENDIAN -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus or linexa])) +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus, linexa or exherbo])) if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") @@ -97,6 +117,7 @@ if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva") AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa") + AC_CHECK_FILE(/etc/exherbo-release,with_distro="exherbo") if test "z$with_distro" = "z"; then with_distro=`lsb_release -is` fi @@ -108,7 +129,7 @@ if test "z$with_distro" = "z"; then exit 1 else case $with_distro in - redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa) ;; + redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;; *) echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" exit 1 @@ -171,6 +192,11 @@ if test x"$with_distro" = xlinexa; then AC_DEFINE(TARGET_LINEXA, 1, [Define if you have linexa]) fi +AM_CONDITIONAL(TARGET_EXHERBO, test x"$with_distro" = xexherbo) +if test x"$with_distro" = xexherbo; then + AC_DEFINE(TARGET_EXHERBO, 1, [Define if you have Exherbo]) +fi + dnl dnl Distribution version string dnl @@ -275,6 +301,20 @@ with_nss=no with_gnutls=no if test x"$ac_crypto" = xnss; then PKG_CHECK_MODULES(NSS, [nss >= 3.11]) + + # Work around a pkg-config bug (fdo #29801) where exists != usable + AC_PATH_PROG(PKGCONFIG_PATH, pkg-config, no) + if test x"$PKGCONFIG_PATH" = xno; then + AC_MSG_ERROR([pkgconfig required but not found]) + else + FOO=`$PKGCONFIG_PATH --cflags --libs nss` + if test x"$?" != "x0"; then + AC_MSG_ERROR([No usable NSS found]) + fi + fi + + AC_SUBST(NSS_CFLAGS) + AC_SUBST(NSS_LIBS) AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS]) with_nss=yes elif test x"$ac_crypto" = xgnutls; then @@ -291,7 +331,7 @@ elif test x"$ac_crypto" = xgnutls; then with_gnutls=yes fi else - AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and key operations]) + AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and crypto operations]) fi AM_CONDITIONAL(WITH_NSS, test x"$with_nss" != xno) AM_CONDITIONAL(WITH_GNUTLS, test x"$with_gnutls" != xno) @@ -313,9 +353,16 @@ else fi AC_SUBST(DBUS_SYS_DIR) -# PPPD -AC_CHECK_HEADERS(pppd/pppd.h,, - AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.)) +# pppd +AC_ARG_ENABLE(ppp, AC_HELP_STRING([--enable-ppp], [enable PPP/PPPoE support]), + [enable_ppp=${enableval}], [enable_ppp=yes]) +if (test "${enable_ppp}" = "yes"); then + AC_CHECK_HEADERS(pppd/pppd.h,, + AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.)) + + AC_DEFINE(WITH_PPP, 1, [Define if you have PPP support]) +fi +AM_CONDITIONAL(WITH_PPP, test "${enable_ppp}" = "yes") AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory])) @@ -326,6 +373,7 @@ else fi AC_SUBST(PPPD_PLUGIN_DIR) + # dhclient support AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support])) # If a full path is given, use that and do not test if it works or not. @@ -491,6 +539,7 @@ esac AC_CONFIG_FILES([ Makefile include/Makefile +include/nm-version.h src/Makefile src/tests/Makefile marshallers/Makefile @@ -498,6 +547,7 @@ src/logging/Makefile src/dns-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile +src/dhcp-manager/tests/Makefile src/ip6-manager/Makefile src/supplicant-manager/Makefile src/supplicant-manager/tests/Makefile @@ -596,6 +646,12 @@ else echo systemd support: no fi +if test "${enable_ppp}" = "yes"; then + echo PPP support: yes +else + echo PPP support: no +fi + echo echo Building documentation: ${with_docs} echo Building tests: ${with_tests} diff --git a/data/Makefile.in b/data/Makefile.in index 66fe5a38..c5fb63ab 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/docs/Makefile.in b/docs/Makefile.in index b120c599..adcc2c43 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -222,6 +222,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -236,6 +240,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/docs/libnm-glib/Makefile.am b/docs/libnm-glib/Makefile.am index 96ff66ee..4a3a6e1e 100644 --- a/docs/libnm-glib/Makefile.am +++ b/docs/libnm-glib/Makefile.am @@ -75,11 +75,17 @@ GTKDOC_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -GTKDOC_LIBS = $(top_builddir)/libnm-glib/libnm-glib.la +GTKDOC_LIBS = \ + $(top_builddir)/libnm-glib/libnm-glib.la \ + $(GLIB_LIBS) # include common portion ... include $(top_srcdir)/gtk-doc.make -CLEANFILES += libnm-glib-sections.txt +CLEANFILES += \ + libnm-glib-sections.txt \ + html/* \ + tmpl/* \ + xml/* diff --git a/docs/libnm-glib/Makefile.in b/docs/libnm-glib/Makefile.in index 12937dd0..45be8a0f 100644 --- a/docs/libnm-glib/Makefile.in +++ b/docs/libnm-glib/Makefile.in @@ -156,6 +156,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -170,6 +174,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -321,7 +326,10 @@ GTKDOC_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -GTKDOC_LIBS = $(top_builddir)/libnm-glib/libnm-glib.la +GTKDOC_LIBS = \ + $(top_builddir)/libnm-glib/libnm-glib.la \ + $(GLIB_LIBS) + @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @@ -363,7 +371,7 @@ REPORT_FILES = \ # include common portion ... CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ - libnm-glib-sections.txt + libnm-glib-sections.txt html/* tmpl/* xml/* @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = diff --git a/docs/libnm-glib/html/NMAccessPoint.html b/docs/libnm-glib/html/NMAccessPoint.html index 4988976c..71c134c9 100644 --- a/docs/libnm-glib/html/NMAccessPoint.html +++ b/docs/libnm-glib/html/NMAccessPoint.html @@ -3,10 +3,10 @@ NMAccessPoint - + - + @@ -14,7 +14,7 @@ - + diff --git a/docs/libnm-glib/html/NMActiveConnection.html b/docs/libnm-glib/html/NMActiveConnection.html index ec15593a..bf28b0a5 100644 --- a/docs/libnm-glib/html/NMActiveConnection.html +++ b/docs/libnm-glib/html/NMActiveConnection.html @@ -3,7 +3,7 @@ NMActiveConnection - + @@ -54,7 +54,7 @@ const char *path); const char * nm_active_connection_get_service_name (NMActiveConnection *connection); -NMConnectionScopenm_active_connection_get_scope (NMActiveConnection *connection); +NMConnectionScopenm_active_connection_get_scope (NMActiveConnection *connection); const char * nm_active_connection_get_connection (NMActiveConnection *connection); const char * nm_active_connection_get_specific_object (NMActiveConnection *connection); @@ -70,6 +70,7 @@ const GObject +----NMObject +----NMActiveConnection + +----NMVPNConnection
@@ -228,7 +229,7 @@ connection, and must not be modified.

nm_active_connection_get_scope ()

-
NMConnectionScope   nm_active_connection_get_scope      (NMActiveConnection *connection);
+
NMConnectionScope   nm_active_connection_get_scope      (NMActiveConnection *connection);

Gets the scope of the active connection.

@@ -253,7 +254,7 @@ Gets the scope of the active connection.

nm_active_connection_get_connection ()

const char *        nm_active_connection_get_connection (NMActiveConnection *connection);

-Gets the NMConnection's DBus object path. +Gets the NMConnection's DBus object path.

@@ -265,7 +266,7 @@ Gets the - diff --git a/docs/libnm-glib/html/NMCdmaDevice.html b/docs/libnm-glib/html/NMCdmaDevice.html index c7153339..3bea2397 100644 --- a/docs/libnm-glib/html/NMCdmaDevice.html +++ b/docs/libnm-glib/html/NMCdmaDevice.html @@ -3,11 +3,11 @@ NMCdmaDevice - + - + @@ -18,7 +18,7 @@ - + - diff --git a/docs/libnm-glib/html/NMDHCP4Config.html b/docs/libnm-glib/html/NMDHCP4Config.html index b52751b8..233b1047 100644 --- a/docs/libnm-glib/html/NMDHCP4Config.html +++ b/docs/libnm-glib/html/NMDHCP4Config.html @@ -3,7 +3,7 @@ NMDHCP4Config - + diff --git a/docs/libnm-glib/html/NMDHCP6Config.html b/docs/libnm-glib/html/NMDHCP6Config.html index 005854f4..4dd32c33 100644 --- a/docs/libnm-glib/html/NMDHCP6Config.html +++ b/docs/libnm-glib/html/NMDHCP6Config.html @@ -3,11 +3,11 @@ NMDHCP6Config - + - + @@ -18,7 +18,7 @@ - +

Returns :

the object path of the NMConnection inside of NMActiveConnection. + the object path of the NMConnection inside of NMActiveConnection. This is the internal string used by the connection, and must not be modified.
Up Home libnm-glib Reference ManualNextNext
Top diff --git a/docs/libnm-glib/html/NMClient.html b/docs/libnm-glib/html/NMClient.html index b871e694..f2e61adb 100644 --- a/docs/libnm-glib/html/NMClient.html +++ b/docs/libnm-glib/html/NMClient.html @@ -3,7 +3,7 @@ NMClient - + @@ -444,7 +444,7 @@ Whether networking is enabled or disabled.

Returns :

TRUE if networking is disabled, FALSE if networking is enabled + TRUE if networking is enabled, FALSE if networking is disabled
Up Home libnm-glib Reference ManualNextNext
Top @@ -26,6 +26,8 @@ Description  |  Object Hierarchy +  |  + Properties

Description

@@ -180,6 +188,16 @@ configuration, and must not be modified.

+
+

Property Details

+
+

The "options" property

+
  "options"                  GHashTable*           : Read
+

+The GHashTable containing options of the configuration. +

+
+
@@ -103,6 +104,7 @@ const char * driver" gchar* : Read "firmware-missing" gboolean : Read "interface" gchar* : Read + "ip-interface" gchar* : Read "ip4-config" NMIP4Config* : Read "ip6-config" NMIP6Config* : Read "managed" gboolean : Read @@ -747,6 +749,16 @@ The interface of the device.

Default value: NULL


+
+

The "ip-interface" property

+
  "ip-interface"             gchar*                : Read
+

+The IP interface of the device which should be used for all IP-related +operations like addressing and routing. +

+

Default value: NULL

+
+

The "ip4-config" property

  "ip4-config"               NMIP4Config*          : Read
diff --git a/docs/libnm-glib/html/NMDeviceBt.html b/docs/libnm-glib/html/NMDeviceBt.html new file mode 100644 index 00000000..3893c367 --- /dev/null +++ b/docs/libnm-glib/html/NMDeviceBt.html @@ -0,0 +1,262 @@ + + + + +NMDeviceBt + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

NMDeviceBt

+

NMDeviceBt

+
+
+

Synopsis

+
#define             NM_DEVICE_BT_HW_ADDRESS
+#define             NM_DEVICE_BT_NAME
+#define             NM_DEVICE_BT_CAPABILITIES
+                    NMDeviceBt;
+                    NMDeviceBtClass;
+GObject *           nm_device_bt_new                    (DBusGConnection *connection,
+                                                         const char *path);
+const char *        nm_device_bt_get_hw_address         (NMDeviceBt *device);
+const char *        nm_device_bt_get_name               (NMDeviceBt *device);
+NMBluetoothCapabilities  nm_device_bt_get_capabilities  (NMDeviceBt *device);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----NMObject
+         +----NMDevice
+               +----NMDeviceBt
+
+
+
+

Properties

+
+  "bt-capabilities"          guint                 : Read
+  "hw-address"               gchar*                : Read
+  "name"                     gchar*                : Read
+
+
+
+

Description

+

+

+
+
+

Details

+
+

NM_DEVICE_BT_HW_ADDRESS

+
#define NM_DEVICE_BT_HW_ADDRESS   "hw-address"
+
+

+

+
+
+
+

NM_DEVICE_BT_NAME

+
#define NM_DEVICE_BT_NAME         "name"
+
+

+

+
+
+
+

NM_DEVICE_BT_CAPABILITIES

+
#define NM_DEVICE_BT_CAPABILITIES "bt-capabilities"
+
+

+

+
+
+
+

NMDeviceBt

+
typedef struct _NMDeviceBt NMDeviceBt;
+

+

+
+
+
+

NMDeviceBtClass

+
typedef struct {
+	NMDeviceClass parent;
+
+	/* Padding for future expansion */
+	void (*_reserved1) (void);
+	void (*_reserved2) (void);
+	void (*_reserved3) (void);
+	void (*_reserved4) (void);
+	void (*_reserved5) (void);
+	void (*_reserved6) (void);
+} NMDeviceBtClass;
+
+

+

+
+
+
+

nm_device_bt_new ()

+
GObject *           nm_device_bt_new                    (DBusGConnection *connection,
+                                                         const char *path);
+

+Creates a new NMDeviceBt. +

+
++ + + + + + + + + + + + + + +

connection :

the DBusGConnection +

path :

the DBus object path of the device +

Returns :

a new device +
+
+
+
+

nm_device_bt_get_hw_address ()

+
const char *        nm_device_bt_get_hw_address         (NMDeviceBt *device);
+

+Gets the hardware (MAC) address of the NMDeviceBt +

+
++ + + + + + + + + + +

device :

a NMDeviceBt +

Returns :

the hardware address. This is the internal string used by the +device, and must not be modified. +
+
+
+
+

nm_device_bt_get_name ()

+
const char *        nm_device_bt_get_name               (NMDeviceBt *device);
+

+Gets the name of the NMDeviceBt. +

+
++ + + + + + + + + + +

device :

a NMDeviceBt +

Returns :

the name of the device +
+
+
+
+

nm_device_bt_get_capabilities ()

+
NMBluetoothCapabilities  nm_device_bt_get_capabilities  (NMDeviceBt *device);
+

+Returns the Bluetooth device's usable capabilities. +

+
++ + + + + + + + + + +

device :

a NMDeviceBt +

Returns :

a combination of NMBluetoothCapabilities +
+
+
+
+

Property Details

+
+

The "bt-capabilities" property

+
  "bt-capabilities"          guint                 : Read
+

+The device's bluetooth capabilities, a combination of NMBluetoothCapabilities. +

+

Default value: 0

+
+
+
+

The "hw-address" property

+
  "hw-address"               gchar*                : Read
+

+The hardware (MAC) address of the device. +

+

Default value: NULL

+
+
+
+

The "name" property

+
  "name"                     gchar*                : Read
+

+The name of the bluetooth device. +

+

Default value: NULL

+
+
+
+ + + \ No newline at end of file diff --git a/docs/libnm-glib/html/NMDeviceEthernet.html b/docs/libnm-glib/html/NMDeviceEthernet.html index 5d63e2e5..ff725116 100644 --- a/docs/libnm-glib/html/NMDeviceEthernet.html +++ b/docs/libnm-glib/html/NMDeviceEthernet.html @@ -3,7 +3,7 @@ NMDeviceEthernet - + diff --git a/docs/libnm-glib/html/NMDeviceWifi.html b/docs/libnm-glib/html/NMDeviceWifi.html index 34e09856..c08e9cd1 100644 --- a/docs/libnm-glib/html/NMDeviceWifi.html +++ b/docs/libnm-glib/html/NMDeviceWifi.html @@ -3,7 +3,7 @@ NMDeviceWifi - + diff --git a/docs/libnm-glib/html/NMExportedConnection.html b/docs/libnm-glib/html/NMExportedConnection.html new file mode 100644 index 00000000..9cd9ee73 --- /dev/null +++ b/docs/libnm-glib/html/NMExportedConnection.html @@ -0,0 +1,139 @@ + + + + +NMExportedConnection + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

NMExportedConnection

+

NMExportedConnection

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----NMConnection
+         +----NMExportedConnection
+
+
+
+

Implemented Interfaces

+

+NMExportedConnection implements + NMSettingsConnectionInterface.

+
+
+

Description

+

+

+
+
+

Details

+
+

NMExportedConnection

+
typedef struct _NMExportedConnection NMExportedConnection;
+

+

+
+
+
+

NMExportedConnectionClass

+
typedef struct {
+	NMConnectionClass parent;
+
+	GHashTable * (*get_settings) (NMExportedConnection *self,
+	                              GError **error);
+
+	void (*update) (NMExportedConnection *self,
+	                GHashTable *new_settings,
+	                DBusGMethodInvocation *context);
+
+	void (*delete) (NMExportedConnection *self,
+	                DBusGMethodInvocation *context);
+
+	void (*get_secrets) (NMExportedConnection *self,
+	                     const gchar *setting_name,
+	                     const gchar **hints,
+	                     gboolean request_new,
+	                     DBusGMethodInvocation *context);
+
+	/* Padding for future expansion */
+	void (*_reserved1) (void);
+	void (*_reserved2) (void);
+	void (*_reserved3) (void);
+	void (*_reserved4) (void);
+	void (*_reserved5) (void);
+	void (*_reserved6) (void);
+} NMExportedConnectionClass;
+
+

+

+
+
+
+

nm_exported_connection_new ()

+
NMExportedConnection * nm_exported_connection_new       (NMConnectionScope scope);
+

+Creates a new object representing the remote connection. +

+
++ + + + + + + + + + +

scope :

the Connection scope (either user or system) +

Returns :

the new exported connection object on success, or NULL on failure +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/libnm-glib/html/NMGsmDevice.html b/docs/libnm-glib/html/NMGsmDevice.html index 5de272de..bad58c50 100644 --- a/docs/libnm-glib/html/NMGsmDevice.html +++ b/docs/libnm-glib/html/NMGsmDevice.html @@ -3,7 +3,7 @@ NMGsmDevice - + diff --git a/docs/libnm-glib/html/NMIP4Config.html b/docs/libnm-glib/html/NMIP4Config.html index 391278d1..63f441c3 100644 --- a/docs/libnm-glib/html/NMIP4Config.html +++ b/docs/libnm-glib/html/NMIP4Config.html @@ -3,7 +3,7 @@ NMIP4Config - + diff --git a/docs/libnm-glib/html/NMIP6Config.html b/docs/libnm-glib/html/NMIP6Config.html index d156ff91..b8de4edf 100644 --- a/docs/libnm-glib/html/NMIP6Config.html +++ b/docs/libnm-glib/html/NMIP6Config.html @@ -3,7 +3,7 @@ NMIP6Config - + @@ -269,7 +269,7 @@ internal copy used by the configuration, and must not be modified.
  "addresses"                nm-ip6-address-object-array*  : Read

The GPtrArray containing the IPv6 addresses; use -nm_utils_ip6_addresses_from_gvalue() to return a GSList of +nm_utils_ip6_addresses_from_gvalue() to return a GSList of NMSettingIP6Address objects that is more usable than the raw data.

@@ -296,7 +296,7 @@ contain the addresses of nameservers of the configuration.
  "routes"                   nm-ip6-route-object-array*  : Read

The GPtrArray containing the IPv6 routes; use -nm_utils_ip6_routes_from_gvalue() to return a GSList of +nm_utils_ip6_routes_from_gvalue() to return a GSList of NMSettingIP6Address objects that is more usable than the raw data.

diff --git a/docs/libnm-glib/html/NMObject.html b/docs/libnm-glib/html/NMObject.html index 4cabb746..b21facc5 100644 --- a/docs/libnm-glib/html/NMObject.html +++ b/docs/libnm-glib/html/NMObject.html @@ -3,22 +3,22 @@ NMObject - + - - + + - + - +

-libnm-glib Objects

+libnm-glib Objects
diff --git a/docs/libnm-glib/html/index.html b/docs/libnm-glib/html/index.html index a8362fcc..02d33be8 100644 --- a/docs/libnm-glib/html/index.html +++ b/docs/libnm-glib/html/index.html @@ -3,7 +3,7 @@ libnm-glib Reference Manual - + @@ -50,7 +50,7 @@ NMCdmaDevice
-NMDeviceBt +NMDeviceBt
NMAccessPoint @@ -68,43 +68,43 @@ NMDHCP6Config
-NMExportedConnection +NMExportedConnection
NMObject
-NMRemoteConnection +NMRemoteConnection
-NMRemoteSettings +NMRemoteSettings
NMRemoteSettingsSystem
-nm-settings-connection-interface +NMSettingsConnection
-nm-settings-interface +NMSettings
NMSettingsService
-nm-settings-system-interface +NMSettingsSystem
nm-types
-NMVPNConnection +NMVPNConnection
NMVPNPlugin
-nm-vpn-plugin-ui-interface +NMVpnPluginUi
diff --git a/docs/libnm-glib/html/index.sgml b/docs/libnm-glib/html/index.sgml index 0b929b1c..e3c76b21 100644 --- a/docs/libnm-glib/html/index.sgml +++ b/docs/libnm-glib/html/index.sgml @@ -129,6 +129,7 @@ + @@ -222,19 +223,25 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -339,6 +346,7 @@ + @@ -347,13 +355,17 @@ - - - - - - - + + + + + + + + + + + @@ -369,23 +381,36 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -395,11 +420,15 @@ + + + + - + @@ -409,6 +438,10 @@ + + + + @@ -417,7 +450,7 @@ - + @@ -466,17 +499,25 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/docs/libnm-glib/html/libnm-glib-NMDeviceBt.html b/docs/libnm-glib/html/libnm-glib-NMDeviceBt.html deleted file mode 100644 index 91c5f6fb..00000000 --- a/docs/libnm-glib/html/libnm-glib-NMDeviceBt.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - -NMDeviceBt - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

NMDeviceBt

-

NMDeviceBt

-
-
-

Synopsis

-
#define             NM_DEVICE_BT_HW_ADDRESS
-#define             NM_DEVICE_BT_NAME
-#define             NM_DEVICE_BT_CAPABILITIES
-                    NMDeviceBt;
-                    NMDeviceBtClass;
-GObject *           nm_device_bt_new                    (DBusGConnection *connection,
-                                                         const char *path);
-const char *        nm_device_bt_get_hw_address         (NMDeviceBt *device);
-const char *        nm_device_bt_get_name               (NMDeviceBt *device);
-NMBluetoothCapabilities  nm_device_bt_get_capabilities  (NMDeviceBt *device);
-
-
-
-

Description

-

-

-
-
-

Details

-
-

NM_DEVICE_BT_HW_ADDRESS

-
#define NM_DEVICE_BT_HW_ADDRESS   "hw-address"
-
-

-

-
-
-
-

NM_DEVICE_BT_NAME

-
#define NM_DEVICE_BT_NAME         "name"
-
-

-

-
-
-
-

NM_DEVICE_BT_CAPABILITIES

-
#define NM_DEVICE_BT_CAPABILITIES "bt-capabilities"
-
-

-

-
-
-
-

NMDeviceBt

-
typedef struct {
-	NMDevice parent;
-} NMDeviceBt;
-
-

-

-
-
-
-

NMDeviceBtClass

-
typedef struct {
-	NMDeviceClass parent;
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMDeviceBtClass;
-
-

-

-
-
-
-

nm_device_bt_new ()

-
GObject *           nm_device_bt_new                    (DBusGConnection *connection,
-                                                         const char *path);
-

-Creates a new NMDeviceBt. -

-
-- - - - - - - - - - - - - - -

connection :

the DBusGConnection -

path :

the DBus object path of the device -

Returns :

a new device -
-
-
-
-

nm_device_bt_get_hw_address ()

-
const char *        nm_device_bt_get_hw_address         (NMDeviceBt *device);
-

-Gets the hardware (MAC) address of the NMDeviceBt -

-
-- - - - - - - - - - -

device :

a NMDeviceBt -

Returns :

the hardware address. This is the internal string used by the -device, and must not be modified. -
-
-
-
-

nm_device_bt_get_name ()

-
const char *        nm_device_bt_get_name               (NMDeviceBt *device);
-

-Gets the name of the NMDeviceBt. -

-
-- - - - - - - - - - -

device :

a NMDeviceBt -

Returns :

the name of the device -
-
-
-
-

nm_device_bt_get_capabilities ()

-
NMBluetoothCapabilities  nm_device_bt_get_capabilities  (NMDeviceBt *device);
-

-Returns the Bluetooth device's usable capabilities. -

-
-- - - - - - - - - - -

device :

a NMDeviceBt -

Returns :

a combination of NMBluetoothCapabilities -
-
-
-
- - - \ No newline at end of file diff --git a/docs/libnm-glib/html/libnm-glib-NMExportedConnection.html b/docs/libnm-glib/html/libnm-glib-NMExportedConnection.html deleted file mode 100644 index a93169af..00000000 --- a/docs/libnm-glib/html/libnm-glib-NMExportedConnection.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - -NMExportedConnection - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

NMExportedConnection

-

NMExportedConnection

-
- -
-

Description

-

-

-
-
-

Details

-
-

NMExportedConnection

-
typedef struct {
-	NMConnection parent;
-} NMExportedConnection;
-
-

-

-
-
-
-

NMExportedConnectionClass

-
typedef struct {
-	NMConnectionClass parent;
-
-	GHashTable * (*get_settings) (NMExportedConnection *self,
-	                              GError **error);
-
-	void (*update) (NMExportedConnection *self,
-	                GHashTable *new_settings,
-	                DBusGMethodInvocation *context);
-
-	void (*delete) (NMExportedConnection *self,
-	                DBusGMethodInvocation *context);
-
-	void (*get_secrets) (NMExportedConnection *self,
-	                     const gchar *setting_name,
-	                     const gchar **hints,
-	                     gboolean request_new,
-	                     DBusGMethodInvocation *context);
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMExportedConnectionClass;
-
-

-

-
-
-
-

nm_exported_connection_new ()

-
NMExportedConnection * nm_exported_connection_new       (NMConnectionScope scope);
-

-Creates a new object representing the remote connection. -

-
-- - - - - - - - - - -

scope :

the Connection scope (either user or system) -

Returns :

the new exported connection object on success, or NULL on failure -
-
-
-
- - - \ No newline at end of file diff --git a/docs/libnm-glib/html/libnm-glib-NMRemoteConnection.html b/docs/libnm-glib/html/libnm-glib-NMRemoteConnection.html deleted file mode 100644 index 74a87b65..00000000 --- a/docs/libnm-glib/html/libnm-glib-NMRemoteConnection.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - -NMRemoteConnection - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

NMRemoteConnection

-

NMRemoteConnection

-
- -
-

Description

-

-

-
-
-

Details

-
-

NMRemoteConnection

-
typedef struct {
-	NMConnection parent;
-} NMRemoteConnection;
-
-

-

-
-
-
-

NMRemoteConnectionClass

-
typedef struct {
-	NMConnectionClass parent_class;
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMRemoteConnectionClass;
-
-

-

-
-
-
-

nm_remote_connection_new ()

-
NMRemoteConnection * nm_remote_connection_new           (DBusGConnection *bus,
-                                                         NMConnectionScope scope,
-                                                         const char *path);
-

-Creates a new object representing the remote connection. -

-
-- - - - - - - - - - - - - - - - - - -

bus :

a valid and connected D-Bus connection -

scope :

the Connection scope (either user or system) -

path :

the D-Bus path of the connection as exported by the settings service - indicated by scope -

Returns :

the new remote connection object on success, or NULL on failure -
-
-
-
- - - \ No newline at end of file diff --git a/docs/libnm-glib/html/libnm-glib-NMRemoteSettings.html b/docs/libnm-glib/html/libnm-glib-NMRemoteSettings.html deleted file mode 100644 index 7ea15083..00000000 --- a/docs/libnm-glib/html/libnm-glib-NMRemoteSettings.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - -NMRemoteSettings - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

NMRemoteSettings

-

NMRemoteSettings

-
- -
-

Description

-

-

-
-
-

Details

-
-

NM_REMOTE_SETTINGS_BUS

-
#define NM_REMOTE_SETTINGS_BUS "bus"
-
-

-

-
-
-
-

NM_REMOTE_SETTINGS_SCOPE

-
#define NM_REMOTE_SETTINGS_SCOPE "scope"
-
-

-

-
-
-
-

NM_REMOTE_SETTINGS_SERVICE_RUNNING

-
#define NM_REMOTE_SETTINGS_SERVICE_RUNNING "service-running"
-
-

-

-
-
-
-

NMRemoteSettings

-
typedef struct {
-	GObject parent;
-} NMRemoteSettings;
-
-

-

-
-
-
-

NMRemoteSettingsClass

-
typedef struct {
-	GObjectClass parent;
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMRemoteSettingsClass;
-
-

-

-
-
-
-

nm_remote_settings_new ()

-
NMRemoteSettings *  nm_remote_settings_new              (DBusGConnection *bus,
-                                                         NMConnectionScope scope);
-

-Creates a new object representing the remote settings service. -

-
-- - - - - - - - - - - - - - -

bus :

a valid and connected D-Bus connection -

scope :

the settings service scope (either user or system) -

Returns :

the new remote settings object on success, or NULL on failure -
-
-
-
- - - \ No newline at end of file diff --git a/docs/libnm-glib/html/libnm-glib-NMRemoteSettingsSystem.html b/docs/libnm-glib/html/libnm-glib-NMRemoteSettingsSystem.html index 5eb2e970..d87a2fd2 100644 --- a/docs/libnm-glib/html/libnm-glib-NMRemoteSettingsSystem.html +++ b/docs/libnm-glib/html/libnm-glib-NMRemoteSettingsSystem.html @@ -3,18 +3,18 @@ NMRemoteSettingsSystem - + - - + + - + diff --git a/docs/libnm-glib/html/libnm-glib-NMSettings.html b/docs/libnm-glib/html/libnm-glib-NMSettings.html index 77b1e594..e56ab8fc 100644 --- a/docs/libnm-glib/html/libnm-glib-NMSettings.html +++ b/docs/libnm-glib/html/libnm-glib-NMSettings.html @@ -2,11 +2,11 @@ -nm-settings-interface - +NMSettings + - + @@ -24,42 +24,67 @@ Top  |  Description +  |  + Object Hierarchy +  |  + Prerequisites +  |  + Known Implementations -
+
-

nm-settings-interface

-

nm-settings-interface

+

NMSettings

+

NMSettings

+
+

Object Hierarchy

+
+  GInterface
+   +----NMSettingsInterface
+
+
+
+

Prerequisites

+

+NMSettingsInterface requires + GObject.

+
+
+

Known Implementations

+

+NMSettingsInterface is implemented by + NMRemoteSettings.

+

Description

@@ -132,44 +157,15 @@ Setting error quark.


-

NMSettingsInterface

-
typedef struct {
-	GTypeInterface g_iface;
-
-	/* Methods */
-	/* Returns a list of objects implementing NMSettingsConnectionInterface */
-	GSList * (*list_connections) (NMSettingsInterface *settings);
-
-	NMSettingsConnectionInterface * (*get_connection_by_path) (NMSettingsInterface *settings,
-	                                                           const char *path);
-
-	gboolean (*add_connection) (NMSettingsInterface *settings,
-	                            NMConnection *connection,
-	                            NMSettingsAddConnectionFunc callback,
-	                            gpointer user_data);
-
-	/* Signals */
-	void (*new_connection) (NMSettingsInterface *settings,
-	                        NMSettingsConnectionInterface *connection);
-
-	void (*connections_read) (NMSettingsInterface *settings);
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMSettingsInterface;
-
+

NMSettingsInterface

+
typedef struct _NMSettingsInterface NMSettingsInterface;


NMSettingsAddConnectionFunc ()

-
void                (*NMSettingsAddConnectionFunc)      (NMSettingsInterface *settings,
+
void                (*NMSettingsAddConnectionFunc)      (NMSettingsInterface *settings,
                                                          GError *error,
                                                          gpointer user_data);

@@ -214,7 +210,7 @@ Setting error quark.

nm_settings_interface_list_connections ()

GSList *            nm_settings_interface_list_connections
-                                                        (NMSettingsInterface *settings);
+ (NMSettingsInterface *settings);

@@ -236,8 +232,8 @@ Setting error quark.

nm_settings_interface_get_connection_by_path ()

-
NMSettingsConnectionInterface * nm_settings_interface_get_connection_by_path
-                                                        (NMSettingsInterface *settings,
+
NMSettingsConnectionInterface * nm_settings_interface_get_connection_by_path
+                                                        (NMSettingsInterface *settings,
                                                          const char *path);

@@ -266,8 +262,8 @@ Setting error quark.

nm_settings_interface_add_connection ()

gboolean            nm_settings_interface_add_connection
-                                                        (NMSettingsInterface *settings,
-                                                         NMConnection *connection,
+                                                        (NMSettingsInterface *settings,
+                                                         NMConnection *connection,
                                                          NMSettingsAddConnectionFunc callback,
                                                          gpointer user_data);

@@ -278,7 +274,7 @@ Requests that the settings service add the given settings to a new connection.

- diff --git a/docs/libnm-glib/html/libnm-glib-NMSettingsConnection.html b/docs/libnm-glib/html/libnm-glib-NMSettingsConnection.html index 68420b00..dc4e4ffa 100644 --- a/docs/libnm-glib/html/libnm-glib-NMSettingsConnection.html +++ b/docs/libnm-glib/html/libnm-glib-NMSettingsConnection.html @@ -2,12 +2,12 @@ -nm-settings-connection-interface - +NMSettingsConnection + - + @@ -24,54 +24,79 @@ Top  |  Description +  |  + Object Hierarchy +  |  + Prerequisites +  |  + Known Implementations

settings :

a object implementing NMSettingsInterface +a object implementing NMSettingsInterface
-
+
-

nm-settings-connection-interface

-

nm-settings-connection-interface

+

NMSettingsConnection

+

NMSettingsConnection

Synopsis

-
#define             NM_SETTINGS_CONNECTION_INTERFACE_UPDATED
+
#define             NM_SETTINGS_CONNECTION_INTERFACE_UPDATED
 #define             NM_SETTINGS_CONNECTION_INTERFACE_REMOVED
-                    NMSettingsConnectionInterface;
+                    NMSettingsConnectionInterface;
 void                (*NMSettingsConnectionInterfaceUpdateFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GError *error,
                                                          gpointer user_data);
 void                (*NMSettingsConnectionInterfaceDeleteFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GError *error,
                                                          gpointer user_data);
 void                (*NMSettingsConnectionInterfaceGetSecretsFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GHashTable *secrets,
                                                          GError *error,
                                                          gpointer user_data);
 gboolean            nm_settings_connection_interface_update
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          NMSettingsConnectionInterfaceUpdateFunc callback,
                                                          gpointer user_data);
 gboolean            nm_settings_connection_interface_delete
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          NMSettingsConnectionInterfaceDeleteFunc callback,
                                                          gpointer user_data);
 gboolean            nm_settings_connection_interface_get_secrets
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          const char *setting_name,
                                                          const char **hints,
                                                          gboolean request_new,
                                                          NMSettingsConnectionInterfaceGetSecretsFunc callback,
                                                          gpointer user_data);
 void                nm_settings_connection_interface_emit_updated
-                                                        (NMSettingsConnectionInterface *connection);
+                                                        (NMSettingsConnectionInterface *connection);
+
+
+
+

Object Hierarchy

+
+  GInterface
+   +----NMSettingsConnectionInterface
 
+
+

Prerequisites

+

+NMSettingsConnectionInterface requires + NMConnection.

+
+
+

Known Implementations

+

+NMSettingsConnectionInterface is implemented by + NMExportedConnection and NMRemoteConnection.

+

Description

@@ -96,44 +121,8 @@


-

NMSettingsConnectionInterface

-
typedef struct {
-	GTypeInterface g_iface;
-
-	/* Methods */
-	gboolean (*update) (NMSettingsConnectionInterface *connection,
-	                    NMSettingsConnectionInterfaceUpdateFunc callback,
-	                    gpointer user_data);
-
-	gboolean (*delete) (NMSettingsConnectionInterface *connection,
-	                    NMSettingsConnectionInterfaceDeleteFunc callback,
-	                    gpointer user_data);
-
-	gboolean (*get_secrets) (NMSettingsConnectionInterface *connection,
-	                         const char *setting_name,
-                             const char **hints,
-                             gboolean request_new,
-                             NMSettingsConnectionInterfaceGetSecretsFunc callback,
-                             gpointer user_data);
-
-	void (*emit_updated) (NMSettingsConnectionInterface *connection);
-
-	/* Signals */
-	/* 'new_settings' hash should *not* contain secrets */
-	void (*updated) (NMSettingsConnectionInterface *connection,
-	                 GHashTable *new_settings);
-
-	void (*removed) (NMSettingsConnectionInterface *connection);
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMSettingsConnectionInterface;
-
+

NMSettingsConnectionInterface

+
typedef struct _NMSettingsConnectionInterface NMSettingsConnectionInterface;

@@ -141,7 +130,7 @@

NMSettingsConnectionInterfaceUpdateFunc ()

void                (*NMSettingsConnectionInterfaceUpdateFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GError *error,
                                                          gpointer user_data);

@@ -171,7 +160,7 @@

NMSettingsConnectionInterfaceDeleteFunc ()

void                (*NMSettingsConnectionInterfaceDeleteFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GError *error,
                                                          gpointer user_data);

@@ -201,7 +190,7 @@

NMSettingsConnectionInterfaceGetSecretsFunc ()

void                (*NMSettingsConnectionInterfaceGetSecretsFunc)
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          GHashTable *secrets,
                                                          GError *error,
                                                          gpointer user_data);
@@ -237,7 +226,7 @@

nm_settings_connection_interface_update ()

gboolean            nm_settings_connection_interface_update
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          NMSettingsConnectionInterfaceUpdateFunc callback,
                                                          gpointer user_data);

@@ -248,7 +237,7 @@ Update the connection with current settings and properties.

connection :

-an object implementing NMSettingsConnectionInterface +an object implementing NMSettingsConnectionInterface @@ -273,7 +262,7 @@ Update the connection with current settings and properties.

nm_settings_connection_interface_delete ()

gboolean            nm_settings_connection_interface_delete
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          NMSettingsConnectionInterfaceDeleteFunc callback,
                                                          gpointer user_data);

@@ -284,7 +273,7 @@ Delete the connection.

connection :

-a objecting implementing NMSettingsConnectionInterface +a objecting implementing NMSettingsConnectionInterface @@ -309,7 +298,7 @@ Delete the connection.

nm_settings_connection_interface_get_secrets ()

gboolean            nm_settings_connection_interface_get_secrets
-                                                        (NMSettingsConnectionInterface *connection,
+                                                        (NMSettingsConnectionInterface *connection,
                                                          const char *setting_name,
                                                          const char **hints,
                                                          gboolean request_new,
@@ -323,18 +312,18 @@ Request the connection's secrets.
 
 
 

connection :

-a object implementing NMSettingsConnectionInterface +a object implementing NMSettingsConnectionInterface

setting_name :

-the NMSetting object name to get secrets for +the NMSetting object name to get secrets for

hints :

-NMSetting key names to get secrets for (optional) +NMSetting key names to get secrets for (optional) @@ -365,7 +354,7 @@ Request the connection's secrets.

nm_settings_connection_interface_emit_updated ()

void                nm_settings_connection_interface_emit_updated
-                                                        (NMSettingsConnectionInterface *connection);
+ (NMSettingsConnectionInterface *connection);

diff --git a/docs/libnm-glib/html/libnm-glib-NMSettingsService.html b/docs/libnm-glib/html/libnm-glib-NMSettingsService.html index 817c78e4..85c51a6b 100644 --- a/docs/libnm-glib/html/libnm-glib-NMSettingsService.html +++ b/docs/libnm-glib/html/libnm-glib-NMSettingsService.html @@ -3,11 +3,11 @@ NMSettingsService - + - - + + @@ -41,13 +41,13 @@ #define NM_SETTINGS_SERVICE_SCOPENMSettingsService; NMSettingsServiceClass; -NMExportedConnection * nm_settings_service_get_connection_by_path +NMExportedConnection * nm_settings_service_get_connection_by_path (NMSettingsService *self, const char *path); voidnm_settings_service_export (NMSettingsService *self); voidnm_settings_service_export_connection (NMSettingsService *self, - NMSettingsConnectionInterface *exported); + NMSettingsConnectionInterface *exported);
@@ -115,7 +115,7 @@

nm_settings_service_get_connection_by_path ()

-
NMExportedConnection * nm_settings_service_get_connection_by_path
+
NMExportedConnection * nm_settings_service_get_connection_by_path
                                                         (NMSettingsService *self,
                                                          const char *path);

@@ -161,7 +161,7 @@

nm_settings_service_export_connection ()

void                nm_settings_service_export_connection
                                                         (NMSettingsService *self,
-                                                         NMSettingsConnectionInterface *exported);
+ NMSettingsConnectionInterface *exported);

diff --git a/docs/libnm-glib/html/libnm-glib-NMSettingsSystem.html b/docs/libnm-glib/html/libnm-glib-NMSettingsSystem.html index c5e754f5..1be498be 100644 --- a/docs/libnm-glib/html/libnm-glib-NMSettingsSystem.html +++ b/docs/libnm-glib/html/libnm-glib-NMSettingsSystem.html @@ -2,8 +2,8 @@ -nm-settings-system-interface - +NMSettingsSystem + @@ -26,12 +26,12 @@ Description
-
+
-

nm-settings-system-interface

-

nm-settings-system-interface

+

NMSettingsSystem

+

NMSettingsSystem

diff --git a/docs/libnm-glib/html/libnm-glib-NMVPNConnection.html b/docs/libnm-glib/html/libnm-glib-NMVPNConnection.html deleted file mode 100644 index f1dbf961..00000000 --- a/docs/libnm-glib/html/libnm-glib-NMVPNConnection.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - -NMVPNConnection - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

NMVPNConnection

-

NMVPNConnection

-
- -
-

Description

-

-

-
-
-

Details

-
-

NM_VPN_CONNECTION_VPN_STATE

-
#define NM_VPN_CONNECTION_VPN_STATE "vpn-state"
-
-

-

-
-
-
-

NM_VPN_CONNECTION_BANNER

-
#define NM_VPN_CONNECTION_BANNER "banner"
-
-

-

-
-
-
-

NMVPNConnection

-
typedef struct {
-	NMActiveConnection parent;
-} NMVPNConnection;
-
-

-

-
-
-
-

NMVPNConnectionClass

-
typedef struct {
-	NMActiveConnectionClass parent;
-
-	/* Signals */
-	void (*vpn_state_changed) (NMVPNConnection *connection,
-	                           NMVPNConnectionState state,
-	                           NMVPNConnectionStateReason reason);
-
-	/* Padding for future expansion */
-	void (*_reserved1) (void);
-	void (*_reserved2) (void);
-	void (*_reserved3) (void);
-	void (*_reserved4) (void);
-	void (*_reserved5) (void);
-	void (*_reserved6) (void);
-} NMVPNConnectionClass;
-
-

-

-
-
-
-

nm_vpn_connection_new ()

-
GObject *           nm_vpn_connection_new               (DBusGConnection *dbus_connection,
-                                                         const char *path);
-

-

-
-- - - - - - - - - - - - - - -

dbus_connection :

-

path :

-

Returns :

-
-
-
-
-

nm_vpn_connection_get_vpn_state ()

-
NMVPNConnectionState  nm_vpn_connection_get_vpn_state   (NMVPNConnection *vpn);
-

-

-
-- - - - - - - - - - -

vpn :

-

Returns :

-
-
-
-
-

nm_vpn_connection_get_banner ()

-
const char *        nm_vpn_connection_get_banner        (NMVPNConnection *vpn);
-

-

-
-- - - - - - - - - - -

vpn :

-

Returns :

-
-
-
-
- - - \ No newline at end of file diff --git a/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html b/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html index 49d9b816..f085a2be 100644 --- a/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html +++ b/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html @@ -3,18 +3,18 @@ NMVPNPlugin - + - - + + - + diff --git a/docs/libnm-glib/html/libnm-glib-NMVpnPluginUi.html b/docs/libnm-glib/html/libnm-glib-NMVpnPluginUi.html index fdf3e5e8..30017061 100644 --- a/docs/libnm-glib/html/libnm-glib-NMVpnPluginUi.html +++ b/docs/libnm-glib/html/libnm-glib-NMVpnPluginUi.html @@ -2,8 +2,8 @@ -nm-vpn-plugin-ui-interface - +NMVpnPluginUi + @@ -25,12 +25,12 @@ Description -
+
-

nm-vpn-plugin-ui-interface

-

nm-vpn-plugin-ui-interface

+

NMVpnPluginUi

+

NMVpnPluginUi

@@ -49,23 +49,23 @@ enum NMVpnPluginUiInterfaceProp; NMVpnPluginUiWidgetInterface * nm_vpn_plugin_ui_interface_ui_factory (NMVpnPluginUiInterface *iface, - NMConnection *connection, + NMConnection *connection, GError **error); guint32 nm_vpn_plugin_ui_interface_get_capabilities (NMVpnPluginUiInterface *iface); -NMConnection * nm_vpn_plugin_ui_interface_import (NMVpnPluginUiInterface *iface, +NMConnection * nm_vpn_plugin_ui_interface_import (NMVpnPluginUiInterface *iface, const char *path, GError **error); gboolean nm_vpn_plugin_ui_interface_export (NMVpnPluginUiInterface *iface, const char *path, - NMConnection *connection, + NMConnection *connection, GError **error); char * nm_vpn_plugin_ui_interface_get_suggested_name (NMVpnPluginUiInterface *iface, - NMConnection *connection); + NMConnection *connection); gboolean nm_vpn_plugin_ui_interface_delete_connection (NMVpnPluginUiInterface *iface, - NMConnection *connection, + NMConnection *connection, GError **error); #define NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE #define NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (obj) @@ -77,11 +77,11 @@ enum NMVpnPluginUiWidgetInterface *iface); gboolean nm_vpn_plugin_ui_widget_interface_update_connection (NMVpnPluginUiWidgetInterface *iface, - NMConnection *connection, + NMConnection *connection, GError **error); gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInterface *iface, - NMConnection *connection, + NMConnection *connection, GError **error);
@@ -302,7 +302,7 @@ enum

nm_vpn_plugin_ui_interface_ui_factory ()

NMVpnPluginUiWidgetInterface * nm_vpn_plugin_ui_interface_ui_factory
                                                         (NMVpnPluginUiInterface *iface,
-                                                         NMConnection *connection,
+                                                         NMConnection *connection,
                                                          GError **error);

@@ -358,7 +358,7 @@ enum

nm_vpn_plugin_ui_interface_import ()

-
NMConnection *      nm_vpn_plugin_ui_interface_import   (NMVpnPluginUiInterface *iface,
+
NMConnection *      nm_vpn_plugin_ui_interface_import   (NMVpnPluginUiInterface *iface,
                                                          const char *path,
                                                          GError **error);

@@ -394,7 +394,7 @@ enum

nm_vpn_plugin_ui_interface_export ()

gboolean            nm_vpn_plugin_ui_interface_export   (NMVpnPluginUiInterface *iface,
                                                          const char *path,
-                                                         NMConnection *connection,
+                                                         NMConnection *connection,
                                                          GError **error);

@@ -434,7 +434,7 @@ enum

nm_vpn_plugin_ui_interface_get_suggested_name ()

char *              nm_vpn_plugin_ui_interface_get_suggested_name
                                                         (NMVpnPluginUiInterface *iface,
-                                                         NMConnection *connection);
+ NMConnection *connection);

@@ -463,7 +463,7 @@ enum

nm_vpn_plugin_ui_interface_delete_connection ()

gboolean            nm_vpn_plugin_ui_interface_delete_connection
                                                         (NMVpnPluginUiInterface *iface,
-                                                         NMConnection *connection,
+                                                         NMConnection *connection,
                                                          GError **error);

@@ -593,7 +593,7 @@ enum

nm_vpn_plugin_ui_widget_interface_update_connection ()

gboolean            nm_vpn_plugin_ui_widget_interface_update_connection
                                                         (NMVpnPluginUiWidgetInterface *iface,
-                                                         NMConnection *connection,
+                                                         NMConnection *connection,
                                                          GError **error);

@@ -628,7 +628,7 @@ enum

nm_vpn_plugin_ui_widget_interface_save_secrets ()

gboolean            nm_vpn_plugin_ui_widget_interface_save_secrets
                                                         (NMVpnPluginUiWidgetInterface *iface,
-                                                         NMConnection *connection,
+                                                         NMConnection *connection,
                                                          GError **error);

diff --git a/docs/libnm-glib/html/libnm-glib-nm-types.html b/docs/libnm-glib/html/libnm-glib-nm-types.html index 478abeaa..ec303a29 100644 --- a/docs/libnm-glib/html/libnm-glib-nm-types.html +++ b/docs/libnm-glib/html/libnm-glib-nm-types.html @@ -3,11 +3,11 @@ nm-types - + - - + + @@ -18,7 +18,7 @@ - +
Up Home libnm-glib Reference ManualNextNext
Top diff --git a/docs/libnm-glib/html/libnm-glib.devhelp b/docs/libnm-glib/html/libnm-glib.devhelp index 2b5fac7f..28707b00 100644 --- a/docs/libnm-glib/html/libnm-glib.devhelp +++ b/docs/libnm-glib/html/libnm-glib.devhelp @@ -11,25 +11,25 @@ - + - + - - + + - - + + - + - + - + @@ -139,6 +139,7 @@ + @@ -198,15 +199,18 @@ - - - - - - - - - + + + + + + + + + + + + @@ -286,9 +290,10 @@ - - - + + + + @@ -297,21 +302,26 @@ - - - - - - - - - + + + + + + + + + + + + + + - + @@ -325,7 +335,7 @@ - + @@ -362,13 +372,16 @@ - - - - - - - + + + + + + + + + + diff --git a/docs/libnm-glib/html/libnm-glib.devhelp2 b/docs/libnm-glib/html/libnm-glib.devhelp2 index ae9daccf..a3b30798 100644 --- a/docs/libnm-glib/html/libnm-glib.devhelp2 +++ b/docs/libnm-glib/html/libnm-glib.devhelp2 @@ -11,25 +11,25 @@ - + - + - - + + - - + + - + - + - + @@ -139,6 +139,7 @@ + @@ -198,15 +199,18 @@ - - - - - - - - - + + + + + + + + + + + + @@ -286,9 +290,10 @@ - - - + + + + @@ -297,21 +302,26 @@ - - - - - - - - - + + + + + + + + + + + + + + - + @@ -325,7 +335,7 @@ - + @@ -362,13 +372,16 @@ - - - - - - - + + + + + + + + + + diff --git a/docs/libnm-glib/libnm-glib-sections.txt b/docs/libnm-glib/libnm-glib-sections.txt index 90bb4f61..a585d42c 100644 --- a/docs/libnm-glib/libnm-glib-sections.txt +++ b/docs/libnm-glib/libnm-glib-sections.txt @@ -1,17 +1,63 @@
-nm-remote-settings-system -NMRemoteSettingsSystem -NMRemoteSettingsSystem -NMRemoteSettingsSystemClass -nm_remote_settings_system_new +nm-exported-connection +NMExportedConnection +NMExportedConnection +NMExportedConnectionClass +nm_exported_connection_new -NM_REMOTE_SETTINGS_SYSTEM -NM_IS_REMOTE_SETTINGS_SYSTEM -NM_TYPE_REMOTE_SETTINGS_SYSTEM -nm_remote_settings_system_get_type -NM_REMOTE_SETTINGS_SYSTEM_CLASS -NM_IS_REMOTE_SETTINGS_SYSTEM_CLASS -NM_REMOTE_SETTINGS_SYSTEM_GET_CLASS +NM_EXPORTED_CONNECTION +NM_IS_EXPORTED_CONNECTION +NM_TYPE_EXPORTED_CONNECTION +nm_exported_connection_get_type +NM_EXPORTED_CONNECTION_CLASS +NM_IS_EXPORTED_CONNECTION_CLASS +NM_EXPORTED_CONNECTION_GET_CLASS +
+ +
+nm-device +NMDevice +NM_DEVICE_UDI +NM_DEVICE_INTERFACE +NM_DEVICE_IP_INTERFACE +NM_DEVICE_DRIVER +NM_DEVICE_CAPABILITIES +NM_DEVICE_MANAGED +NM_DEVICE_FIRMWARE_MISSING +NM_DEVICE_IP4_CONFIG +NM_DEVICE_DHCP4_CONFIG +NM_DEVICE_IP6_CONFIG +NM_DEVICE_DHCP6_CONFIG +NM_DEVICE_STATE +NM_DEVICE_VENDOR +NM_DEVICE_PRODUCT +NMDevice +NMDeviceClass +nm_device_new +nm_device_get_iface +nm_device_get_ip_iface +nm_device_get_udi +nm_device_get_driver +nm_device_get_capabilities +nm_device_get_managed +nm_device_get_firmware_missing +nm_device_get_ip4_config +nm_device_get_dhcp4_config +nm_device_get_ip6_config +nm_device_get_dhcp6_config +nm_device_get_state +nm_device_get_product +nm_device_get_vendor +NMDeviceDeactivateFn +nm_device_disconnect + +NM_DEVICE +NM_IS_DEVICE +NM_TYPE_DEVICE +nm_device_get_type +NM_DEVICE_CLASS +NM_IS_DEVICE_CLASS +NM_DEVICE_GET_CLASS
@@ -46,24 +92,106 @@ NM_ACTIVE_CONNECTION_GET_CLASS
-nm-settings-system-interface -NMSettingsSystem -NMSettingsSystemPermissions -NM_SETTINGS_SYSTEM_INTERFACE_HOSTNAME -NM_SETTINGS_SYSTEM_INTERFACE_CAN_MODIFY -NM_SETTINGS_SYSTEM_INTERFACE_CHECK_PERMISSIONS -NMSettingsSystemInterfaceProp -NMSettingsSystemInterface -NMSettingsSystemSaveHostnameFunc -NMSettingsSystemGetPermissionsFunc -nm_settings_system_interface_save_hostname -nm_settings_system_interface_get_permissions +nm-access-point +NMAccessPoint +NM_ACCESS_POINT_FLAGS +NM_ACCESS_POINT_WPA_FLAGS +NM_ACCESS_POINT_RSN_FLAGS +NM_ACCESS_POINT_SSID +NM_ACCESS_POINT_FREQUENCY +NM_ACCESS_POINT_HW_ADDRESS +NM_ACCESS_POINT_MODE +NM_ACCESS_POINT_MAX_BITRATE +NM_ACCESS_POINT_STRENGTH +NMAccessPoint +NMAccessPointClass +nm_access_point_new +nm_access_point_get_flags +nm_access_point_get_wpa_flags +nm_access_point_get_rsn_flags +nm_access_point_get_ssid +nm_access_point_get_frequency +nm_access_point_get_hw_address +nm_access_point_get_mode +nm_access_point_get_max_bitrate +nm_access_point_get_strength -NM_SETTINGS_SYSTEM_INTERFACE -NM_IS_SETTINGS_SYSTEM_INTERFACE -NM_TYPE_SETTINGS_SYSTEM_INTERFACE -nm_settings_system_interface_get_type -NM_SETTINGS_SYSTEM_INTERFACE_GET_INTERFACE +NM_ACCESS_POINT +NM_IS_ACCESS_POINT +NM_TYPE_ACCESS_POINT +nm_access_point_get_type +NM_ACCESS_POINT_CLASS +NM_IS_ACCESS_POINT_CLASS +NM_ACCESS_POINT_GET_CLASS +
+ +
+nm-vpn-connection +NMVPNConnection +NM_VPN_CONNECTION_VPN_STATE +NM_VPN_CONNECTION_BANNER +NMVPNConnection +NMVPNConnectionClass +nm_vpn_connection_new +nm_vpn_connection_get_vpn_state +nm_vpn_connection_get_banner + +NM_VPN_CONNECTION +NM_IS_VPN_CONNECTION +NM_TYPE_VPN_CONNECTION +nm_vpn_connection_get_type +NM_VPN_CONNECTION_CLASS +NM_IS_VPN_CONNECTION_CLASS +NM_VPN_CONNECTION_GET_CLASS +
+ +
+nm-settings-connection-interface +NMSettingsConnection +NM_SETTINGS_CONNECTION_INTERFACE_UPDATED +NM_SETTINGS_CONNECTION_INTERFACE_REMOVED +NMSettingsConnectionInterface +NMSettingsConnectionInterfaceUpdateFunc +NMSettingsConnectionInterfaceDeleteFunc +NMSettingsConnectionInterfaceGetSecretsFunc +nm_settings_connection_interface_update +nm_settings_connection_interface_delete +nm_settings_connection_interface_get_secrets +nm_settings_connection_interface_emit_updated + +NM_SETTINGS_CONNECTION_INTERFACE +NM_IS_SETTINGS_CONNECTION_INTERFACE +NM_TYPE_SETTINGS_CONNECTION_INTERFACE +nm_settings_connection_interface_get_type +NM_SETTINGS_CONNECTION_INTERFACE_GET_INTERFACE +
+ +
+nm-ip4-config +NMIP4Config +NMIP4Config +NMIP4ConfigClass +NM_IP4_CONFIG_ADDRESSES +NM_IP4_CONFIG_HOSTNAME +NM_IP4_CONFIG_NAMESERVERS +NM_IP4_CONFIG_DOMAINS +NM_IP4_CONFIG_ROUTES +NM_IP4_CONFIG_WINS_SERVERS +nm_ip4_config_new +nm_ip4_config_get_addresses +nm_ip4_config_get_hostname +nm_ip4_config_get_nameservers +nm_ip4_config_get_domains +nm_ip4_config_get_routes +nm_ip4_config_get_wins_servers + +NM_IP4_CONFIG +NM_IS_IP4_CONFIG +NM_TYPE_IP4_CONFIG +nm_ip4_config_get_type +NM_IP4_CONFIG_CLASS +NM_IS_IP4_CONFIG_CLASS +NM_IP4_CONFIG_GET_CLASS
@@ -86,20 +214,59 @@ NM_REMOTE_SETTINGS_GET_CLASS
-nm-serial-device -NMSerialDevice -NMSerialDevice -NMSerialDeviceClass -nm_serial_device_get_bytes_received -nm_serial_device_get_bytes_sent +nm-ip6-config +NMIP6Config +NMIP6Config +NMIP6ConfigClass +NM_IP6_CONFIG_ADDRESSES +NM_IP6_CONFIG_NAMESERVERS +NM_IP6_CONFIG_DOMAINS +NM_IP6_CONFIG_ROUTES +nm_ip6_config_new +nm_ip6_config_get_addresses +nm_ip6_config_get_nameservers +nm_ip6_config_get_domains +nm_ip6_config_get_routes -NM_SERIAL_DEVICE -NM_IS_SERIAL_DEVICE -NM_TYPE_SERIAL_DEVICE -nm_serial_device_get_type -NM_SERIAL_DEVICE_CLASS -NM_IS_SERIAL_DEVICE_CLASS -NM_SERIAL_DEVICE_GET_CLASS +NM_IP6_CONFIG +NM_IS_IP6_CONFIG +NM_TYPE_IP6_CONFIG +nm_ip6_config_get_type +NM_IP6_CONFIG_CLASS +NM_IS_IP6_CONFIG_CLASS +NM_IP6_CONFIG_GET_CLASS +
+ +
+nm-remote-settings-system +NMRemoteSettingsSystem +NMRemoteSettingsSystem +NMRemoteSettingsSystemClass +nm_remote_settings_system_new + +NM_REMOTE_SETTINGS_SYSTEM +NM_IS_REMOTE_SETTINGS_SYSTEM +NM_TYPE_REMOTE_SETTINGS_SYSTEM +nm_remote_settings_system_get_type +NM_REMOTE_SETTINGS_SYSTEM_CLASS +NM_IS_REMOTE_SETTINGS_SYSTEM_CLASS +NM_REMOTE_SETTINGS_SYSTEM_GET_CLASS +
+ +
+nm-cdma-device +NMCdmaDevice +NMCdmaDevice +NMCdmaDeviceClass +nm_cdma_device_new + +NM_CDMA_DEVICE +NM_IS_CDMA_DEVICE +NM_TYPE_CDMA_DEVICE +nm_cdma_device_get_type +NM_CDMA_DEVICE_CLASS +NM_IS_CDMA_DEVICE_CLASS +NM_CDMA_DEVICE_GET_CLASS
@@ -133,252 +300,21 @@ NM_DEVICE_WIFI_GET_CLASS
-nm-dhcp6-config -NMDHCP6Config -NMDHCP6Config -NMDHCP6ConfigClass -NM_DHCP6_CONFIG_OPTIONS -nm_dhcp6_config_new -nm_dhcp6_config_get_options -nm_dhcp6_config_get_one_option - -NM_DHCP6_CONFIG -NM_IS_DHCP6_CONFIG -NM_TYPE_DHCP6_CONFIG -nm_dhcp6_config_get_type -NM_DHCP6_CONFIG_CLASS -NM_IS_DHCP6_CONFIG_CLASS -
- -
-nm-exported-connection -NMExportedConnection -NMExportedConnection -NMExportedConnectionClass -nm_exported_connection_new - -NM_EXPORTED_CONNECTION -NM_IS_EXPORTED_CONNECTION -NM_TYPE_EXPORTED_CONNECTION -nm_exported_connection_get_type -NM_EXPORTED_CONNECTION_CLASS -NM_IS_EXPORTED_CONNECTION_CLASS -NM_EXPORTED_CONNECTION_GET_CLASS -
- -
-nm-object -NMObject -NM_OBJECT_DBUS_CONNECTION -NM_OBJECT_DBUS_PATH -NMObject -NMObjectClass -nm_object_get_connection -nm_object_get_path - -NM_OBJECT -NM_IS_OBJECT -NM_TYPE_OBJECT -nm_object_get_type -NM_OBJECT_CLASS -NM_IS_OBJECT_CLASS -NM_OBJECT_GET_CLASS -
- -
-nm-settings-interface -NMSettings -NMSettingsInterfaceError -NM_SETTINGS_INTERFACE_ERROR -nm_settings_interface_error_quark -NM_TYPE_SETTINGS_INTERFACE_ERROR -NM_SETTINGS_INTERFACE_NEW_CONNECTION -NM_SETTINGS_INTERFACE_CONNECTIONS_READ -NMSettingsInterface -NMSettingsAddConnectionFunc -nm_settings_interface_get_type -nm_settings_interface_list_connections -nm_settings_interface_get_connection_by_path -nm_settings_interface_add_connection - -NM_SETTINGS_INTERFACE -NM_IS_SETTINGS_INTERFACE -NM_TYPE_SETTINGS_INTERFACE -nm_settings_interface_error_get_type -NM_SETTINGS_INTERFACE_GET_INTERFACE -
- -
-nm-settings-service -NMSettingsService -NM_SETTINGS_SERVICE_BUS -NM_SETTINGS_SERVICE_SCOPE -NMSettingsService -NMSettingsServiceClass -nm_settings_service_get_connection_by_path -nm_settings_service_export -nm_settings_service_export_connection - -NM_SETTINGS_SERVICE -NM_IS_SETTINGS_SERVICE -NM_TYPE_SETTINGS_SERVICE -nm_settings_service_get_type -NM_SETTINGS_SERVICE_CLASS -NM_IS_SETTINGS_SERVICE_CLASS -NM_SETTINGS_SERVICE_GET_CLASS -
- -
-nm-ip4-config -NMIP4Config -NMIP4Config -NMIP4ConfigClass -NM_IP4_CONFIG_ADDRESSES -NM_IP4_CONFIG_HOSTNAME -NM_IP4_CONFIG_NAMESERVERS -NM_IP4_CONFIG_DOMAINS -NM_IP4_CONFIG_ROUTES -NM_IP4_CONFIG_WINS_SERVERS -nm_ip4_config_new -nm_ip4_config_get_addresses -nm_ip4_config_get_hostname -nm_ip4_config_get_nameservers -nm_ip4_config_get_domains -nm_ip4_config_get_routes -nm_ip4_config_get_wins_servers - -NM_IP4_CONFIG -NM_IS_IP4_CONFIG -NM_TYPE_IP4_CONFIG -nm_ip4_config_get_type -NM_IP4_CONFIG_CLASS -NM_IS_IP4_CONFIG_CLASS -NM_IP4_CONFIG_GET_CLASS -
- -
-nm-gsm-device -NMGsmDevice -NMGsmDevice -NMGsmDeviceClass -nm_gsm_device_new - -NM_GSM_DEVICE -NM_IS_GSM_DEVICE -NM_TYPE_GSM_DEVICE -nm_gsm_device_get_type -NM_GSM_DEVICE_CLASS -NM_IS_GSM_DEVICE_CLASS -NM_GSM_DEVICE_GET_CLASS -
- -
-nm-vpn-plugin -NMVPNPlugin -NM_VPN_PLUGIN_DBUS_SERVICE_NAME -NM_VPN_PLUGIN_STATE -NMVPNPluginError -NM_VPN_PLUGIN_ERROR -NM_TYPE_VPN_PLUGIN_ERROR -NMVPNPlugin -NMVPNPluginClass -nm_vpn_plugin_error_quark -nm_vpn_plugin_error_get_type -nm_vpn_plugin_get_connection -nm_vpn_plugin_get_state -nm_vpn_plugin_set_state -nm_vpn_plugin_set_login_banner -nm_vpn_plugin_failure -nm_vpn_plugin_set_ip4_config -nm_vpn_plugin_disconnect - -NM_VPN_PLUGIN -NM_IS_VPN_PLUGIN -NM_TYPE_VPN_PLUGIN -nm_vpn_plugin_get_type -NM_VPN_PLUGIN_CLASS -NM_IS_VPN_PLUGIN_CLASS -NM_VPN_PLUGIN_GET_CLASS -
- -
-nm-access-point -NMAccessPoint -NM_ACCESS_POINT_FLAGS -NM_ACCESS_POINT_WPA_FLAGS -NM_ACCESS_POINT_RSN_FLAGS -NM_ACCESS_POINT_SSID -NM_ACCESS_POINT_FREQUENCY -NM_ACCESS_POINT_HW_ADDRESS -NM_ACCESS_POINT_MODE -NM_ACCESS_POINT_MAX_BITRATE -NM_ACCESS_POINT_STRENGTH -NMAccessPoint -NMAccessPointClass -nm_access_point_new -nm_access_point_get_flags -nm_access_point_get_wpa_flags -nm_access_point_get_rsn_flags -nm_access_point_get_ssid -nm_access_point_get_frequency -nm_access_point_get_hw_address -nm_access_point_get_mode -nm_access_point_get_max_bitrate -nm_access_point_get_strength - -NM_ACCESS_POINT -NM_IS_ACCESS_POINT -NM_TYPE_ACCESS_POINT -nm_access_point_get_type -NM_ACCESS_POINT_CLASS -NM_IS_ACCESS_POINT_CLASS -NM_ACCESS_POINT_GET_CLASS -
- -
-nm-device -NMDevice -NM_DEVICE_UDI -NM_DEVICE_INTERFACE -NM_DEVICE_IP_INTERFACE -NM_DEVICE_DRIVER -NM_DEVICE_CAPABILITIES -NM_DEVICE_MANAGED -NM_DEVICE_FIRMWARE_MISSING -NM_DEVICE_IP4_CONFIG -NM_DEVICE_DHCP4_CONFIG -NM_DEVICE_IP6_CONFIG -NM_DEVICE_DHCP6_CONFIG -NM_DEVICE_STATE -NM_DEVICE_VENDOR -NM_DEVICE_PRODUCT -NMDevice -NMDeviceClass -nm_device_new -nm_device_get_iface -nm_device_get_ip_iface -nm_device_get_udi -nm_device_get_driver -nm_device_get_capabilities -nm_device_get_managed -nm_device_get_firmware_missing -nm_device_get_ip4_config -nm_device_get_dhcp4_config -nm_device_get_ip6_config -nm_device_get_dhcp6_config -nm_device_get_state -nm_device_get_product -nm_device_get_vendor -NMDeviceDeactivateFn -nm_device_disconnect +nm-dhcp4-config +NMDHCP4Config +NMDHCP4Config +NMDHCP4ConfigClass +NM_DHCP4_CONFIG_OPTIONS +nm_dhcp4_config_new +nm_dhcp4_config_get_options +nm_dhcp4_config_get_one_option -NM_DEVICE -NM_IS_DEVICE -NM_TYPE_DEVICE -nm_device_get_type -NM_DEVICE_CLASS -NM_IS_DEVICE_CLASS -NM_DEVICE_GET_CLASS +NM_DHCP4_CONFIG +NM_IS_DHCP4_CONFIG +NM_TYPE_DHCP4_CONFIG +nm_dhcp4_config_get_type +NM_DHCP4_CONFIG_CLASS +NM_IS_DHCP4_CONFIG_CLASS
@@ -401,132 +337,26 @@ NM_IS_DEVICE_ETHERNET NM_TYPE_DEVICE_ETHERNET nm_device_ethernet_get_type NM_DEVICE_ETHERNET_CLASS -NM_IS_DEVICE_ETHERNET_CLASS -NM_DEVICE_ETHERNET_GET_CLASS -
- -
-nm-settings-connection-interface -NMSettingsConnection -NM_SETTINGS_CONNECTION_INTERFACE_UPDATED -NM_SETTINGS_CONNECTION_INTERFACE_REMOVED -NMSettingsConnectionInterface -NMSettingsConnectionInterfaceUpdateFunc -NMSettingsConnectionInterfaceDeleteFunc -NMSettingsConnectionInterfaceGetSecretsFunc -nm_settings_connection_interface_update -nm_settings_connection_interface_delete -nm_settings_connection_interface_get_secrets -nm_settings_connection_interface_emit_updated - -NM_SETTINGS_CONNECTION_INTERFACE -NM_IS_SETTINGS_CONNECTION_INTERFACE -NM_TYPE_SETTINGS_CONNECTION_INTERFACE -nm_settings_connection_interface_get_type -NM_SETTINGS_CONNECTION_INTERFACE_GET_INTERFACE -
- -
-nm-vpn-connection -NMVPNConnection -NM_VPN_CONNECTION_VPN_STATE -NM_VPN_CONNECTION_BANNER -NMVPNConnection -NMVPNConnectionClass -nm_vpn_connection_new -nm_vpn_connection_get_vpn_state -nm_vpn_connection_get_banner - -NM_VPN_CONNECTION -NM_IS_VPN_CONNECTION -NM_TYPE_VPN_CONNECTION -nm_vpn_connection_get_type -NM_VPN_CONNECTION_CLASS -NM_IS_VPN_CONNECTION_CLASS -NM_VPN_CONNECTION_GET_CLASS -
- -
-nm-vpn-plugin-ui-interface -NMVpnPluginUiWidget -NMVpnPluginUi -NMVpnPluginUiInterface -NMVpnPluginUiWidgetInterface -NMVpnPluginUiFactory -nm_vpn_plugin_ui_factory -NM_VPN_PLUGIN_UI_CAPABILITY_NONE -NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT -NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT -NM_VPN_PLUGIN_UI_INTERFACE_NAME -NM_VPN_PLUGIN_UI_INTERFACE_DESC -NM_VPN_PLUGIN_UI_INTERFACE_SERVICE -NMVpnPluginUiInterfaceProp -nm_vpn_plugin_ui_interface_ui_factory -nm_vpn_plugin_ui_interface_get_capabilities -nm_vpn_plugin_ui_interface_import -nm_vpn_plugin_ui_interface_export -nm_vpn_plugin_ui_interface_get_suggested_name -nm_vpn_plugin_ui_interface_delete_connection -NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE -NM_VPN_PLUGIN_UI_WIDGET_INTERFACE -NM_IS_VPN_PLUGIN_UI_WIDGET_INTERFACE -NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE -nm_vpn_plugin_ui_widget_interface_get_type -nm_vpn_plugin_ui_widget_interface_get_widget -nm_vpn_plugin_ui_widget_interface_update_connection -nm_vpn_plugin_ui_widget_interface_save_secrets - -NM_VPN_PLUGIN_UI_INTERFACE -NM_IS_VPN_PLUGIN_UI_INTERFACE -NM_TYPE_VPN_PLUGIN_UI_INTERFACE -nm_vpn_plugin_ui_interface_get_type -NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE -
- -
-nm-ip6-config -NMIP6Config -NMIP6Config -NMIP6ConfigClass -NM_IP6_CONFIG_ADDRESSES -NM_IP6_CONFIG_NAMESERVERS -NM_IP6_CONFIG_DOMAINS -NM_IP6_CONFIG_ROUTES -nm_ip6_config_new -nm_ip6_config_get_addresses -nm_ip6_config_get_nameservers -nm_ip6_config_get_domains -nm_ip6_config_get_routes - -NM_IP6_CONFIG -NM_IS_IP6_CONFIG -NM_TYPE_IP6_CONFIG -nm_ip6_config_get_type -NM_IP6_CONFIG_CLASS -NM_IS_IP6_CONFIG_CLASS -NM_IP6_CONFIG_GET_CLASS -
- -
-nm-device-bt -NMDeviceBt -NM_DEVICE_BT_HW_ADDRESS -NM_DEVICE_BT_NAME -NM_DEVICE_BT_CAPABILITIES -NMDeviceBt -NMDeviceBtClass -nm_device_bt_new -nm_device_bt_get_hw_address -nm_device_bt_get_name -nm_device_bt_get_capabilities +NM_IS_DEVICE_ETHERNET_CLASS +NM_DEVICE_ETHERNET_GET_CLASS +
+ +
+nm-dhcp6-config +NMDHCP6Config +NMDHCP6Config +NMDHCP6ConfigClass +NM_DHCP6_CONFIG_OPTIONS +nm_dhcp6_config_new +nm_dhcp6_config_get_options +nm_dhcp6_config_get_one_option -NM_DEVICE_BT -NM_IS_DEVICE_BT -NM_TYPE_DEVICE_BT -nm_device_bt_get_type -NM_DEVICE_BT_CLASS -NM_IS_DEVICE_BT_CLASS -NM_DEVICE_BT_GET_CLASS +NM_DHCP6_CONFIG +NM_IS_DHCP6_CONFIG +NM_TYPE_DHCP6_CONFIG +nm_dhcp6_config_get_type +NM_DHCP6_CONFIG_CLASS +NM_IS_DHCP6_CONFIG_CLASS
@@ -573,24 +403,6 @@ NM_IS_CLIENT_CLASS NM_CLIENT_GET_CLASS
-
-nm-dhcp4-config -NMDHCP4Config -NMDHCP4Config -NMDHCP4ConfigClass -NM_DHCP4_CONFIG_OPTIONS -nm_dhcp4_config_new -nm_dhcp4_config_get_options -nm_dhcp4_config_get_one_option - -NM_DHCP4_CONFIG -NM_IS_DHCP4_CONFIG -NM_TYPE_DHCP4_CONFIG -nm_dhcp4_config_get_type -NM_DHCP4_CONFIG_CLASS -NM_IS_DHCP4_CONFIG_CLASS -
-
nm-remote-connection NMRemoteConnection @@ -608,28 +420,207 @@ NM_REMOTE_CONNECTION_GET_CLASS
-nm-cdma-device -NMCdmaDevice -NMCdmaDevice -NMCdmaDeviceClass -nm_cdma_device_new +nm-gsm-device +NMGsmDevice +NMGsmDevice +NMGsmDeviceClass +nm_gsm_device_new -NM_CDMA_DEVICE -NM_IS_CDMA_DEVICE -NM_TYPE_CDMA_DEVICE -nm_cdma_device_get_type -NM_CDMA_DEVICE_CLASS -NM_IS_CDMA_DEVICE_CLASS -NM_CDMA_DEVICE_GET_CLASS +NM_GSM_DEVICE +NM_IS_GSM_DEVICE +NM_TYPE_GSM_DEVICE +nm_gsm_device_get_type +NM_GSM_DEVICE_CLASS +NM_IS_GSM_DEVICE_CLASS +NM_GSM_DEVICE_GET_CLASS +
+ +
+nm-vpn-plugin-ui-interface +NMVpnPluginUiWidget +NMVpnPluginUi +NMVpnPluginUiInterface +NMVpnPluginUiWidgetInterface +NMVpnPluginUiFactory +nm_vpn_plugin_ui_factory +NM_VPN_PLUGIN_UI_CAPABILITY_NONE +NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT +NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT +NM_VPN_PLUGIN_UI_INTERFACE_NAME +NM_VPN_PLUGIN_UI_INTERFACE_DESC +NM_VPN_PLUGIN_UI_INTERFACE_SERVICE +NMVpnPluginUiInterfaceProp +nm_vpn_plugin_ui_interface_ui_factory +nm_vpn_plugin_ui_interface_get_capabilities +nm_vpn_plugin_ui_interface_import +nm_vpn_plugin_ui_interface_export +nm_vpn_plugin_ui_interface_get_suggested_name +nm_vpn_plugin_ui_interface_delete_connection +NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE +NM_VPN_PLUGIN_UI_WIDGET_INTERFACE +NM_IS_VPN_PLUGIN_UI_WIDGET_INTERFACE +NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE +nm_vpn_plugin_ui_widget_interface_get_type +nm_vpn_plugin_ui_widget_interface_get_widget +nm_vpn_plugin_ui_widget_interface_update_connection +nm_vpn_plugin_ui_widget_interface_save_secrets + +NM_VPN_PLUGIN_UI_INTERFACE +NM_IS_VPN_PLUGIN_UI_INTERFACE +NM_TYPE_VPN_PLUGIN_UI_INTERFACE +nm_vpn_plugin_ui_interface_get_type +NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE +
+ +
+nm-vpn-plugin +NMVPNPlugin +NM_VPN_PLUGIN_DBUS_SERVICE_NAME +NM_VPN_PLUGIN_STATE +NMVPNPluginError +NM_VPN_PLUGIN_ERROR +NM_TYPE_VPN_PLUGIN_ERROR +NMVPNPlugin +NMVPNPluginClass +nm_vpn_plugin_error_quark +nm_vpn_plugin_error_get_type +nm_vpn_plugin_get_connection +nm_vpn_plugin_get_state +nm_vpn_plugin_set_state +nm_vpn_plugin_set_login_banner +nm_vpn_plugin_failure +nm_vpn_plugin_set_ip4_config +nm_vpn_plugin_disconnect + +NM_VPN_PLUGIN +NM_IS_VPN_PLUGIN +NM_TYPE_VPN_PLUGIN +nm_vpn_plugin_get_type +NM_VPN_PLUGIN_CLASS +NM_IS_VPN_PLUGIN_CLASS +NM_VPN_PLUGIN_GET_CLASS +
+ +
+nm-serial-device +NMSerialDevice +NMSerialDevice +NMSerialDeviceClass +nm_serial_device_get_bytes_received +nm_serial_device_get_bytes_sent + +NM_SERIAL_DEVICE +NM_IS_SERIAL_DEVICE +NM_TYPE_SERIAL_DEVICE +nm_serial_device_get_type +NM_SERIAL_DEVICE_CLASS +NM_IS_SERIAL_DEVICE_CLASS +NM_SERIAL_DEVICE_GET_CLASS +
+ +
+nm-settings-system-interface +NMSettingsSystem +NMSettingsSystemPermissions +NM_SETTINGS_SYSTEM_INTERFACE_HOSTNAME +NM_SETTINGS_SYSTEM_INTERFACE_CAN_MODIFY +NM_SETTINGS_SYSTEM_INTERFACE_CHECK_PERMISSIONS +NMSettingsSystemInterfaceProp +NMSettingsSystemInterface +NMSettingsSystemSaveHostnameFunc +NMSettingsSystemGetPermissionsFunc +nm_settings_system_interface_save_hostname +nm_settings_system_interface_get_permissions + +NM_SETTINGS_SYSTEM_INTERFACE +NM_IS_SETTINGS_SYSTEM_INTERFACE +NM_TYPE_SETTINGS_SYSTEM_INTERFACE +nm_settings_system_interface_get_type +NM_SETTINGS_SYSTEM_INTERFACE_GET_INTERFACE +
+ +
+nm-settings-service +NMSettingsService +NM_SETTINGS_SERVICE_BUS +NM_SETTINGS_SERVICE_SCOPE +NMSettingsService +NMSettingsServiceClass +nm_settings_service_get_connection_by_path +nm_settings_service_export +nm_settings_service_export_connection + +NM_SETTINGS_SERVICE +NM_IS_SETTINGS_SERVICE +NM_TYPE_SETTINGS_SERVICE +nm_settings_service_get_type +NM_SETTINGS_SERVICE_CLASS +NM_IS_SETTINGS_SERVICE_CLASS +NM_SETTINGS_SERVICE_GET_CLASS
-nm-wimax-device-bindings -DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Device_WiMax -org_freedesktop_NetworkManager_Device_WiMax_get_nsp_list -org_freedesktop_NetworkManager_Device_WiMax_get_nsp_list_reply -org_freedesktop_NetworkManager_Device_WiMax_get_nsp_list_async -dbus_g_proxy_begin_call +nm-object +NMObject +NM_OBJECT_DBUS_CONNECTION +NM_OBJECT_DBUS_PATH +NMObject +NMObjectClass +nm_object_get_connection +nm_object_get_path + +NM_OBJECT +NM_IS_OBJECT +NM_TYPE_OBJECT +nm_object_get_type +NM_OBJECT_CLASS +NM_IS_OBJECT_CLASS +NM_OBJECT_GET_CLASS +
+ +
+nm-device-bt +NMDeviceBt +NM_DEVICE_BT_HW_ADDRESS +NM_DEVICE_BT_NAME +NM_DEVICE_BT_CAPABILITIES +NMDeviceBt +NMDeviceBtClass +nm_device_bt_new +nm_device_bt_get_hw_address +nm_device_bt_get_name +nm_device_bt_get_capabilities + +NM_DEVICE_BT +NM_IS_DEVICE_BT +NM_TYPE_DEVICE_BT +nm_device_bt_get_type +NM_DEVICE_BT_CLASS +NM_IS_DEVICE_BT_CLASS +NM_DEVICE_BT_GET_CLASS +
+ +
+nm-settings-interface +NMSettings +NMSettingsInterfaceError +NM_SETTINGS_INTERFACE_ERROR +nm_settings_interface_error_quark +NM_TYPE_SETTINGS_INTERFACE_ERROR +NM_SETTINGS_INTERFACE_NEW_CONNECTION +NM_SETTINGS_INTERFACE_CONNECTIONS_READ +NMSettingsInterface +NMSettingsAddConnectionFunc +nm_settings_interface_get_type +nm_settings_interface_list_connections +nm_settings_interface_get_connection_by_path +nm_settings_interface_add_connection + +NM_SETTINGS_INTERFACE +NM_IS_SETTINGS_INTERFACE +NM_TYPE_SETTINGS_INTERFACE +nm_settings_interface_error_get_type +NM_SETTINGS_INTERFACE_GET_INTERFACE
@@ -650,22 +641,3 @@ NM_TYPE_IP6_ROUTE_OBJECT_ARRAY nm_ip6_route_object_array_get_type
-
-nm-sysconfig-connection-bindings -DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Settings_Connection -org_freedesktop_NetworkManager_Settings_Connection_update -org_freedesktop_NetworkManager_Settings_Connection_update_reply -org_freedesktop_NetworkManager_Settings_Connection_update_async -dbus_g_proxy_begin_call -org_freedesktop_NetworkManager_Settings_Connection_delete -org_freedesktop_NetworkManager_Settings_Connection_delete_reply -org_freedesktop_NetworkManager_Settings_Connection_delete_async -org_freedesktop_NetworkManager_Settings_Connection_get_settings -org_freedesktop_NetworkManager_Settings_Connection_get_settings_reply -org_freedesktop_NetworkManager_Settings_Connection_get_settings_async -DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Settings_Connection_Secrets -org_freedesktop_NetworkManager_Settings_Connection_Secrets_get_secrets -org_freedesktop_NetworkManager_Settings_Connection_Secrets_get_secrets_reply -org_freedesktop_NetworkManager_Settings_Connection_Secrets_get_secrets_async -
- diff --git a/docs/libnm-glib/libnm-glib.types b/docs/libnm-glib/libnm-glib.types index 99783ba6..8b3b3d2a 100644 --- a/docs/libnm-glib/libnm-glib.types +++ b/docs/libnm-glib/libnm-glib.types @@ -1,25 +1,40 @@ #include +#include +#include #include #include #include #include #include +#include #include #include #include #include #include +#include +#include +#include +#include +#include -nm_object_get_type nm_client_get_type +nm_object_get_type nm_device_get_type nm_device_ethernet_get_type nm_device_wifi_get_type -nm_gsm_device_get_type nm_cdma_device_get_type +nm_gsm_device_get_type nm_serial_device_get_type +nm_device_bt_get_type nm_access_point_get_type nm_ip4_config_get_type +nm_ip6_config_get_type nm_active_connection_get_type nm_dhcp4_config_get_type -nm_ip6_config_get_type +nm_dhcp6_config_get_type +nm_remote_settings_get_type +nm_exported_connection_get_type +nm_remote_connection_get_type +nm_vpn_connection_get_type + diff --git a/docs/libnm-glib/tmpl/libnm-glib-unused.sgml b/docs/libnm-glib/tmpl/libnm-glib-unused.sgml index 16b548cd..e69de29b 100644 --- a/docs/libnm-glib/tmpl/libnm-glib-unused.sgml +++ b/docs/libnm-glib/tmpl/libnm-glib-unused.sgml @@ -1,666 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -libnm_glib - - - - - - - - - - - - - - - - - - - - - - - -NMDBusConnection - - - - - - - - - - - - - - - - - - - - - - - -NMDBusSettingsSystem - - - - - - - - - - - - - - - - - - - - - - - -NMDBusSettings - - - - - - - - - - - - - - - - - - - - - - - -nm-device-bt-bindings - - - - - - - - - - - - - - - - - - - - - - - -nm-dhcp6-config-bindings - - - - - - - - - - - - - - - - - - - - - - - -nm-ip6-config-bindings - - - - - - - - - - - - - - - - - - - - - - - -nm-remote-connection-private - - - - - - - - - - - - - - - - - - - - - - - -NMSettings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent: - - - - - - -@parent: - - - - - - -@parent: - - - - - - -@NM_REMOTE_CONNECTION_INIT_RESULT_UNKNOWN: -@NM_REMOTE_CONNECTION_INIT_RESULT_SUCCESS: -@NM_REMOTE_CONNECTION_INIT_RESULT_ERROR: - - - - - - -@parent: - - - - - - -@NM_SETTINGS_ERROR_INVALID_CONNECTION: -@NM_SETTINGS_ERROR_READ_ONLY_CONNECTION: -@NM_SETTINGS_ERROR_INTERNAL_ERROR: -@NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE: -@NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED: -@NM_SETTINGS_ERROR_PERMISSION_DENIED: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@obj: - - - - - - -@klass: - - - - - - - - - - - - -@obj: - - - - - - -@klass: - - - - - - -@obj: - - - - - - - - - - - - -@obj: - - - - - - -@obj: - - - - - - -@obj: - - - - - - - - - - - - -@obj: - - - - - - -@libnm_ctx: -@user_data: - - - - - - - - - - - - -@ctx: -@Returns: - - - - - - -@Returns: - - - - - - -@ctx: -@func: -@user_data: -@g_main_ctx: -@Returns: - - - - - - -@ctx: - - - - - - -@LIBNM_NO_DBUS: -@LIBNM_NO_NETWORKMANAGER: -@LIBNM_NO_NETWORK_CONNECTION: -@LIBNM_ACTIVE_NETWORK_CONNECTION: -@LIBNM_INVALID_CONTEXT: - - - - - - -@ctx: -@id: - - - - - - -@dbus_connection: -@scope: -@path: -@Returns: - - - - - - -@self: -@path: -@Returns: - - - - - - -@dbus_connection: -@Returns: - - - - - - -@self: -@connection: -@err: -@Returns: - - - - - - -@self: -@Returns: - - - - - - -@self: -@Returns: - - - - - - -@self: -@Returns: - - - - - - -@dbus_connection: -@Returns: - - - - - - -@self: -@hostname: -@err: -@Returns: - - - - - - -@connection: -@err: -@Returns: - - - - - - -@connection: -@Returns: - - - - - - -@connection: -@scope: -@dbus_connection: - - - - - - -@connection: - - - - - - -@connection: -@new_settings: - - - - - - -@connection: -@new_settings: -@err: -@Returns: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - -@settings: -@Returns: - - - - - - -@settings: -@connection: - diff --git a/docs/libnm-glib/tmpl/libnm_glib.sgml b/docs/libnm-glib/tmpl/libnm_glib.sgml deleted file mode 100644 index 325e10cb..00000000 --- a/docs/libnm-glib/tmpl/libnm_glib.sgml +++ /dev/null @@ -1,22 +0,0 @@ - -libnm_glib - - - - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-access-point.sgml b/docs/libnm-glib/tmpl/nm-access-point.sgml index 0963db06..b3c2c6d6 100644 --- a/docs/libnm-glib/tmpl/nm-access-point.sgml +++ b/docs/libnm-glib/tmpl/nm-access-point.sgml @@ -9,11 +9,13 @@ NMAccessPoint + + diff --git a/docs/libnm-glib/tmpl/nm-active-connection.sgml b/docs/libnm-glib/tmpl/nm-active-connection.sgml index d357bbc7..c642d1fc 100644 --- a/docs/libnm-glib/tmpl/nm-active-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-active-connection.sgml @@ -9,11 +9,13 @@ NMActiveConnection + + diff --git a/docs/libnm-glib/tmpl/nm-cdma-device.sgml b/docs/libnm-glib/tmpl/nm-cdma-device.sgml index 72e54281..bcb72892 100644 --- a/docs/libnm-glib/tmpl/nm-cdma-device.sgml +++ b/docs/libnm-glib/tmpl/nm-cdma-device.sgml @@ -9,11 +9,13 @@ NMCdmaDevice + + diff --git a/docs/libnm-glib/tmpl/nm-client.sgml b/docs/libnm-glib/tmpl/nm-client.sgml index 3a9485b7..b30dffd8 100644 --- a/docs/libnm-glib/tmpl/nm-client.sgml +++ b/docs/libnm-glib/tmpl/nm-client.sgml @@ -9,11 +9,13 @@ NMClient + + diff --git a/docs/libnm-glib/tmpl/nm-dbus-connection.sgml b/docs/libnm-glib/tmpl/nm-dbus-connection.sgml deleted file mode 100644 index dbc81062..00000000 --- a/docs/libnm-glib/tmpl/nm-dbus-connection.sgml +++ /dev/null @@ -1,19 +0,0 @@ - -NMDBusConnection - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-dbus-settings-system.sgml b/docs/libnm-glib/tmpl/nm-dbus-settings-system.sgml deleted file mode 100644 index b57a582d..00000000 --- a/docs/libnm-glib/tmpl/nm-dbus-settings-system.sgml +++ /dev/null @@ -1,19 +0,0 @@ - -NMDBusSettingsSystem - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-dbus-settings.sgml b/docs/libnm-glib/tmpl/nm-dbus-settings.sgml deleted file mode 100644 index 5090b3a8..00000000 --- a/docs/libnm-glib/tmpl/nm-dbus-settings.sgml +++ /dev/null @@ -1,19 +0,0 @@ - -NMDBusSettings - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-device-bt-bindings.sgml b/docs/libnm-glib/tmpl/nm-device-bt-bindings.sgml deleted file mode 100644 index cc4c496a..00000000 --- a/docs/libnm-glib/tmpl/nm-device-bt-bindings.sgml +++ /dev/null @@ -1,26 +0,0 @@ - -nm-device-bt-bindings - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-device-bt.sgml b/docs/libnm-glib/tmpl/nm-device-bt.sgml index 8bdeb199..d3ce4dc5 100644 --- a/docs/libnm-glib/tmpl/nm-device-bt.sgml +++ b/docs/libnm-glib/tmpl/nm-device-bt.sgml @@ -9,11 +9,13 @@ NMDeviceBt + + @@ -46,7 +48,21 @@ NMDeviceBt -@parent: + + + + + + + + + + + + + + + diff --git a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml index 8f31943a..ee82d5af 100644 --- a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml +++ b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml @@ -9,11 +9,13 @@ NMDeviceEthernet + + diff --git a/docs/libnm-glib/tmpl/nm-device-wifi.sgml b/docs/libnm-glib/tmpl/nm-device-wifi.sgml index c84a1fbd..0ef2031d 100644 --- a/docs/libnm-glib/tmpl/nm-device-wifi.sgml +++ b/docs/libnm-glib/tmpl/nm-device-wifi.sgml @@ -9,11 +9,13 @@ NMDeviceWifi + + diff --git a/docs/libnm-glib/tmpl/nm-device.sgml b/docs/libnm-glib/tmpl/nm-device.sgml index 4baa86a6..7c38adf6 100644 --- a/docs/libnm-glib/tmpl/nm-device.sgml +++ b/docs/libnm-glib/tmpl/nm-device.sgml @@ -9,11 +9,13 @@ NMDevice + + @@ -164,6 +166,11 @@ NMDevice + + + + + diff --git a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml index 40bf2bcf..35a6e306 100644 --- a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml +++ b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml @@ -9,11 +9,13 @@ NMDHCP4Config + + diff --git a/docs/libnm-glib/tmpl/nm-dhcp6-config-bindings.sgml b/docs/libnm-glib/tmpl/nm-dhcp6-config-bindings.sgml deleted file mode 100644 index 4aee648c..00000000 --- a/docs/libnm-glib/tmpl/nm-dhcp6-config-bindings.sgml +++ /dev/null @@ -1,26 +0,0 @@ - -nm-dhcp6-config-bindings - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml index 4eb22506..3e00467c 100644 --- a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml +++ b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml @@ -9,11 +9,13 @@ NMDHCP6Config + + @@ -26,6 +28,11 @@ NMDHCP6Config + + + + + diff --git a/docs/libnm-glib/tmpl/nm-exported-connection.sgml b/docs/libnm-glib/tmpl/nm-exported-connection.sgml index 363db251..c2ba3b21 100644 --- a/docs/libnm-glib/tmpl/nm-exported-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-exported-connection.sgml @@ -9,11 +9,13 @@ NMExportedConnection + + @@ -25,7 +27,6 @@ NMExportedConnection -@parent: diff --git a/docs/libnm-glib/tmpl/nm-gsm-device.sgml b/docs/libnm-glib/tmpl/nm-gsm-device.sgml index fb84fd44..bb4e7232 100644 --- a/docs/libnm-glib/tmpl/nm-gsm-device.sgml +++ b/docs/libnm-glib/tmpl/nm-gsm-device.sgml @@ -9,11 +9,13 @@ NMGsmDevice + + diff --git a/docs/libnm-glib/tmpl/nm-ip4-config.sgml b/docs/libnm-glib/tmpl/nm-ip4-config.sgml index 78dd6b47..3fd603b2 100644 --- a/docs/libnm-glib/tmpl/nm-ip4-config.sgml +++ b/docs/libnm-glib/tmpl/nm-ip4-config.sgml @@ -9,11 +9,13 @@ NMIP4Config + + diff --git a/docs/libnm-glib/tmpl/nm-ip6-config-bindings.sgml b/docs/libnm-glib/tmpl/nm-ip6-config-bindings.sgml deleted file mode 100644 index 0a6ba649..00000000 --- a/docs/libnm-glib/tmpl/nm-ip6-config-bindings.sgml +++ /dev/null @@ -1,26 +0,0 @@ - -nm-ip6-config-bindings - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/libnm-glib/tmpl/nm-ip6-config.sgml b/docs/libnm-glib/tmpl/nm-ip6-config.sgml index fb125207..a9c44abd 100644 --- a/docs/libnm-glib/tmpl/nm-ip6-config.sgml +++ b/docs/libnm-glib/tmpl/nm-ip6-config.sgml @@ -9,11 +9,13 @@ NMIP6Config + + diff --git a/docs/libnm-glib/tmpl/nm-object.sgml b/docs/libnm-glib/tmpl/nm-object.sgml index 652e54cd..d1919d39 100644 --- a/docs/libnm-glib/tmpl/nm-object.sgml +++ b/docs/libnm-glib/tmpl/nm-object.sgml @@ -9,11 +9,13 @@ NMObject + + diff --git a/docs/libnm-glib/tmpl/nm-remote-connection-private.sgml b/docs/libnm-glib/tmpl/nm-remote-connection-private.sgml deleted file mode 100644 index 3b6da6d5..00000000 --- a/docs/libnm-glib/tmpl/nm-remote-connection-private.sgml +++ /dev/null @@ -1,35 +0,0 @@ - -nm-remote-connection-private - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@NM_REMOTE_CONNECTION_INIT_RESULT_UNKNOWN: -@NM_REMOTE_CONNECTION_INIT_RESULT_SUCCESS: -@NM_REMOTE_CONNECTION_INIT_RESULT_ERROR: - diff --git a/docs/libnm-glib/tmpl/nm-remote-connection.sgml b/docs/libnm-glib/tmpl/nm-remote-connection.sgml index 42487240..d43534e1 100644 --- a/docs/libnm-glib/tmpl/nm-remote-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-remote-connection.sgml @@ -9,11 +9,13 @@ NMRemoteConnection + + @@ -25,7 +27,16 @@ NMRemoteConnection -@parent: + + + + + + + + + + diff --git a/docs/libnm-glib/tmpl/nm-remote-settings-system.sgml b/docs/libnm-glib/tmpl/nm-remote-settings-system.sgml index ed20d604..c14d4b2e 100644 --- a/docs/libnm-glib/tmpl/nm-remote-settings-system.sgml +++ b/docs/libnm-glib/tmpl/nm-remote-settings-system.sgml @@ -9,11 +9,13 @@ NMRemoteSettingsSystem + + diff --git a/docs/libnm-glib/tmpl/nm-remote-settings.sgml b/docs/libnm-glib/tmpl/nm-remote-settings.sgml index 29646e7f..6f95df14 100644 --- a/docs/libnm-glib/tmpl/nm-remote-settings.sgml +++ b/docs/libnm-glib/tmpl/nm-remote-settings.sgml @@ -9,11 +9,13 @@ NMRemoteSettings + + @@ -46,7 +48,21 @@ NMRemoteSettings -@parent: + + + + + + + + + + + + + + + diff --git a/docs/libnm-glib/tmpl/nm-serial-device.sgml b/docs/libnm-glib/tmpl/nm-serial-device.sgml index 694332fb..7f6403fe 100644 --- a/docs/libnm-glib/tmpl/nm-serial-device.sgml +++ b/docs/libnm-glib/tmpl/nm-serial-device.sgml @@ -9,11 +9,13 @@ NMSerialDevice + + diff --git a/docs/libnm-glib/tmpl/nm-settings-connection-interface.sgml b/docs/libnm-glib/tmpl/nm-settings-connection-interface.sgml index 27c494fc..9e05931a 100644 --- a/docs/libnm-glib/tmpl/nm-settings-connection-interface.sgml +++ b/docs/libnm-glib/tmpl/nm-settings-connection-interface.sgml @@ -1,5 +1,5 @@ -nm-settings-connection-interface +NMSettingsConnection @@ -9,11 +9,13 @@ nm-settings-connection-interface + + @@ -39,19 +41,6 @@ nm-settings-connection-interface -@g_iface: -@update: -@delete: -@get_secrets: -@emit_updated: -@updated: -@removed: -@_reserved1: -@_reserved2: -@_reserved3: -@_reserved4: -@_reserved5: -@_reserved6: diff --git a/docs/libnm-glib/tmpl/nm-settings-interface.sgml b/docs/libnm-glib/tmpl/nm-settings-interface.sgml index fd36e19a..846d5464 100644 --- a/docs/libnm-glib/tmpl/nm-settings-interface.sgml +++ b/docs/libnm-glib/tmpl/nm-settings-interface.sgml @@ -1,5 +1,5 @@ -nm-settings-interface +NMSettings @@ -9,11 +9,13 @@ nm-settings-interface + + @@ -75,18 +77,6 @@ nm-settings-interface -@g_iface: -@list_connections: -@get_connection_by_path: -@add_connection: -@new_connection: -@connections_read: -@_reserved1: -@_reserved2: -@_reserved3: -@_reserved4: -@_reserved5: -@_reserved6: diff --git a/docs/libnm-glib/tmpl/nm-settings-service.sgml b/docs/libnm-glib/tmpl/nm-settings-service.sgml index 01c43db2..a79c966b 100644 --- a/docs/libnm-glib/tmpl/nm-settings-service.sgml +++ b/docs/libnm-glib/tmpl/nm-settings-service.sgml @@ -9,11 +9,13 @@ NMSettingsService + + diff --git a/docs/libnm-glib/tmpl/nm-settings-system-interface.sgml b/docs/libnm-glib/tmpl/nm-settings-system-interface.sgml index bded0701..9ee1ef69 100644 --- a/docs/libnm-glib/tmpl/nm-settings-system-interface.sgml +++ b/docs/libnm-glib/tmpl/nm-settings-system-interface.sgml @@ -1,5 +1,5 @@ -nm-settings-system-interface +NMSettingsSystem @@ -9,11 +9,13 @@ nm-settings-system-interface + + diff --git a/docs/libnm-glib/tmpl/nm-settings.sgml b/docs/libnm-glib/tmpl/nm-settings.sgml deleted file mode 100644 index c8f4b951..00000000 --- a/docs/libnm-glib/tmpl/nm-settings.sgml +++ /dev/null @@ -1,35 +0,0 @@ - -NMSettings - - - - - - - - - - - - - - - - - - - - - - -@parent: - - - - - - -@scope: -@Returns: - - diff --git a/docs/libnm-glib/tmpl/nm-sysconfig-connection-bindings.sgml b/docs/libnm-glib/tmpl/nm-sysconfig-connection-bindings.sgml deleted file mode 100644 index 1be20987..00000000 --- a/docs/libnm-glib/tmpl/nm-sysconfig-connection-bindings.sgml +++ /dev/null @@ -1,173 +0,0 @@ - -nm-sysconfig-connection-bindings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@proxy: -@IN_properties: -@Returns: - - - - - - - -@proxy: -@error: -@userdata: - - - - - - - -@proxy: -@IN_properties: -@callback: -@Returns: - - - - - - - -@Param1: -@Returns: - - - - - - - -@proxy: -@Returns: - - - - - - - -@proxy: -@error: -@userdata: - - - - - - - -@proxy: -@callback: -@Returns: - - - - - - - -@proxy: -@OUT_settings: -@Returns: - - - - - - - -@proxy: -@OUT_settings: -@error: -@userdata: - - - - - - - -@proxy: -@callback: -@Returns: - - - - - - - - - - - - - - -@proxy: -@IN_setting_name: -@IN_hints: -@IN_request_new: -@OUT_secrets: -@Returns: - - - - - - - -@proxy: -@OUT_secrets: -@error: -@userdata: - - - - - - - -@proxy: -@IN_setting_name: -@IN_hints: -@IN_request_new: -@callback: -@Returns: - - diff --git a/docs/libnm-glib/tmpl/nm-types.sgml b/docs/libnm-glib/tmpl/nm-types.sgml index a96a895f..f57d882e 100644 --- a/docs/libnm-glib/tmpl/nm-types.sgml +++ b/docs/libnm-glib/tmpl/nm-types.sgml @@ -9,11 +9,13 @@ nm-types + + diff --git a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml index 35bc1899..8e4e18a8 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml @@ -9,11 +9,13 @@ NMVPNConnection + + @@ -39,7 +41,25 @@ NMVPNConnection -@parent: + + + + + + +@nmvpnconnection: the object which received the signal. +@arg1: +@arg2: + + + + + + + + + + diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml index 9b3b71bf..ace182a8 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml @@ -1,5 +1,5 @@ -nm-vpn-plugin-ui-interface +NMVpnPluginUi @@ -9,11 +9,13 @@ nm-vpn-plugin-ui-interface + + diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml index 25869dd2..061e4edf 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml @@ -9,11 +9,13 @@ NMVPNPlugin + + diff --git a/docs/libnm-glib/tmpl/nm-wimax-device-bindings.sgml b/docs/libnm-glib/tmpl/nm-wimax-device-bindings.sgml deleted file mode 100644 index 9b909c96..00000000 --- a/docs/libnm-glib/tmpl/nm-wimax-device-bindings.sgml +++ /dev/null @@ -1,69 +0,0 @@ - -nm-wimax-device-bindings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@proxy: -@OUT_nsps: -@Returns: - - - - - - - -@proxy: -@OUT_nsps: -@error: -@userdata: - - - - - - - -@proxy: -@callback: -@Returns: - - - - - - - -@Param1: -@Returns: - - diff --git a/docs/libnm-util/Makefile.am b/docs/libnm-util/Makefile.am index 59a9ef6b..89a5db98 100644 --- a/docs/libnm-util/Makefile.am +++ b/docs/libnm-util/Makefile.am @@ -54,11 +54,18 @@ GTKDOC_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -GTKDOC_LIBS = $(top_builddir)/libnm-util/libnm-util.la +GTKDOC_LIBS = \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) + # include common portion ... include $(top_srcdir)/gtk-doc.make -CLEANFILES += libnm-util-sections.txt +CLEANFILES += \ + libnm-util-sections.txt \ + html/* \ + tmpl/* \ + xml/* diff --git a/docs/libnm-util/Makefile.in b/docs/libnm-util/Makefile.in index b6600058..63e046a4 100644 --- a/docs/libnm-util/Makefile.in +++ b/docs/libnm-util/Makefile.in @@ -156,6 +156,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -170,6 +174,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -300,7 +305,10 @@ GTKDOC_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -GTKDOC_LIBS = $(top_builddir)/libnm-util/libnm-util.la +GTKDOC_LIBS = \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) + @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @@ -342,7 +350,7 @@ REPORT_FILES = \ # include common portion ... CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ - libnm-util-sections.txt + libnm-util-sections.txt html/* tmpl/* xml/* @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = diff --git a/docs/libnm-util/html/NMConnection.html b/docs/libnm-util/html/NMConnection.html index 032f18a3..7d660012 100644 --- a/docs/libnm-util/html/NMConnection.html +++ b/docs/libnm-util/html/NMConnection.html @@ -3,7 +3,7 @@ NMConnection - + @@ -74,6 +74,10 @@ enum gboolean nm_connection_compare (NMConnection *a, NMConnection *b, NMSettingCompareFlags flags); +gboolean nm_connection_diff (NMConnection *a, + NMConnection *b, + NMSettingCompareFlags flags, + GHashTable **out_settings); gboolean nm_connection_verify (NMConnection *connection, GError **error); const char * nm_connection_need_secrets (NMConnection *connection, @@ -81,7 +85,7 @@ const char * void nm_connection_clear_secrets (NMConnection *connection); gboolean nm_connection_update_secrets (NMConnection *connection, const char *setting_name, - GHashTable *secrets, + GHashTable *setting_secrets, GError **error); void nm_connection_set_scope (NMConnection *connection, NMConnectionScope scope); @@ -555,6 +559,53 @@ each flag's behavior.

+
+

nm_connection_diff ()

+
gboolean            nm_connection_diff                  (NMConnection *a,
+                                                         NMConnection *b,
+                                                         NMSettingCompareFlags flags,
+                                                         GHashTable **out_settings);
+

+Compares two NMConnection objects for similarity, with comparison behavior +modified by a set of flags. See nm_setting_compare() for a description of +each flag's behavior. If the connections differ, settings and keys within +each setting that differ are added to the returned out_settings hash table. +No values are returned, only key names. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

a :

a NMConnection +

b :

a second NMConnection to compare with the first +

flags :

compare flags, e.g. NM_SETTING_COMPARE_FLAG_EXACT +

out_settings :

if the connections differ, on return a hash table mapping +setting names to second-level GHashTable, which contains key names that differ +

Returns :

TRUE if the connections contain the same values, FALSE if they do +not +
+
+

nm_connection_verify ()

gboolean            nm_connection_verify                (NMConnection *connection,
@@ -651,7 +702,7 @@ keeping secret data in memory when not needed.
 

nm_connection_update_secrets ()

gboolean            nm_connection_update_secrets        (NMConnection *connection,
                                                          const char *setting_name,
-                                                         GHashTable *secrets,
+                                                         GHashTable *setting_secrets,
                                                          GError **error);

Update the specified setting's secrets, given a hash table of secrets @@ -671,7 +722,7 @@ intended for that setting (deserialized from D-Bus for example). -

secrets :

+

setting_secrets :

a GHashTable mapping string:GValue of setting property names and secrets diff --git a/docs/libnm-util/html/NMSetting.html b/docs/libnm-util/html/NMSetting.html index dbfd9855..a31c80d4 100644 --- a/docs/libnm-util/html/NMSetting.html +++ b/docs/libnm-util/html/NMSetting.html @@ -3,7 +3,7 @@ NMSetting - + @@ -73,6 +73,12 @@ enum gboolean nm_setting_compare (NMSetting *a, NMSetting *b, NMSettingCompareFlags flags); +enum NMSettingDiffResult; +gboolean nm_setting_diff (NMSetting *a, + NMSetting *b, + NMSettingCompareFlags flags, + gboolean invert_results, + GHashTable **results); void nm_setting_enumerate_values (NMSetting *setting, NMSettingValueIterFn func, gpointer user_data); @@ -561,6 +567,94 @@ for a description of each flag's behavior.

+
+

enum NMSettingDiffResult

+
typedef enum {
+	NM_SETTING_DIFF_RESULT_UNKNOWN = 0x00000000,
+	NM_SETTING_DIFF_RESULT_IN_A =    0x00000001,
+	NM_SETTING_DIFF_RESULT_IN_B =    0x00000002,
+} NMSettingDiffResult;
+
+

+These values indicate the result of a setting difference operation. +

+
++ + + + + + + + + + + + + + +

NM_SETTING_DIFF_RESULT_UNKNOWN

unknown result +

NM_SETTING_DIFF_RESULT_IN_A

the property is present in setting A +

NM_SETTING_DIFF_RESULT_IN_B

the property is present in setting B +
+
+
+
+

nm_setting_diff ()

+
gboolean            nm_setting_diff                     (NMSetting *a,
+                                                         NMSetting *b,
+                                                         NMSettingCompareFlags flags,
+                                                         gboolean invert_results,
+                                                         GHashTable **results);
+

+Compares two NMSetting objects for similarity, with comparison behavior +modified by a set of flags. See the documentation for NMSettingCompareFlags +for a description of each flag's behavior. If the settings differ, the keys +of each setting that differ from the other are added to results, mapped to +one or more NMSettingDiffResult values. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

a :

a NMSetting +

b :

a second NMSetting to compare with the first +

flags :

compare flags, e.g. NM_SETTING_COMPARE_FLAG_EXACT +

invert_results :

this parameter is used internally by libnm-util and should +be set to FALSE. If TRUE inverts the meaning of the NMSettingDiffResult. +

results :

if the settings differ, on return a +hash table mapping the differing keys to one or more NMSettingDiffResult +values OR-ed together. If the settings do not differ, any hash table passed +in is unmodified. If no hash table is passed in, a new one is created. [element-type utf8 guint32] +

Returns :

TRUE if the settings contain the same values, FALSE if they do not +
+
+

nm_setting_enumerate_values ()

void                nm_setting_enumerate_values         (NMSetting *setting,
diff --git a/docs/libnm-util/html/NMSetting8021x.html b/docs/libnm-util/html/NMSetting8021x.html
index 1aa66f80..7b25578e 100644
--- a/docs/libnm-util/html/NMSetting8021x.html
+++ b/docs/libnm-util/html/NMSetting8021x.html
@@ -3,7 +3,7 @@
 
 
 NMSetting8021x
-
+
 
 
 
diff --git a/docs/libnm-util/html/NMSettingBluetooth.html b/docs/libnm-util/html/NMSettingBluetooth.html
index d1f99a9d..068c5e83 100644
--- a/docs/libnm-util/html/NMSettingBluetooth.html
+++ b/docs/libnm-util/html/NMSettingBluetooth.html
@@ -3,7 +3,7 @@
 
 
 NMSettingBluetooth
-
+
 
 
 
diff --git a/docs/libnm-util/html/NMSettingCdma.html b/docs/libnm-util/html/NMSettingCdma.html
index 8b41328e..6ee02f0d 100644
--- a/docs/libnm-util/html/NMSettingCdma.html
+++ b/docs/libnm-util/html/NMSettingCdma.html
@@ -3,7 +3,7 @@
 
 
 NMSettingCdma
-
+
 
 
 
diff --git a/docs/libnm-util/html/NMSettingConnection.html b/docs/libnm-util/html/NMSettingConnection.html
index 29786290..f70fdb95 100644
--- a/docs/libnm-util/html/NMSettingConnection.html
+++ b/docs/libnm-util/html/NMSettingConnection.html
@@ -3,7 +3,7 @@
 
 
 NMSettingConnection
-
+
 
 
 
diff --git a/docs/libnm-util/html/NMSettingGsm.html b/docs/libnm-util/html/NMSettingGsm.html
index ddc98b8e..c3f8c318 100644
--- a/docs/libnm-util/html/NMSettingGsm.html
+++ b/docs/libnm-util/html/NMSettingGsm.html
@@ -3,7 +3,7 @@
 
 
 NMSettingGsm
-
+
 
 
 
@@ -659,7 +659,7 @@ GSM 03.60 Section 14.9.
 

DEPRECATED

-

Allowed values: [G_MAXULONG,5]

+

Allowed values: [-1,5]

Default value: -1


@@ -695,7 +695,7 @@ technologies. The permitted values are: -1: any, 0: 3G only, 1: GPRS/EDGE only, 2: prefer 3G, and 3: prefer 2G. Note that not all devices allow network preference control.

-

Allowed values: [G_MAXULONG,3]

+

Allowed values: [-1,3]

Default value: -1


diff --git a/docs/libnm-util/html/NMSettingIP4Config.html b/docs/libnm-util/html/NMSettingIP4Config.html index 31e01499..7f0eef80 100644 --- a/docs/libnm-util/html/NMSettingIP4Config.html +++ b/docs/libnm-util/html/NMSettingIP4Config.html @@ -3,7 +3,7 @@ NMSettingIP4Config - + @@ -1656,7 +1656,7 @@ providing a static hostname for the computer. If "dhcp-hostname" is empty and this property is TRUE, the current persistent hostname of the computer is sent.

-

Default value: FALSE

+

Default value: TRUE


diff --git a/docs/libnm-util/html/NMSettingIP6Config.html b/docs/libnm-util/html/NMSettingIP6Config.html index b61a7d1f..4e80d905 100644 --- a/docs/libnm-util/html/NMSettingIP6Config.html +++ b/docs/libnm-util/html/NMSettingIP6Config.html @@ -3,7 +3,7 @@ NMSettingIP6Config - + diff --git a/docs/libnm-util/html/NMSettingOlpcMesh.html b/docs/libnm-util/html/NMSettingOlpcMesh.html index 8e315c6b..4543a907 100644 --- a/docs/libnm-util/html/NMSettingOlpcMesh.html +++ b/docs/libnm-util/html/NMSettingOlpcMesh.html @@ -3,7 +3,7 @@ NMSettingOlpcMesh - + diff --git a/docs/libnm-util/html/NMSettingPPP.html b/docs/libnm-util/html/NMSettingPPP.html index e52ab970..435c5b96 100644 --- a/docs/libnm-util/html/NMSettingPPP.html +++ b/docs/libnm-util/html/NMSettingPPP.html @@ -3,7 +3,7 @@ NMSettingPPP - + diff --git a/docs/libnm-util/html/NMSettingPPPOE.html b/docs/libnm-util/html/NMSettingPPPOE.html index 22f9a895..a94012fd 100644 --- a/docs/libnm-util/html/NMSettingPPPOE.html +++ b/docs/libnm-util/html/NMSettingPPPOE.html @@ -3,7 +3,7 @@ NMSettingPPPOE - + diff --git a/docs/libnm-util/html/NMSettingSerial.html b/docs/libnm-util/html/NMSettingSerial.html index d32d6c1c..33a60860 100644 --- a/docs/libnm-util/html/NMSettingSerial.html +++ b/docs/libnm-util/html/NMSettingSerial.html @@ -3,7 +3,7 @@ NMSettingSerial - + diff --git a/docs/libnm-util/html/NMSettingVPN.html b/docs/libnm-util/html/NMSettingVPN.html index e3b96cdb..16df44cb 100644 --- a/docs/libnm-util/html/NMSettingVPN.html +++ b/docs/libnm-util/html/NMSettingVPN.html @@ -3,7 +3,7 @@ NMSettingVPN - + diff --git a/docs/libnm-util/html/NMSettingWired.html b/docs/libnm-util/html/NMSettingWired.html index 70fdd4b5..f9333d3e 100644 --- a/docs/libnm-util/html/NMSettingWired.html +++ b/docs/libnm-util/html/NMSettingWired.html @@ -3,7 +3,7 @@ NMSettingWired - + diff --git a/docs/libnm-util/html/NMSettingWireless.html b/docs/libnm-util/html/NMSettingWireless.html index 2586678c..368d455d 100644 --- a/docs/libnm-util/html/NMSettingWireless.html +++ b/docs/libnm-util/html/NMSettingWireless.html @@ -3,7 +3,7 @@ NMSettingWireless - + diff --git a/docs/libnm-util/html/NMSettingWirelessSecurity.html b/docs/libnm-util/html/NMSettingWirelessSecurity.html index 2fd8cd92..6e90df86 100644 --- a/docs/libnm-util/html/NMSettingWirelessSecurity.html +++ b/docs/libnm-util/html/NMSettingWirelessSecurity.html @@ -3,7 +3,7 @@ NMSettingWirelessSecurity - + diff --git a/docs/libnm-util/html/annotation-glossary.html b/docs/libnm-util/html/annotation-glossary.html new file mode 100644 index 00000000..68c91a18 --- /dev/null +++ b/docs/libnm-util/html/annotation-glossary.html @@ -0,0 +1,36 @@ + + + + +Annotation Glossary + + + + + + + + + + + + + + + + + + +
+

+Annotation Glossary

+

E

+
+element-type
+

Generics and defining elements of containers and arrays.

+
+ + + \ No newline at end of file diff --git a/docs/libnm-util/html/api-index-full.html b/docs/libnm-util/html/api-index-full.html index 94ef6a8f..73178ec7 100644 --- a/docs/libnm-util/html/api-index-full.html +++ b/docs/libnm-util/html/api-index-full.html @@ -3,10 +3,11 @@ API Index - + + @@ -17,7 +18,7 @@   Home libnm-util Reference Manual -  +Next C @@ -92,6 +93,10 @@
+nm_connection_diff, function in NMConnection +
+
+
nm_connection_dump, function in NMConnection
@@ -654,6 +659,10 @@
+NMSettingDiffResult, enum in NMSetting +
+
+
NMSettingError, enum in NMSetting
@@ -1718,6 +1727,10 @@
+nm_setting_diff, function in NMSetting +
+
+
nm_setting_duplicate, function in NMSetting
diff --git a/docs/libnm-util/html/ch01.html b/docs/libnm-util/html/ch01.html index e677349c..a8e5f34c 100644 --- a/docs/libnm-util/html/ch01.html +++ b/docs/libnm-util/html/ch01.html @@ -3,7 +3,7 @@ libnm-util API Reference - + @@ -21,7 +21,7 @@

-libnm-util API Reference

+libnm-util API Reference
NMConnection — Describes a connection to specific network or provider diff --git a/docs/libnm-util/html/index.html b/docs/libnm-util/html/index.html index 890e9bcd..88c9e994 100644 --- a/docs/libnm-util/html/index.html +++ b/docs/libnm-util/html/index.html @@ -3,7 +3,7 @@ libnm-util Reference Manual - + @@ -82,6 +82,7 @@
Object Hierarchy
API Index
+
Annotation Glossary

Interfaces

+

Interfaces

org.freedesktop.NetworkManager

Methods:

GetDevices ( ) → @@ -439,6 +439,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.o - (read)
Object path of the Ip6Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state. +
Dhcp6Config - + o - + (read)
+ Object path of the Dhcp6Config object describing the DHCP options + returned by the DHCP server. Only valid when the device is in the + NM_DEVICE_STATE_ACTIVATED state.
Managed - b - (read)
@@ -822,6 +828,47 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Interface has no properties.

+

org.freedesktop.NetworkManagerSettings.System

+ Implemented by the system settings service to provide additional settings to NetworkManager. +

Methods:

SaveHostname ( + s: hostname + ) → + nothing

+ Save the hostname to persistent configuration. +

Parameters

hostname - + s
+ The hostname to save to persistent configuration. If blank, the persistent hostname is cleared. +

GetPermissions ( + + ) → + u

+ Returns a bitfield indicating certain operations the caller is permitted to perform. Some of these operations may require authorization by the user. +

Returns

permissions - + u + (NM_SETTINGS_SYSTEM_PERMISSIONS) +
+ A bitfield of permitted operations. Some of these operations may require the user to authorize via password entry or other means. +

Signals:

PropertiesChanged ( + a{sv}: properties + )

Parameters

properties - + a{sv} + (String_Variant_Map) +
+ A dictionary mapping property names to variant boxed values +

CheckPermissions ( + + )

+ Emitted when system authorization details change, indicating that clients may wish to recheck permissions with GetPermissions. +

Properties:

Hostname - + s - + (read)
+ The machine hostname stored in persistent configuration. +
CanModify - + b - + (read)
+ If true, adding and modifying connections is supported. +

Sets of flags:

NM_SETTINGS_SYSTEM_PERMISSIONS

NM_SETTINGS_SYSTEM_PERMISSION_NONE = 0x0
No permissions.
NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY = 0x1
Can modify/add/delete connections.
NM_SETTINGS_SYSTEM_PERMISSION_WIFI_SHARING_PROTECTED = 0x2
Can share connections via a encrypted user-created WiFi network.
NM_SETTINGS_SYSTEM_PERMISSION_WIFI_SHARING_OPEN = 0x4
Can share connections via a open/unencrypted user-created WiFi network.
NM_SETTINGS_SYSTEM_PERMISSION_HOSTNAME_MODIFY = 0x8
Can modify the persistent system hostname.
+

org.freedesktop.NetworkManagerSettings.Connection

Represents a single network connection configuration. @@ -921,31 +968,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -

org.freedesktop.NetworkManager.Connection.Active

Interface has no methods.

Signals:

PropertiesChanged ( - a{sv}: properties - )

Parameters

properties - - a{sv} - (String_Variant_Map) -
- A dictionary mapping property names to variant boxed values -

Properties:

ServiceName - - s - - (read)
The D-Bus service name providing this connection.
Connection - - o - - (read)
The path of the connection.
SpecificObject - - o - - (read)
A specific object associated with the active connection.
Devices - - ao - - (read)
Array of object paths representing devices which are part of this active connection.
State - - u - - (read) - (NM_ACTIVE_CONNECTION_STATE) -
The state of this active connection.
Default - - b - - (read)
Whether this active connection is the default connection, i.e. whether it currently owns the default route.
Vpn - - b - - (read)
Whether this active connection is also a VPN connection.
-

org.freedesktop.NetworkManager.VPN.Connection

Represents an active connection to a Virtual Private Network.

Interface has no methods.

Signals:

PropertiesChanged ( @@ -1011,6 +1033,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS = 9
Necessary secrets for the VPN connection were not provided. +
NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED = 10
+ Authentication to the VPN server failed. +
NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED = 11
+ The connection was deleted from settings.

org.freedesktop.NetworkManager.VPN.Plugin

@@ -1160,7 +1186,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.org.freedesktop.NetworkManager.VPN.Error.BadArgumentsInvalid arguments were passed with the request. FIXME: too general.

org.freedesktop.NetworkManager.VPN.Error.LaunchFailed

A binary providing the service failed to launch.

org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid

The request could not be processed because the VPN connection settings were invalid. -

Index

Index of interfaces

Index of types

  • NM_802_11_AP_FLAGS +

    Index

    Index of interfaces

    Index of types

    • NM_802_11_AP_FLAGS - u
    • NM_802_11_AP_SEC - u
    • NM_802_11_DEVICE_CAP - u
    • NM_802_11_MODE @@ -1170,6 +1196,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    • NM_DEVICE_STATE - u
    • NM_DEVICE_STATE_REASON - u
    • NM_DEVICE_TYPE + - u
    • NM_SETTINGS_SYSTEM_PERMISSIONS - u
    • NM_STATE - u
    • NM_VPN_CONNECTION_STATE - u
    • NM_VPN_CONNECTION_STATE_REASON diff --git a/examples/Makefile.in b/examples/Makefile.in index 494a268d..ce7a12e5 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -189,6 +189,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -203,6 +207,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index dec8b571..5650ed83 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -1,6 +1,7 @@ EXTRA_DIST = \ nm-state.py \ add-system-connection.py \ + add-system-wifi-connection.py vpn.py \ list-connections.py \ show-bssids.py \ diff --git a/examples/python/Makefile.in b/examples/python/Makefile.in index 49b50c0c..e6fdf88f 100644 --- a/examples/python/Makefile.in +++ b/examples/python/Makefile.in @@ -149,6 +149,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -163,6 +167,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -241,10 +246,7 @@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nm-state.py \ add-system-connection.py \ - vpn.py \ - list-connections.py \ - show-bssids.py \ - disconnect-device.py + add-system-wifi-connection.py all: all-am @@ -430,6 +432,10 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + vpn.py \ + list-connections.py \ + show-bssids.py \ + disconnect-device.py # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/examples/python/add-system-wifi-connection.py b/examples/python/add-system-wifi-connection.py new file mode 100755 index 00000000..f12723d1 --- /dev/null +++ b/examples/python/add-system-wifi-connection.py @@ -0,0 +1,64 @@ +#!/bin/env python +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2010 Red Hat, Inc. +# + +import dbus + +def path_to_value(path): + return dbus.ByteArray("file://" + path + "\0") + +s_con = dbus.Dictionary({ + 'type': '802-11-wireless', + 'uuid': '7371bb78-c1f7-42a3-a9db-5b9566e8ca07', + 'id': 'My Wifi'}) + +s_wifi = dbus.Dictionary({ + 'ssid': dbus.ByteArray("homewifi"), + 'security': '802-11-wireless-security'}) + +s_wsec = dbus.Dictionary({'key-mgmt': 'wpa-eap'}) + +s_8021x = dbus.Dictionary({ + 'eap': ['tls'], + 'identity': 'Bill Smith', + 'client-cert': path_to_value("/some/place/client.pem"), + 'ca-cert': path_to_value("/some/place/ca-cert.pem"), + 'private-key': path_to_value("/some/place/privkey.pem"), + 'private-key-password': "12345testing"}) + +s_ip4 = dbus.Dictionary({'method': 'auto'}) +s_ip6 = dbus.Dictionary({'method': 'ignore'}) + +con = dbus.Dictionary({ + 'connection': s_con, + '802-11-wireless': s_wifi, + '802-11-wireless-security': s_wsec, + '802-1x': s_8021x, + 'ipv4': s_ip4, + 'ipv6': s_ip6 + }) + + +bus = dbus.SystemBus() + +print con +proxy = bus.get_object("org.freedesktop.NetworkManagerSystemSettings", "/org/freedesktop/NetworkManagerSettings") +settings = dbus.Interface(proxy, "org.freedesktop.NetworkManagerSettings") + +settings.AddConnection(con) + diff --git a/examples/python/disconnect-device.py b/examples/python/disconnect-device.py deleted file mode 100755 index f8854951..00000000 --- a/examples/python/disconnect-device.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/env python -# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2010 Red Hat, Inc. -# - -import dbus, sys - -# This example takes a device interface name as a parameter and tells -# NetworkManager to disconnect that device, closing down any network -# connection it may have - -if len(sys.argv) != 2: - raise Exception("Usage: %s " % sys.argv[0]) - -bus = dbus.SystemBus() - -# Get a proxy for the base NetworkManager object -proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager") -manager = dbus.Interface(proxy, "org.freedesktop.NetworkManager") - -dpath = None - -# Find the device the user wants to disconnect -devices = manager.GetDevices() -for d in devices: - dev_proxy = bus.get_object("org.freedesktop.NetworkManager", d) - prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") - iface = prop_iface.Get("org.freedesktop.NetworkManager.Device", "Interface") - if iface == sys.argv[1]: - dpath = d - break - -if not dpath or not len(dpath): - raise Exception("NetworkManager knows nothing about %s" % sys.argv[1]) - -dev_proxy = bus.get_object("org.freedesktop.NetworkManager", dpath) -dev_iface = dbus.Interface(dev_proxy, "org.freedesktop.NetworkManager.Device") -prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") - -# Make sure the device is connected before we try to disconnect it -state = prop_iface.Get("org.freedesktop.NetworkManager.Device", "State") -if state <= 3: - raise Exception("Device %s isn't connected" % sys.argv[1]) - -# Tell NM to disconnect it -dev_iface.Disconnect() - diff --git a/examples/python/list-connections.py b/examples/python/list-connections.py deleted file mode 100644 index ad8d9047..00000000 --- a/examples/python/list-connections.py +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/env python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2010 Red Hat, Inc. -# - -import dbus - -# This example asks both the system settings service and the user settings -# service for all configured connections. It also asks for secrets, demonstrating -# the mechanisms each settings service uses to prevent unauthorized access to -# a user's network passwords - -bus = dbus.SystemBus() - -def merge_secrets(proxy, config, setting_name): - try: - # returns a dict of dicts mapping name::setting, where setting is a dict - # mapping key::value. Each member of the 'setting' dict is a secret - secrets = proxy.GetSecrets(setting_name, [], False) - - # Copy the secrets into our connection config - for setting in secrets: - for key in secrets[setting]: - config[setting_name][key] = setting[key] - except Exception, e: - pass - -def dict_to_string(d, indent): - # Try to trivially translate a dictionary's elements into nice string - # formatting. - dstr = "" - for key in d: - val = d[key] - str_val = "" - add_string = True - if type(val) == type(dbus.Array([])): - for elt in val: - if type(elt) == type(dbus.Byte(1)): - str_val += "%s " % int(elt) - elif type(elt) == type(dbus.String("")): - str_val += "%s" % elt - elif type(val) == type(dbus.Dictionary({})): - dstr += dict_to_string(val, indent + " ") - add_string = False - else: - str_val = val - if add_string: - dstr += "%s%s: %s\n" % (indent, key, str_val) - return dstr - -def connection_to_string(config): - # dump a connection configuration to a the console - for setting_name in config: - print " Setting: %s" % setting_name - print dict_to_string(config[setting_name], " ") - print "" - - -def print_one_services_connections(service_name, desc): - # Ask the settings service for the list of connections it provides - proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManagerSettings") - settings = dbus.Interface(proxy, "org.freedesktop.NetworkManagerSettings") - connection_paths = settings.ListConnections() - - print "%s connections --------------------------------------------\n" % desc - - # List each connection's name, UUID, and type - for path in connection_paths: - con_proxy = bus.get_object(service_name, path) - connection = dbus.Interface(con_proxy, "org.freedesktop.NetworkManagerSettings.Connection") - config = connection.GetSettings() - - # Now get secrets too; we grab the secrets for each type of connection - # (since there isn't a "get all secrets" call because most of the time - # you only need 'wifi' secrets or '802.1x' secrets, not everything) and - # merge that into the configuration data - connection_secrets = dbus.Interface(con_proxy, "org.freedesktop.NetworkManagerSettings.Connection.Secrets") - merge_secrets(connection_secrets, config, '802-11-wireless') - merge_secrets(connection_secrets, config, '802-11-wireless-security') - merge_secrets(connection_secrets, config, '802-1x') - merge_secrets(connection_secrets, config, 'gsm') - merge_secrets(connection_secrets, config, 'cdma') - merge_secrets(connection_secrets, config, 'ppp') - - # Get the details of the 'connection' setting - s_con = config['connection'] - print "name: %s" % s_con['id'] - print " uuid: %s" % s_con['uuid'] - print " type: %s" % s_con['type'] - print " ----------------------------" - connection_to_string(config) - - print "" - -# Print out connection information for all connections -print_one_services_connections("org.freedesktop.NetworkManagerSystemSettings", "System") -print_one_services_connections("org.freedesktop.NetworkManagerUserSettings", "User") - diff --git a/examples/python/nm-state.py b/examples/python/nm-state.py index fddd2da6..2bbdd2db 100644 --- a/examples/python/nm-state.py +++ b/examples/python/nm-state.py @@ -47,13 +47,13 @@ active = manager_prop_iface.Get("org.freedesktop.NetworkManager", "ActiveConnect for a in active: ac_proxy = bus.get_object("org.freedesktop.NetworkManager", a) prop_iface = dbus.Interface(ac_proxy, "org.freedesktop.DBus.Properties") - state = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "State") + state = prop_iface.Get("org.freedesktop.NetworkManager.Connection.Active", "State") # Connections in NM are a collection of settings that describe everything # needed to connect to a specific network. Lets get those details so we # can find the user-readable name of the connection. - con_path = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "Connection") - con_service = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "ServiceName") + con_path = prop_iface.Get("org.freedesktop.NetworkManager.Connection.Active", "Connection") + con_service = prop_iface.Get("org.freedesktop.NetworkManager.Connection.Active", "ServiceName") # ask the provider of the connection for its details service_proxy = bus.get_object(con_service, con_path) diff --git a/examples/python/show-bssids.py b/examples/python/show-bssids.py deleted file mode 100644 index 5d8778c7..00000000 --- a/examples/python/show-bssids.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/env python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2010 Red Hat, Inc. -# - - -# This example prints out all the AP BSSIDs that all WiFi devices on the -# machine can see. Useful for location-based services like Skyhook that -# can geolocate you based on the APs you can see. - -import dbus - -bus = dbus.SystemBus() - -# Get a proxy for the base NetworkManager object -proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager") -manager = dbus.Interface(proxy, "org.freedesktop.NetworkManager") - -all_aps = [] - -print "Associated APs:" - -# Get all network devices -devices = manager.GetDevices() -for d in devices: - dev_proxy = bus.get_object("org.freedesktop.NetworkManager", d) - prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") - - # Make sure the device is enabled before we try to use it - state = prop_iface.Get("org.freedesktop.NetworkManager.Device", "State") - if state <= 2: - continue - - # Get device's type; we only want wifi devices - iface = prop_iface.Get("org.freedesktop.NetworkManager.Device", "Interface") - dtype = prop_iface.Get("org.freedesktop.NetworkManager.Device", "DeviceType") - if dtype == 2: # WiFi - # Get a proxy for the wifi interface - wifi_iface = dbus.Interface(dev_proxy, "org.freedesktop.NetworkManager.Device.Wireless") - wifi_prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") - - # Get the associated AP's object path - connected_path = wifi_prop_iface.Get("org.freedesktop.NetworkManager.Device.Wireless", "ActiveAccessPoint") - - # Get all APs the card can see - aps = wifi_iface.GetAccessPoints() - for path in aps: - ap_proxy = bus.get_object("org.freedesktop.NetworkManager", path) - ap_prop_iface = dbus.Interface(ap_proxy, "org.freedesktop.DBus.Properties") - bssid = ap_prop_iface.Get("org.freedesktop.NetworkManager.AccessPoint", "HwAddress") - - # Cache the BSSID - if not bssid in all_aps: - all_aps.append(bssid) - - # Print the current AP's BSSID - if path == connected_path: - print "%s (%s)" % (bssid, iface) - -# and print out all APs the wifi devices can see -print"\nFound APs:" -for bssid in all_aps: - print bssid - diff --git a/examples/python/vpn.py b/examples/python/vpn.py deleted file mode 100644 index 4b4057fc..00000000 --- a/examples/python/vpn.py +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2009 Novell, Inc. -# Copyright (C) 2009 Red Hat, Inc. -# - -# Run this script without any arguments to list the available connection uuids. - -# The uuid of the connection to activate -CONNECTION_UUID="ac6dc9b2-85ef-4311-83d8-add5d7db3f59" - -# UID to use. Note that NM only allows the owner of the connection to activate it. -#UID=1000 -UID=0 - -import sys -import os -import dbus -from dbus.mainloop.glib import DBusGMainLoop -import gobject - -DBusGMainLoop(set_as_default=True) - -def get_connections(): - bus = dbus.SystemBus() - proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', '/org/freedesktop/NetworkManagerSettings') - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings') - return iface.ListConnections() - - -def get_connection_by_uuid(uuid): - bus = dbus.SystemBus() - for c in get_connections(): - proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', c) - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') - settings = iface.GetSettings() - if settings['connection']['uuid'] == uuid: - return c - - return None - - -def list_uuids(): - bus = dbus.SystemBus() - for c in get_connections(): - proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', c) - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') - settings = iface.GetSettings() - conn = settings['connection'] - print "%s - %s (%s)" % (conn['uuid'], conn['id'], conn['type']) - - -def get_active_connection_path(uuid): - bus = dbus.SystemBus() - proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') - active_connections = iface.Get('org.freedesktop.NetworkManager', 'ActiveConnections') - all_connections = get_connections() - - for a in active_connections: - proxy = bus.get_object('org.freedesktop.NetworkManager', a) - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') - path = iface.Get('org.freedesktop.NetworkManager.Connection.Active', 'Connection') - - proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', path) - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') - settings = iface.GetSettings() - - if settings['connection']['uuid'] == uuid: - return a - - return None - - -def get_wifi_device_path(): - bus = dbus.SystemBus() - proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager') - devices = iface.GetDevices() - for d in devices: - proxy = bus.get_object('org.freedesktop.NetworkManager', d) - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') - devtype = iface.Get('org.freedesktop.NetworkManager.Device', 'DeviceType') - if devtype == 2: - return d - return None - -def activate_connection(connection_path, device_path): - - def reply_handler(opath): - print "Success: device activating" - sys.exit(0) - - def error_handler(*args): - print "Error activating device: %s" % args - sys.exit(1) - - bus = dbus.SystemBus() - proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') - iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager') - iface.ActivateConnection('org.freedesktop.NetworkManagerUserSettings', - connection_path, - device_path, - "/", - reply_handler=reply_handler, - error_handler=error_handler) - - -# Change the UID first if required -if UID != 0: - os.setuid(UID) - -# Are we configured? -if not len(CONNECTION_UUID): - print "missing connection UUID" - sys.exit(0) - -connection_path = get_connection_by_uuid(CONNECTION_UUID) -if not connection_path: - # Configured VPN connection is not known to NM, check CONNECTION_UUID. - print "couldn't find the connection" - sys.exit(1) - -device_path = get_wifi_device_path() -if not device_path: - print "no wifi device found" - sys.exit(1) - -# Is it already activated? -if get_active_connection_path(CONNECTION_UUID): - print "already connected" - sys.exit(0) - -print "Activating connection..." -activate_connection(connection_path, device_path) -loop = gobject.MainLoop() -loop.run() - diff --git a/include/Makefile.am b/include/Makefile.am index 54c4d1dc..b2f24ae8 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,11 +4,13 @@ EXTRA_DIST = \ wireless-helper.h \ nm-dbus-glib-types.h \ nm-glib-compat.h \ - nm-test-helpers.h + nm-test-helpers.h \ + nm-version.h.in NetworkManagerincludedir=$(includedir)/NetworkManager NetworkManagerinclude_HEADERS = \ NetworkManager.h \ - NetworkManagerVPN.h + NetworkManagerVPN.h \ + nm-version.h diff --git a/include/Makefile.in b/include/Makefile.in index 198944c7..df62f1a6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -36,7 +36,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(NetworkManagerinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(srcdir)/nm-version.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ @@ -48,7 +48,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = nm-version.h CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -176,6 +176,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -190,6 +194,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -271,12 +276,14 @@ EXTRA_DIST = \ wireless-helper.h \ nm-dbus-glib-types.h \ nm-glib-compat.h \ - nm-test-helpers.h + nm-test-helpers.h \ + nm-version.h.in NetworkManagerincludedir = $(includedir)/NetworkManager NetworkManagerinclude_HEADERS = \ NetworkManager.h \ - NetworkManagerVPN.h + NetworkManagerVPN.h \ + nm-version.h all: all-am @@ -311,6 +318,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +nm-version.h: $(top_builddir)/config.status $(srcdir)/nm-version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo diff --git a/include/NetworkManager.h b/include/NetworkManager.h index f58b84bc..30444e66 100644 --- a/include/NetworkManager.h +++ b/include/NetworkManager.h @@ -22,6 +22,8 @@ #ifndef NETWORK_MANAGER_H #define NETWORK_MANAGER_H +#include "nm-version.h" + /* * dbus services details */ diff --git a/include/nm-version.h b/include/nm-version.h new file mode 100644 index 00000000..3abab46e --- /dev/null +++ b/include/nm-version.h @@ -0,0 +1,63 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2011 Red Hat, Inc. + */ + +#ifndef NM_VERSION_H +#define NM_VERSION_H + +/** + * NM_MAJOR_VERSION: + * + * Evaluates to the major version number of NetworkManager which this source + * is compiled against. + */ +#define NM_MAJOR_VERSION (0) + +/** + * NM_MINOR_VERSION: + * + * Evaluates to the minor version number of NetworkManager which this source + * is compiled against. + */ +#define NM_MINOR_VERSION (8) + +/** + * NM_MICRO_VERSION: + * + * Evaluates to the micro version number of NetworkManager which this source + * compiled against. + */ +#define NM_MICRO_VERSION (3) + +/** + * NM_CHECK_VERSION: + * @major: major version (e.g. 1 for version 1.2.5) + * @minor: minor version (e.g. 2 for version 1.2.5) + * @micro: micro version (e.g. 5 for version 1.2.5) + * + * Returns %TRUE if the version of the NetworkManager header files + * is the same as or newer than the passed-in version. + */ +#define NM_CHECK_VERSION(major,minor,micro) \ + (NM_MAJOR_VERSION > (major) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro))) + +#endif /* NM_VERSION_H */ + diff --git a/include/nm-version.h.in b/include/nm-version.h.in new file mode 100644 index 00000000..ee2e1080 --- /dev/null +++ b/include/nm-version.h.in @@ -0,0 +1,63 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2011 Red Hat, Inc. + */ + +#ifndef NM_VERSION_H +#define NM_VERSION_H + +/** + * NM_MAJOR_VERSION: + * + * Evaluates to the major version number of NetworkManager which this source + * is compiled against. + */ +#define NM_MAJOR_VERSION (@NM_MAJOR_VERSION@) + +/** + * NM_MINOR_VERSION: + * + * Evaluates to the minor version number of NetworkManager which this source + * is compiled against. + */ +#define NM_MINOR_VERSION (@NM_MINOR_VERSION@) + +/** + * NM_MICRO_VERSION: + * + * Evaluates to the micro version number of NetworkManager which this source + * compiled against. + */ +#define NM_MICRO_VERSION (@NM_MICRO_VERSION@) + +/** + * NM_CHECK_VERSION: + * @major: major version (e.g. 1 for version 1.2.5) + * @minor: minor version (e.g. 2 for version 1.2.5) + * @micro: micro version (e.g. 5 for version 1.2.5) + * + * Returns %TRUE if the version of the NetworkManager header files + * is the same as or newer than the passed-in version. + */ +#define NM_CHECK_VERSION(major,minor,micro) \ + (NM_MAJOR_VERSION > (major) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro))) + +#endif /* NM_VERSION_H */ + diff --git a/initscript/Arch/Makefile.in b/initscript/Arch/Makefile.in index 843d7fa6..f2561855 100644 --- a/initscript/Arch/Makefile.in +++ b/initscript/Arch/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Arch/networkmanager b/initscript/Arch/networkmanager index f1687681..60874f22 100644 --- a/initscript/Arch/networkmanager +++ b/initscript/Arch/networkmanager @@ -17,6 +17,7 @@ PID=`pidof -o %PPID $NETWORKMANAGER_BIN` case "$1" in start) stat_busy "Starting NetworkManager" + [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager if [ -z "$PID" ]; then $NETWORKMANAGER_BIN fi diff --git a/initscript/Arch/networkmanager.in b/initscript/Arch/networkmanager.in index c3b2bfe5..4846427a 100644 --- a/initscript/Arch/networkmanager.in +++ b/initscript/Arch/networkmanager.in @@ -17,6 +17,7 @@ PID=`pidof -o %PPID $NETWORKMANAGER_BIN` case "$1" in start) stat_busy "Starting NetworkManager" + [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager if [ -z "$PID" ]; then $NETWORKMANAGER_BIN fi diff --git a/initscript/Debian/Makefile.in b/initscript/Debian/Makefile.in index b5ba6976..12b99d35 100644 --- a/initscript/Debian/Makefile.in +++ b/initscript/Debian/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Gentoo/Makefile.in b/initscript/Gentoo/Makefile.in index 3166046f..e87643af 100644 --- a/initscript/Gentoo/Makefile.in +++ b/initscript/Gentoo/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Makefile.in b/initscript/Makefile.in index ac882880..84b2370e 100644 --- a/initscript/Makefile.in +++ b/initscript/Makefile.in @@ -199,6 +199,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -213,6 +217,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Mandriva/Makefile.in b/initscript/Mandriva/Makefile.in index 44957d91..eb882781 100644 --- a/initscript/Mandriva/Makefile.in +++ b/initscript/Mandriva/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/RedHat/Makefile.in b/initscript/RedHat/Makefile.in index d550dddd..9e3bc499 100644 --- a/initscript/RedHat/Makefile.in +++ b/initscript/RedHat/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/SUSE/Makefile.in b/initscript/SUSE/Makefile.in index f2cd58b7..8e2c45de 100644 --- a/initscript/SUSE/Makefile.in +++ b/initscript/SUSE/Makefile.in @@ -150,6 +150,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -164,6 +168,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Slackware/Makefile.in b/initscript/Slackware/Makefile.in index 1fd1196f..58f85f47 100644 --- a/initscript/Slackware/Makefile.in +++ b/initscript/Slackware/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/Slackware/rc.networkmanager b/initscript/Slackware/rc.networkmanager index 87df6ff1..5ab01ea1 100644 --- a/initscript/Slackware/rc.networkmanager +++ b/initscript/Slackware/rc.networkmanager @@ -27,11 +27,6 @@ nm_start() return fi - if [ "`pgrep hald`" = "" ]; then - echo "HAL must be running to start NetworkManager" - return - fi - # Just in case the pidfile is still there, we may need to nuke it. if [ -e "$PIDFILE" ]; then rm -f $PIDFILE @@ -67,6 +62,7 @@ nm_stop() nm_restart() { nm_stop + sleep 2 nm_start } diff --git a/initscript/Slackware/rc.networkmanager.in b/initscript/Slackware/rc.networkmanager.in index 04890384..6eed87e1 100644 --- a/initscript/Slackware/rc.networkmanager.in +++ b/initscript/Slackware/rc.networkmanager.in @@ -27,11 +27,6 @@ nm_start() return fi - if [ "`pgrep hald`" = "" ]; then - echo "HAL must be running to start NetworkManager" - return - fi - # Just in case the pidfile is still there, we may need to nuke it. if [ -e "$PIDFILE" ]; then rm -f $PIDFILE @@ -67,6 +62,7 @@ nm_stop() nm_restart() { nm_stop + sleep 2 nm_start } diff --git a/initscript/linexa/Makefile.in b/initscript/linexa/Makefile.in index c06e2281..49f99dae 100644 --- a/initscript/linexa/Makefile.in +++ b/initscript/linexa/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/initscript/paldo/Makefile.in b/initscript/paldo/Makefile.in index bf3a3ae2..4f8570ce 100644 --- a/initscript/paldo/Makefile.in +++ b/initscript/paldo/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/introspection/Makefile.in b/introspection/Makefile.in index 3644aad6..0a37f352 100644 --- a/introspection/Makefile.in +++ b/introspection/Makefile.in @@ -149,6 +149,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -163,6 +167,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/introspection/all.xml b/introspection/all.xml index d6b2f236..1c32f3f3 100644 --- a/introspection/all.xml +++ b/introspection/all.xml @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index 016c121e..eaebdf35 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -55,6 +55,13 @@ Object path of the Ip6Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state. + + + Object path of the Dhcp6Config object describing the DHCP options + returned by the DHCP server. Only valid when the device is in the + NM_DEVICE_STATE_ACTIVATED state. + + Whether or not this device is managed by NetworkManager. diff --git a/introspection/nm-vpn-connection.xml b/introspection/nm-vpn-connection.xml index 3a47cdf1..65b91785 100644 --- a/introspection/nm-vpn-connection.xml +++ b/introspection/nm-vpn-connection.xml @@ -1,38 +1,6 @@ - - - The D-Bus service name providing this connection. - - - The path of the connection. - - - A specific object associated with the active connection. - - - Array of object paths representing devices which are part of this active connection. - - - The state of this active connection. - - - Whether this active connection is the default connection, i.e. whether it currently owns the default route. - - - Whether this active connection is also a VPN connection. - - - - - - A dictionary mapping property names to variant boxed values - - - - - Represents an active connection to a Virtual Private Network. @@ -162,6 +130,16 @@ Necessary secrets for the VPN connection were not provided. + + + Authentication to the VPN server failed. + + + + + The connection was deleted from settings. + + diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am index ec21a328..0c5fa137 100644 --- a/libnm-glib/Makefile.am +++ b/libnm-glib/Makefile.am @@ -52,7 +52,6 @@ lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la libnm_glib_la_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ - $(GCONF_CFLAGS) \ $(GUDEV_CFLAGS) libnmincludedir = $(includedir)/libnm-glib @@ -128,11 +127,10 @@ libnm_glib_la_LIBADD = \ $(builddir)/libdeprecated-nm-glib.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) \ - $(GCONF_LIBS) \ $(GUDEV_LIBS) libnm_glib_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib.ver \ - -version-info "6:2:4" + -version-info "6:3:4" noinst_PROGRAMS = libnm-glib-test diff --git a/libnm-glib/Makefile.in b/libnm-glib/Makefile.in index 1c8af1a2..822974dc 100644 --- a/libnm-glib/Makefile.in +++ b/libnm-glib/Makefile.in @@ -269,6 +269,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -283,6 +287,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -410,7 +415,6 @@ lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la libnm_glib_la_CFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ - $(GCONF_CFLAGS) \ $(GUDEV_CFLAGS) libnmincludedir = $(includedir)/libnm-glib @@ -485,11 +489,10 @@ libnm_glib_la_LIBADD = \ $(builddir)/libdeprecated-nm-glib.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) \ - $(GCONF_LIBS) \ $(GUDEV_LIBS) libnm_glib_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib.ver \ - -version-info "6:2:4" + -version-info "6:3:4" libnm_glib_test_SOURCES = libnm-glib-test.c libnm_glib_test_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c index 3ac0a24c..6284feca 100644 --- a/libnm-glib/libnm-glib-test.c +++ b/libnm-glib/libnm-glib-test.c @@ -203,7 +203,7 @@ dump_wireless (NMDeviceWifi *device) g_print ("AccessPoints:\n"); aps = nm_device_wifi_get_access_points (device); - for (i = 0; i < aps->len; i++) { + for (i = 0; aps && (i < aps->len); i++) { dump_access_point (NM_ACCESS_POINT (g_ptr_array_index (aps, i))); g_print ("\n"); } @@ -320,7 +320,8 @@ test_get_active_connections (NMClient *client) g_print (" %s\n", nm_object_get_path (g_ptr_array_index (connections, i))); devices = nm_active_connection_get_devices (g_ptr_array_index (connections, i)); - g_ptr_array_foreach ((GPtrArray *) devices, show_active_connection_device, NULL); + if (devices) + g_ptr_array_foreach ((GPtrArray *) devices, show_active_connection_device, NULL); } } diff --git a/libnm-glib/libnm-glib.ver b/libnm-glib/libnm-glib.ver index 1596afaa..22fc0e24 100644 --- a/libnm-glib/libnm-glib.ver +++ b/libnm-glib/libnm-glib.ver @@ -69,6 +69,7 @@ global: nm_device_ethernet_new; nm_device_get_capabilities; nm_device_get_dhcp4_config; + nm_device_get_dhcp6_config; nm_device_get_driver; nm_device_get_firmware_missing; nm_device_get_iface; @@ -95,6 +96,10 @@ global: nm_dhcp4_config_get_options; nm_dhcp4_config_get_type; nm_dhcp4_config_new; + nm_dhcp6_config_get_one_option; + nm_dhcp6_config_get_options; + nm_dhcp6_config_get_type; + nm_dhcp6_config_new; nm_exported_connection_export; nm_exported_connection_get_type; nm_exported_connection_new; diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index 88fe15b5..1de7b863 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2010 Red Hat, Inc. + * Copyright (C) 2007 - 2011 Red Hat, Inc. */ #include @@ -1244,7 +1244,7 @@ nm_client_get_state (NMClient *client) * * Whether networking is enabled or disabled. * - * Returns: %TRUE if networking is disabled, %FALSE if networking is enabled + * Returns: %TRUE if networking is enabled, %FALSE if networking is disabled **/ gboolean nm_client_networking_get_enabled (NMClient *client) diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index ea2a91d1..b8998f70 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -476,6 +476,20 @@ nm_device_class_init (NMDeviceClass *device_class) NULL, G_PARAM_READABLE)); + /** + * NMDevice:ip-interface: + * + * The IP interface of the device which should be used for all IP-related + * operations like addressing and routing. + **/ + g_object_class_install_property + (object_class, PROP_IP_INTERFACE, + g_param_spec_string (NM_DEVICE_IP_INTERFACE, + "IP Interface", + "IP Interface name", + NULL, + G_PARAM_READABLE)); + /** * NMDevice:udi: * diff --git a/libnm-glib/nm-exported-connection.c b/libnm-glib/nm-exported-connection.c index 3a8e51ce..b0e974cd 100644 --- a/libnm-glib/nm-exported-connection.c +++ b/libnm-glib/nm-exported-connection.c @@ -17,7 +17,7 @@ * Boston, MA 02110-1301 USA. * * (C) Copyright 2008 Novell, Inc. - * (C) Copyright 2008 - 2009 Red Hat, Inc. + * (C) Copyright 2008 - 2011 Red Hat, Inc. */ #include @@ -64,11 +64,16 @@ typedef struct { /**************************************************************/ +/* Has to be the same as NM_SYSCONFIG_SETTINGS_TIMESTAMP_TAG in nm-sysconfig-settings.h */ +#define CONNECTION_TIMESTAMP_TAG "timestamp-tag" + static GHashTable * real_get_settings (NMExportedConnection *self, GError **error) { NMConnection *no_secrets; GHashTable *settings; + NMSettingConnection *s_con; + guint64 *timestamp; /* Secrets should *never* be returned by the GetSettings method, they * get returned by the GetSecrets method which can be better @@ -77,6 +82,20 @@ real_get_settings (NMExportedConnection *self, GError **error) no_secrets = nm_connection_duplicate (NM_CONNECTION (self)); g_assert (no_secrets); nm_connection_clear_secrets (no_secrets); + + /* Timestamp is not updated internally in connection's 'timestamp' + * property, because it would force updating the connection and in turn + * writing to /etc periodically, which we want to avoid. Rather real + * timestamps are kept track of in data associated with GObject. + * Here we substitute connection's timestamp with the real one. + */ + timestamp = (guint64 *) g_object_get_data (G_OBJECT (self), CONNECTION_TIMESTAMP_TAG); + if (timestamp) { + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (NM_CONNECTION (no_secrets), NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + g_object_set (s_con, NM_SETTING_CONNECTION_TIMESTAMP, *timestamp, NULL); + } + settings = nm_connection_to_hash (no_secrets); g_assert (settings); g_object_unref (no_secrets); diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index f43fb602..a2d4d2b2 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -59,7 +59,7 @@ libnm_util_la_SOURCES= \ libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS) libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver \ - -version-info "7:0:6" + -version-info "7:1:6" if WITH_GNUTLS libnm_util_la_SOURCES += crypto_gnutls.c diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in index 28454329..dcea77bf 100644 --- a/libnm-util/Makefile.in +++ b/libnm-util/Makefile.in @@ -313,6 +313,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -327,6 +331,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -440,7 +445,7 @@ libnm_util_la_SOURCES = crypto.c crypto.h nm-connection.c \ libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS) \ $(am__append_3) $(am__append_6) libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver \ - -version-info "7:0:6" + -version-info "7:1:6" libnm_util_includedir = $(includedir)/NetworkManager diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver index 6c2b9fc7..354a0f7b 100644 --- a/libnm-util/libnm-util.ver +++ b/libnm-util/libnm-util.ver @@ -4,6 +4,7 @@ global: nm_connection_clear_secrets; nm_connection_compare; nm_connection_create_setting; + nm_connection_diff; nm_connection_dump; nm_connection_duplicate; nm_connection_error_get_type; @@ -115,6 +116,7 @@ global: nm_setting_connection_get_autoconnect; nm_setting_connection_get_timestamp; nm_setting_connection_get_read_only; + nm_setting_diff; nm_setting_duplicate; nm_setting_enumerate_values; nm_setting_error_get_type; diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c index 33790a63..3f339dbc 100644 --- a/libnm-util/nm-connection.c +++ b/libnm-util/nm-connection.c @@ -556,6 +556,89 @@ nm_connection_compare (NMConnection *a, return info.failed ? FALSE : TRUE; } + +static void +diff_one_connection (NMConnection *a, + NMConnection *b, + NMSettingCompareFlags flags, + gboolean invert_results, + GHashTable *diffs) +{ + NMConnectionPrivate *priv = NM_CONNECTION_GET_PRIVATE (a); + GHashTableIter iter; + NMSetting *a_setting = NULL; + + g_hash_table_iter_init (&iter, priv->settings); + while (g_hash_table_iter_next (&iter, NULL, (gpointer) &a_setting)) { + NMSetting *b_setting = NULL; + const char *setting_name = nm_setting_get_name (a_setting); + GHashTable *results; + gboolean new_results = TRUE; + + if (b) + b_setting = nm_connection_get_setting (b, G_OBJECT_TYPE (a_setting)); + + results = g_hash_table_lookup (diffs, setting_name); + if (results) + new_results = FALSE; + + if (!nm_setting_diff (a_setting, b_setting, flags, invert_results, &results)) { + if (new_results) + g_hash_table_insert (diffs, g_strdup (setting_name), results); + } + } +} + +/** + * nm_connection_diff: + * @a: a #NMConnection + * @b: a second #NMConnection to compare with the first + * @flags: compare flags, e.g. %NM_SETTING_COMPARE_FLAG_EXACT + * @out_settings: if the connections differ, on return a hash table mapping + * setting names to second-level GHashTable, which contains key names that differ + * + * Compares two #NMConnection objects for similarity, with comparison behavior + * modified by a set of flags. See nm_setting_compare() for a description of + * each flag's behavior. If the connections differ, settings and keys within + * each setting that differ are added to the returned @out_settings hash table. + * No values are returned, only key names. + * + * Returns: %TRUE if the connections contain the same values, %FALSE if they do + * not + **/ +gboolean +nm_connection_diff (NMConnection *a, + NMConnection *b, + NMSettingCompareFlags flags, + GHashTable **out_settings) +{ + GHashTable *diffs; + + g_return_val_if_fail (a != NULL, FALSE); + g_return_val_if_fail (NM_IS_CONNECTION (a), FALSE); + g_return_val_if_fail (out_settings != NULL, FALSE); + g_return_val_if_fail (*out_settings == NULL, FALSE); + if (b) + g_return_val_if_fail (NM_IS_CONNECTION (b), FALSE); + + if (a == b) + return TRUE; + + diffs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_hash_table_destroy); + + /* Diff A to B, then B to A to capture keys in B that aren't in A */ + diff_one_connection (a, b, flags, FALSE, diffs); + if (b) + diff_one_connection (b, a, flags, TRUE, diffs); + + if (g_hash_table_size (diffs) == 0) + g_hash_table_destroy (diffs); + else + *out_settings = diffs; + + return *out_settings ? FALSE : TRUE; +} + /** * nm_connection_verify: * @connection: the #NMConnection to verify @@ -624,7 +707,7 @@ nm_connection_verify (NMConnection *connection, GError **error) * nm_connection_update_secrets: * @connection: the #NMConnection * @setting_name: the setting object name to which the secrets apply - * @secrets: a #GHashTable mapping string:#GValue of setting property names and + * @setting_secrets: a #GHashTable mapping string:#GValue of setting property names and * secrets * @error: location to store error, or %NULL * @@ -637,7 +720,7 @@ nm_connection_verify (NMConnection *connection, GError **error) gboolean nm_connection_update_secrets (NMConnection *connection, const char *setting_name, - GHashTable *secrets, + GHashTable *setting_secrets, GError **error) { NMSetting *setting; @@ -646,19 +729,20 @@ nm_connection_update_secrets (NMConnection *connection, g_return_val_if_fail (connection != NULL, FALSE); g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE); g_return_val_if_fail (setting_name != NULL, FALSE); - g_return_val_if_fail (secrets != NULL, FALSE); + g_return_val_if_fail (setting_secrets != NULL, FALSE); if (error) g_return_val_if_fail (*error == NULL, FALSE); setting = nm_connection_get_setting (connection, nm_connection_lookup_setting_type (setting_name)); if (!setting) { - g_set_error (error, NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, - "%s", setting_name); + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, + setting_name); return FALSE; } - success = nm_setting_update_secrets (setting, secrets, error); + success = nm_setting_update_secrets (setting, setting_secrets, error); if (success) g_signal_emit (connection, signals[SECRETS_UPDATED], 0, setting_name); return success; diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h index 576db049..83d62d9b 100644 --- a/libnm-util/nm-connection.h +++ b/libnm-util/nm-connection.h @@ -127,6 +127,11 @@ gboolean nm_connection_compare (NMConnection *a, NMConnection *b, NMSettingCompareFlags flags); +gboolean nm_connection_diff (NMConnection *a, + NMConnection *b, + NMSettingCompareFlags flags, + GHashTable **out_settings); + gboolean nm_connection_verify (NMConnection *connection, GError **error); const char * nm_connection_need_secrets (NMConnection *connection, @@ -136,7 +141,7 @@ void nm_connection_clear_secrets (NMConnection *connection); gboolean nm_connection_update_secrets (NMConnection *connection, const char *setting_name, - GHashTable *secrets, + GHashTable *setting_secrets, GError **error); void nm_connection_set_scope (NMConnection *connection, diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c index 70840df9..e3cebe2e 100644 --- a/libnm-util/nm-setting-bluetooth.c +++ b/libnm-util/nm-setting-bluetooth.c @@ -274,8 +274,8 @@ nm_setting_bluetooth_class_init (NMSettingBluetoothClass *setting_class) g_param_spec_string (NM_SETTING_BLUETOOTH_TYPE, "Connection type", "Either '" NM_SETTING_BLUETOOTH_TYPE_DUN "' for " - "Dial-Up Networking connections (not yet supported) " - " or '" NM_SETTING_BLUETOOTH_TYPE_PANU "' for " + "Dial-Up Networking connections or " + "'" NM_SETTING_BLUETOOTH_TYPE_PANU "' for " "Personal Area Networking connections.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); diff --git a/libnm-util/nm-setting-cdma.c b/libnm-util/nm-setting-cdma.c index 7255eb91..cff8dff4 100644 --- a/libnm-util/nm-setting-cdma.c +++ b/libnm-util/nm-setting-cdma.c @@ -23,7 +23,6 @@ #include #include "nm-setting-cdma.h" -#include "nm-setting-serial.h" #include "nm-utils.h" /** @@ -69,7 +68,7 @@ nm_setting_cdma_error_get_type (void) ENUM_ENTRY (NM_SETTING_CDMA_ERROR_INVALID_PROPERTY, "InvalidProperty"), /* The specified property was missing and is required. */ ENUM_ENTRY (NM_SETTING_CDMA_ERROR_MISSING_PROPERTY, "MissingProperty"), - /* The required serial setting is missing */ + /* The required serial setting is missing (DEPRECATED) */ ENUM_ENTRY (NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING, "MissingSerialSetting"), { 0, 0, 0 } }; @@ -153,30 +152,11 @@ nm_setting_cdma_get_password (NMSettingCdma *setting) return NM_SETTING_CDMA_GET_PRIVATE (setting)->password; } -static gint -find_setting_by_name (gconstpointer a, gconstpointer b) -{ - NMSetting *setting = NM_SETTING (a); - const char *str = (const char *) b; - - return strcmp (nm_setting_get_name (setting), str); -} - static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { NMSettingCdmaPrivate *priv = NM_SETTING_CDMA_GET_PRIVATE (setting); - /* Serial connections require a PPP setting */ - if (all_settings && - !g_slist_find_custom (all_settings, NM_SETTING_SERIAL_SETTING_NAME, find_setting_by_name)) { - g_set_error (error, - NM_SETTING_CDMA_ERROR, - NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING, - NULL); - return FALSE; - } - if (!priv->number) { g_set_error (error, NM_SETTING_CDMA_ERROR, diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c index 9f24265d..aff8be08 100644 --- a/libnm-util/nm-setting-gsm.c +++ b/libnm-util/nm-setting-gsm.c @@ -26,7 +26,6 @@ #include #include #include "nm-setting-gsm.h" -#include "nm-setting-serial.h" #include "nm-utils.h" GQuark @@ -55,7 +54,7 @@ nm_setting_gsm_error_get_type (void) ENUM_ENTRY (NM_SETTING_GSM_ERROR_INVALID_PROPERTY, "InvalidProperty"), /* The specified property was missing and is required. */ ENUM_ENTRY (NM_SETTING_GSM_ERROR_MISSING_PROPERTY, "MissingProperty"), - /* The required serial setting is missing */ + /* The required serial setting is missing (DEPRECATED) */ ENUM_ENTRY (NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING, "MissingSerialSetting"), { 0, 0, 0 } }; @@ -107,15 +106,6 @@ nm_setting_gsm_new (void) return (NMSetting *) g_object_new (NM_TYPE_SETTING_GSM, NULL); } -static gint -find_setting_by_name (gconstpointer a, gconstpointer b) -{ - NMSetting *setting = NM_SETTING (a); - const char *str = (const char *) b; - - return strcmp (nm_setting_get_name (setting), str); -} - const char * nm_setting_gsm_get_number (NMSettingGsm *setting) { @@ -207,16 +197,6 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) { NMSettingGsmPrivate *priv = NM_SETTING_GSM_GET_PRIVATE (setting); - /* Serial connections require a PPP setting */ - if (all_settings && - !g_slist_find_custom (all_settings, NM_SETTING_SERIAL_SETTING_NAME, find_setting_by_name)) { - g_set_error (error, - NM_SETTING_GSM_ERROR, - NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING, - NULL); - return FALSE; - } - if (!priv->number) { g_set_error (error, NM_SETTING_GSM_ERROR, diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c index 186e41e2..ec8de7ce 100644 --- a/libnm-util/nm-setting-ip4-config.c +++ b/libnm-util/nm-setting-ip4-config.c @@ -950,7 +950,7 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "the 'dhcp-hostname' property is empty and this " "property is TRUE, the current persistent hostname " "of the computer is sent.", - FALSE, + TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); /** diff --git a/libnm-util/nm-setting-serial.c b/libnm-util/nm-setting-serial.c index 779e53a8..d1d1445e 100644 --- a/libnm-util/nm-setting-serial.c +++ b/libnm-util/nm-setting-serial.c @@ -19,14 +19,13 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2011 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ #include #include "nm-setting-serial.h" -#include "nm-setting-ppp.h" GQuark nm_setting_serial_error_quark (void) @@ -54,7 +53,7 @@ nm_setting_serial_error_get_type (void) ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY, "InvalidProperty"), /* The specified property was missing and is required. */ ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY, "MissingProperty"), - /* The required PPP setting is missing */ + /* The required PPP setting is missing (DEPRECATED) */ ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING, "MissingPPPSetting"), { 0, 0, 0 } }; @@ -134,28 +133,9 @@ nm_setting_serial_get_send_delay (NMSettingSerial *setting) return NM_SETTING_SERIAL_GET_PRIVATE (setting)->send_delay; } -static gint -find_setting_by_name (gconstpointer a, gconstpointer b) -{ - NMSetting *setting = NM_SETTING (a); - const char *str = (const char *) b; - - return strcmp (nm_setting_get_name (setting), str); -} - static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { - /* Serial connections require a PPP setting */ - if (all_settings && - !g_slist_find_custom (all_settings, NM_SETTING_PPP_SETTING_NAME, find_setting_by_name)) { - g_set_error_literal (error, - NM_SETTING_SERIAL_ERROR, - NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING, - "Missing required PPP setting"); - return FALSE; - } - return TRUE; } diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index 06994c73..6f014bff 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -317,6 +317,29 @@ nm_setting_verify (NMSetting *setting, GSList *all_settings, GError **error) return TRUE; } +static inline gboolean +should_compare_prop (NMSetting *setting, + const char *prop_name, + NMSettingCompareFlags comp_flags, + GParamFlags prop_flags) +{ + /* Fuzzy compare ignores secrets and properties defined with the FUZZY_IGNORE flag */ + if ( (comp_flags & NM_SETTING_COMPARE_FLAG_FUZZY) + && (prop_flags & (NM_SETTING_PARAM_FUZZY_IGNORE | NM_SETTING_PARAM_SECRET))) + return FALSE; + + if ( (comp_flags & NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS) + && (prop_flags & NM_SETTING_PARAM_SECRET)) + return FALSE; + + if ( (comp_flags & NM_SETTING_COMPARE_FLAG_IGNORE_ID) + && NM_IS_SETTING_CONNECTION (setting) + && !strcmp (prop_name, NM_SETTING_CONNECTION_ID)) + return FALSE; + + return TRUE; +} + /** * nm_setting_compare: * @a: a #NMSetting @@ -355,19 +378,8 @@ nm_setting_compare (NMSetting *a, GValue value1 = { 0 }; GValue value2 = { 0 }; - /* Fuzzy compare ignores secrets and properties defined with the - * FUZZY_IGNORE flag - */ - if ( (flags & NM_SETTING_COMPARE_FLAG_FUZZY) - && (prop_spec->flags & (NM_SETTING_PARAM_FUZZY_IGNORE | NM_SETTING_PARAM_SECRET))) - continue; - - if ((flags & NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS) && (prop_spec->flags & NM_SETTING_PARAM_SECRET)) - continue; - - if ( (flags & NM_SETTING_COMPARE_FLAG_IGNORE_ID) - && !strcmp (nm_setting_get_name (a), NM_SETTING_CONNECTION_SETTING_NAME) - && !strcmp (prop_spec->name, NM_SETTING_CONNECTION_ID)) + /* Handle compare flags */ + if (!should_compare_prop (a, prop_spec->name, flags, prop_spec->flags)) continue; g_value_init (&value1, prop_spec->value_type); @@ -387,6 +399,118 @@ nm_setting_compare (NMSetting *a, return different == 0 ? TRUE : FALSE; } +/** + * nm_setting_diff: + * @a: a #NMSetting + * @b: a second #NMSetting to compare with the first + * @flags: compare flags, e.g. %NM_SETTING_COMPARE_FLAG_EXACT + * @invert_results: this parameter is used internally by libnm-util and should + * be set to %FALSE. If %TRUE inverts the meaning of the #NMSettingDiffResult. + * @results: (element-type utf8 guint32): if the settings differ, on return a + * hash table mapping the differing keys to one or more #NMSettingDiffResult + * values OR-ed together. If the settings do not differ, any hash table passed + * in is unmodified. If no hash table is passed in, a new one is created. + * + * Compares two #NMSetting objects for similarity, with comparison behavior + * modified by a set of flags. See the documentation for #NMSettingCompareFlags + * for a description of each flag's behavior. If the settings differ, the keys + * of each setting that differ from the other are added to @results, mapped to + * one or more #NMSettingDiffResult values. + * + * Returns: %TRUE if the settings contain the same values, %FALSE if they do not + **/ +gboolean +nm_setting_diff (NMSetting *a, + NMSetting *b, + NMSettingCompareFlags flags, + gboolean invert_results, + GHashTable **results) +{ + GParamSpec **property_specs; + guint n_property_specs; + guint i; + NMSettingDiffResult a_result = NM_SETTING_DIFF_RESULT_IN_A; + NMSettingDiffResult b_result = NM_SETTING_DIFF_RESULT_IN_B; + gboolean results_created = FALSE; + + g_return_val_if_fail (results != NULL, FALSE); + g_return_val_if_fail (a != NULL, FALSE); + g_return_val_if_fail (NM_IS_SETTING (a), FALSE); + if (b) { + g_return_val_if_fail (NM_IS_SETTING (b), FALSE); + g_return_val_if_fail (G_OBJECT_TYPE (a) == G_OBJECT_TYPE (b), FALSE); + } + + /* If the caller is calling this function in a pattern like this to get + * complete diffs: + * + * nm_setting_diff (A, B, FALSE, &results); + * nm_setting_diff (B, A, TRUE, &results); + * + * and wants us to invert the results so that the second invocation comes + * out correctly, do that here. + */ + if (invert_results) { + a_result = NM_SETTING_DIFF_RESULT_IN_B; + b_result = NM_SETTING_DIFF_RESULT_IN_A; + } + + if (*results == NULL) { + *results = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + results_created = TRUE; + } + + /* And now all properties */ + property_specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (a), &n_property_specs); + + for (i = 0; i < n_property_specs; i++) { + GParamSpec *prop_spec = property_specs[i]; + GValue a_value = { 0 }, b_value = { 0 }; + NMSettingDiffResult r = NM_SETTING_DIFF_RESULT_UNKNOWN, tmp; + gboolean different = TRUE; + + /* Handle compare flags */ + if (!should_compare_prop (a, prop_spec->name, flags, prop_spec->flags)) + continue; + if (strcmp (prop_spec->name, NM_SETTING_NAME) == 0) + continue; + + if (b) { + g_value_init (&a_value, prop_spec->value_type); + g_object_get_property (G_OBJECT (a), prop_spec->name, &a_value); + + g_value_init (&b_value, prop_spec->value_type); + g_object_get_property (G_OBJECT (b), prop_spec->name, &b_value); + + different = !!g_param_values_cmp (prop_spec, &a_value, &b_value); + if (different) { + if (!g_param_value_defaults (prop_spec, &a_value)) + r |= a_result; + if (!g_param_value_defaults (prop_spec, &b_value)) + r |= b_result; + } + + g_value_unset (&a_value); + g_value_unset (&b_value); + } else + r = a_result; /* only in A */ + + if (different) { + tmp = GPOINTER_TO_UINT (g_hash_table_lookup (*results, prop_spec->name)); + g_hash_table_insert (*results, g_strdup (prop_spec->name), GUINT_TO_POINTER (tmp | r)); + } + } + g_free (property_specs); + + /* Don't return an empty hash table */ + if (results_created && !g_hash_table_size (*results)) { + g_hash_table_destroy (*results); + *results = NULL; + } + + return !(*results); +} + /** * nm_setting_enumerate_values: * @setting: the #NMSetting @@ -483,11 +607,6 @@ nm_setting_need_secrets (NMSetting *setting) return secrets; } -typedef struct { - NMSetting *setting; - GError **error; -} UpdateSecretsInfo; - static gboolean update_one_secret (NMSetting *setting, const char *key, GValue *value, GError **error) { @@ -504,13 +623,9 @@ update_one_secret (NMSetting *setting, const char *key, GValue *value, GError ** return FALSE; } - if (!(prop_spec->flags & NM_SETTING_PARAM_SECRET)) { - g_set_error (error, - NM_SETTING_ERROR, - NM_SETTING_ERROR_PROPERTY_NOT_SECRET, - "%s", key); - return FALSE; - } + /* Silently ignore non-secrets */ + if (!(prop_spec->flags & NM_SETTING_PARAM_SECRET)) + return TRUE; if (g_value_type_compatible (G_VALUE_TYPE (value), G_PARAM_SPEC_VALUE_TYPE (prop_spec))) { g_object_set_property (G_OBJECT (setting), prop_spec->name, value); @@ -528,17 +643,6 @@ update_one_secret (NMSetting *setting, const char *key, GValue *value, GError ** return success; } -static void -update_one_cb (gpointer key, gpointer val, gpointer user_data) -{ - UpdateSecretsInfo *info = user_data; - const char *secret_key = (const char *) key; - GValue *secret_value = (GValue *) val; - - if (*(info->error) == NULL) - NM_SETTING_GET_CLASS (info->setting)->update_one_secret (info->setting, secret_key, secret_value, info->error); -} - /** * nm_setting_update_secrets: * @setting: the #NMSetting @@ -555,8 +659,9 @@ update_one_cb (gpointer key, gpointer val, gpointer user_data) gboolean nm_setting_update_secrets (NMSetting *setting, GHashTable *secrets, GError **error) { - UpdateSecretsInfo *info; - gboolean success; + GHashTableIter iter; + gpointer key, data; + GError *tmp_error = NULL; g_return_val_if_fail (setting != NULL, FALSE); g_return_val_if_fail (NM_IS_SETTING (setting), FALSE); @@ -564,14 +669,19 @@ nm_setting_update_secrets (NMSetting *setting, GHashTable *secrets, GError **err if (error) g_return_val_if_fail (*error == NULL, FALSE); - info = g_malloc0 (sizeof (UpdateSecretsInfo)); - info->setting = setting; - info->error = error; - g_hash_table_foreach (secrets, update_one_cb, info); - success = *(info->error) ? FALSE : TRUE; - g_free (info); + g_hash_table_iter_init (&iter, secrets); + while (g_hash_table_iter_next (&iter, &key, &data)) { + const char *secret_key = (const char *) key; + GValue *secret_value = (GValue *) data; - return success; + NM_SETTING_GET_CLASS (setting)->update_one_secret (setting, secret_key, secret_value, &tmp_error); + if (tmp_error) { + g_propagate_error (error, tmp_error); + return FALSE; + } + } + + return TRUE; } /** @@ -620,6 +730,8 @@ nm_setting_to_string (NMSetting *setting) is_serializable = prop_spec->flags & NM_SETTING_PARAM_SERIALIZE; is_default = g_param_value_defaults (prop_spec, &value); + g_value_unset (&value); + if (is_serializable || is_default) { g_string_append (string, " ("); diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h index de5657ee..6b7e92ab 100644 --- a/libnm-util/nm-setting.h +++ b/libnm-util/nm-setting.h @@ -160,6 +160,26 @@ gboolean nm_setting_compare (NMSetting *a, NMSetting *b, NMSettingCompareFlags flags); +/** + * NMSettingDiffResult: + * @NM_SETTING_DIFF_RESULT_UNKNOWN: unknown result + * @NM_SETTING_DIFF_RESULT_IN_A: the property is present in setting A + * @NM_SETTING_DIFF_RESULT_IN_B: the property is present in setting B + * + * These values indicate the result of a setting difference operation. + **/ +typedef enum { + NM_SETTING_DIFF_RESULT_UNKNOWN = 0x00000000, + NM_SETTING_DIFF_RESULT_IN_A = 0x00000001, + NM_SETTING_DIFF_RESULT_IN_B = 0x00000002, +} NMSettingDiffResult; + +gboolean nm_setting_diff (NMSetting *a, + NMSetting *b, + NMSettingCompareFlags flags, + gboolean invert_results, + GHashTable **results); + void nm_setting_enumerate_values (NMSetting *setting, NMSettingValueIterFn func, gpointer user_data); diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index ce13da3c..9c3662f4 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -1269,14 +1269,24 @@ nm_utils_security_valid (NMUtilsSecurityType type, if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA)) return FALSE; if (have_ap) { - /* Ad-Hoc WPA APs won't necessarily have the PSK flag set */ - if ((ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) || adhoc) { - if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP) + /* Ad-Hoc WPA APs won't necessarily have the PSK flag set, and + * they don't have any pairwise ciphers. */ + if (adhoc) { + if ( (ap_wpa & NM_802_11_AP_SEC_GROUP_TKIP) && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) return TRUE; - if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_CCMP) + if ( (ap_wpa & NM_802_11_AP_SEC_GROUP_CCMP) && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) return TRUE; + } else { + if (ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) { + if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP) + && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) + return TRUE; + if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_CCMP) + && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) + return TRUE; + } } return FALSE; } @@ -1285,14 +1295,22 @@ nm_utils_security_valid (NMUtilsSecurityType type, if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN)) return FALSE; if (have_ap) { - /* Ad-Hoc WPA APs won't necessarily have the PSK flag set */ - if ((ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) || adhoc) { - if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP) - && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) + /* Ad-Hoc WPA APs won't necessarily have the PSK flag set, and + * they don't have any pairwise ciphers, nor any RSA flags yet. */ + if (adhoc) { + if (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP) return TRUE; - if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP) - && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) + if (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP) return TRUE; + } else { + if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) { + if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP) + && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) + return TRUE; + if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP) + && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) + return TRUE; + } } return FALSE; } diff --git a/libnm-util/tests/Makefile.am b/libnm-util/tests/Makefile.am index 378a7388..a0b4779c 100644 --- a/libnm-util/tests/Makefile.am +++ b/libnm-util/tests/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ noinst_PROGRAMS = \ test-settings-defaults \ test-crypto \ - test-need-secrets \ + test-secrets \ test-general \ test-setting-8021x @@ -34,15 +34,15 @@ test_crypto_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) -test_need_secrets_SOURCES = \ - test-need-secrets.c +test_secrets_SOURCES = \ + test-secrets.c -test_need_secrets_CPPFLAGS = \ +test_secrets_CPPFLAGS = \ -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-util/tests/certs/\" \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -test_need_secrets_LDADD = \ +test_secrets_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) @@ -73,9 +73,9 @@ test_setting_8021x_LDADD = \ if WITH_TESTS -check-local: test-settings-defaults test-crypto test-need-secrets +check-local: test-settings-defaults test-crypto test-secrets $(abs_builddir)/test-settings-defaults - $(abs_builddir)/test-need-secrets + $(abs_builddir)/test-secrets $(abs_builddir)/test-general # Private key and CA certificate in the same file (PEM) diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in index bf696885..766aa979 100644 --- a/libnm-util/tests/Makefile.in +++ b/libnm-util/tests/Makefile.in @@ -35,7 +35,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = test-settings-defaults$(EXEEXT) test-crypto$(EXEEXT) \ - test-need-secrets$(EXEEXT) test-general$(EXEEXT) \ + test-secrets$(EXEEXT) test-general$(EXEEXT) \ test-setting-8021x$(EXEEXT) subdir = libnm-util/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -66,12 +66,10 @@ am_test_general_OBJECTS = test_general-test-general.$(OBJEXT) test_general_OBJECTS = $(am_test_general_OBJECTS) test_general_DEPENDENCIES = $(top_builddir)/libnm-util/libnm-util.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_test_need_secrets_OBJECTS = \ - test_need_secrets-test-need-secrets.$(OBJEXT) -test_need_secrets_OBJECTS = $(am_test_need_secrets_OBJECTS) -test_need_secrets_DEPENDENCIES = \ - $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +am_test_secrets_OBJECTS = test_secrets-test-secrets.$(OBJEXT) +test_secrets_OBJECTS = $(am_test_secrets_OBJECTS) +test_secrets_DEPENDENCIES = $(top_builddir)/libnm-util/libnm-util.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_test_setting_8021x_OBJECTS = \ test_setting_8021x-test-setting-8021x.$(OBJEXT) test_setting_8021x_OBJECTS = $(am_test_setting_8021x_OBJECTS) @@ -111,10 +109,10 @@ AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(test_crypto_SOURCES) $(test_general_SOURCES) \ - $(test_need_secrets_SOURCES) $(test_setting_8021x_SOURCES) \ + $(test_secrets_SOURCES) $(test_setting_8021x_SOURCES) \ $(test_settings_defaults_SOURCES) DIST_SOURCES = $(test_crypto_SOURCES) $(test_general_SOURCES) \ - $(test_need_secrets_SOURCES) $(test_setting_8021x_SOURCES) \ + $(test_secrets_SOURCES) $(test_setting_8021x_SOURCES) \ $(test_settings_defaults_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ @@ -249,6 +247,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -263,6 +265,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -366,15 +369,15 @@ test_crypto_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) -test_need_secrets_SOURCES = \ - test-need-secrets.c +test_secrets_SOURCES = \ + test-secrets.c -test_need_secrets_CPPFLAGS = \ +test_secrets_CPPFLAGS = \ -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-util/tests/certs/\" \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) -test_need_secrets_LDADD = \ +test_secrets_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) @@ -452,9 +455,9 @@ test-crypto$(EXEEXT): $(test_crypto_OBJECTS) $(test_crypto_DEPENDENCIES) test-general$(EXEEXT): $(test_general_OBJECTS) $(test_general_DEPENDENCIES) @rm -f test-general$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_general_OBJECTS) $(test_general_LDADD) $(LIBS) -test-need-secrets$(EXEEXT): $(test_need_secrets_OBJECTS) $(test_need_secrets_DEPENDENCIES) - @rm -f test-need-secrets$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_need_secrets_OBJECTS) $(test_need_secrets_LDADD) $(LIBS) +test-secrets$(EXEEXT): $(test_secrets_OBJECTS) $(test_secrets_DEPENDENCIES) + @rm -f test-secrets$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_secrets_OBJECTS) $(test_secrets_LDADD) $(LIBS) test-setting-8021x$(EXEEXT): $(test_setting_8021x_OBJECTS) $(test_setting_8021x_DEPENDENCIES) @rm -f test-setting-8021x$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setting_8021x_OBJECTS) $(test_setting_8021x_LDADD) $(LIBS) @@ -470,7 +473,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-test-crypto.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_general-test-general.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_need_secrets-test-need-secrets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_secrets-test-secrets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_setting_8021x-test-setting-8021x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_settings_defaults-test-settings-defaults.Po@am__quote@ @@ -533,21 +536,21 @@ test_general-test-general.obj: test-general.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_general_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_general-test-general.obj `if test -f 'test-general.c'; then $(CYGPATH_W) 'test-general.c'; else $(CYGPATH_W) '$(srcdir)/test-general.c'; fi` -test_need_secrets-test-need-secrets.o: test-need-secrets.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_need_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_need_secrets-test-need-secrets.o -MD -MP -MF $(DEPDIR)/test_need_secrets-test-need-secrets.Tpo -c -o test_need_secrets-test-need-secrets.o `test -f 'test-need-secrets.c' || echo '$(srcdir)/'`test-need-secrets.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_need_secrets-test-need-secrets.Tpo $(DEPDIR)/test_need_secrets-test-need-secrets.Po +test_secrets-test-secrets.o: test-secrets.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_secrets-test-secrets.o -MD -MP -MF $(DEPDIR)/test_secrets-test-secrets.Tpo -c -o test_secrets-test-secrets.o `test -f 'test-secrets.c' || echo '$(srcdir)/'`test-secrets.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_secrets-test-secrets.Tpo $(DEPDIR)/test_secrets-test-secrets.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-need-secrets.c' object='test_need_secrets-test-need-secrets.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-secrets.c' object='test_secrets-test-secrets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_need_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_need_secrets-test-need-secrets.o `test -f 'test-need-secrets.c' || echo '$(srcdir)/'`test-need-secrets.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_secrets-test-secrets.o `test -f 'test-secrets.c' || echo '$(srcdir)/'`test-secrets.c -test_need_secrets-test-need-secrets.obj: test-need-secrets.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_need_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_need_secrets-test-need-secrets.obj -MD -MP -MF $(DEPDIR)/test_need_secrets-test-need-secrets.Tpo -c -o test_need_secrets-test-need-secrets.obj `if test -f 'test-need-secrets.c'; then $(CYGPATH_W) 'test-need-secrets.c'; else $(CYGPATH_W) '$(srcdir)/test-need-secrets.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_need_secrets-test-need-secrets.Tpo $(DEPDIR)/test_need_secrets-test-need-secrets.Po +test_secrets-test-secrets.obj: test-secrets.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_secrets-test-secrets.obj -MD -MP -MF $(DEPDIR)/test_secrets-test-secrets.Tpo -c -o test_secrets-test-secrets.obj `if test -f 'test-secrets.c'; then $(CYGPATH_W) 'test-secrets.c'; else $(CYGPATH_W) '$(srcdir)/test-secrets.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_secrets-test-secrets.Tpo $(DEPDIR)/test_secrets-test-secrets.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-need-secrets.c' object='test_need_secrets-test-need-secrets.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-secrets.c' object='test_secrets-test-secrets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_need_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_need_secrets-test-need-secrets.obj `if test -f 'test-need-secrets.c'; then $(CYGPATH_W) 'test-need-secrets.c'; else $(CYGPATH_W) '$(srcdir)/test-need-secrets.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_secrets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_secrets-test-secrets.obj `if test -f 'test-secrets.c'; then $(CYGPATH_W) 'test-secrets.c'; else $(CYGPATH_W) '$(srcdir)/test-secrets.c'; fi` test_setting_8021x-test-setting-8021x.o: test-setting-8021x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_setting_8021x_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_setting_8021x-test-setting-8021x.o -MD -MP -MF $(DEPDIR)/test_setting_8021x-test-setting-8021x.Tpo -c -o test_setting_8021x-test-setting-8021x.o `test -f 'test-setting-8021x.c' || echo '$(srcdir)/'`test-setting-8021x.c @@ -902,9 +905,9 @@ uninstall-am: tags tags-recursive uninstall uninstall-am -@WITH_TESTS_TRUE@check-local: test-settings-defaults test-crypto test-need-secrets +@WITH_TESTS_TRUE@check-local: test-settings-defaults test-crypto test-secrets @WITH_TESTS_TRUE@ $(abs_builddir)/test-settings-defaults -@WITH_TESTS_TRUE@ $(abs_builddir)/test-need-secrets +@WITH_TESTS_TRUE@ $(abs_builddir)/test-secrets @WITH_TESTS_TRUE@ $(abs_builddir)/test-general # Private key and CA certificate in the same file (PEM) diff --git a/libnm-util/tests/certs/Makefile.in b/libnm-util/tests/certs/Makefile.in index 860d05de..d49619f7 100644 --- a/libnm-util/tests/certs/Makefile.in +++ b/libnm-util/tests/certs/Makefile.in @@ -158,6 +158,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -172,6 +176,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index e91e2b5c..c7421faf 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -29,7 +29,10 @@ #include "nm-setting-connection.h" #include "nm-setting-vpn.h" #include "nm-setting-gsm.h" +#include "nm-setting-wired.h" #include "nm-setting-ip6-config.h" +#include "nm-setting-ip4-config.h" +#include "nm-setting-pppoe.h" #include "nm-dbus-glib-types.h" static void @@ -289,6 +292,240 @@ test_setting_gsm_apn_bad_chars (void) "gsm-apn-bad-chars", "unexpectedly valid GSM setting"); } +static NMConnection * +new_test_connection (void) +{ + NMConnection *connection; + NMSetting *setting; + char *uuid; + gulong timestamp = time (NULL); + + connection = nm_connection_new (); + + setting = nm_setting_connection_new (); + uuid = nm_utils_uuid_generate (); + g_object_set (G_OBJECT (setting), + NM_SETTING_CONNECTION_ID, "foobar", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_CONNECTION_TIMESTAMP, timestamp, + NULL); + g_free (uuid); + nm_connection_add_setting (connection, setting); + + setting = nm_setting_wired_new (); + g_object_set (G_OBJECT (setting), + NM_SETTING_WIRED_MTU, 1592, + NULL); + nm_connection_add_setting (connection, setting); + + setting = nm_setting_ip4_config_new (); + g_object_set (G_OBJECT (setting), + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, + NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME, "eyeofthetiger", + NULL); + nm_connection_add_setting (connection, setting); + + return connection; +} + +typedef struct { + const char *key_name; + guint32 result; +} DiffKey; + +typedef struct { + const char *name; + DiffKey keys[30]; +} DiffSetting; + +#define ARRAY_LEN(a) (sizeof (a) / sizeof (a[0])) + +static void +ensure_diffs (GHashTable *diffs, const DiffSetting *check, gsize n_check) +{ + guint i; + + g_assert (g_hash_table_size (diffs) == n_check); + + /* Loop through the settings */ + for (i = 0; i < n_check; i++) { + GHashTable *setting_hash; + guint z = 0; + + setting_hash = g_hash_table_lookup (diffs, check[i].name); + g_assert (setting_hash); + + /* Get the number of keys to check */ + while (check[i].keys[z].key_name) + z++; + g_assert (g_hash_table_size (setting_hash) == z); + + /* Now compare the actual keys */ + for (z = 0; check[i].keys[z].key_name; z++) { + NMSettingDiffResult result; + + result = GPOINTER_TO_UINT (g_hash_table_lookup (setting_hash, check[i].keys[z].key_name)); + g_assert (result == check[i].keys[z].result); + } + } +} + +static void +test_connection_diff_a_only (void) +{ + NMConnection *connection; + GHashTable *out_diffs = NULL; + gboolean same; + const DiffSetting settings[] = { + { NM_SETTING_CONNECTION_SETTING_NAME, { + { NM_SETTING_CONNECTION_ID, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_UUID, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_TYPE, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_TIMESTAMP, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_AUTOCONNECT, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_READ_ONLY, NM_SETTING_DIFF_RESULT_IN_A }, + { NULL, NM_SETTING_DIFF_RESULT_UNKNOWN } + } }, + { NM_SETTING_WIRED_SETTING_NAME, { + { NM_SETTING_WIRED_PORT, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_SPEED, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_DUPLEX, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_AUTO_NEGOTIATE, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_MAC_ADDRESS, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_CLONED_MAC_ADDRESS, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_MTU, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_S390_SUBCHANNELS, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_S390_NETTYPE, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_WIRED_S390_OPTIONS, NM_SETTING_DIFF_RESULT_IN_A }, + { NULL, NM_SETTING_DIFF_RESULT_UNKNOWN }, + } }, + { NM_SETTING_IP4_CONFIG_SETTING_NAME, { + { NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_DNS, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_DNS_SEARCH, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_ADDRESSES, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_ROUTES, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_IP4_CONFIG_MAY_FAIL, NM_SETTING_DIFF_RESULT_IN_A }, + { NULL, NM_SETTING_DIFF_RESULT_UNKNOWN }, + } }, + }; + + connection = new_test_connection (); + + same = nm_connection_diff (connection, NULL, NM_SETTING_COMPARE_FLAG_EXACT, &out_diffs); + g_assert (same == FALSE); + g_assert (out_diffs != NULL); + g_assert (g_hash_table_size (out_diffs) > 0); + + ensure_diffs (out_diffs, settings, ARRAY_LEN (settings)); + + g_object_unref (connection); +} + +static void +test_connection_diff_same (void) +{ + NMConnection *a, *b; + GHashTable *out_diffs = NULL; + gboolean same; + + a = new_test_connection (); + b = nm_connection_duplicate (a); + + same = nm_connection_diff (a, b, NM_SETTING_COMPARE_FLAG_EXACT, &out_diffs); + g_assert (same == TRUE); + g_assert (out_diffs == NULL); + g_object_unref (a); + g_object_unref (b); +} + +static void +test_connection_diff_different (void) +{ + NMConnection *a, *b; + GHashTable *out_diffs = NULL; + NMSetting *s_ip4; + gboolean same; + const DiffSetting settings[] = { + { NM_SETTING_IP4_CONFIG_SETTING_NAME, { + { NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_DIFF_RESULT_IN_A | NM_SETTING_DIFF_RESULT_IN_B }, + { NULL, NM_SETTING_DIFF_RESULT_UNKNOWN }, + } }, + }; + + a = new_test_connection (); + b = nm_connection_duplicate (a); + s_ip4 = nm_connection_get_setting (a, NM_TYPE_SETTING_IP4_CONFIG); + g_assert (s_ip4); + g_object_set (G_OBJECT (s_ip4), + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, + NULL); + + same = nm_connection_diff (a, b, NM_SETTING_COMPARE_FLAG_EXACT, &out_diffs); + g_assert (same == FALSE); + g_assert (out_diffs != NULL); + g_assert (g_hash_table_size (out_diffs) > 0); + + ensure_diffs (out_diffs, settings, ARRAY_LEN (settings)); + + g_object_unref (a); + g_object_unref (b); +} + +static void +test_connection_diff_no_secrets (void) +{ + NMConnection *a, *b; + GHashTable *out_diffs = NULL; + NMSetting *s_pppoe; + gboolean same; + const DiffSetting settings[] = { + { NM_SETTING_PPPOE_SETTING_NAME, { + { NM_SETTING_PPPOE_PASSWORD, NM_SETTING_DIFF_RESULT_IN_B }, + { NULL, NM_SETTING_DIFF_RESULT_UNKNOWN }, + } }, + }; + + a = new_test_connection (); + s_pppoe = nm_setting_pppoe_new (); + g_object_set (G_OBJECT (s_pppoe), + NM_SETTING_PPPOE_USERNAME, "thomas", + NULL); + nm_connection_add_setting (a, s_pppoe); + + b = nm_connection_duplicate (a); + + /* Add a secret to B */ + s_pppoe = nm_connection_get_setting (b, NM_TYPE_SETTING_PPPOE); + g_assert (s_pppoe); + g_object_set (G_OBJECT (s_pppoe), + NM_SETTING_PPPOE_PASSWORD, "secretpassword", + NULL); + + /* Make sure the diff returns no results as secrets are ignored */ + same = nm_connection_diff (a, b, NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS, &out_diffs); + g_assert (same == TRUE); + g_assert (out_diffs == NULL); + + /* Now make sure the diff returns results if secrets are not ignored */ + same = nm_connection_diff (a, b, NM_SETTING_COMPARE_FLAG_EXACT, &out_diffs); + g_assert (same == FALSE); + g_assert (out_diffs != NULL); + g_assert (g_hash_table_size (out_diffs) > 0); + + ensure_diffs (out_diffs, settings, ARRAY_LEN (settings)); + + g_object_unref (a); + g_object_unref (b); +} + int main (int argc, char **argv) { GError *error = NULL; @@ -306,6 +543,10 @@ int main (int argc, char **argv) test_setting_ip6_config_old_address_array (); test_setting_gsm_apn_spaces (); test_setting_gsm_apn_bad_chars (); + test_connection_diff_a_only (); + test_connection_diff_same (); + test_connection_diff_different (); + test_connection_diff_no_secrets (); base = g_path_get_basename (argv[0]); fprintf (stdout, "%s: SUCCESS\n", base); diff --git a/libnm-util/tests/test-need-secrets.c b/libnm-util/tests/test-need-secrets.c deleted file mode 100644 index 517e2e01..00000000 --- a/libnm-util/tests/test-need-secrets.c +++ /dev/null @@ -1,566 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2008 - 2009 Red Hat, Inc. - * - */ - -#include -#include -#include - -#include "nm-test-helpers.h" -#include - -#include "nm-setting-connection.h" -#include "nm-setting-wired.h" -#include "nm-setting-8021x.h" -#include "nm-setting-ip4-config.h" -#include "nm-setting-wireless-security.h" -#include "nm-setting-cdma.h" -#include "nm-setting-gsm.h" -#include "nm-setting-ppp.h" -#include "nm-setting-pppoe.h" -#include "nm-setting-vpn.h" - - -#define TEST_NEED_SECRETS_EAP_TLS_CA_CERT TEST_CERT_DIR "/test_ca_cert.pem" -#define TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT TEST_CERT_DIR "/test_key_and_cert.pem" -#define TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY TEST_CERT_DIR "/test_key_and_cert.pem" - -static gboolean -find_hints_item (GPtrArray *hints, const char *item) -{ - int i; - - for (i = 0; i < hints->len; i++) { - if (!strcmp (item, (const char *) g_ptr_array_index (hints, i))) - return TRUE; - } - return FALSE; -} - -static NMConnection * -make_tls_connection (const char *detail, NMSetting8021xCKScheme scheme) -{ - NMConnection *connection; - NMSettingConnection *s_con; - NMSetting8021x *s_8021x; - NMSettingWired *s_wired; - NMSettingIP4Config *s_ip4; - char *uuid; - gboolean success; - GError *error = NULL; - - connection = nm_connection_new (); - ASSERT (connection != NULL, - detail, "failed to allocate new connection"); - - /* Connection setting */ - s_con = (NMSettingConnection *) nm_setting_connection_new (); - ASSERT (s_con != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_CONNECTION_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_con)); - - uuid = nm_utils_uuid_generate (); - g_object_set (s_con, - NM_SETTING_CONNECTION_ID, "Test Need TLS Secrets", - NM_SETTING_CONNECTION_UUID, uuid, - NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, - NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, - NULL); - g_free (uuid); - - /* Wired setting */ - s_wired = (NMSettingWired *) nm_setting_wired_new (); - ASSERT (s_wired != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_WIRED_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_wired)); - - /* Wireless security setting */ - s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); - ASSERT (s_8021x != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_802_1X_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_8021x)); - - g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL); - - nm_setting_802_1x_add_eap_method (s_8021x, "tls"); - - success = nm_setting_802_1x_set_ca_cert (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_CA_CERT, - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set CA certificate '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_CA_CERT, error->message); - - success = nm_setting_802_1x_set_client_cert (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set client certificate '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, error->message); - - success = nm_setting_802_1x_set_private_key (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, - "test", - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set private key '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, error->message); - - /* IP4 setting */ - s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); - ASSERT (s_ip4 != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_IP4_CONFIG_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_ip4)); - - g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); - - ASSERT (nm_connection_verify (connection, &error) == TRUE, - detail, "failed to verify connection: %s", - (error && error->message) ? error->message : "(unknown)"); - - return connection; -} - -static void -test_need_tls_secrets_path (void) -{ - NMConnection *connection; - const char *setting_name; - GPtrArray *hints = NULL; - NMSetting8021x *s_8021x; - - connection = make_tls_connection ("need-tls-secrets-path-key", NM_SETTING_802_1X_CK_SCHEME_PATH); - ASSERT (connection != NULL, - "need-tls-secrets-path-key", - "error creating test connection"); - - /* Ensure we don't need any secrets since we just set up the connection */ - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-secrets-path-key", - "secrets are unexpectedly required"); - ASSERT (hints == NULL, - "need-tls-secrets-path-key", - "hints should be NULL since no secrets were required"); - - /* Connection is good; clear secrets and ensure private key is then required */ - nm_connection_clear_secrets (connection); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-secrets-path-key", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-secrets-path-key", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-secrets-path-key", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY), - "need-tls-secrets-path-key", - "expected to require private key, but it wasn't"); - - g_object_unref (connection); - - /*** Just clear the private key this time ***/ - - connection = make_tls_connection ("need-tls-secrets-path-key-password", NM_SETTING_802_1X_CK_SCHEME_PATH); - ASSERT (connection != NULL, - "need-tls-secrets-path-key-password", - "error creating test connection"); - - s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); - ASSERT (s_8021x != NULL, - "need-tls-secrets-path-key-password", - "error getting test 802.1x setting"); - - g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, NULL, NULL); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-secrets-path-key-password", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-secrets-path-key-password", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-secrets-path-key-password", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD), - "need-tls-secrets-path-key-password", - "expected to require private key password, but it wasn't"); - - g_object_unref (connection); -} - -static void -test_need_tls_secrets_blob (void) -{ - NMConnection *connection; - const char *setting_name; - GPtrArray *hints = NULL; - NMSetting8021x *s_8021x; - - connection = make_tls_connection ("need-tls-secrets-blob-key", NM_SETTING_802_1X_CK_SCHEME_BLOB); - ASSERT (connection != NULL, - "need-tls-secrets-blob-key", - "error creating test connection"); - - /* Ensure we don't need any secrets since we just set up the connection */ - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-secrets-blob-key", - "secrets are unexpectedly required"); - ASSERT (hints == NULL, - "need-tls-secrets-blob-key", - "hints should be NULL since no secrets were required"); - - /* Connection is good; clear secrets and ensure private key is then required */ - nm_connection_clear_secrets (connection); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-secrets-blob-key", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-secrets-blob-key", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-secrets-blob-key", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY), - "need-tls-secrets-blob-key", - "expected to require private key, but it wasn't"); - - g_object_unref (connection); - - /*** Just clear the private key this time ***/ - - connection = make_tls_connection ("need-tls-secrets-blob-key-password", NM_SETTING_802_1X_CK_SCHEME_BLOB); - ASSERT (connection != NULL, - "need-tls-secrets-blob-key-password", - "error creating test connection"); - - s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); - ASSERT (s_8021x != NULL, - "need-tls-secrets-blob-key-password", - "error getting test 802.1x setting"); - - g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, NULL, NULL); - - /* Blobs are already decrypted and don't need a password */ - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-secrets-blob-key-password", - "unexpected secrets failure"); - ASSERT (hints == NULL, - "need-tls-secrets-blob-key-password", - "hints should be NULL since no secrets were required"); - - g_object_unref (connection); -} - -static NMConnection * -make_tls_phase2_connection (const char *detail, NMSetting8021xCKScheme scheme) -{ - NMConnection *connection; - NMSettingConnection *s_con; - NMSetting8021x *s_8021x; - NMSettingWired *s_wired; - NMSettingIP4Config *s_ip4; - char *uuid; - gboolean success; - GError *error = NULL; - - connection = nm_connection_new (); - ASSERT (connection != NULL, - detail, "failed to allocate new connection"); - - /* Connection setting */ - s_con = (NMSettingConnection *) nm_setting_connection_new (); - ASSERT (s_con != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_CONNECTION_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_con)); - - uuid = nm_utils_uuid_generate (); - g_object_set (s_con, - NM_SETTING_CONNECTION_ID, "Test Need TLS Secrets", - NM_SETTING_CONNECTION_UUID, uuid, - NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, - NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, - NULL); - g_free (uuid); - - /* Wired setting */ - s_wired = (NMSettingWired *) nm_setting_wired_new (); - ASSERT (s_wired != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_WIRED_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_wired)); - - /* Wireless security setting */ - s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); - ASSERT (s_8021x != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_802_1X_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_8021x)); - - g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, "blahblah", NULL); - g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL); - - nm_setting_802_1x_add_eap_method (s_8021x, "ttls"); - g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "tls", NULL); - - success = nm_setting_802_1x_set_phase2_ca_cert (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_CA_CERT, - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set phase2 CA certificate '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_CA_CERT, error->message); - - success = nm_setting_802_1x_set_phase2_client_cert (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set phase2 client certificate '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, error->message); - - success = nm_setting_802_1x_set_phase2_private_key (s_8021x, - TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, - "test", - scheme, - NULL, - &error); - ASSERT (success == TRUE, - detail, "failed to set phase2 private key '%s': %s", - TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, error->message); - - /* IP4 setting */ - s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); - ASSERT (s_ip4 != NULL, - detail, "failed to allocate new %s setting", - NM_SETTING_IP4_CONFIG_SETTING_NAME); - nm_connection_add_setting (connection, NM_SETTING (s_ip4)); - - g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); - - ASSERT (nm_connection_verify (connection, &error) == TRUE, - detail, "failed to verify connection: %s", - (error && error->message) ? error->message : "(unknown)"); - - return connection; -} - -static void -test_need_tls_phase2_secrets_path (void) -{ - NMConnection *connection; - const char *setting_name; - GPtrArray *hints = NULL; - NMSetting8021x *s_8021x; - - connection = make_tls_phase2_connection ("need-tls-phase2-secrets-path-key", - NM_SETTING_802_1X_CK_SCHEME_PATH); - ASSERT (connection != NULL, - "need-tls-phase2-secrets-path-key", - "error creating test connection"); - - /* Ensure we don't need any secrets since we just set up the connection */ - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-phase2-secrets-path-key", - "secrets are unexpectedly required"); - ASSERT (hints == NULL, - "need-tls-phase2-secrets-path-key", - "hints should be NULL since no secrets were required"); - - /* Connection is good; clear secrets and ensure private key is then required */ - nm_connection_clear_secrets (connection); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-phase2-secrets-path-key", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-phase2-secrets-path-key", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-phase2-secrets-path-key", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY), - "need-tls-phase2-secrets-path-key", - "expected to require private key, but it wasn't"); - - g_object_unref (connection); - - /*** Just clear the private key this time ***/ - - connection = make_tls_phase2_connection ("need-tls-phase2-secrets-path-key-password", - NM_SETTING_802_1X_CK_SCHEME_PATH); - ASSERT (connection != NULL, - "need-tls-phase2-secrets-path-key-password", - "error creating test connection"); - - s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); - ASSERT (s_8021x != NULL, - "need-tls-phase2-secrets-path-key-password", - "error getting test 802.1x setting"); - - g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, NULL, NULL); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-phase2-secrets-path-key-password", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-phase2-secrets-path-key-password", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-phase2-secrets-path-key-password", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD), - "need-tls-phase2-secrets-path-key-password", - "expected to require private key password, but it wasn't"); - - g_object_unref (connection); -} - -static void -test_need_tls_phase2_secrets_blob (void) -{ - NMConnection *connection; - const char *setting_name; - GPtrArray *hints = NULL; - NMSetting8021x *s_8021x; - - connection = make_tls_phase2_connection ("need-tls-phase2-secrets-blob-key", - NM_SETTING_802_1X_CK_SCHEME_BLOB); - ASSERT (connection != NULL, - "need-tls-phase2-secrets-blob-key", - "error creating test connection"); - - /* Ensure we don't need any secrets since we just set up the connection */ - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-phase2-secrets-blob-key", - "secrets are unexpectedly required"); - ASSERT (hints == NULL, - "need-tls-phase2-secrets-blob-key", - "hints should be NULL since no secrets were required"); - - /* Connection is good; clear secrets and ensure private key is then required */ - nm_connection_clear_secrets (connection); - - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name != NULL, - "need-tls-phase2-secrets-blob-key", - "unexpected secrets success"); - ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, - "need-tls-phase2-secrets-blob-key", - "unexpected setting secrets required"); - - ASSERT (hints != NULL, - "need-tls-phase2-secrets-blob-key", - "expected returned secrets hints"); - ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY), - "need-tls-phase2-secrets-blob-key", - "expected to require private key, but it wasn't"); - - g_object_unref (connection); - - /*** Just clear the private key this time ***/ - - connection = make_tls_phase2_connection ("need-tls-phase2-secrets-blob-key-password", - NM_SETTING_802_1X_CK_SCHEME_BLOB); - ASSERT (connection != NULL, - "need-tls-phase2-secrets-blob-key-password", - "error creating test connection"); - - s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); - ASSERT (s_8021x != NULL, - "need-tls-phase2-secrets-blob-key-password", - "error getting test 802.1x setting"); - - g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, NULL, NULL); - - /* Blobs are already decrypted and don't need a password */ - hints = NULL; - setting_name = nm_connection_need_secrets (connection, &hints); - ASSERT (setting_name == NULL, - "need-tls-phase2-secrets-blob-key-password", - "unexpected secrets failure"); - ASSERT (hints == NULL, - "need-tls-phase2-secrets-blob-key-password", - "hints should be NULL since no secrets were required"); - - g_object_unref (connection); -} - -int main (int argc, char **argv) -{ - GError *error = NULL; - DBusGConnection *bus; - char *base; - - g_type_init (); - bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); - - if (!nm_utils_init (&error)) - FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); - - /* The tests */ - test_need_tls_secrets_path (); - test_need_tls_secrets_blob (); - test_need_tls_phase2_secrets_path (); - test_need_tls_phase2_secrets_blob (); - - base = g_path_get_basename (argv[0]); - fprintf (stdout, "%s: SUCCESS\n", base); - g_free (base); - return 0; -} - diff --git a/libnm-util/tests/test-secrets.c b/libnm-util/tests/test-secrets.c new file mode 100644 index 00000000..da6f610d --- /dev/null +++ b/libnm-util/tests/test-secrets.c @@ -0,0 +1,672 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 - 2011 Red Hat, Inc. + * + */ + +#include +#include +#include + +#include "nm-test-helpers.h" +#include + +#include "nm-setting-connection.h" +#include "nm-setting-wired.h" +#include "nm-setting-8021x.h" +#include "nm-setting-ip4-config.h" +#include "nm-setting-wireless.h" +#include "nm-setting-wireless-security.h" +#include "nm-setting-cdma.h" +#include "nm-setting-gsm.h" +#include "nm-setting-ppp.h" +#include "nm-setting-pppoe.h" +#include "nm-setting-vpn.h" + + +#define TEST_NEED_SECRETS_EAP_TLS_CA_CERT TEST_CERT_DIR "/test_ca_cert.pem" +#define TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT TEST_CERT_DIR "/test_key_and_cert.pem" +#define TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY TEST_CERT_DIR "/test_key_and_cert.pem" + +static gboolean +find_hints_item (GPtrArray *hints, const char *item) +{ + int i; + + for (i = 0; i < hints->len; i++) { + if (!strcmp (item, (const char *) g_ptr_array_index (hints, i))) + return TRUE; + } + return FALSE; +} + +static NMConnection * +make_tls_connection (const char *detail, NMSetting8021xCKScheme scheme) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSetting8021x *s_8021x; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + char *uuid; + gboolean success; + GError *error = NULL; + + connection = nm_connection_new (); + ASSERT (connection != NULL, + detail, "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Need TLS Secrets", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NULL); + g_free (uuid); + + /* Wired setting */ + s_wired = (NMSettingWired *) nm_setting_wired_new (); + ASSERT (s_wired != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_WIRED_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wired)); + + /* Wireless security setting */ + s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); + ASSERT (s_8021x != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_802_1X_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_8021x)); + + g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL); + + nm_setting_802_1x_add_eap_method (s_8021x, "tls"); + + success = nm_setting_802_1x_set_ca_cert (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_CA_CERT, + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set CA certificate '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_CA_CERT, error->message); + + success = nm_setting_802_1x_set_client_cert (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set client certificate '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, error->message); + + success = nm_setting_802_1x_set_private_key (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, + "test", + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set private key '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, error->message); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + ASSERT (s_ip4 != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + detail, "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + return connection; +} + +static void +test_need_tls_secrets_path (void) +{ + NMConnection *connection; + const char *setting_name; + GPtrArray *hints = NULL; + NMSetting8021x *s_8021x; + + connection = make_tls_connection ("need-tls-secrets-path-key", NM_SETTING_802_1X_CK_SCHEME_PATH); + ASSERT (connection != NULL, + "need-tls-secrets-path-key", + "error creating test connection"); + + /* Ensure we don't need any secrets since we just set up the connection */ + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-secrets-path-key", + "secrets are unexpectedly required"); + ASSERT (hints == NULL, + "need-tls-secrets-path-key", + "hints should be NULL since no secrets were required"); + + /* Connection is good; clear secrets and ensure private key is then required */ + nm_connection_clear_secrets (connection); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-secrets-path-key", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-secrets-path-key", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-secrets-path-key", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY), + "need-tls-secrets-path-key", + "expected to require private key, but it wasn't"); + + g_object_unref (connection); + + /*** Just clear the private key this time ***/ + + connection = make_tls_connection ("need-tls-secrets-path-key-password", NM_SETTING_802_1X_CK_SCHEME_PATH); + ASSERT (connection != NULL, + "need-tls-secrets-path-key-password", + "error creating test connection"); + + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + ASSERT (s_8021x != NULL, + "need-tls-secrets-path-key-password", + "error getting test 802.1x setting"); + + g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, NULL, NULL); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-secrets-path-key-password", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-secrets-path-key-password", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-secrets-path-key-password", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD), + "need-tls-secrets-path-key-password", + "expected to require private key password, but it wasn't"); + + g_object_unref (connection); +} + +static void +test_need_tls_secrets_blob (void) +{ + NMConnection *connection; + const char *setting_name; + GPtrArray *hints = NULL; + NMSetting8021x *s_8021x; + + connection = make_tls_connection ("need-tls-secrets-blob-key", NM_SETTING_802_1X_CK_SCHEME_BLOB); + ASSERT (connection != NULL, + "need-tls-secrets-blob-key", + "error creating test connection"); + + /* Ensure we don't need any secrets since we just set up the connection */ + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-secrets-blob-key", + "secrets are unexpectedly required"); + ASSERT (hints == NULL, + "need-tls-secrets-blob-key", + "hints should be NULL since no secrets were required"); + + /* Connection is good; clear secrets and ensure private key is then required */ + nm_connection_clear_secrets (connection); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-secrets-blob-key", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-secrets-blob-key", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-secrets-blob-key", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PRIVATE_KEY), + "need-tls-secrets-blob-key", + "expected to require private key, but it wasn't"); + + g_object_unref (connection); + + /*** Just clear the private key this time ***/ + + connection = make_tls_connection ("need-tls-secrets-blob-key-password", NM_SETTING_802_1X_CK_SCHEME_BLOB); + ASSERT (connection != NULL, + "need-tls-secrets-blob-key-password", + "error creating test connection"); + + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + ASSERT (s_8021x != NULL, + "need-tls-secrets-blob-key-password", + "error getting test 802.1x setting"); + + g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, NULL, NULL); + + /* Blobs are already decrypted and don't need a password */ + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-secrets-blob-key-password", + "unexpected secrets failure"); + ASSERT (hints == NULL, + "need-tls-secrets-blob-key-password", + "hints should be NULL since no secrets were required"); + + g_object_unref (connection); +} + +static NMConnection * +make_tls_phase2_connection (const char *detail, NMSetting8021xCKScheme scheme) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSetting8021x *s_8021x; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + char *uuid; + gboolean success; + GError *error = NULL; + + connection = nm_connection_new (); + ASSERT (connection != NULL, + detail, "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Need TLS Secrets", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NULL); + g_free (uuid); + + /* Wired setting */ + s_wired = (NMSettingWired *) nm_setting_wired_new (); + ASSERT (s_wired != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_WIRED_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wired)); + + /* Wireless security setting */ + s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); + ASSERT (s_8021x != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_802_1X_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_8021x)); + + g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, "blahblah", NULL); + g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL); + + nm_setting_802_1x_add_eap_method (s_8021x, "ttls"); + g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "tls", NULL); + + success = nm_setting_802_1x_set_phase2_ca_cert (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_CA_CERT, + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set phase2 CA certificate '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_CA_CERT, error->message); + + success = nm_setting_802_1x_set_phase2_client_cert (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set phase2 client certificate '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_CLIENT_CERT, error->message); + + success = nm_setting_802_1x_set_phase2_private_key (s_8021x, + TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, + "test", + scheme, + NULL, + &error); + ASSERT (success == TRUE, + detail, "failed to set phase2 private key '%s': %s", + TEST_NEED_SECRETS_EAP_TLS_PRIVATE_KEY, error->message); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + ASSERT (s_ip4 != NULL, + detail, "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + detail, "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + return connection; +} + +static void +test_need_tls_phase2_secrets_path (void) +{ + NMConnection *connection; + const char *setting_name; + GPtrArray *hints = NULL; + NMSetting8021x *s_8021x; + + connection = make_tls_phase2_connection ("need-tls-phase2-secrets-path-key", + NM_SETTING_802_1X_CK_SCHEME_PATH); + ASSERT (connection != NULL, + "need-tls-phase2-secrets-path-key", + "error creating test connection"); + + /* Ensure we don't need any secrets since we just set up the connection */ + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-phase2-secrets-path-key", + "secrets are unexpectedly required"); + ASSERT (hints == NULL, + "need-tls-phase2-secrets-path-key", + "hints should be NULL since no secrets were required"); + + /* Connection is good; clear secrets and ensure private key is then required */ + nm_connection_clear_secrets (connection); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-phase2-secrets-path-key", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-phase2-secrets-path-key", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-phase2-secrets-path-key", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY), + "need-tls-phase2-secrets-path-key", + "expected to require private key, but it wasn't"); + + g_object_unref (connection); + + /*** Just clear the private key this time ***/ + + connection = make_tls_phase2_connection ("need-tls-phase2-secrets-path-key-password", + NM_SETTING_802_1X_CK_SCHEME_PATH); + ASSERT (connection != NULL, + "need-tls-phase2-secrets-path-key-password", + "error creating test connection"); + + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + ASSERT (s_8021x != NULL, + "need-tls-phase2-secrets-path-key-password", + "error getting test 802.1x setting"); + + g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, NULL, NULL); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-phase2-secrets-path-key-password", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-phase2-secrets-path-key-password", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-phase2-secrets-path-key-password", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD), + "need-tls-phase2-secrets-path-key-password", + "expected to require private key password, but it wasn't"); + + g_object_unref (connection); +} + +static void +test_need_tls_phase2_secrets_blob (void) +{ + NMConnection *connection; + const char *setting_name; + GPtrArray *hints = NULL; + NMSetting8021x *s_8021x; + + connection = make_tls_phase2_connection ("need-tls-phase2-secrets-blob-key", + NM_SETTING_802_1X_CK_SCHEME_BLOB); + ASSERT (connection != NULL, + "need-tls-phase2-secrets-blob-key", + "error creating test connection"); + + /* Ensure we don't need any secrets since we just set up the connection */ + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-phase2-secrets-blob-key", + "secrets are unexpectedly required"); + ASSERT (hints == NULL, + "need-tls-phase2-secrets-blob-key", + "hints should be NULL since no secrets were required"); + + /* Connection is good; clear secrets and ensure private key is then required */ + nm_connection_clear_secrets (connection); + + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name != NULL, + "need-tls-phase2-secrets-blob-key", + "unexpected secrets success"); + ASSERT (strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME) == 0, + "need-tls-phase2-secrets-blob-key", + "unexpected setting secrets required"); + + ASSERT (hints != NULL, + "need-tls-phase2-secrets-blob-key", + "expected returned secrets hints"); + ASSERT (find_hints_item (hints, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY), + "need-tls-phase2-secrets-blob-key", + "expected to require private key, but it wasn't"); + + g_object_unref (connection); + + /*** Just clear the private key this time ***/ + + connection = make_tls_phase2_connection ("need-tls-phase2-secrets-blob-key-password", + NM_SETTING_802_1X_CK_SCHEME_BLOB); + ASSERT (connection != NULL, + "need-tls-phase2-secrets-blob-key-password", + "error creating test connection"); + + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + ASSERT (s_8021x != NULL, + "need-tls-phase2-secrets-blob-key-password", + "error getting test 802.1x setting"); + + g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, NULL, NULL); + + /* Blobs are already decrypted and don't need a password */ + hints = NULL; + setting_name = nm_connection_need_secrets (connection, &hints); + ASSERT (setting_name == NULL, + "need-tls-phase2-secrets-blob-key-password", + "unexpected secrets failure"); + ASSERT (hints == NULL, + "need-tls-phase2-secrets-blob-key-password", + "hints should be NULL since no secrets were required"); + + g_object_unref (connection); +} + +static void +value_destroy (gpointer data) +{ + GValue *value = (GValue *) data; + + g_value_unset (value); + g_slice_free (GValue, value); +} + +static GValue * +string_to_gvalue (const char *str) +{ + GValue *val = g_slice_new0 (GValue); + + g_value_init (val, G_TYPE_STRING); + g_value_set_string (val, str); + return val; +} + +static GValue * +uint_to_gvalue (guint32 i) +{ + GValue *val; + + val = g_slice_new0 (GValue); + g_value_init (val, G_TYPE_UINT); + g_value_set_uint (val, i); + return val; +} + +static void +test_update_secrets_wifi (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; + NMSettingWirelessSecurity *s_wsec; + unsigned char tmpssid[] = { 0x31, 0x33, 0x33, 0x37 }; + const char *wepkey = "11111111111111111111111111"; + GHashTable *secrets; + GError *error = NULL; + char *uuid; + GByteArray *ssid; + gboolean success; + + connection = nm_connection_new (); + g_assert (connection); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + g_assert (s_con); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Wireless", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, FALSE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME, + NULL); + g_free (uuid); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + /* Wireless setting */ + s_wifi = (NMSettingWireless *) nm_setting_wireless_new (); + g_assert (s_wifi); + + ssid = g_byte_array_sized_new (sizeof (tmpssid)); + g_byte_array_append (ssid, &tmpssid[0], sizeof (tmpssid)); + g_object_set (s_wifi, + NM_SETTING_WIRELESS_SSID, ssid, + NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NULL); + g_byte_array_free (ssid, TRUE); + nm_connection_add_setting (connection, NM_SETTING (s_wifi)); + + /* Wifi security */ + s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new (); + g_assert (s_wsec); + + g_object_set (G_OBJECT (s_wsec), + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none", + NULL); + nm_connection_add_setting (connection, NM_SETTING (s_wsec)); + + /* Build up the secrets hash */ + secrets = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, value_destroy); + g_hash_table_insert (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, string_to_gvalue (wepkey)); + g_hash_table_insert (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, uint_to_gvalue (NM_WEP_KEY_TYPE_KEY)); + + success = nm_connection_update_secrets (connection, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + secrets, + &error); + if (!success) { + /* Print the warning message before we assert success */ + g_assert (error); + g_warning ("Error updating connection secrets: %s", error->message); + g_clear_error (&error); + } + g_assert (success); +} + + +int main (int argc, char **argv) +{ + GError *error = NULL; + DBusGConnection *bus; + char *base; + + g_type_init (); + bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); + + if (!nm_utils_init (&error)) + FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); + + /* The tests */ + test_need_tls_secrets_path (); + test_need_tls_secrets_blob (); + test_need_tls_phase2_secrets_path (); + test_need_tls_phase2_secrets_blob (); + + test_update_secrets_wifi (); + + base = g_path_get_basename (argv[0]); + fprintf (stdout, "%s: SUCCESS\n", base); + g_free (base); + return 0; +} + diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4 index 6cea2f74..be69af27 100644 --- a/m4/compiler_warnings.m4 +++ b/m4/compiler_warnings.m4 @@ -10,7 +10,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \ -Wdeclaration-after-statement -Wstrict-prototypes \ -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \ - -fno-strict-aliasing; do + -fno-strict-aliasing -Wno-unused-but-set-variable; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) diff --git a/man/Makefile.in b/man/Makefile.in index 828a60e8..0be51b3c 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -182,6 +182,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -196,6 +200,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/man/NetworkManager.8 b/man/NetworkManager.8 index 4f700e9a..92c6e5aa 100644 --- a/man/NetworkManager.8 +++ b/man/NetworkManager.8 @@ -52,8 +52,10 @@ A VPN connection has been deactivated. .TP .I "hostname" The system hostname has been updated. Use gethostname(2) to retrieve it. +.TP .I "dhcp4\-change" The DHCPv4 lease has changed (renewed, rebound, etc). +.TP .I "dhcp6\-change" The DHCPv6 lease has changed (renewed, rebound, etc). .SH OPTIONS diff --git a/man/NetworkManager.8.in b/man/NetworkManager.8.in index 4f700e9a..92c6e5aa 100644 --- a/man/NetworkManager.8.in +++ b/man/NetworkManager.8.in @@ -52,8 +52,10 @@ A VPN connection has been deactivated. .TP .I "hostname" The system hostname has been updated. Use gethostname(2) to retrieve it. +.TP .I "dhcp4\-change" The DHCPv4 lease has changed (renewed, rebound, etc). +.TP .I "dhcp6\-change" The DHCPv6 lease has changed (renewed, rebound, etc). .SH OPTIONS diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 index ba575c94..acacb432 100644 --- a/man/NetworkManager.conf.5 +++ b/man/NetworkManager.conf.5 @@ -2,7 +2,7 @@ .\" .\" Copyright (C) 2010 Red Hat, Inc. .\" -.TH "NetworkManager.conf" "5" "16 September 2010" "" +.TH "NetworkManager.conf" "5" "23 November 2010" "" .SH NAME NetworkManager.conf \- NetworkManager configuration file .SH SYNOPSIS @@ -129,10 +129,12 @@ Set a persistent hostname when using the \fIkeyfile\fP plugin. .B unmanaged-devices=\fImac:\fP;\fImac:\fP;... Set devices that should be ignored by NetworkManager when using the \fIkeyfile\fP plugin. Devices are specified in the following format: "mac:", where - is MAC address of the device to be ignored, in lowercase. Multiple -entries are separated by a semicolon. Example: + is MAC address of the device to be ignored, in hex-digits-and-colons notation. +Multiple entries are separated by a semicolon. No spaces are allowed in the value. +.br +Example: .nf -unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1e:65:30:d1:c4 +unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4 .fi .SS [ifupdown] This section contains ifupdown-specific options and thus only has effect when using \fIifupdown\fP plugin. @@ -158,7 +160,7 @@ from earlier levels; thus setting the log level to INFO also logs error and warning messages. .TP .B domains=\fI,, ...\fP -The following log domains are available: [NONE, HW, RKILL, ETHER, WIFI, BT, MB, +The following log domains are available: [NONE, HW, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, USER_SET, SYS_SET, SUSPEND, CORE, DEVICE, OLPC]. When "NONE" is given by itself, logging is disabled. MB = Mobile Broadband, USER_SET = user settings operations diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in index ba575c94..acacb432 100644 --- a/man/NetworkManager.conf.5.in +++ b/man/NetworkManager.conf.5.in @@ -2,7 +2,7 @@ .\" .\" Copyright (C) 2010 Red Hat, Inc. .\" -.TH "NetworkManager.conf" "5" "16 September 2010" "" +.TH "NetworkManager.conf" "5" "23 November 2010" "" .SH NAME NetworkManager.conf \- NetworkManager configuration file .SH SYNOPSIS @@ -129,10 +129,12 @@ Set a persistent hostname when using the \fIkeyfile\fP plugin. .B unmanaged-devices=\fImac:\fP;\fImac:\fP;... Set devices that should be ignored by NetworkManager when using the \fIkeyfile\fP plugin. Devices are specified in the following format: "mac:", where - is MAC address of the device to be ignored, in lowercase. Multiple -entries are separated by a semicolon. Example: + is MAC address of the device to be ignored, in hex-digits-and-colons notation. +Multiple entries are separated by a semicolon. No spaces are allowed in the value. +.br +Example: .nf -unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1e:65:30:d1:c4 +unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4 .fi .SS [ifupdown] This section contains ifupdown-specific options and thus only has effect when using \fIifupdown\fP plugin. @@ -158,7 +160,7 @@ from earlier levels; thus setting the log level to INFO also logs error and warning messages. .TP .B domains=\fI,, ...\fP -The following log domains are available: [NONE, HW, RKILL, ETHER, WIFI, BT, MB, +The following log domains are available: [NONE, HW, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, USER_SET, SYS_SET, SUSPEND, CORE, DEVICE, OLPC]. When "NONE" is given by itself, logging is disabled. MB = Mobile Broadband, USER_SET = user settings operations diff --git a/marshallers/Makefile.in b/marshallers/Makefile.in index d30b00b1..f299d460 100644 --- a/marshallers/Makefile.in +++ b/marshallers/Makefile.in @@ -180,6 +180,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -194,6 +198,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/po/LINGUAS b/po/LINGUAS index 24285986..f77d9c0d 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -14,6 +14,7 @@ dz el en_CA en_GB +eo es et eu diff --git a/po/POTFILES.in b/po/POTFILES.in index f3421b4a..d4988c43 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -16,6 +16,7 @@ policy/org.freedesktop.NetworkManager.policy.in src/nm-netlink-monitor.c src/main.c src/dhcp-manager/nm-dhcp-dhclient.c +src/dhcp-manager/nm-dhcp-dhclient-utils.c src/dhcp-manager/nm-dhcp-manager.c src/logging/nm-logging.c src/dns-manager/nm-dns-manager.c diff --git a/po/bg.po b/po/bg.po index 5a1e7c1c..b9169060 100644 --- a/po/bg.po +++ b/po/bg.po @@ -1,102 +1,109 @@ # Bulgarian translation of NetworkManager po-file # Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the NetworkManager package. -# Alexander Shopov , 2005, 2007, 2008. +# Alexander Shopov , 2005, 2007, 2008, 2011. # Damyan Ivanov , 2010. # msgid "" msgstr "" -"Project-Id-Version: NetworkManager trunk\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=NetworkManager&component=general\n" -"POT-Creation-Date: 2010-09-20 15:25+0000\n" -"PO-Revision-Date: 2010-09-29 23:55+0300\n" -"Last-Translator: Damyan Ivanov \n" +"Project-Id-Version: NetworkManager master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 15:37+0200\n" +"PO-Revision-Date: 2011-01-16 15:36+0200\n" +"Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" +"Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 -#: ../cli/src/devices.c:88 ../cli/src/devices.c:101 ../cli/src/devices.c:111 -#: ../cli/src/devices.c:121 ../cli/src/devices.c:134 ../cli/src/devices.c:145 -#: ../cli/src/devices.c:156 ../cli/src/devices.c:165 ../cli/src/devices.c:174 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:78 +#: ../cli/src/devices.c:92 ../cli/src/devices.c:105 ../cli/src/devices.c:115 +#: ../cli/src/devices.c:125 ../cli/src/devices.c:138 ../cli/src/devices.c:151 +#: ../cli/src/devices.c:162 ../cli/src/devices.c:173 ../cli/src/devices.c:182 +#: ../cli/src/devices.c:191 ../cli/src/devices.c:212 msgid "NAME" msgstr "ИМЕ" #. 0 -#: ../cli/src/connections.c:61 ../cli/src/connections.c:76 +#: ../cli/src/connections.c:63 ../cli/src/connections.c:79 msgid "UUID" msgstr "УНИВЕРСАЛЕН ИДЕНТИФИКАТОР" #. 1 -#: ../cli/src/connections.c:62 +#: ../cli/src/connections.c:64 msgid "DEVICES" msgstr "УСТРОЙСТВА" #. 2 -#: ../cli/src/connections.c:63 ../cli/src/connections.c:78 +#: ../cli/src/connections.c:65 ../cli/src/connections.c:81 msgid "SCOPE" msgstr "ОБСЕГ" #. 3 -#: ../cli/src/connections.c:64 +#: ../cli/src/connections.c:66 msgid "DEFAULT" -msgstr "ПОДРАЗ." +msgstr "ПОДРАЗБ." #. 4 -#: ../cli/src/connections.c:65 +#: ../cli/src/connections.c:67 msgid "DBUS-SERVICE" msgstr "УСЛУГА-DBUS" #. 5 -#: ../cli/src/connections.c:66 +#: ../cli/src/connections.c:68 msgid "SPEC-OBJECT" msgstr "СПЕЦИФИКАЦ." #. 6 -#: ../cli/src/connections.c:67 +#: ../cli/src/connections.c:69 msgid "VPN" msgstr "ВЧМ" +#. 7 +#. 2 +#. 11 +#. 5 +#: ../cli/src/connections.c:70 ../cli/src/connections.c:86 +#: ../cli/src/devices.c:65 ../cli/src/devices.c:203 ../cli/src/devices.c:218 +msgid "DBUS-PATH" +msgstr "ПЪТ-DBUS" + #. 1 #. 0 #. 1 -#: ../cli/src/connections.c:77 ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#. 2 +#: ../cli/src/connections.c:80 ../cli/src/devices.c:63 ../cli/src/devices.c:94 +#: ../cli/src/devices.c:215 msgid "TYPE" msgstr "ВИД" # Заглавие за датата и часа, когато последно е използвана връзката. # Използва се вътрешният формат (секунди от фиксирана дата през 1700г). #. 3 -#: ../cli/src/connections.c:79 +#: ../cli/src/connections.c:82 msgid "TIMESTAMP" msgstr "ПОСЛ. АКТ." # Заглавие за датата и часа, когато последно е използвана връзката. # Използва се локализиран формат за дата и час. #. 4 -#: ../cli/src/connections.c:80 +#: ../cli/src/connections.c:83 msgid "TIMESTAMP-REAL" msgstr "ПОСЛЕДНО АКТИВНА" #. 5 -#: ../cli/src/connections.c:81 +#: ../cli/src/connections.c:84 msgid "AUTOCONNECT" msgstr "АВТОМАТИЧНА" #. 6 -#: ../cli/src/connections.c:82 +#: ../cli/src/connections.c:85 msgid "READONLY" msgstr "САМО ЧЕТ." -#. 7 -#: ../cli/src/connections.c:83 -msgid "DBUS-PATH" -msgstr "ПЪТ-DBUS" - -#: ../cli/src/connections.c:159 +#: ../cli/src/connections.c:164 #, c-format msgid "" "Usage: nmcli con { COMMAND | help }\n" @@ -104,8 +111,8 @@ msgid "" "\n" " list [id | uuid | system | user]\n" " status\n" -" up id | uuid [iface ] [ap ] [--nowait] [--timeout " -"]\n" +" up id | uuid [iface ] [ap ] [nsp ] [--" +"nowait] [--timeout ]\n" " down id | uuid \n" msgstr "" "Употреба: nmcli con { КОМАНДА | help }\n" @@ -113,805 +120,851 @@ msgstr "" "\n" " list [id <ид> | uuid <ид> | system | user]\n" " status\n" -" up id <ид> | uuid <ид> [iface <интерфейс>] [ap <хардуерен адрес>] [--" -"nowait] [--timeout <изчакване>]\n" +" up id <ид> | uuid <ид> [iface <интерфейс>] [ap <хардуерен адрес>]\n" +" [nsp <име>] [--nowait] [--timeout <изчакване>]\n" " down id <ид> | uuid <ид>\n" -#: ../cli/src/connections.c:199 ../cli/src/connections.c:540 +#: ../cli/src/connections.c:204 ../cli/src/connections.c:554 #, c-format msgid "Error: 'con list': %s" -msgstr "Грешка при „con list“ – %s" +msgstr "Грешка при „con list“ — %s" -#: ../cli/src/connections.c:201 ../cli/src/connections.c:542 +#: ../cli/src/connections.c:206 ../cli/src/connections.c:556 #, c-format msgid "Error: 'con list': %s; allowed fields: %s" -msgstr "Грешка при „con list“ – %s; допустимите полета са %s" +msgstr "Грешка при „con list“ — %s; допустимите полета са %s" -#: ../cli/src/connections.c:209 -#| msgid "Connection Established" +#: ../cli/src/connections.c:214 msgid "Connection details" msgstr "Информация за връзката" -#: ../cli/src/connections.c:384 ../cli/src/connections.c:605 +#: ../cli/src/connections.c:398 ../cli/src/connections.c:619 msgid "system" msgstr "система" -#: ../cli/src/connections.c:384 ../cli/src/connections.c:605 +#: ../cli/src/connections.c:398 ../cli/src/connections.c:619 msgid "user" msgstr "потреб." -#: ../cli/src/connections.c:386 +#: ../cli/src/connections.c:400 msgid "never" msgstr "никога" #. "CAPABILITIES" #. Print header #. "WIFI-PROPERTIES" -#: ../cli/src/connections.c:387 ../cli/src/connections.c:388 -#: ../cli/src/connections.c:606 ../cli/src/connections.c:609 -#: ../cli/src/devices.c:432 ../cli/src/devices.c:557 ../cli/src/devices.c:583 -#: ../cli/src/devices.c:584 ../cli/src/devices.c:585 ../cli/src/devices.c:586 -#: ../cli/src/devices.c:587 ../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 +#: ../cli/src/connections.c:401 ../cli/src/connections.c:402 +#: ../cli/src/connections.c:620 ../cli/src/connections.c:623 +#: ../cli/src/devices.c:469 ../cli/src/devices.c:521 ../cli/src/devices.c:643 +#: ../cli/src/devices.c:669 ../cli/src/devices.c:670 ../cli/src/devices.c:671 +#: ../cli/src/devices.c:672 ../cli/src/devices.c:673 ../cli/src/settings.c:520 +#: ../cli/src/settings.c:563 ../cli/src/settings.c:664 +#: ../cli/src/settings.c:938 ../cli/src/settings.c:939 +#: ../cli/src/settings.c:941 ../cli/src/settings.c:943 +#: ../cli/src/settings.c:1068 ../cli/src/settings.c:1069 +#: ../cli/src/settings.c:1070 ../cli/src/settings.c:1149 +#: ../cli/src/settings.c:1150 ../cli/src/settings.c:1151 +#: ../cli/src/settings.c:1152 ../cli/src/settings.c:1153 +#: ../cli/src/settings.c:1154 ../cli/src/settings.c:1155 +#: ../cli/src/settings.c:1156 ../cli/src/settings.c:1157 +#: ../cli/src/settings.c:1158 ../cli/src/settings.c:1159 +#: ../cli/src/settings.c:1160 ../cli/src/settings.c:1161 +#: ../cli/src/settings.c:1236 msgid "yes" msgstr "да" -#: ../cli/src/connections.c:387 ../cli/src/connections.c:388 -#: ../cli/src/connections.c:606 ../cli/src/connections.c:609 -#: ../cli/src/devices.c:432 ../cli/src/devices.c:557 ../cli/src/devices.c:583 -#: ../cli/src/devices.c:584 ../cli/src/devices.c:585 ../cli/src/devices.c:586 -#: ../cli/src/devices.c:587 ../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 "none" +#: ../cli/src/connections.c:401 ../cli/src/connections.c:402 +#: ../cli/src/connections.c:620 ../cli/src/connections.c:623 +#: ../cli/src/devices.c:469 ../cli/src/devices.c:521 ../cli/src/devices.c:643 +#: ../cli/src/devices.c:669 ../cli/src/devices.c:670 ../cli/src/devices.c:671 +#: ../cli/src/devices.c:672 ../cli/src/devices.c:673 ../cli/src/settings.c:520 +#: ../cli/src/settings.c:522 ../cli/src/settings.c:563 +#: ../cli/src/settings.c:664 ../cli/src/settings.c:938 +#: ../cli/src/settings.c:939 ../cli/src/settings.c:941 +#: ../cli/src/settings.c:943 ../cli/src/settings.c:1068 +#: ../cli/src/settings.c:1069 ../cli/src/settings.c:1070 +#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1150 +#: ../cli/src/settings.c:1151 ../cli/src/settings.c:1152 +#: ../cli/src/settings.c:1153 ../cli/src/settings.c:1154 +#: ../cli/src/settings.c:1155 ../cli/src/settings.c:1156 +#: ../cli/src/settings.c:1157 ../cli/src/settings.c:1158 +#: ../cli/src/settings.c:1159 ../cli/src/settings.c:1160 +#: ../cli/src/settings.c:1161 ../cli/src/settings.c:1236 msgid "no" msgstr "не" -#: ../cli/src/connections.c:461 ../cli/src/connections.c:504 -#| msgid "No active connections!" +#: ../cli/src/connections.c:475 ../cli/src/connections.c:518 msgid "System connections" msgstr "Системни връзки" -#: ../cli/src/connections.c:466 ../cli/src/connections.c:517 -#| msgid "VPN Connections" +#: ../cli/src/connections.c:480 ../cli/src/connections.c:531 msgid "User connections" msgstr "Потребителски връзки" -#: ../cli/src/connections.c:478 ../cli/src/connections.c:1338 -#: ../cli/src/connections.c:1354 ../cli/src/connections.c:1363 -#: ../cli/src/connections.c:1374 ../cli/src/connections.c:1459 -#: ../cli/src/devices.c:962 ../cli/src/devices.c:972 ../cli/src/devices.c:1074 -#: ../cli/src/devices.c:1081 +#: ../cli/src/connections.c:492 ../cli/src/connections.c:1429 +#: ../cli/src/connections.c:1445 ../cli/src/connections.c:1454 +#: ../cli/src/connections.c:1463 ../cli/src/connections.c:1474 +#: ../cli/src/connections.c:1559 ../cli/src/devices.c:1117 +#: ../cli/src/devices.c:1127 ../cli/src/devices.c:1229 +#: ../cli/src/devices.c:1236 ../cli/src/devices.c:1435 +#: ../cli/src/devices.c:1442 #, c-format msgid "Error: %s argument is missing." msgstr "Липсва аргумент за „%s“." -#: ../cli/src/connections.c:491 +#: ../cli/src/connections.c:505 #, c-format msgid "Error: %s - no such connection." msgstr "Няма връзка „%s“." -#: ../cli/src/connections.c:523 ../cli/src/connections.c:1387 -#: ../cli/src/connections.c:1477 ../cli/src/devices.c:785 -#: ../cli/src/devices.c:852 ../cli/src/devices.c:986 ../cli/src/devices.c:1087 +#: ../cli/src/connections.c:537 ../cli/src/connections.c:1487 +#: ../cli/src/connections.c:1577 ../cli/src/devices.c:940 +#: ../cli/src/devices.c:1007 ../cli/src/devices.c:1141 +#: ../cli/src/devices.c:1242 ../cli/src/devices.c:1448 #, c-format msgid "Unknown parameter: %s\n" msgstr "Непознат параметър „%s“\n" -#: ../cli/src/connections.c:532 +#: ../cli/src/connections.c:546 #, c-format msgid "Error: no valid parameter specified." -msgstr "Няма указани параметри." +msgstr "Грешка: не са указани правилни параметри." -#: ../cli/src/connections.c:547 ../cli/src/connections.c:1580 -#: ../cli/src/devices.c:1293 ../cli/src/network-manager.c:359 +#: ../cli/src/connections.c:561 ../cli/src/connections.c:1680 +#: ../cli/src/devices.c:1646 ../cli/src/network-manager.c:401 #, c-format msgid "Error: %s." -msgstr "Грешка – %s." +msgstr "Грешка: %s." -#: ../cli/src/connections.c:653 +#: ../cli/src/connections.c:668 #, c-format msgid "Error: 'con status': %s" -msgstr "Грешка при „con status“ – %s" +msgstr "Грешка при „con status“: %s" -#: ../cli/src/connections.c:655 +#: ../cli/src/connections.c:670 #, c-format msgid "Error: 'con status': %s; allowed fields: %s" -msgstr "Грешка при „con status“ – %s. Допустимите полета са %s" +msgstr "Грешка при „con status“: %s. Допустимите полета са: %s" -#: ../cli/src/connections.c:662 -#| msgid "No active connections!" +#: ../cli/src/connections.c:677 msgid "Active connections" msgstr "Активни връзки" -#: ../cli/src/connections.c:1030 +#: ../cli/src/connections.c:1101 #, c-format -#| msgid "No active connections!" msgid "no active connection on device '%s'" msgstr "няма активна връзка, използваща устройството „%s“" -#: ../cli/src/connections.c:1038 +#: ../cli/src/connections.c:1109 #, c-format -#| msgid "No active connections!" msgid "no active connection or device" msgstr "няма активна връзка или устройство" -#: ../cli/src/connections.c:1088 +#: ../cli/src/connections.c:1178 #, c-format msgid "device '%s' not compatible with connection '%s'" msgstr "устройството „%s“ не е съвместимо с връзката „%s“" -#: ../cli/src/connections.c:1090 +#: ../cli/src/connections.c:1180 #, c-format -#| msgid "Error retrieving VPN connection '%s'" msgid "no device found for connection '%s'" msgstr "не е открито устройство за връзката „%s“" -#: ../cli/src/connections.c:1101 +#: ../cli/src/connections.c:1191 msgid "activating" msgstr "включване" -#: ../cli/src/connections.c:1103 +#: ../cli/src/connections.c:1193 msgid "activated" msgstr "включена" -#: ../cli/src/connections.c:1106 ../cli/src/connections.c:1129 -#: ../cli/src/connections.c:1162 ../cli/src/devices.c:246 -#: ../cli/src/devices.c:558 ../cli/src/network-manager.c:94 -#: ../cli/src/network-manager.c:149 ../cli/src/settings.c:473 -#| msgid "(unknown)" +#: ../cli/src/connections.c:1196 ../cli/src/connections.c:1219 +#: ../cli/src/connections.c:1252 ../cli/src/devices.c:281 +#: ../cli/src/devices.c:644 ../cli/src/network-manager.c:98 +#: ../cli/src/network-manager.c:156 ../cli/src/settings.c:485 msgid "unknown" msgstr "неизвестно" -#: ../cli/src/connections.c:1115 -#| msgid "VPN connecting to '%s'" +#: ../cli/src/connections.c:1205 msgid "VPN connecting (prepare)" msgstr "Свързване към ВЧМ (подготовка)" -#: ../cli/src/connections.c:1117 +#: ../cli/src/connections.c:1207 msgid "VPN connecting (need authentication)" msgstr "Свързване към ВЧМ (нужна е идентификация)" -#: ../cli/src/connections.c:1119 -#| msgid "VPN Connections" +#: ../cli/src/connections.c:1209 msgid "VPN connecting" msgstr "Свързване към ВЧМ" -#: ../cli/src/connections.c:1121 +#: ../cli/src/connections.c:1211 msgid "VPN connecting (getting IP configuration)" msgstr "Свързване към ВЧМ (получаване на настройките за IP)" -#: ../cli/src/connections.c:1123 -#| msgid "Disconnected" +#: ../cli/src/connections.c:1213 msgid "VPN connected" msgstr "Свързан към ВЧМ" -#: ../cli/src/connections.c:1125 -#| msgid "VPN Connect Failure" +#: ../cli/src/connections.c:1215 msgid "VPN connection failed" msgstr "Неуспешно свързване към ВЧМ" -#: ../cli/src/connections.c:1127 -#| msgid "Disconnected" +#: ../cli/src/connections.c:1217 msgid "VPN disconnected" msgstr "Връзката към ВЧМ е прекъсната" -#: ../cli/src/connections.c:1138 -#| msgid "(unknown)" +#: ../cli/src/connections.c:1228 msgid "unknown reason" msgstr "неизвестна причина" -#: ../cli/src/connections.c:1140 +#: ../cli/src/connections.c:1230 msgid "none" msgstr "липсва" -#: ../cli/src/connections.c:1142 -#| msgid "The network connection has been disconnected." +#: ../cli/src/connections.c:1232 msgid "the user was disconnected" msgstr "потребителят е изключен" -#: ../cli/src/connections.c:1144 -#| msgid "The network connection has been disconnected." +#: ../cli/src/connections.c:1234 msgid "the base network connection was interrupted" msgstr "основната връзка към мрежата е прекъсната" -#: ../cli/src/connections.c:1146 +#: ../cli/src/connections.c:1236 msgid "the VPN service stopped unexpectedly" msgstr "услугата за ВЧМ спря неочаквано" -#: ../cli/src/connections.c:1148 +#: ../cli/src/connections.c:1238 msgid "the VPN service returned invalid configuration" msgstr "услугата за ВЧМ предостави неправилни настройки" -#: ../cli/src/connections.c:1150 +#: ../cli/src/connections.c:1240 msgid "the connection attempt timed out" msgstr "времето за свързване изтече" -#: ../cli/src/connections.c:1152 +#: ../cli/src/connections.c:1242 msgid "the VPN service did not start in time" msgstr "услугата за ВЧМ не успя да тръгне в определеното време" -#: ../cli/src/connections.c:1154 +#: ../cli/src/connections.c:1244 msgid "the VPN service failed to start" msgstr "услугата за ВЧМ не успя да тръгне" -#: ../cli/src/connections.c:1156 +#: ../cli/src/connections.c:1246 msgid "no valid VPN secrets" msgstr "няма правилни пароли за ВЧМ" -#: ../cli/src/connections.c:1158 +#: ../cli/src/connections.c:1248 msgid "invalid VPN secrets" msgstr "неправилни пароли за ВЧМ" -#: ../cli/src/connections.c:1160 +#: ../cli/src/connections.c:1250 msgid "the connection was removed" msgstr "връзката е премахната" -#: ../cli/src/connections.c:1174 +#: ../cli/src/connections.c:1264 #, c-format msgid "state: %s\n" msgstr "състояние: %s\n" -#: ../cli/src/connections.c:1177 ../cli/src/connections.c:1203 +#: ../cli/src/connections.c:1267 ../cli/src/connections.c:1293 #, c-format -#| msgid "Connection Established" msgid "Connection activated\n" msgstr "Връзката е активирана\n" -#: ../cli/src/connections.c:1180 +#: ../cli/src/connections.c:1270 #, c-format -#| msgid "Connection to the wired network failed." msgid "Error: Connection activation failed." msgstr "Грешка при активиране на връзката." -#: ../cli/src/connections.c:1199 +#: ../cli/src/connections.c:1289 #, c-format msgid "state: %s (%d)\n" msgstr "състояние: %s (%d)\n" -#: ../cli/src/connections.c:1209 +#: ../cli/src/connections.c:1299 #, c-format msgid "Error: Connection activation failed: %s." msgstr "Грешка при активиране на връзката: %s." -#: ../cli/src/connections.c:1226 ../cli/src/devices.c:909 +#: ../cli/src/connections.c:1316 ../cli/src/devices.c:1064 #, c-format msgid "Error: Timeout %d sec expired." -msgstr "Просрочено е времето от %d сек." +msgstr "Грешка: просрочване на времето от %d сек." -#: ../cli/src/connections.c:1269 +#: ../cli/src/connections.c:1359 #, c-format msgid "Error: Connection activation failed: %s" msgstr "Грешка при активиране на връзката: %s" -#: ../cli/src/connections.c:1283 +#: ../cli/src/connections.c:1373 #, c-format -#| msgid "Error retrieving VPN connection '%s'" msgid "Error: Obtaining active connection for '%s' failed." msgstr "Грешка при получаване на активната връзка за „%s“." -#: ../cli/src/connections.c:1292 +#: ../cli/src/connections.c:1382 #, c-format -#| msgid "No active connections!" msgid "Active connection state: %s\n" msgstr "Състояние на активната връзка: %s\n" -#: ../cli/src/connections.c:1293 +#: ../cli/src/connections.c:1383 #, c-format -#| msgid "No active connections!" msgid "Active connection path: %s\n" msgstr "Път на активната връзка: %s\n" -#: ../cli/src/connections.c:1347 ../cli/src/connections.c:1468 +#: ../cli/src/connections.c:1438 ../cli/src/connections.c:1568 #, c-format -#| msgid "Error retrieving VPN connection '%s'" msgid "Error: Unknown connection: %s." msgstr "Непозната връзка „%s“." -#: ../cli/src/connections.c:1382 ../cli/src/devices.c:980 +#: ../cli/src/connections.c:1482 ../cli/src/devices.c:1135 #, c-format msgid "Error: timeout value '%s' is not valid." msgstr "Ограничението на времето „%s“ не е правилно." -#: ../cli/src/connections.c:1395 ../cli/src/connections.c:1485 +#: ../cli/src/connections.c:1495 ../cli/src/connections.c:1585 #, c-format msgid "Error: id or uuid has to be specified." msgstr "" "Указването на идентификатор или универсален идентификатор (uuid) е " "задължително." -#: ../cli/src/connections.c:1415 +#: ../cli/src/connections.c:1515 #, c-format msgid "Error: No suitable device found: %s." -msgstr "Не е намерено подходящо устройство – %s." +msgstr "Не е намерено подходящо устройство — %s." -#: ../cli/src/connections.c:1417 +#: ../cli/src/connections.c:1517 #, c-format msgid "Error: No suitable device found." -msgstr "Не е намерено подходящо устройство." +msgstr "Не е намерено подходящо устройство." -#: ../cli/src/connections.c:1512 +#: ../cli/src/connections.c:1612 #, c-format -#| msgid "Connection Information" msgid "Warning: Connection not active\n" msgstr "Предупреждение: Връзката не е активна\n" -#: ../cli/src/connections.c:1569 +#: ../cli/src/connections.c:1669 #, c-format msgid "Error: 'con' command '%s' is not valid." -msgstr "„con“ не поддържа команда „%s“." +msgstr "Грешка: „con“ не поддържа команда „%s“." -#: ../cli/src/connections.c:1605 +#: ../cli/src/connections.c:1705 #, c-format msgid "Error: could not connect to D-Bus." msgstr "Грешка при свързване с D-Bus." -#: ../cli/src/connections.c:1612 +#: ../cli/src/connections.c:1712 #, c-format msgid "Error: Could not get system settings." msgstr "Грешка при получаване на системните настройки." -#: ../cli/src/connections.c:1620 +#: ../cli/src/connections.c:1720 #, c-format msgid "Error: Could not get user settings." msgstr "Грешка при получаване на потребителските настройки." -#: ../cli/src/connections.c:1630 +#: ../cli/src/connections.c:1730 #, c-format msgid "Error: Can't obtain connections: settings services are not running." msgstr "" -"Грешка при получаване на списъка с връзки – услугите за настройки не са " +"Грешка при получаване на списъка с връзки — услугите за настройки не са " "налични." #. 0 #. 9 -#: ../cli/src/devices.c:61 ../cli/src/devices.c:89 ../cli/src/devices.c:184 +#. 3 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:93 ../cli/src/devices.c:201 +#: ../cli/src/devices.c:216 msgid "DEVICE" msgstr "УСТРОЙСТВО" #. 1 #. 4 #. 0 -#: ../cli/src/devices.c:63 ../cli/src/devices.c:93 +#: ../cli/src/devices.c:64 ../cli/src/devices.c:97 #: ../cli/src/network-manager.c:36 msgid "STATE" msgstr "СЪСТОЯНИЕ" -#: ../cli/src/devices.c:72 +#: ../cli/src/devices.c:74 msgid "GENERAL" msgstr "ОБЩИ" #. 0 -#: ../cli/src/devices.c:73 +#: ../cli/src/devices.c:75 msgid "CAPABILITIES" msgstr "ВЪЗМОЖНОСТИ" #. 1 -#: ../cli/src/devices.c:74 +#: ../cli/src/devices.c:76 msgid "WIFI-PROPERTIES" -msgstr "БЕЗЖИЧНИ-ХАРАКТЕРИСТИКИ" +msgstr "БЕЗЖ-ХАРАКТЕРИСТИКИ" #. 2 -#: ../cli/src/devices.c:75 -#| msgid "PEAP" +#: ../cli/src/devices.c:77 msgid "AP" -msgstr "ТД" +msgstr "ТЧК-ДСТП" #. 3 -#: ../cli/src/devices.c:76 +#: ../cli/src/devices.c:78 msgid "WIRED-PROPERTIES" msgstr "ЖИЧНИ-ХАРАКТЕРИСТИКИ" #. 4 -#: ../cli/src/devices.c:77 +#: ../cli/src/devices.c:79 +msgid "WIMAX-PROPERTIES" +msgstr "WIMAX-ХАРАКТЕРИСТИКИ" + +#. 5 +#. 0 +#: ../cli/src/devices.c:80 ../cli/src/devices.c:213 +msgid "NSP" +msgstr "ДОСТАВЧИК" + +#. 6 +#: ../cli/src/devices.c:81 msgid "IP4-SETTINGS" msgstr "ПАРАМЕТРИ-IP4" -#. 5 -#: ../cli/src/devices.c:78 +#. 7 +#: ../cli/src/devices.c:82 msgid "IP4-DNS" msgstr "IP4-DNS" -#. 6 -#: ../cli/src/devices.c:79 +#. 8 +#: ../cli/src/devices.c:83 msgid "IP6-SETTINGS" msgstr "ПАРАМЕТРИ-IP6" -#. 7 -#: ../cli/src/devices.c:80 +#. 9 +#: ../cli/src/devices.c:84 msgid "IP6-DNS" msgstr "IP6-DNS" #. 2 -#: ../cli/src/devices.c:91 +#: ../cli/src/devices.c:95 msgid "DRIVER" msgstr "ДРАЙВЕР" #. 3 -#: ../cli/src/devices.c:92 +#: ../cli/src/devices.c:96 msgid "HWADDR" msgstr "ХАРДУЕРЕН-АДРЕС" #. 0 -#: ../cli/src/devices.c:102 +#: ../cli/src/devices.c:106 msgid "CARRIER-DETECT" msgstr "СИГНАЛ-ОТКР." #. 1 -#: ../cli/src/devices.c:103 +#: ../cli/src/devices.c:107 msgid "SPEED" msgstr "СКОРОСТ" #. 0 -#: ../cli/src/devices.c:112 +#: ../cli/src/devices.c:116 msgid "CARRIER" msgstr "СИГНАЛ" #. 0 -#: ../cli/src/devices.c:122 +#: ../cli/src/devices.c:126 msgid "WEP" msgstr "WEP" #. 1 -#: ../cli/src/devices.c:123 +#: ../cli/src/devices.c:127 msgid "WPA" msgstr "WPA" #. 2 -#: ../cli/src/devices.c:124 -#| msgid "WPA2 TKIP" +#: ../cli/src/devices.c:128 msgid "WPA2" msgstr "WPA2" #. 3 -#: ../cli/src/devices.c:125 +#: ../cli/src/devices.c:129 msgid "TKIP" msgstr "TKIP" #. 4 -#: ../cli/src/devices.c:126 -#| msgid "AES-CCMP" +#: ../cli/src/devices.c:130 msgid "CCMP" msgstr "CCMP" #. 0 -#: ../cli/src/devices.c:135 ../cli/src/devices.c:146 +#: ../cli/src/devices.c:139 +msgid "CTR-FREQ" +msgstr "CTR-FREQ" + +#. 1 +#: ../cli/src/devices.c:140 +msgid "RSSI" +msgstr "RSSI" + +#. 2 +#: ../cli/src/devices.c:141 +msgid "CINR" +msgstr "CINR" + +#. 3 +#: ../cli/src/devices.c:142 +msgid "TX-POW" +msgstr "TX-POW" + +#. 4 +#: ../cli/src/devices.c:143 +msgid "BSID" +msgstr "BSID" + +#. 0 +#: ../cli/src/devices.c:152 ../cli/src/devices.c:163 msgid "ADDRESS" msgstr "АДРЕС" #. 1 -#: ../cli/src/devices.c:136 ../cli/src/devices.c:147 +#: ../cli/src/devices.c:153 ../cli/src/devices.c:164 msgid "PREFIX" msgstr "ПРЕФИКС" #. 2 -#: ../cli/src/devices.c:137 ../cli/src/devices.c:148 +#: ../cli/src/devices.c:154 ../cli/src/devices.c:165 msgid "GATEWAY" msgstr "ШЛЮЗ" #. 0 -#: ../cli/src/devices.c:157 ../cli/src/devices.c:166 +#: ../cli/src/devices.c:174 ../cli/src/devices.c:183 msgid "DNS" msgstr "DNS" #. 0 -#: ../cli/src/devices.c:175 +#: ../cli/src/devices.c:192 msgid "SSID" msgstr "SSID" #. 1 -#: ../cli/src/devices.c:176 +#: ../cli/src/devices.c:193 msgid "BSSID" msgstr "BSSID" #. 2 -#: ../cli/src/devices.c:177 +#: ../cli/src/devices.c:194 msgid "MODE" msgstr "РЕЖИМ" #. 3 -#: ../cli/src/devices.c:178 +#: ../cli/src/devices.c:195 msgid "FREQ" msgstr "ЧЕСТОТА" #. 4 -#: ../cli/src/devices.c:179 +#: ../cli/src/devices.c:196 msgid "RATE" msgstr "СКОРОСТ-ПРЕДАВАНЕ" #. 5 -#: ../cli/src/devices.c:180 +#. 1 +#: ../cli/src/devices.c:197 ../cli/src/devices.c:214 msgid "SIGNAL" msgstr "СИГНАЛ" #. 6 -#: ../cli/src/devices.c:181 +#: ../cli/src/devices.c:198 msgid "SECURITY" msgstr "СИГУРНОСТ" #. 7 -#: ../cli/src/devices.c:182 +#: ../cli/src/devices.c:199 msgid "WPA-FLAGS" msgstr "ФЛАГОВЕ-WPA" #. 8 -#: ../cli/src/devices.c:183 +#: ../cli/src/devices.c:200 msgid "RSN-FLAGS" msgstr "ФЛАГОВЕ-RSN" #. 10 -#: ../cli/src/devices.c:185 +#. 4 +#: ../cli/src/devices.c:202 ../cli/src/devices.c:217 msgid "ACTIVE" msgstr "АКТИВНА" -#: ../cli/src/devices.c:208 +#: ../cli/src/devices.c:242 #, c-format msgid "" "Usage: nmcli dev { COMMAND | help }\n" "\n" -" COMMAND := { status | list | disconnect | wifi }\n" +" COMMAND := { status | list | disconnect | wifi | wimax }\n" "\n" " status\n" " list [iface ]\n" " disconnect iface [--nowait] [--timeout ]\n" " wifi [list [iface ] [hwaddr ]]\n" +" wimax [list [iface ] [nsp ]]\n" "\n" msgstr "" "Употреба: nmcli dev { КОМАНДА | help }\n" "\n" -" КОМАНДА := { status | list | disconnect | wifi }\n" +" КОМАНДА := { status | list | disconnect | wifi | wimax}\n" "\n" " status\n" " list [ iface <интерфейс>]\n" " disconnect iface <интерфейс> [--nowait] [--timeout <време>]\n" " wifi [list [iface <интерфейс>] [hwaddr <хардуерен адрес>]]\n" -"\n" +" wimax [list [iface <интерфейс>] [nsp <име>]]\n" -#: ../cli/src/devices.c:228 +#: ../cli/src/devices.c:263 msgid "unmanaged" msgstr "не се управлява" -#: ../cli/src/devices.c:230 +#: ../cli/src/devices.c:265 msgid "unavailable" msgstr "не е налично" # става дума за устройство # или за общото състояние на N-M -#: ../cli/src/devices.c:232 ../cli/src/network-manager.c:91 -#| msgid "Disconnected" +#: ../cli/src/devices.c:267 ../cli/src/network-manager.c:95 msgid "disconnected" msgstr "без връзка" -#: ../cli/src/devices.c:234 +#: ../cli/src/devices.c:269 msgid "connecting (prepare)" msgstr "свързване (подготовка)" -#: ../cli/src/devices.c:236 -#| msgid "Connection Information" +#: ../cli/src/devices.c:271 msgid "connecting (configuring)" msgstr "свързване (настройка)" -#: ../cli/src/devices.c:238 +#: ../cli/src/devices.c:273 msgid "connecting (need authentication)" msgstr "свързване (нужна е идентификация)" -#: ../cli/src/devices.c:240 -#| msgid "Connection Information" +#: ../cli/src/devices.c:275 msgid "connecting (getting IP configuration)" msgstr "свързване (получаване на настройките за IP)" # става дума и за конкретно устройство, # и за NM като цяло -#: ../cli/src/devices.c:242 ../cli/src/network-manager.c:89 -#| msgid "Disconnected" +#: ../cli/src/devices.c:277 ../cli/src/network-manager.c:93 msgid "connected" msgstr "има връзка" -#: ../cli/src/devices.c:244 -#| msgid "Connection Established" +#: ../cli/src/devices.c:279 msgid "connection failed" msgstr "неуспешно свързване" -# вид устройство (жично, безжично, телефон, bluetooth) или вид мрежа (инфраструктура, ad-hoc) -#: ../cli/src/devices.c:267 ../cli/src/devices.c:424 +# вид устройство (жично, безжично, телефон, Bluetooth) или вид мрежа (инфраструктура, ad-hoc) +#: ../cli/src/devices.c:304 ../cli/src/devices.c:461 ../cli/src/devices.c:504 msgid "Unknown" msgstr "Непознат" # низът се използва когато дадена безжична мрежа няма флагове от рода на pair_ccmp, pair_wpe140 и т.н. -#: ../cli/src/devices.c:299 -#| msgid "none" +#: ../cli/src/devices.c:336 msgid "(none)" msgstr "(без)" -#: ../cli/src/devices.c:324 +#: ../cli/src/devices.c:361 #, c-format msgid "%s: error converting IP4 address 0x%X" msgstr "%s: грешка при преобразуване на адрес IP4 0x%X" -#: ../cli/src/devices.c:393 +#: ../cli/src/devices.c:430 #, c-format msgid "%u MHz" -msgstr "%u МХц" +msgstr "%u MHz" -#: ../cli/src/devices.c:394 +#: ../cli/src/devices.c:431 #, c-format -#| msgid "%d Mb/s" msgid "%u MB/s" -msgstr "%u МБ/с" +msgstr "%u MB/s" -#: ../cli/src/devices.c:403 +#: ../cli/src/devices.c:440 msgid "Encrypted: " -msgstr "Шифроване: " +msgstr "Шифриране: " -#: ../cli/src/devices.c:408 +#: ../cli/src/devices.c:445 msgid "WEP " msgstr "WEP" -#: ../cli/src/devices.c:410 -#| msgid "WPA TKIP" +#: ../cli/src/devices.c:447 msgid "WPA " msgstr "WPA" -#: ../cli/src/devices.c:412 -#| msgid "WPA2 TKIP" +#: ../cli/src/devices.c:449 msgid "WPA2 " msgstr "WPA2" -#: ../cli/src/devices.c:415 -#| msgid "WPA Enterprise" +#: ../cli/src/devices.c:452 msgid "Enterprise " msgstr "Индустр." # Режима на мрежата -#: ../cli/src/devices.c:424 +#: ../cli/src/devices.c:461 msgid "Ad-Hoc" -msgstr "Специален" +msgstr "Инцидентен (ад хок)" # Режима на мрежата -#: ../cli/src/devices.c:424 +#: ../cli/src/devices.c:461 msgid "Infrastructure" msgstr "Инфраструктурен" -#: ../cli/src/devices.c:486 +#: ../cli/src/devices.c:495 +msgid "Home" +msgstr "На доставчика" + +#: ../cli/src/devices.c:498 +msgid "Partner" +msgstr "На партньор" + +#: ../cli/src/devices.c:501 +msgid "Roaming" +msgstr "Роуминг" + +#: ../cli/src/devices.c:570 #, c-format msgid "Error: 'dev list': %s" -msgstr "Грешка при „dev list“ – %s" +msgstr "Грешка при „dev list“ — %s" -#: ../cli/src/devices.c:488 +#: ../cli/src/devices.c:572 #, c-format msgid "Error: 'dev list': %s; allowed fields: %s" -msgstr "Грешка при „dev list“ – %s; допустимите полета са %s" +msgstr "Грешка при „dev list“ — %s; допустимите полета са %s" -#: ../cli/src/devices.c:497 +#: ../cli/src/devices.c:581 msgid "Device details" msgstr "Информация за устройството" # или е драйвер, # или е грешка при прекъсване на връзката -#: ../cli/src/devices.c:527 ../cli/src/devices.c:925 +#: ../cli/src/devices.c:613 ../cli/src/devices.c:1080 msgid "(unknown)" msgstr "(няма информация)" # хардуерен адрес -#: ../cli/src/devices.c:528 -#| msgid "(unknown)" +#: ../cli/src/devices.c:614 msgid "unknown)" msgstr "(няма информация)" -#: ../cli/src/devices.c:554 +#: ../cli/src/devices.c:640 #, c-format -#| msgid "%d Mb/s" msgid "%u Mb/s" -msgstr "%u Мб/с" +msgstr "%u Mb/s" # дадено устройство има сигнал по жицата #. Print header #. "WIRED-PROPERTIES" -#: ../cli/src/devices.c:627 -#| msgid "None" +#: ../cli/src/devices.c:713 msgid "on" msgstr "свързано" -#: ../cli/src/devices.c:627 +#: ../cli/src/devices.c:713 msgid "off" msgstr "без връзка" -#: ../cli/src/devices.c:808 +#: ../cli/src/devices.c:963 #, c-format msgid "Error: 'dev status': %s" -msgstr "Грешка при „dev status“ – %s" +msgstr "Грешка при „dev status“ — %s" -#: ../cli/src/devices.c:810 +#: ../cli/src/devices.c:965 #, c-format msgid "Error: 'dev status': %s; allowed fields: %s" -msgstr "Грешка при „dev status“ – %s; допустимите полета са %s" +msgstr "Грешка при „dev status“ — %s; допустимите полета са %s" -#: ../cli/src/devices.c:817 +#: ../cli/src/devices.c:972 msgid "Status of devices" msgstr "Състояние на устройствата" -#: ../cli/src/devices.c:845 +#: ../cli/src/devices.c:1000 #, c-format msgid "Error: '%s' argument is missing." -msgstr "Липсва аргумент за „%s“." +msgstr "Грешка: липсва аргумент за „%s“." -#: ../cli/src/devices.c:874 ../cli/src/devices.c:1013 -#: ../cli/src/devices.c:1136 +#: ../cli/src/devices.c:1029 ../cli/src/devices.c:1168 +#: ../cli/src/devices.c:1291 ../cli/src/devices.c:1497 #, c-format msgid "Error: Device '%s' not found." -msgstr "Устройството „%s“ не е намерено." +msgstr "Грешка: устройството „%s“ не е открито." -#: ../cli/src/devices.c:897 +#: ../cli/src/devices.c:1052 #, c-format msgid "Success: Device '%s' successfully disconnected." -msgstr "Връзката на устройството „%s“ е прекъсната." +msgstr "Успех: връзката на устройството „%s“ е прекъсната." -#: ../cli/src/devices.c:922 +#: ../cli/src/devices.c:1077 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s" -msgstr "Грешка при прекъсване на връзката на устройството „%s“ (%s) – %s" +msgstr "Грешка при прекъсване на връзката на устройството „%s“ (%s) — %s" -#: ../cli/src/devices.c:930 +#: ../cli/src/devices.c:1085 #, c-format msgid "Device state: %d (%s)\n" msgstr "Състояние на устройството: %d (%s)\n" -#: ../cli/src/devices.c:994 +#: ../cli/src/devices.c:1149 #, c-format msgid "Error: iface has to be specified." -msgstr "Указването на „iface“ е задължително." +msgstr "Грешка: указването на „iface“ е задължително." -#: ../cli/src/devices.c:1112 +#: ../cli/src/devices.c:1267 #, c-format msgid "Error: 'dev wifi': %s" -msgstr "Грешка при „dev wifi“ – %s" +msgstr "Грешка при „dev wifi“ — %s" -#: ../cli/src/devices.c:1114 +#: ../cli/src/devices.c:1269 #, c-format msgid "Error: 'dev wifi': %s; allowed fields: %s" -msgstr "Грешка при „dev wifi“ – %s; допустимите полета са %s" +msgstr "Грешка при „dev wifi“ — %s; допустимите полета са %s" -#: ../cli/src/devices.c:1121 +#: ../cli/src/devices.c:1276 msgid "WiFi scan list" msgstr "Открити безжични мрежи" -#: ../cli/src/devices.c:1156 ../cli/src/devices.c:1210 +#: ../cli/src/devices.c:1311 ../cli/src/devices.c:1365 +#: ../cli/src/devices.c:1559 #, c-format msgid "Error: Access point with hwaddr '%s' not found." msgstr "Не е открита точка за достъп с хардуерен адрес „%s“." -#: ../cli/src/devices.c:1173 +#: ../cli/src/devices.c:1328 #, c-format msgid "Error: Device '%s' is not a WiFi device." msgstr "„%s“ не е устройство за безжична мрежа." -#: ../cli/src/devices.c:1237 +#: ../cli/src/devices.c:1392 #, c-format msgid "Error: 'dev wifi' command '%s' is not valid." msgstr "„%s“ не е правилна команда за „dev wifi“." -#: ../cli/src/devices.c:1284 +#: ../cli/src/devices.c:1473 +#, c-format +msgid "Error: 'dev wimax': %s" +msgstr "Грешка при „dev wimax“ — %s" + +#: ../cli/src/devices.c:1475 +#, c-format +msgid "Error: 'dev wimax': %s; allowed fields: %s" +msgstr "Грешка при „dev wifi“ — %s; допустимите полета са %s" + +#: ../cli/src/devices.c:1482 +msgid "WiMAX NSP list" +msgstr "Списък с доставчици на WiMAX" + +#: ../cli/src/devices.c:1517 +#, c-format +msgid "Error: NSP with name '%s' not found." +msgstr "Грешка: доставчикът „%s“ не е открит." + +#: ../cli/src/devices.c:1528 +#, c-format +msgid "Error: Device '%s' is not a WiMAX device." +msgstr "„%s“ не е устройство за мрежа по WiMAX." + +#: ../cli/src/devices.c:1586 +#, c-format +msgid "Error: 'dev wimax' command '%s' is not valid." +msgstr "„%s“ не е правилна команда за „dev wimax“." + +#: ../cli/src/devices.c:1637 #, c-format msgid "Error: 'dev' command '%s' is not valid." msgstr "„%s“ не е правилна команда за „dev“." @@ -945,144 +998,169 @@ msgstr "МОБ. ХАРДУЕР" msgid "WWAN" msgstr "МОБ. МРЕЖА" -#: ../cli/src/network-manager.c:64 +#. 6 +#: ../cli/src/network-manager.c:42 +msgid "WIMAX-HARDWARE" +msgstr "ХАРДУЕР-WIMAX" + +#. 7 +#: ../cli/src/network-manager.c:43 +msgid "WIMAX" +msgstr "WIMAX" + +#: ../cli/src/network-manager.c:67 #, c-format msgid "" "Usage: nmcli nm { COMMAND | help }\n" "\n" -" COMMAND := { status | enable | sleep | wifi | wwan }\n" +" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n" "\n" " status\n" " enable [true|false]\n" " sleep [true|false]\n" " wifi [on|off]\n" " wwan [on|off]\n" +" wimax [on|off]\n" "\n" msgstr "" "Употреба: nmcli nm { КОМАНДА | help }\n" "\n" -" КОМАНДА := { status | enable | sleep | wifi | wwan }\n" +" КОМАНДА := { status | enable | sleep | wifi | wwan | wimax }\n" "\n" " status\n" " enable [true|false]\n" " sleep [true|false]\n" " wifi [on|off]\n" " wwan [on|off]\n" +" wimax [on|off]\n" "\n" -#: ../cli/src/network-manager.c:85 +#: ../cli/src/network-manager.c:89 msgid "asleep" msgstr "спящ" -#: ../cli/src/network-manager.c:87 -#| msgid "C_onnect" +#: ../cli/src/network-manager.c:91 msgid "connecting" msgstr "свързване" -#: ../cli/src/network-manager.c:128 +#: ../cli/src/network-manager.c:133 #, c-format msgid "Error: 'nm status': %s" -msgstr "Грешка при „nm status“ – %s" +msgstr "Грешка при „nm status“ — %s" -#: ../cli/src/network-manager.c:130 +#: ../cli/src/network-manager.c:135 #, c-format msgid "Error: 'nm status': %s; allowed fields: %s" -msgstr "Грешка при „nm status“ – %s; допустимите полета са %s" +msgstr "Грешка при „nm status“ — %s; допустимите полета са %s" -#: ../cli/src/network-manager.c:137 -#| msgid "NetworkManager Applet" +#: ../cli/src/network-manager.c:142 msgid "NetworkManager status" msgstr "Състояние на NetworkManager" #. Print header -#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145 -#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147 -#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247 -#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328 +#: ../cli/src/network-manager.c:149 ../cli/src/network-manager.c:150 +#: ../cli/src/network-manager.c:151 ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:153 ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:257 +#: ../cli/src/network-manager.c:306 ../cli/src/network-manager.c:338 +#: ../cli/src/network-manager.c:370 msgid "enabled" msgstr "включено" -#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145 -#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147 -#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247 -#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328 +#: ../cli/src/network-manager.c:149 ../cli/src/network-manager.c:150 +#: ../cli/src/network-manager.c:151 ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:153 ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:257 +#: ../cli/src/network-manager.c:306 ../cli/src/network-manager.c:338 +#: ../cli/src/network-manager.c:370 msgid "disabled" msgstr "изключено" -#: ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:159 msgid "running" msgstr "включен" -#: ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:159 msgid "not running" msgstr "изключен" -#: ../cli/src/network-manager.c:175 +#: ../cli/src/network-manager.c:184 #, c-format msgid "Error: Couldn't connect to system bus: %s" -msgstr "Грешка при свързване към системната шина – %s" +msgstr "Грешка при свързване към системната шина — %s" -#: ../cli/src/network-manager.c:186 +#: ../cli/src/network-manager.c:195 #, c-format msgid "Error: Couldn't create D-Bus object proxy." msgstr "Грешка при създаване на обект-посредник за D-Bus." -#: ../cli/src/network-manager.c:192 +#: ../cli/src/network-manager.c:201 #, c-format msgid "Error in sleep: %s" -msgstr "Грешка при приспиване – %s" +msgstr "Грешка при приспиване — %s" -#: ../cli/src/network-manager.c:237 ../cli/src/network-manager.c:286 -#: ../cli/src/network-manager.c:318 +#: ../cli/src/network-manager.c:247 ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 ../cli/src/network-manager.c:360 #, c-format msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" msgstr "Стойността „%s“ за „--fields“ не е правилна; допустимите полета са %s" -#: ../cli/src/network-manager.c:245 -#| msgid "Networking disabled" +#: ../cli/src/network-manager.c:255 msgid "Networking enabled" msgstr "Мрежата е включена" -#: ../cli/src/network-manager.c:256 +#: ../cli/src/network-manager.c:266 #, c-format msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'." msgstr "" -"Недопустим аргумент на „enable“ – „%s“. Използвайте „true“ или „false“." +"Грешка: неправилен аргумент на „enable“ — „%s“. Използвайте „true“ или " +"„false“." -#: ../cli/src/network-manager.c:265 +#: ../cli/src/network-manager.c:275 #, c-format msgid "Error: Sleeping status is not exported by NetworkManager." msgstr "NetworkManager не предоставя информация за приспиването." -#: ../cli/src/network-manager.c:273 +#: ../cli/src/network-manager.c:283 #, c-format msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'." msgstr "" -"„%s“ не е правилен параметър за „sleep“. Използвайте „true“ или „false“." +"Грешка: „%s“ не е правилен параметър за „sleep“. Използвайте „true“ или " +"„false“." -#: ../cli/src/network-manager.c:294 +#: ../cli/src/network-manager.c:304 msgid "WiFi enabled" msgstr "Безжичната мрежа е включена" -#: ../cli/src/network-manager.c:305 +#: ../cli/src/network-manager.c:315 #, c-format msgid "Error: invalid 'wifi' parameter: '%s'." -msgstr "„%s“ не е правилен параметър за „wifi“." +msgstr "Грешка: „%s“ не е правилен параметър за „wifi“." -#: ../cli/src/network-manager.c:326 +#: ../cli/src/network-manager.c:336 msgid "WWAN enabled" msgstr "Мобилната мрежа е включена" -#: ../cli/src/network-manager.c:337 +#: ../cli/src/network-manager.c:347 #, c-format msgid "Error: invalid 'wwan' parameter: '%s'." -msgstr "„%s“ не е правилен параметър за „wwan“." +msgstr "Грешка: „%s“ не е правилен параметър за „wwan“." + +#: ../cli/src/network-manager.c:368 +msgid "WiMAX enabled" +msgstr "Мрежата по WiMAX е включена" -#: ../cli/src/network-manager.c:348 +#: ../cli/src/network-manager.c:379 +#, c-format +msgid "Error: invalid 'wimax' parameter: '%s'." +msgstr "Грешка: „%s“ не е правилен параметър за „wimax“." + +#: ../cli/src/network-manager.c:390 #, c-format msgid "Error: 'nm' command '%s' is not valid." -msgstr "„%s“ не е правилна команда за „nm“." +msgstr "Грешка: „%s“ не е правилна команда за „nm“." +# CONTINUE #: ../cli/src/nmcli.c:69 #, c-format msgid "" @@ -1111,12 +1189,13 @@ msgstr "" " -p[retty] красив изход\n" " -m[ode] tabular|multiline режим на изхода\n" " -f[ields] <поле1,поле2,…>|all|common извеждани полета\n" -" -е[scape] yes|no кодиране на разделителите между " -"колоните в стойностите\n" +" -е[scape] yes|no екраниране на разделителите " +"между\n" +" колоните в стойностите\n" " -v[ersion] показване на версията на " "програмата\n" -" -h[elp] показване на тази помощна " -"информация\n" +" -h[elp] показване на тази помощна \n" +" информация\n" "\n" "OBJECT\n" " nm състояние на NetworkManager\n" @@ -1127,42 +1206,42 @@ msgstr "" #: ../cli/src/nmcli.c:113 #, c-format msgid "Error: Object '%s' is unknown, try 'nmcli help'." -msgstr "Обектът „%s“ е непознат. Опитайте с „nmcli help“." +msgstr "Грешка: обектът „%s“ е непознат. Опитайте с „nmcli help“." #: ../cli/src/nmcli.c:143 #, c-format msgid "Error: Option '--terse' is specified the second time." -msgstr "Опцията „--terse“ е указана втори път." +msgstr "Грешка: опцията „--terse“ е указана втори път." #: ../cli/src/nmcli.c:148 #, c-format msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." -msgstr "Опцията „--terse“ е несъвместима с „--pretty“." +msgstr "Гешка: опцията „--terse“ е несъвместима с „--pretty“." #: ../cli/src/nmcli.c:156 #, c-format msgid "Error: Option '--pretty' is specified the second time." -msgstr "Опцията „--pretty“ е указана втори път." +msgstr "Грешка: опцията „--pretty“ е указана втори път." #: ../cli/src/nmcli.c:161 #, c-format msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." -msgstr "Опцията „--pretty“ е несъвместима с „--terse“." +msgstr "Грешка: опцията „--pretty“ е несъвместима с „--terse“." #: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 #, c-format msgid "Error: missing argument for '%s' option." -msgstr "Липсва аргумент на опцията „%s“." +msgstr "Грешка: липсва аргумент на опцията „%s“." #: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 #, c-format msgid "Error: '%s' is not valid argument for '%s' option." -msgstr "„%s“ не е правилен аргумент за опцията „%s“." +msgstr "Грешка: „%s“ не е правилен аргумент за опцията „%s“." #: ../cli/src/nmcli.c:203 #, c-format msgid "Error: fields for '%s' options are missing." -msgstr "Липсват полета за опциите „%s“." +msgstr "Грешка: липсват полета за опциите „%s“." #: ../cli/src/nmcli.c:209 #, c-format @@ -1172,7 +1251,7 @@ msgstr "nmcli, версия %s\n" #: ../cli/src/nmcli.c:215 #, c-format msgid "Error: Option '%s' is unknown, try 'nmcli -help'." -msgstr "Опцията „%s“ е непозната. Опитайте с „nmcli -help“." +msgstr "Грешка: опцията „%s“ е непозната. Опитайте с „nmcli -help“." #: ../cli/src/nmcli.c:234 #, c-format @@ -1188,82 +1267,79 @@ msgstr "Грешка при свързване с NetworkManager." msgid "Success" msgstr "Успех" -#: ../cli/src/settings.c:411 +#: ../cli/src/settings.c:423 #, c-format msgid "%d (hex-ascii-key)" msgstr "%d (ключ в шестнайсетичен запис)" -#: ../cli/src/settings.c:413 +#: ../cli/src/settings.c:425 #, c-format -#| msgid "WEP 128-bit Passphrase" msgid "%d (104/128-bit passphrase)" msgstr "%d (104/128 битова парола)" -#: ../cli/src/settings.c:416 +#: ../cli/src/settings.c:428 #, c-format -#| msgid "(unknown)" msgid "%d (unknown)" msgstr "%d (неизвестен)" -#: ../cli/src/settings.c:442 -#| msgid "(unknown)" +#: ../cli/src/settings.c:454 msgid "0 (unknown)" msgstr "0 (неизвестно)" -#: ../cli/src/settings.c:448 +#: ../cli/src/settings.c:460 msgid "any, " msgstr "всяка, " -#: ../cli/src/settings.c:450 +#: ../cli/src/settings.c:462 msgid "900 MHz, " -msgstr "900 МХц, " +msgstr "900 MHz, " -#: ../cli/src/settings.c:452 +#: ../cli/src/settings.c:464 msgid "1800 MHz, " -msgstr "1800 МХц, " +msgstr "1800 MHz, " -#: ../cli/src/settings.c:454 +#: ../cli/src/settings.c:466 msgid "1900 MHz, " -msgstr "1900 МХц, " +msgstr "1900 MHz, " -#: ../cli/src/settings.c:456 +#: ../cli/src/settings.c:468 msgid "850 MHz, " -msgstr "850 МХц, " +msgstr "850 MHz, " -#: ../cli/src/settings.c:458 +#: ../cli/src/settings.c:470 msgid "WCDMA 3GPP UMTS 2100 MHz, " -msgstr "WCDMA 3GPP UMTS 2100 МХц, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " -#: ../cli/src/settings.c:460 +#: ../cli/src/settings.c:472 msgid "WCDMA 3GPP UMTS 1800 MHz, " -msgstr "WCDMA 3GPP UMTS 1800 МХц, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " -#: ../cli/src/settings.c:462 +#: ../cli/src/settings.c:474 msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " -msgstr "WCDMA 3GPP UMTS 1700/2100 МХц, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " -#: ../cli/src/settings.c:464 +#: ../cli/src/settings.c:476 msgid "WCDMA 3GPP UMTS 800 MHz, " -msgstr "WCDMA 3GPP UMTS 800 МХц, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " -#: ../cli/src/settings.c:466 +#: ../cli/src/settings.c:478 msgid "WCDMA 3GPP UMTS 850 MHz, " -msgstr "WCDMA 3GPP UMTS 850 МХц, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " -#: ../cli/src/settings.c:468 +#: ../cli/src/settings.c:480 msgid "WCDMA 3GPP UMTS 900 MHz, " -msgstr "WCDMA 3GPP UMTS 900 МХц, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " -#: ../cli/src/settings.c:470 +#: ../cli/src/settings.c:482 msgid "WCDMA 3GPP UMTS 1700 MHz, " -msgstr "WCDMA 3GPP UMTS 1700 МХц, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " -#: ../cli/src/settings.c:554 ../cli/src/settings.c:721 +#: ../cli/src/settings.c:566 ../cli/src/settings.c:733 msgid "auto" msgstr "автоматично" -#: ../cli/src/settings.c:716 ../cli/src/settings.c:719 -#: ../cli/src/settings.c:720 ../cli/src/utils.c:172 +#: ../cli/src/settings.c:728 ../cli/src/settings.c:731 +#: ../cli/src/settings.c:732 ../cli/src/utils.c:172 msgid "not set" msgstr "не е зададено" @@ -1287,134 +1363,130 @@ msgstr "Опцията „--terse“ изисква указването на msgid "Option '--terse' requires specific '--fields' option values , not '%s'" msgstr "Опцията „--terse“ изисква конкретни стойности за „--fields“, а не „%s“" -#: ../libnm-util/crypto.c:120 +#: ../libnm-util/crypto.c:121 #, c-format msgid "PEM key file had no end tag '%s'." msgstr "Крайният етикет „%s“ липсва в сертификат във формат PEM." -#: ../libnm-util/crypto.c:130 +#: ../libnm-util/crypto.c:131 #, c-format msgid "Doesn't look like a PEM private key file." msgstr "Това не изглежда да е сертификат във формат PEM с частен ключ." -#: ../libnm-util/crypto.c:138 +#: ../libnm-util/crypto.c:139 #, c-format msgid "Not enough memory to store PEM file data." msgstr "" "Няма достатъчно памет за запазването на данните от сертификата във формат " "PEM." -#: ../libnm-util/crypto.c:154 +#: ../libnm-util/crypto.c:155 #, c-format msgid "Malformed PEM file: Proc-Type was not first tag." msgstr "" -"Неправилен сертификат във формат PEM – първият етикет не е „Proc-Type“." +"Неправилен сертификат във формат PEM — първият етикет не е „Proc-Type“." -#: ../libnm-util/crypto.c:162 +#: ../libnm-util/crypto.c:163 #, c-format msgid "Malformed PEM file: unknown Proc-Type tag '%s'." msgstr "" "Неправилен сертификат във формат PEM: непознат етикет „Proc-Type“ — „%s“." -#: ../libnm-util/crypto.c:172 +#: ../libnm-util/crypto.c:173 #, c-format msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Неправилен сертификат във формат PEM – вторият етикет не е „DEK-Info“." +msgstr "Неправилен сертификат във формат PEM — вторият етикет не е „DEK-Info“." -#: ../libnm-util/crypto.c:183 +#: ../libnm-util/crypto.c:184 #, c-format msgid "Malformed PEM file: no IV found in DEK-Info tag." msgstr "" -"Неправилен сертификат във формат PEM – в етикета „DEK-Info“ липсва начален " +"Неправилен сертификат във формат PEM — в етикета „DEK-Info“ липсва начален " "вектор." -#: ../libnm-util/crypto.c:190 +#: ../libnm-util/crypto.c:191 #, c-format msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." msgstr "" -"Неправилен сертификат във формат PEM – неправилен начален вектор в етикета " +"Неправилен сертификат във формат PEM — неправилен начален вектор в етикета " "„DEK-Info“." -#: ../libnm-util/crypto.c:203 +#: ../libnm-util/crypto.c:204 #, c-format msgid "Malformed PEM file: unknown private key cipher '%s'." msgstr "" -"Неправилен сертификат във формат PEM – непознат шифър „%s“ за частния ключ." +"Неправилен сертификат във формат PEM — непознат шифър „%s“ за частния ключ." -#: ../libnm-util/crypto.c:222 +#: ../libnm-util/crypto.c:223 #, c-format msgid "Could not decode private key." msgstr "Грешка при декодиране на частния ключ." -#: ../libnm-util/crypto.c:267 +#: ../libnm-util/crypto.c:268 #, c-format msgid "PEM certificate '%s' had no end tag '%s'." msgstr "Крайният етикет „%2$s“ липсва в сертификата във формат PEM — „%1$s“." -#: ../libnm-util/crypto.c:277 +#: ../libnm-util/crypto.c:278 #, c-format msgid "Failed to decode certificate." msgstr "Грешка при декодиране на сертификата." -#: ../libnm-util/crypto.c:286 +#: ../libnm-util/crypto.c:287 #, c-format msgid "Not enough memory to store certificate data." msgstr "Няма достатъчно памет за съхраняване на данните от сертификата." -#: ../libnm-util/crypto.c:294 +#: ../libnm-util/crypto.c:295 #, c-format -#| msgid "Not enough memory to store PEM file data." msgid "Not enough memory to store file data." msgstr "Няма достатъчно памет за съхраняване на данните от файла." -#: ../libnm-util/crypto.c:324 +#: ../libnm-util/crypto.c:325 #, c-format msgid "IV must be an even number of bytes in length." msgstr "Началният вектор трябва да е с размер четен брой байта." -#: ../libnm-util/crypto.c:333 +#: ../libnm-util/crypto.c:334 #, c-format msgid "Not enough memory to store the IV." msgstr "Няма достатъчно памет за съхраняване на началния вектор." -#: ../libnm-util/crypto.c:344 +#: ../libnm-util/crypto.c:345 #, c-format msgid "IV contains non-hexadecimal digits." msgstr "Началният вектор съдържа низ, който не е шестнайсетично число." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto.c:383 ../libnm-util/crypto_gnutls.c:148 #: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 #: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Шифърът за частен ключ „%s“ е непознат." -#: ../libnm-util/crypto.c:391 +#: ../libnm-util/crypto.c:392 #, c-format -#| msgid "Not enough memory to store decrypted private key." msgid "Not enough memory to decrypt private key." -msgstr "Няма достатъчно памет за разшифроване на частния ключ." +msgstr "Няма достатъчно памет за дешифриране на частния ключ." -#: ../libnm-util/crypto.c:511 +#: ../libnm-util/crypto.c:512 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Unable to determine private key type." msgstr "Видът на частния ключ не може да се определи." -#: ../libnm-util/crypto.c:530 +#: ../libnm-util/crypto.c:531 #, c-format msgid "Not enough memory to store decrypted private key." -msgstr "Няма достатъчно памет за съхраняване на разшифрования частен ключ." +msgstr "Няма достатъчно памет за съхраняване на дешифрирания частен ключ." #: ../libnm-util/crypto_gnutls.c:49 -#| msgid "Failed to initialize the decryption context." msgid "Failed to initialize the crypto engine." -msgstr "Грешка при инициализиране на модула за шифроване." +msgstr "Грешка при инициализиране на модула за шифриране." #: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Грешка при инициализиране на модула за MD5 – %s / %s." +msgstr "Грешка при инициализиране на модула за MD5 — %s / %s." #: ../libnm-util/crypto_gnutls.c:156 #, c-format @@ -1424,108 +1496,99 @@ msgstr "Неправилен начален вектор (трябва да е #: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." -msgstr "Няма достатъчно памет за буфера за разшифрования ключ." +msgstr "Няма достатъчно памет за буфера за дешифриране." #: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "Грешка при инициализиране на контекста за разшифроване – %s / %s." +msgstr "Грешка при инициализиране на контекста за дешифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "Грешка при задаване на симетричния ключ за разшифроване – %s / %s." +msgstr "Грешка при задаване на симетричния ключ за дешифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." -msgstr "Грешка при задаване на началния вектор за разшифроване – %s / %s." +msgstr "Грешка при задаване на началния вектор за дешифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." -msgstr "Грешка при разшифроване на частния ключ – %s / %s." +msgstr "Грешка при дешифриране на частния ключ — %s / %s." #: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: unexpected padding length." msgstr "" -"Грешка при разшифроване на частния ключ – неочаквана дължина на " +"Грешка при дешифриране на частния ключ — неочаквана дължина на " "подравняването." #: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key." -msgstr "Грешка при разшифроване на частния ключ." +msgstr "Грешка при дешифриране на частния ключ." #: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 #, c-format msgid "Could not allocate memory for encrypting." -msgstr "Няма достатъчно памет за буфер при шифроване." +msgstr "Няма достатъчно памет за буфер при шифриране." #: ../libnm-util/crypto_gnutls.c:294 #, c-format -#| msgid "Failed to initialize the decryption cipher context: %s / %s." msgid "Failed to initialize the encryption cipher context: %s / %s." -msgstr "Грешка при инициализиране на контекста за шифроване – %s / %s." +msgstr "Грешка при инициализиране на контекста за шифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:303 #, c-format -#| msgid "Failed to set symmetric key for decryption: %s / %s." msgid "Failed to set symmetric key for encryption: %s / %s." -msgstr "Грешка при задаване на симетричния ключ за шифроване – %s / %s." +msgstr "Грешка при задаване на симетричния ключ за шифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:313 #, c-format -#| msgid "Failed to set IV for decryption: %s / %s." msgid "Failed to set IV for encryption: %s / %s." -msgstr "Грешка при задаване на началния вектор за шифроване – %s / %s." +msgstr "Грешка при задаване на началния вектор за шифриране — %s / %s." #: ../libnm-util/crypto_gnutls.c:322 #, c-format -#| msgid "Failed to decrypt the private key: %s / %s." msgid "Failed to encrypt the data: %s / %s." -msgstr "Грешка при шифроване на данните – %s / %s." +msgstr "Грешка при шифриране на данните — %s / %s." #: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" -msgstr "Грешка при инициализиране на данните от сертификата – %s" +msgstr "Грешка при инициализиране на данните от сертификата — %s" #: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" -msgstr "Грешка при декодиране на сертификата – %s" +msgstr "Грешка при декодиране на сертификата — %s" #: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" -msgstr "Грешка при инициализиране на модула за декодиране на PKCS#12 – %s" +msgstr "Грешка при инициализиране на модула за декодиране на PKCS#12 — %s" #: ../libnm-util/crypto_gnutls.c:421 #, c-format -#| msgid "Couldn't decode certificate: %s" msgid "Couldn't decode PKCS#12 file: %s" -msgstr "Грешка при декодиране на файла PKCS#12 – %s" +msgstr "Грешка при декодиране на файла PKCS#12 — %s" #: ../libnm-util/crypto_gnutls.c:433 #, c-format -#| msgid "Couldn't decode certificate: %s" msgid "Couldn't verify PKCS#12 file: %s" -msgstr "Грешка при проверка на файла PKCS#12 – %s" +msgstr "Грешка при проверка на файла PKCS#12 — %s" #: ../libnm-util/crypto_nss.c:56 #, c-format -#| msgid "Failed to initialize the MD5 engine: %s / %s." msgid "Failed to initialize the crypto engine: %d." -msgstr "Грешка при инициализиране на модула за шифроване – %d." +msgstr "Грешка при инициализиране на модула за шифриране — %d." #: ../libnm-util/crypto_nss.c:111 #, c-format msgid "Failed to initialize the MD5 context: %d." -msgstr "Грешка при инициализиране на контекста за MD5 – %d." +msgstr "Грешка при инициализиране на контекста за MD5 — %d." #: ../libnm-util/crypto_nss.c:179 #, c-format @@ -1535,135 +1598,123 @@ msgstr "Неправилна дължина на началния вектор ( #: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." -msgstr "Грешка при инициализиране на буфер за шифъра за разшифроване." +msgstr "Грешка при инициализиране на буфер за шифъра за дешифриране." #: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." -msgstr "Грешка при задаване на симетричния ключ за разшифроване." +msgstr "Грешка при задаване на симетричния ключ за дешифриране." #: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." -msgstr "Грешка при задаване на началния вектор за разшифроване." +msgstr "Грешка при задаване на началния вектор за дешифриране." #: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." -msgstr "Грешка при инициализиране на контекста за разшифроване." +msgstr "Грешка при инициализиране на контекста за дешифриране." #: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." -msgstr "Грешка при разшифроване на частния ключ – %d." +msgstr "Грешка при дешифриране на частния ключ — %d." #: ../libnm-util/crypto_nss.c:245 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: decrypted data too large." msgstr "" -"Грешка при разшифроване на частния ключ – твърде много разшифровани данни." +"Грешка при дешифриране на частния ключ — твърде много дешифрирани данни." #: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." -msgstr "Грешка при завършване на разшифроването на частния ключ – %d." +msgstr "Грешка при завършване на дешифрирането на частния ключ — %d." #: ../libnm-util/crypto_nss.c:364 #, c-format -#| msgid "Failed to initialize the decryption cipher slot." msgid "Failed to initialize the encryption cipher slot." -msgstr "Грешка при инициализиране на буфер за шифъра за шифроване." +msgstr "Грешка при инициализиране на буфер за шифъра за шифриране." #: ../libnm-util/crypto_nss.c:372 #, c-format -#| msgid "Failed to set symmetric key for decryption." msgid "Failed to set symmetric key for encryption." -msgstr "Грешка при задаване на симетричния ключ за шифроване." +msgstr "Грешка при задаване на симетричния ключ за шифриране." #: ../libnm-util/crypto_nss.c:380 #, c-format -#| msgid "Failed to set IV for decryption." msgid "Failed to set IV for encryption." -msgstr "Грешка при задаване на началния вектор за шифроване." +msgstr "Грешка при задаване на началния вектор за шифриране." #: ../libnm-util/crypto_nss.c:388 #, c-format -#| msgid "Failed to initialize the decryption context." msgid "Failed to initialize the encryption context." -msgstr "Грешка при инициализиране на контекста за шифроване." +msgstr "Грешка при инициализиране на контекста за шифриране." #: ../libnm-util/crypto_nss.c:396 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to encrypt: %d." -msgstr "Грешка при шифроване – %d." +msgstr "Грешка при шифриране — %d." #: ../libnm-util/crypto_nss.c:404 #, c-format msgid "Unexpected amount of data after encrypting." -msgstr "Неочакван обем данни след шифроване." +msgstr "Неочакван обем данни след шифриране." #: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" -msgstr "Грешка при декодиране на сертификата – %d" +msgstr "Грешка при декодиране на сертификата — %d" #: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" -msgstr "Грешка при преобразуване на паролата в UCS2 – %d" +msgstr "Грешка при преобразуване на паролата в UCS2 — %d" #: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" -msgstr "Грешка при инициализиране на модула за декодиране на PKCS#12 – %d" +msgstr "Грешка при инициализиране на модула за декодиране на PKCS#12 — %d" #: ../libnm-util/crypto_nss.c:519 #, c-format -#| msgid "Couldn't decode certificate: %d" msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Грешка при декодиране на файла с PKCS#12 – %d" +msgstr "Грешка при декодиране на файла с PKCS#12 — %d" #: ../libnm-util/crypto_nss.c:528 #, c-format -#| msgid "Couldn't decode certificate: %d" msgid "Couldn't verify PKCS#12 file: %d" -msgstr "Грешка при проверка на файла с PKCS#12 – %d" +msgstr "Грешка при проверка на файла с PKCS#12 — %d" #: ../libnm-util/crypto_nss.c:557 -#| msgid "Could not decode private key." msgid "Could not generate random data." msgstr "Грешка при генериране на случайни числа." -#: ../libnm-util/nm-utils.c:1975 +#: ../libnm-util/nm-utils.c:1993 #, c-format -#| msgid "Not enough memory to create private key decryption key." msgid "Not enough memory to make encryption key." -msgstr "Няма достатъчно памет за създаването на ключ за шифроване." +msgstr "Няма достатъчно памет за създаването на ключ за шифриране." -#: ../libnm-util/nm-utils.c:2085 -#| msgid "Not enough memory to store PEM file data." +#: ../libnm-util/nm-utils.c:2103 msgid "Could not allocate memory for PEM file creation." msgstr "Няма достатъчно памет за създаването на файл във формат PEM." -#: ../libnm-util/nm-utils.c:2097 +#: ../libnm-util/nm-utils.c:2115 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "" "Няма достатъчно памет за записването на началния вектор във файл във формат " "PEM." -#: ../libnm-util/nm-utils.c:2109 +#: ../libnm-util/nm-utils.c:2127 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "" -"Няма достатъчно памет за записване на ключа за шифроване във файл във формат " +"Няма достатъчно памет за записване на ключа за шифриране във файл във формат " "PEM." -#: ../libnm-util/nm-utils.c:2128 +#: ../libnm-util/nm-utils.c:2146 #, c-format -#| msgid "Not enough memory to store PEM file data." msgid "Could not allocate memory for PEM file data." msgstr "Няма достатъчно памет за данните за файла във формат PEM." @@ -1680,7 +1731,6 @@ msgid "Modify persistent system hostname" msgstr "Промяна на името на хоста" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 -#| msgid "No active connections!" msgid "Modify system connections" msgstr "Промяна на системни връзки" @@ -1705,7 +1755,6 @@ msgstr "" "безжична мрежа" #: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 -#| msgid "No network connection" msgid "Allow control of network connections" msgstr "Разрешаване на управлението на мрежовите връзки" @@ -1718,15 +1767,19 @@ msgid "Enable or disable WiFi devices" msgstr "Включване и изключване на устройства за безжични мрежи" #: ../policy/org.freedesktop.NetworkManager.policy.in.h:4 +msgid "Enable or disable WiMAX mobile broadband devices" +msgstr "" +"Включване и изключване на устройства за достъп до мобилни мрежи по WiMAX" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 msgid "Enable or disable mobile broadband devices" msgstr "Включване и изключване на устройства за достъп до мобилни мрежи" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 -#| msgid "Enable _Networking" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6 msgid "Enable or disable system networking" msgstr "Включване и изключване на мрежата на системно ниво" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 msgid "" "Put NetworkManager to sleep or wake it up (should only be used by system " "power management)" @@ -1734,34 +1787,41 @@ msgstr "" "Приспиване и събуждане на NetworkManager (за целите на модула за управление " "на захранването на системата)" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 msgid "System policy prevents control of network connections" msgstr "Политиката на системата не позволява управляване на мрежовите връзки" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 msgid "System policy prevents enabling or disabling WiFi devices" msgstr "" "Политиката на системата не позволява включване и изключване на устройства за " "безжични мрежи" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +msgid "" +"System policy prevents enabling or disabling WiMAX mobile broadband devices" +msgstr "" +"Политиката на системата не позволява включване и изключване на устройства за " +"мобилни мрежи по WiMAX" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 msgid "System policy prevents enabling or disabling mobile broadband devices" msgstr "" "Политиката на системата не позволява включване и изключване на устройства за " "мобилни мрежи" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 msgid "System policy prevents enabling or disabling system networking" msgstr "" "Политиката на системата не позволява включване и изключване на мрежата на " "системно ниво" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13 msgid "System policy prevents putting NetworkManager to sleep or waking it up" msgstr "" "Политиката на системата не позволява приспиване и събуждане на NetworkManager" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14 msgid "System policy prevents use of user-specific connections" msgstr "" "Политиката на системата не позволява използване на потребителски връзки" @@ -1770,7 +1830,7 @@ msgstr "" #: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" -msgstr "грешка при обработката на съобщение от мрежовия слой – %s" +msgstr "грешка при обработката на съобщение от мрежовия слой — %s" #: ../src/nm-netlink-monitor.c:214 msgid "error occurred while waiting for data on socket" @@ -1785,7 +1845,6 @@ msgstr "" #: ../src/nm-netlink-monitor.c:265 #, c-format -#| msgid "unable to allocate netlink handle for monitoring link status: %s" msgid "unable to enable netlink handle credential passing: %s" msgstr "" "грешка при включване на предаването на удостоверения в модула на мрежовия " @@ -1807,32 +1866,29 @@ msgstr "" #: ../src/nm-netlink-monitor.c:502 #, c-format -#| msgid "unable to join netlink group for monitoring link status: %s" msgid "unable to join netlink group: %s" msgstr "грешка при присъединяване към групата на мрежовия слой — %s" #: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format -#| msgid "error processing netlink message: %s" msgid "error updating link cache: %s" -msgstr "грешка при обновяване на информацията за връзките – %s" +msgstr "грешка при обновяване на информацията за връзките — %s" -#: ../src/main.c:499 +#: ../src/main.c:518 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "Неправилна опция. Ползвайте --help, за да видите списъка с опции.\n" -#: ../src/main.c:570 +#: ../src/main.c:589 #, c-format -#| msgid "Invalid option. Please use --help to see a list of valid options.\n" msgid "%s. Please use --help to see a list of valid options.\n" msgstr "%s. Ползвайте --help, за да видите списъка с опции.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:328 +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62 msgid "# Created by NetworkManager\n" msgstr "# Създаден от NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:344 +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69 #, c-format msgid "" "# Merged from %s\n" @@ -1858,638 +1914,30 @@ msgstr "Не е намерен „dhcpcd“." msgid "unsupported DHCP client '%s'" msgstr "Клиентът за DHCP „%s“ не се поддържа" -#: ../src/logging/nm-logging.c:146 +#: ../src/logging/nm-logging.c:148 #, c-format msgid "Unknown log level '%s'" msgstr "Непознат праг за съобщенията в журнала „%s“" -#: ../src/logging/nm-logging.c:171 +#: ../src/logging/nm-logging.c:173 #, c-format msgid "Unknown log domain '%s'" msgstr "Непознат домейн за съобщенията в журнала „%s“" -#: ../src/dns-manager/nm-dns-manager.c:384 -#| msgid "NOTE: the glibc resolver does not support more than 3 nameservers." +#: ../src/dns-manager/nm-dns-manager.c:367 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "ЗАБЕЛЕЖКА: libc може да не поддържа повече от 3 сървъра за имена." -#: ../src/dns-manager/nm-dns-manager.c:386 +#: ../src/dns-manager/nm-dns-manager.c:369 msgid "The nameservers listed below may not be recognized." -msgstr "Долните сървъри за имена може да не бъдат разпознати." +msgstr "Следните сървъри за имена може да не бъдат разпознати." #: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "Автоматично %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:3412 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3409 #: ../system-settings/plugins/ifnet/connection_parser.c:49 -#| msgid "Open System" msgid "System" msgstr "Системна" - -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "Парола за безжичната мрежа %s" - -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "Неуспешно свързване към безжичната мрежа „%s“." - -#~ msgid "Error displaying connection information:" -#~ msgstr "Грешка при показване на информацията за връзката:" - -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "Някои ресурси не бяха открити (файлът на glade)!" - -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "Кабелен Етернет (%s)" - -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "Безжичен Етернет (%s)" - -#~ msgid "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Авторски права © 2004—2006 Red Hat, Inc.\n" -#~ "Авторски права © 2004—2006 Novell, Inc." - -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "" -#~ "Аплет за областта за уведомяване за управление на мрежовите устройства и " -#~ "връзки." - -#~ msgid "translator-credits" -#~ msgstr "" -#~ "Александър Шопов \n" -#~ "\n" -#~ "Проектът за превод на GNOME има нужда от подкрепа.\n" -#~ "Научете повече за нас на http://gnome.cult.bg\n" -#~ "Докладвайте за грешки на http://gnome.cult.bg/bugs<" - -#~ msgid "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Авторски права © 2004—2005 Red Hat, Inc.\n" -#~ "Авторски права © 2005—2006 Novell, Inc." - -#~ msgid "VPN Login Failure" -#~ msgstr "Грешка при идентификация пред ВЧМ" - -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "" -#~ "Неуспех при осъществяването на връзката към ВЧМ „%s“ поради грешка в " -#~ "идентификацията." - -#~ msgid "VPN Start Failure" -#~ msgstr "Грешка при стартиране на ВЧМ" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "" -#~ "Връзката към ВЧМ „%s“ се провали поради грешка при стартиране на " -#~ "програмата за ВЧМ." - -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "Връзката към ВЧМ „%s“ се провали поради грешка при свързването." - -#~ msgid "VPN Configuration Error" -#~ msgstr "Грешка в настройките на ВЧМ" - -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "Връзката към ВЧМ „%s“ е с неправилни настройки." - -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "" -#~ "Връзката към ВЧМ „%s“ се провали, защото настройките на мрежата върнати " -#~ "от сървъра за ВЧМ бяха неправилни." - -#~ msgid "VPN Login Message" -#~ msgstr "Съобщение при идентификация пред ВЧМ" - -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "" -#~ "Аплетът NetworkManager не можа да открие някои задължителни ресурси " -#~ "(файлът на glade)." - -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "Мрежовото устройство „%s (%s)“ не поддържа безжично претърсване." - -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "Мрежовото устройство „%s (%s)“ не поддържа засичане на връзка." - -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "Подготвяне на устройството „%s“ за кабелната мрежа…" - -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "Подготвяне на устройството „%s“ за безжичната мрежа „%s“…" - -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "Настройване на устройството „%s“ за кабелната мрежа…" - -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "Опит за свързване към безжичната мрежа „%s“…" - -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "Изчакване за мрежовия ключ за безжичната мрежа „%s“…" - -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "Запитване на кабелната мрежа за адрес…" - -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "Запитване на безжичната мрежа „%s“ за адрес…" - -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "Завършване на връзката към кабелната мрежа…" - -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "Завършване на връзката към безжичната мрежа „%s“…" - -#~ msgid "NetworkManager is not running" -#~ msgstr "NetworkManager не е включен" - -#~ msgid "Wired network connection" -#~ msgstr "Връзка към кабелна мрежа" - -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "Връзка към инцидентна, безжична мрежа" - -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "Безжична връзка към „%s“ (%d%%)" - -#~ msgid "VPN connection to '%s'" -#~ msgstr "Връзка по ВЧМ към „%s“" - -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "_Свързване към други безжични мрежи…" - -#~ msgid "Create _New Wireless Network..." -#~ msgstr "Създаване на _нова безжична мрежа…" - -#~ msgid "_VPN Connections" -#~ msgstr "_Връзки по ВЧМ" - -#~ msgid "_Configure VPN..." -#~ msgstr "_Настройване на ВЧМ…" - -#~ msgid "_Disconnect VPN..." -#~ msgstr "_Прекъсване на ВЧМ…" - -#~ msgid "_Dial Up Connections" -#~ msgstr "_Връзки по телефонна линия" - -#~ msgid "Connect to %s..." -#~ msgstr "Свързване към %s…" - -#~ msgid "Disconnect from %s..." -#~ msgstr "Прекъсване на връзката към %s…" - -#~ msgid "No network devices have been found" -#~ msgstr "Не са открити мрежови устройства" - -#~ msgid "NetworkManager is not running..." -#~ msgstr "NetworkManager не е включен…" - -#~ msgid "Enable _Wireless" -#~ msgstr "Включване на _безжичната мрежа" - -#~ msgid "Connection _Information" -#~ msgstr "_Информация за връзката" - -#~ msgid "_Help" -#~ msgstr "_Помощ" - -#~ msgid "_About" -#~ msgstr "_Относно" - -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "" -#~ "Аплетът NetworkManager не може да открие необходим ресурс. Програмата не " -#~ "може да продължи работа.\n" - -#~ msgid "Shared Key" -#~ msgstr "Споделен ключ" - -#~ msgid "Automatic (Default)" -#~ msgstr "Автоматично (по подразбиране)" - -#~ msgid "Dynamic WEP" -#~ msgstr "Динамичен WEP" - -#~ msgid "WEP 64/128-bit ASCII" -#~ msgstr "40/128-битов ключ за WEP в ASCII" - -#~ msgid "WEP 64/128-bit Hex" -#~ msgstr "40/128-битов шестнадесетичен ключ за WEP" - -#~ msgid "TLS" -#~ msgstr "TLS" - -#~ msgid "TTLS" -#~ msgstr "TTLS" - -#~ msgid "WPA2 Enterprise" -#~ msgstr "WPA2 Enterprise" - -#~ msgid "WPA2 Personal" -#~ msgstr "WPA2 Personal" - -#~ msgid "WPA Personal" -#~ msgstr "WPA Personal" - -#~ msgid "Orientation" -#~ msgstr "Ориентация" - -#~ msgid "The orientation of the tray." -#~ msgstr "Ориентацията на тавата" - -#~ msgid "Wired Network (%s)" -#~ msgstr "Кабелна мрежа (%s)" - -#~ msgid "_Wired Network" -#~ msgstr "_Кабелна мрежа" - -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "Безжична мрежа (%s)" -#~ msgstr[1] "Безжични мрежи (%s)" - -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "Безжична мрежа" -#~ msgstr[1] "Безжични мрежи" - -#~ msgid " (invalid Unicode)" -#~ msgstr " (невалиден Уникод)" - -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "" -#~ "По подразбиране името на безжичната мрежа е името на компютъра ви, „%s“, " -#~ "без шифриране" - -#~ msgid "Create new wireless network" -#~ msgstr "Създаване на нова безжична мрежа" - -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "" -#~ "Въведете името и настройките на сигурността на безжичната мрежа, която " -#~ "искате да създадете." - -#~ msgid "Create New Wireless Network" -#~ msgstr "Създаване на нова безжична мрежа" - -#~ msgid "Existing wireless network" -#~ msgstr "Съществуваща безжична мрежа" - -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "" -#~ "Въведете името на безжичната мрежа, към която искате да се свържете." - -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "Свързване към друга безжична мрежа" - -#~ msgid "Error connecting to wireless network" -#~ msgstr "Грешка при свързване към друга безжична мрежа" - -#~ msgid "" -#~ "The requested wireless network requires security capabilities unsupported " -#~ "by your hardware." -#~ msgstr "Хардуерът ви не поддържа изискванията на поисканата безжична мрежа." - -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "Връзката към ВЧМ „%s“ не може да бъде стартирана" - -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "" -#~ "Диалоговата кутия за идентификация пред ВЧМ „%s“ не може да бъде открита. " -#~ "Свържете се със системния администратор." - -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "" -#~ "Имаше проблем с показването на диалоговата кутия за идентификация пред " -#~ "ВЧМ „%s“. Свържете се със системния администратор." - -#~ msgid " " -#~ msgstr " " - -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "" -#~ "Информация за действащата връзка" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "Безжичната мрежа изисква парола\n" -#~ "\n" -#~ "Необходима е парола или ключ за шифриране, за да се свържете с безжичната " -#~ "мрежа „%s“." - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "Ограничена функционалност на " -#~ "мрежата\n" -#~ "\n" -#~ "%s няма да функционира изцяло." - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "Потвърждение за свързване към " -#~ "безжична мрежа\n" -#~ "\n" -#~ "Избрали сте да се свържете към безжичната мрежа „%s“. Ако сте уверени, че " -#~ "тя е сигурна и можете да ѝ се доверите, задайте настройката отдолу и " -#~ "NetworkManager няма да ви иска потвърждения при следващи влизания." - -#~ msgid "Anonymous Identity:" -#~ msgstr "Анонимна идентичност:" - -#~ msgid "Authentication:" -#~ msgstr "Идентификация:" - -#~ msgid "Broadcast Address:" -#~ msgstr "Адрес за разпръскване:" - -#~ msgid "CA Certificate File:" -#~ msgstr "Файл със сертификатите на сертифициращите организации:" - -#~ msgid "Client Certificate File:" -#~ msgstr "Файл с клиентските сертификати:" - -#~ msgid "Default Route:" -#~ msgstr "Маршрут по подразбиране:" - -#~ msgid "Destination Address:" -#~ msgstr "Целеви адрес:" - -#~ msgid "Driver:" -#~ msgstr "Драйвер:" - -#~ msgid "EAP Method:" -#~ msgstr "Метод за EAP:" - -#~ msgid "Hardware Address:" -#~ msgstr "Хардуерен адрес:" - -#~ msgid "IP Address:" -#~ msgstr "IP адрес:" - -#~ msgid "Identity:" -#~ msgstr "Идентичност:" - -#~ msgid "Interface:" -#~ msgstr "Интерфейс:" - -#~ msgid "Key Type:" -#~ msgstr "Вид ключ:" - -#~ msgid "Key management:" -#~ msgstr "Управление на ключове:" - -#~ msgid "Key:" -#~ msgstr "Ключ:" - -#~ msgid "" -#~ "None\n" -#~ "WEP 128-bit Passphrase\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" -#~ msgstr "" -#~ "Няма\n" -#~ "128 битова парола WEP\n" -#~ "40/128-битов шестнадесетичен ключ за WEP\n" -#~ "40/128-битов ключ за WEP в ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "Открита система\n" -#~ "Споделен ключ" - -#~ msgid "Other Wireless Network..." -#~ msgstr "Друга безжична мрежа…" - -#~ msgid "Passphrase:" -#~ msgstr "Парола:" - -#~ msgid "Password:" -#~ msgstr "Парола:" - -#~ msgid "Primary DNS:" -#~ msgstr "Основен сървър за DNS:" - -#~ msgid "Private Key File:" -#~ msgstr "Файл с частните ключове:" - -#~ msgid "Private Key Password:" -#~ msgstr "Парола за частния ключ:" - -#~ msgid "Secondary DNS:" -#~ msgstr "Допълнителен сървър за DNS:" - -#~ msgid "Select the CA Certificate File" -#~ msgstr "Избор на файла със сертификатите на сертифициращите организации" - -#~ msgid "Select the Client Certificate File" -#~ msgstr "Избор на файла с клиентските сертификати" - -#~ msgid "Select the Private Key File" -#~ msgstr "Избор на файла с частните ключове" - -#~ msgid "Show key" -#~ msgstr "Показване на ключа" - -#~ msgid "Show passphrase" -#~ msgstr "Показване на паролата" - -#~ msgid "Show password" -#~ msgstr "Показване на паролата" - -#~ msgid "Show passwords" -#~ msgstr "Показване на паролите" - -#~ msgid "Speed:" -#~ msgstr "Скорост:" - -#~ msgid "Subnet Mask:" -#~ msgstr "Маска на подмрежата:" - -#~ msgid "Type:" -#~ msgstr "Вид:" - -#~ msgid "User Name:" -#~ msgstr "Потребителско име:" - -#~ msgid "Wireless Network Key Required" -#~ msgstr "Необходим е ключ за безжична мрежа" - -#~ msgid "Wireless _adapter:" -#~ msgstr "Безжичен _адаптер:" - -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "_Постоянно доверие на тази безжична мрежа" - -#~ msgid "_Don't remind me again" -#~ msgstr "_Да няма нови напомняния" - -#~ msgid "_Fallback on this Network" -#~ msgstr "Тази мрежа да е и _резервна" - -#~ msgid "_Login to Network" -#~ msgstr "_Свързване към мрежа" - -#~ msgid "_Network Name:" -#~ msgstr "_Име на мрежа:" - -#~ msgid "_Wireless Security:" -#~ msgstr "_Безжична сигурност:" - -#~ msgid "Cannot add VPN connection" -#~ msgstr "Не може да се добави връзка към ВЧМ" - -#~ msgid "" -#~ "No suitable VPN software was found on your system. Contact your system " -#~ "administrator." -#~ msgstr "" -#~ "Не е открит подходящ софтуер за ВЧМ. Свържете се със системния " -#~ "администратор." - -#~ msgid "Cannot import VPN connection" -#~ msgstr "Връзката към ВЧМ не може да се внесе" - -#~ msgid "" -#~ "Cannot find suitable software for VPN connection type '%s' to import the " -#~ "file '%s'. Contact your system administrator." -#~ msgstr "" -#~ "Файлът „%2$s“ не може да се внесе, защото не може да се открие подходящ " -#~ "софтуер за връзка към ВЧМ от вида „%1$s“. Свържете се със системния " -#~ "администратор." - -#~ msgid "" -#~ "Could not find the UI files for VPN connection type '%s'. Contact your " -#~ "system administrator." -#~ msgstr "" -#~ "Файловете с описание на графичния интерфейс за връзки към ВЧМ от вида „%" -#~ "s“ не могат да бъдат открити. Свържете се със системния администратор." - -#~ msgid "Delete VPN connection \"%s\"?" -#~ msgstr "Да се изтрие ли връзката към ВЧМ „%s“?" - -#~ msgid "" -#~ "All information about the VPN connection \"%s\" will be lost and you may " -#~ "need your system administrator to provide information to create a new " -#~ "connection." -#~ msgstr "" -#~ "Цялата информация за връзката към ВЧМ „%s“ ще бъде изтрита и може да се " -#~ "наложи да я искате наново от системния администратор, ако искате да я " -#~ "създадете наново." - -#~ msgid "Unable to load" -#~ msgstr "Неуспех при зареждане" - -#~ msgid "Cannot find some needed resources (the glade file)!" -#~ msgstr "Някои ресурси не бяха открити (файлът на glade)!" - -#~ msgid "Create VPN Connection" -#~ msgstr "Създаване на връзка към ВЧМ" - -#~ msgid "Edit VPN Connection" -#~ msgstr "Редактиране на връзка към ВЧМ" - -#~ msgid "Add a new VPN connection" -#~ msgstr "Добавяне на нова връзка към ВЧМ" - -#~ msgid "Delete the selected VPN connection" -#~ msgstr "Изтриване на избраната връзка към ВЧМ" - -#~ msgid "E_xport" -#~ msgstr "_Изнасяне" - -#~ msgid "Edit the selected VPN connection" -#~ msgstr "Редактиране на избраната връзка към ВЧМ" - -#~ msgid "Export the VPN settings to a file" -#~ msgstr "Изнасяне на настройките за ВЧМ във файл" - -#~ msgid "Export the selected VPN connection to a file" -#~ msgstr "Изнасяне на избраната връзка към ВЧМ във файл" - -#~ msgid "Manage Virtual Private Network Connections" -#~ msgstr "Управление на връзките към ВЧМ" - -#~ msgid "40-bit WEP" -#~ msgstr "40-битов WEP" - -#~ msgid "104-bit WEP" -#~ msgstr "104-битов WEP" - -#~ msgid "WPA CCMP" -#~ msgstr "WPA CCMP" - -#~ msgid "WPA Automatic" -#~ msgstr "Автоматичен WPA" - -#~ msgid "WPA2 CCMP" -#~ msgstr "WPA2 CCMP" - -#~ msgid "WPA2 Automatic" -#~ msgstr "Автоматичен WPA2" - -#~ msgid "operation took too long" -#~ msgstr "операцията продължи прекалено дълго" - -#~ msgid "received data from wrong type of sender" -#~ msgstr "получени са данни от неправилен вид изпращач" - -#~ msgid "received data from unexpected sender" -#~ msgstr "получени са данни от неочакван изпращач" - -#~ msgid "too much data was sent over socket and some of it was lost" -#~ msgstr "" -#~ "през гнездото са получени прекалено много данни и някои от тях са загубени" - -#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." -#~ msgstr "Свързали сте се към инцидентната, безжична мрежа „%s“." - -#~ msgid "You are now connected to the wireless network '%s'." -#~ msgstr "Свързани сте към безжичната мрежа „%s“." - -#~ msgid "You are now connected to the wired network." -#~ msgstr "Свързани сте към кабелната мрежа." - -#~ msgid "LEAP" -#~ msgstr "LEAP" diff --git a/po/ca.po b/po/ca.po index ebe35d55..d4e6c8e2 100644 --- a/po/ca.po +++ b/po/ca.po @@ -4,1206 +4,1951 @@ # NetworkManager package. # Josep Puigdemont Casamajó , 2005, 2006. # David Planella , 2009. +# Joan Duran , 2010. # msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-01-10 17:02+0000\n" -"PO-Revision-Date: 2009-01-21 17:51+0100\n" -"Last-Translator: David Planella \n" +"POT-Creation-Date: 2011-01-23 15:24+0000\n" +"PO-Revision-Date: 2011-01-23 21:26+0100\n" +"Last-Translator: Joan Duran \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ../libnm-util/crypto.c:120 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:78 +#: ../cli/src/devices.c:92 ../cli/src/devices.c:105 ../cli/src/devices.c:115 +#: ../cli/src/devices.c:125 ../cli/src/devices.c:138 ../cli/src/devices.c:151 +#: ../cli/src/devices.c:162 ../cli/src/devices.c:173 ../cli/src/devices.c:182 +#: ../cli/src/devices.c:191 ../cli/src/devices.c:212 +msgid "NAME" +msgstr "NOM" + +#. 0 +#: ../cli/src/connections.c:63 ../cli/src/connections.c:79 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:64 +msgid "DEVICES" +msgstr "DISPOSITIUS" + +#. 2 +#: ../cli/src/connections.c:65 ../cli/src/connections.c:81 +msgid "SCOPE" +msgstr "ABAST" + +#. 3 +#: ../cli/src/connections.c:66 +msgid "DEFAULT" +msgstr "PREDETERMINAT" + +#. 4 +#: ../cli/src/connections.c:67 +msgid "DBUS-SERVICE" +msgstr "SERVEI-DBUS" + +#. 5 +#: ../cli/src/connections.c:68 +msgid "SPEC-OBJECT" +msgstr "OBJECTE-ESPEC" + +#. 6 +#: ../cli/src/connections.c:69 +msgid "VPN" +msgstr "VPN" + +#. 7 +#. 2 +#. 11 +#. 5 +#: ../cli/src/connections.c:70 ../cli/src/connections.c:86 +#: ../cli/src/devices.c:65 ../cli/src/devices.c:203 ../cli/src/devices.c:218 +msgid "DBUS-PATH" +msgstr "CAMÍ-DBUS" + +#. 1 +#. 0 +#. 1 +#. 2 +#: ../cli/src/connections.c:80 ../cli/src/devices.c:63 ../cli/src/devices.c:94 +#: ../cli/src/devices.c:215 +msgid "TYPE" +msgstr "TIPUS" + +#. 3 +#: ../cli/src/connections.c:82 +msgid "TIMESTAMP" +msgstr "MARCA-HORÀRIA" + +#. 4 +#: ../cli/src/connections.c:83 +msgid "TIMESTAMP-REAL" +msgstr "MARCA-HORÀRIA-REAL" + +#. 5 +#: ../cli/src/connections.c:84 +msgid "AUTOCONNECT" +msgstr "CONNEXIÓ-AUTOMÀTICA" + +#. 6 +#: ../cli/src/connections.c:85 +msgid "READONLY" +msgstr "NOMÉS-LECTURA" + +#: ../cli/src/connections.c:164 #, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "El fitxer de clau PEM no té l'etiqueta de final «%s»." +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [nsp ] [--" +"nowait] [--timeout ]\n" +" down id | uuid \n" +msgstr "" +"Utilització: nmcli con { ORDRE | help }\n" +" ORDRE := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [nsp ] [--" +"nowait] [--timeout ]\n" +" down id | uuid \n" -#: ../libnm-util/crypto.c:130 +#: ../cli/src/connections.c:204 ../cli/src/connections.c:554 #, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "Aquest no sembla que sigui un fitxer de clau privada PEM." +msgid "Error: 'con list': %s" +msgstr "Error: «con list»: %s" -#: ../libnm-util/crypto.c:138 +#: ../cli/src/connections.c:206 ../cli/src/connections.c:556 #, c-format -msgid "Not enough memory to store PEM file data." -msgstr "No hi ha prou memòria per a emmagatzemar les dades del fitxer PEM." - -#: ../libnm-util/crypto.c:154 +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Error: «con list»: %s; camps permesos: %s" + +#: ../cli/src/connections.c:214 +msgid "Connection details" +msgstr "Detalls de la connexió" + +#: ../cli/src/connections.c:398 ../cli/src/connections.c:619 +msgid "system" +msgstr "sistema" + +#: ../cli/src/connections.c:398 ../cli/src/connections.c:619 +msgid "user" +msgstr "usuari" + +#: ../cli/src/connections.c:400 +msgid "never" +msgstr "mai" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:401 ../cli/src/connections.c:402 +#: ../cli/src/connections.c:620 ../cli/src/connections.c:623 +#: ../cli/src/devices.c:469 ../cli/src/devices.c:521 ../cli/src/devices.c:643 +#: ../cli/src/devices.c:669 ../cli/src/devices.c:670 ../cli/src/devices.c:671 +#: ../cli/src/devices.c:672 ../cli/src/devices.c:673 ../cli/src/settings.c:520 +#: ../cli/src/settings.c:563 ../cli/src/settings.c:664 +#: ../cli/src/settings.c:938 ../cli/src/settings.c:939 +#: ../cli/src/settings.c:941 ../cli/src/settings.c:943 +#: ../cli/src/settings.c:1068 ../cli/src/settings.c:1069 +#: ../cli/src/settings.c:1070 ../cli/src/settings.c:1149 +#: ../cli/src/settings.c:1150 ../cli/src/settings.c:1151 +#: ../cli/src/settings.c:1152 ../cli/src/settings.c:1153 +#: ../cli/src/settings.c:1154 ../cli/src/settings.c:1155 +#: ../cli/src/settings.c:1156 ../cli/src/settings.c:1157 +#: ../cli/src/settings.c:1158 ../cli/src/settings.c:1159 +#: ../cli/src/settings.c:1160 ../cli/src/settings.c:1161 +#: ../cli/src/settings.c:1236 +msgid "yes" +msgstr "sí" + +#: ../cli/src/connections.c:401 ../cli/src/connections.c:402 +#: ../cli/src/connections.c:620 ../cli/src/connections.c:623 +#: ../cli/src/devices.c:469 ../cli/src/devices.c:521 ../cli/src/devices.c:643 +#: ../cli/src/devices.c:669 ../cli/src/devices.c:670 ../cli/src/devices.c:671 +#: ../cli/src/devices.c:672 ../cli/src/devices.c:673 ../cli/src/settings.c:520 +#: ../cli/src/settings.c:522 ../cli/src/settings.c:563 +#: ../cli/src/settings.c:664 ../cli/src/settings.c:938 +#: ../cli/src/settings.c:939 ../cli/src/settings.c:941 +#: ../cli/src/settings.c:943 ../cli/src/settings.c:1068 +#: ../cli/src/settings.c:1069 ../cli/src/settings.c:1070 +#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1150 +#: ../cli/src/settings.c:1151 ../cli/src/settings.c:1152 +#: ../cli/src/settings.c:1153 ../cli/src/settings.c:1154 +#: ../cli/src/settings.c:1155 ../cli/src/settings.c:1156 +#: ../cli/src/settings.c:1157 ../cli/src/settings.c:1158 +#: ../cli/src/settings.c:1159 ../cli/src/settings.c:1160 +#: ../cli/src/settings.c:1161 ../cli/src/settings.c:1236 +msgid "no" +msgstr "no" + +#: ../cli/src/connections.c:475 ../cli/src/connections.c:518 +msgid "System connections" +msgstr "Connexions del sistema" + +#: ../cli/src/connections.c:480 ../cli/src/connections.c:531 +msgid "User connections" +msgstr "Connexions d'usuari" + +#: ../cli/src/connections.c:492 ../cli/src/connections.c:1487 +#: ../cli/src/connections.c:1503 ../cli/src/connections.c:1512 +#: ../cli/src/connections.c:1521 ../cli/src/connections.c:1532 +#: ../cli/src/connections.c:1617 ../cli/src/devices.c:1117 +#: ../cli/src/devices.c:1127 ../cli/src/devices.c:1229 +#: ../cli/src/devices.c:1236 ../cli/src/devices.c:1435 +#: ../cli/src/devices.c:1442 #, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "" -"El format del fitxer PEM és incorrecte: la primera etiqueta no és la de Proc-" -"Type." +msgid "Error: %s argument is missing." +msgstr "Error: Falta l'argument %s." -#: ../libnm-util/crypto.c:162 +#: ../cli/src/connections.c:505 #, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "" -"El format del fitxer PEM és incorrecte: l'etiqueta de Proc-Type «%s» és " -"desconeguda." +msgid "Error: %s - no such connection." +msgstr "Error: %s - no existeix la connexió." -#: ../libnm-util/crypto.c:172 +#: ../cli/src/connections.c:537 ../cli/src/connections.c:1545 +#: ../cli/src/connections.c:1635 ../cli/src/devices.c:940 +#: ../cli/src/devices.c:1007 ../cli/src/devices.c:1141 +#: ../cli/src/devices.c:1242 ../cli/src/devices.c:1448 #, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "" -"El format del fitxer PEM és incorrecte: la segona etiqueta no és la de DEK-" -"Info." +msgid "Unknown parameter: %s\n" +msgstr "Paràmetre desconegut: %s\n" -#: ../libnm-util/crypto.c:183 +#: ../cli/src/connections.c:546 #, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "" -"El format del fitxer PEM és incorrecte: no s'ha trobat cap vector " -"d'inicialització a l'etiqueta de DEK-Info." +msgid "Error: no valid parameter specified." +msgstr "Error: No s'ha especificat cap paràmetre vàlid." -#: ../libnm-util/crypto.c:190 +#: ../cli/src/connections.c:561 ../cli/src/connections.c:1738 +#: ../cli/src/devices.c:1646 ../cli/src/network-manager.c:401 #, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "" -"El format del fitxer PEM és incorrecte: el format del vector " -"d'inicialització a l'etiqueta DEK-Info no és vàlid." +msgid "Error: %s." +msgstr "Error: %s." -#: ../libnm-util/crypto.c:203 +#: ../cli/src/connections.c:668 #, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "" -"El format del fitxer PEM és incorrecte: el criptògraf «%s» de clau privada és " -"desconegut." +msgid "Error: 'con status': %s" +msgstr "Error: «con status»: %s" -#: ../libnm-util/crypto.c:222 +#: ../cli/src/connections.c:670 #, c-format -msgid "Could not decode private key." -msgstr "No s'ha pogut descodificar la clau privada." +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Error: «con status»: %s; camps permesos: %s" -#: ../libnm-util/crypto.c:267 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "No s'ha trobat l'etiqueta de tancament «%s» al certificat PEM «%s»." +#: ../cli/src/connections.c:677 +msgid "Active connections" +msgstr "Connexions actives" -#: ../libnm-util/crypto.c:277 +#: ../cli/src/connections.c:1159 #, c-format -msgid "Failed to decode certificate." -msgstr "No s'ha pogut descodificar el certificat." +msgid "no active connection on device '%s'" +msgstr "no hi ha cap connexió activa al dispositiu «%s»" -#: ../libnm-util/crypto.c:286 +#: ../cli/src/connections.c:1167 #, c-format -msgid "Not enough memory to store certificate data." -msgstr "No hi ha prou memòria per a emmagatzemar les dades del certificat." +msgid "no active connection or device" +msgstr "connexió o dispositiu no actiu" -#: ../libnm-util/crypto.c:294 +#: ../cli/src/connections.c:1236 #, c-format -msgid "Not enough memory to store file data." -msgstr "No hi ha prou memòria per a emmagatzemar les dades del fitxer." +msgid "device '%s' not compatible with connection '%s'" +msgstr "el dispositiu «%s» no és compatible amb la connexió «%s»" -#: ../libnm-util/crypto.c:324 +#: ../cli/src/connections.c:1238 #, c-format -msgid "IV must be an even number of bytes in length." -msgstr "" -"La llargada del vector d'inicialització ha de ser un nombre parell de bytes." +msgid "no device found for connection '%s'" +msgstr "no s'ha trobat cap dispositiu per a la connexió «%s»" -#: ../libnm-util/crypto.c:333 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "No hi ha prou memòria per a emmagatzemar el vector d'inicialització." +#: ../cli/src/connections.c:1249 +msgid "activating" +msgstr "s'està activant" -#: ../libnm-util/crypto.c:344 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "El vector d'inicialització conté dígits que no són hexadecimals." +#: ../cli/src/connections.c:1251 +msgid "activated" +msgstr "activada" -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "Es desconeix el criptògraf «%s» de la clau privada." +#: ../cli/src/connections.c:1254 ../cli/src/connections.c:1277 +#: ../cli/src/connections.c:1310 ../cli/src/devices.c:281 +#: ../cli/src/devices.c:644 ../cli/src/network-manager.c:98 +#: ../cli/src/network-manager.c:156 ../cli/src/settings.c:485 +msgid "unknown" +msgstr "desconegut" -#: ../libnm-util/crypto.c:391 -#, c-format -msgid "Not enough memory to decrypt private key." -msgstr "No hi ha prou memòria per a desencriptar a la clau privada." +#: ../cli/src/connections.c:1263 +msgid "VPN connecting (prepare)" +msgstr "S'està connectant a la VPN (preparació)" -#: ../libnm-util/crypto.c:511 -#, c-format -msgid "Unable to determine private key type." -msgstr "No s'ha pogut determinar el tipus de la clau privada." +#: ../cli/src/connections.c:1265 +msgid "VPN connecting (need authentication)" +msgstr "S'està connectant a la VPN (cal autenticació)" -#: ../libnm-util/crypto.c:530 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "" -"No hi ha prou memòria per a emmagatzemar la clau privada desencriptada." +#: ../cli/src/connections.c:1267 +msgid "VPN connecting" +msgstr "S'està connectant a la VPN" -#: ../libnm-util/crypto_gnutls.c:46 -msgid "Failed to initialize the crypto engine." -msgstr "No s'ha pogut inicialitzar el motor criptogràfic." +#: ../cli/src/connections.c:1269 +msgid "VPN connecting (getting IP configuration)" +msgstr "S'està connectant a la VPN (obtenció de la configuració d'IP)" -#: ../libnm-util/crypto_gnutls.c:90 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "No s'ha pogut inicialitzar el motor MD5: %s / %s." +#: ../cli/src/connections.c:1271 +msgid "VPN connected" +msgstr "S'ha connectat a la VPN" -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "No hi ha prou memòria per al búfer de la clau desencriptada." +#: ../cli/src/connections.c:1273 +msgid "VPN connection failed" +msgstr "No s'ha pogut connectar a la VPN" -#: ../libnm-util/crypto_gnutls.c:160 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "" -"No s'ha pogut inicialitzar el context del criptògraf de desencriptació: %s / " -"%s." +#: ../cli/src/connections.c:1275 +msgid "VPN disconnected" +msgstr "S'ha desconnectat la VPN" -#: ../libnm-util/crypto_gnutls.c:169 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "" -"No s'ha pogut definir la clau simètrica per a la desencriptació: %s / %s." +#: ../cli/src/connections.c:1286 +msgid "unknown reason" +msgstr "raó desconeguda" -#: ../libnm-util/crypto_gnutls.c:178 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "" -"No s'ha pogut definir el vector d'inicialització per a la desencriptació: %" -"s / %s." +#: ../cli/src/connections.c:1288 +msgid "none" +msgstr "cap" -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "No s'ha pogut desencriptar la clau privada: %s / %s." +#: ../cli/src/connections.c:1290 +msgid "the user was disconnected" +msgstr "l'usuari s'ha desconnectat" -#: ../libnm-util/crypto_gnutls.c:200 -#, c-format -msgid "Failed to decrypt the private key." -msgstr "No s'ha pogut desencriptar la clau privada." +#: ../cli/src/connections.c:1292 +msgid "the base network connection was interrupted" +msgstr "la connexió de xarxa de base es va interrompre" -#: ../libnm-util/crypto_gnutls.c:235 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "S'ha produït un error en inicialitzar les dades del certificat: %s" +#: ../cli/src/connections.c:1294 +msgid "the VPN service stopped unexpectedly" +msgstr "el servei VPN es va parar inesperadament" -#: ../libnm-util/crypto_gnutls.c:257 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "No s'ha pogut descodificar el certificat: %s" +#: ../cli/src/connections.c:1296 +msgid "the VPN service returned invalid configuration" +msgstr "el servei VPN ha retornat una configuració no vàlida" -#: ../libnm-util/crypto_gnutls.c:281 -#, c-format -msgid "Couldn't initialize PKCS#12 decoder: %s" -msgstr "No s'ha pogut inicialitzar el descodificador PKCS#12: %s" +#: ../cli/src/connections.c:1298 +msgid "the connection attempt timed out" +msgstr "l'intent de connexió ha excedit el temps" -#: ../libnm-util/crypto_gnutls.c:294 -#, c-format -msgid "Couldn't decode PKCS#12 file: %s" -msgstr "No s'ha pogut descodificar el fitxer PKCS#12: %s" +#: ../cli/src/connections.c:1300 +msgid "the VPN service did not start in time" +msgstr "el servei VPN no s'ha iniciat a temps" -#: ../libnm-util/crypto_gnutls.c:306 -#, c-format -msgid "Couldn't verify PKCS#12 file: %s" -msgstr "No s'ha pogut verificar el fitxer PKCS#12: %s" +#: ../cli/src/connections.c:1302 +msgid "the VPN service failed to start" +msgstr "no s'ha pogut iniciar el servei VPN" + +#: ../cli/src/connections.c:1304 +msgid "no valid VPN secrets" +msgstr "els secrets de la VPN no són vàlids" + +#: ../cli/src/connections.c:1306 +msgid "invalid VPN secrets" +msgstr "els secrets de la VPN no són vàlids" + +#: ../cli/src/connections.c:1308 +msgid "the connection was removed" +msgstr "s'ha suprimit la connexió" -#: ../libnm-util/crypto_nss.c:57 +#: ../cli/src/connections.c:1322 #, c-format -msgid "Failed to initialize the crypto engine: %d." -msgstr "No s'ha pogut inicialitzar el motor criptogràfic: %d" +msgid "state: %s\n" +msgstr "estat: %s\n" -#: ../libnm-util/crypto_nss.c:111 +#: ../cli/src/connections.c:1325 ../cli/src/connections.c:1351 #, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "No s'ha pogut inicialitzar el context MD5: %d." +msgid "Connection activated\n" +msgstr "S'ha activat la connexió\n" -#: ../libnm-util/crypto_nss.c:186 +#: ../cli/src/connections.c:1328 #, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "No s'ha pogut inicialitzar la ranura del criptògraf de desencriptació." +msgid "Error: Connection activation failed." +msgstr "Error: No s'ha pogut activar la connexió." -#: ../libnm-util/crypto_nss.c:196 +#: ../cli/src/connections.c:1347 #, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "No s'ha pogut definir la clau simètrica per a la desencriptació." +msgid "state: %s (%d)\n" +msgstr "estat: %s (%d)\n" -#: ../libnm-util/crypto_nss.c:206 +#: ../cli/src/connections.c:1357 #, c-format -msgid "Failed to set IV for decryption." -msgstr "" -"No s'ha pogut definir el vector d'inicialització per a la desencriptació." +msgid "Error: Connection activation failed: %s." +msgstr "Error: No s'ha pogut activar la connexió: %s." -#: ../libnm-util/crypto_nss.c:214 +#: ../cli/src/connections.c:1374 ../cli/src/devices.c:1064 #, c-format -msgid "Failed to initialize the decryption context." -msgstr "No s'ha pogut inicialitzar el context de desxifratge." +msgid "Error: Timeout %d sec expired." +msgstr "Error: S'ha excedit el temps d'espera de %d segons." -#: ../libnm-util/crypto_nss.c:227 +#: ../cli/src/connections.c:1417 #, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "No s'ha pogut desxifrar la clau privada: %d." +msgid "Error: Connection activation failed: %s" +msgstr "Error: No s'ha pogut activar la connexió: %s" -#: ../libnm-util/crypto_nss.c:239 +#: ../cli/src/connections.c:1431 #, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "No s'ha pogut finalitzar la desencriptació de la clau privada: %d." +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Error: No s'ha pogut obtenir la connexió activa per «%s»." -#: ../libnm-util/crypto_nss.c:284 +#: ../cli/src/connections.c:1440 #, c-format -msgid "Couldn't decode certificate: %d" -msgstr "No s'ha pogut descodificar el certificat: %d" +msgid "Active connection state: %s\n" +msgstr "Estat de la connexió activa: %s\n" -#: ../libnm-util/crypto_nss.c:319 +#: ../cli/src/connections.c:1441 #, c-format -msgid "Couldn't convert password to UCS2: %d" -msgstr "No s'ha pogut convertir la contrasenya a UCS2: %d" +msgid "Active connection path: %s\n" +msgstr "Camí de la connexió activa: %s\n" -#: ../libnm-util/crypto_nss.c:347 +#: ../cli/src/connections.c:1496 ../cli/src/connections.c:1626 #, c-format -msgid "Couldn't initialize PKCS#12 decoder: %d" -msgstr "No s'ha pogut inicialitzar el descodificador PKCS#12: %d" +msgid "Error: Unknown connection: %s." +msgstr "Error: Connexió desconeguda: %s." -#: ../libnm-util/crypto_nss.c:356 +#: ../cli/src/connections.c:1540 ../cli/src/devices.c:1135 #, c-format -msgid "Couldn't decode PKCS#12 file: %d" -msgstr "No s'ha pogut descodificar el fitxer PKCS#12: %d" +msgid "Error: timeout value '%s' is not valid." +msgstr "Error: El valor «%s» del temps d'espera no és vàlid." -#: ../libnm-util/crypto_nss.c:365 +#: ../cli/src/connections.c:1553 ../cli/src/connections.c:1643 #, c-format -msgid "Couldn't verify PKCS#12 file: %d" -msgstr "No s'ha pogut verificar el fitxer PKCS#12: %d" +msgid "Error: id or uuid has to be specified." +msgstr "Error: S'ha d'especificar un ID o UUID." -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:454 +#: ../cli/src/connections.c:1573 #, c-format -msgid "error processing netlink message: %s" -msgstr "s'ha produït un error en processar el missatge netlink: %s" +msgid "Error: No suitable device found: %s." +msgstr "Error: No s'ha trobat cap dispositiu adequat: %s." -#: ../src/nm-netlink-monitor.c:251 +#: ../cli/src/connections.c:1575 #, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "" -"no s'ha pogut assignar el gestor del netlink per a fer un seguiment de " -"l'estat de l'enllaç: %s" +msgid "Error: No suitable device found." +msgstr "Error: No s'ha trobat cap dispositiu adequat." -#: ../src/nm-netlink-monitor.c:261 +#: ../cli/src/connections.c:1670 #, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "" -"no s'ha pogut connectar amb el netlink per a fer un seguiment de l'estat de " -"l'enllaç: %s" +msgid "Warning: Connection not active\n" +msgstr "Avís: La connexió no està activa\n" -#: ../src/nm-netlink-monitor.c:269 +#: ../cli/src/connections.c:1727 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "" -"no s'ha pogut unir el grup del netlink per a fer un seguiment de l'estat de " -"l'enllaç: %s" +msgid "Error: 'con' command '%s' is not valid." +msgstr "Error: L'ordre «con» «%s» no és vàlida." -#: ../src/nm-netlink-monitor.c:277 +#: ../cli/src/connections.c:1763 #, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"no s'ha pogut assignar la memòria cau de l'enllaç del netlink per a fer un " -"seguiment de l'estat de l'enllaç: %s" +msgid "Error: could not connect to D-Bus." +msgstr "Error: No s'ha pogut connectar al D-Bus." -#: ../src/nm-netlink-monitor.c:418 +#: ../cli/src/connections.c:1770 #, c-format -msgid "error updating link cache: %s" -msgstr "s'ha produït un error en actualitzar la memòria cau de l'enllaç: %s" +msgid "Error: Could not get system settings." +msgstr "Error: No s'han pogut obtenir els paràmetres del sistema." -#: ../src/nm-netlink-monitor.c:484 -msgid "error occurred while waiting for data on socket" -msgstr "s'ha produït un error en esperar dades del sòcol" +#: ../cli/src/connections.c:1778 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Error: No s'han pogut obtenir els paràmetres de l'usuari." -#: ../src/NetworkManager.c:293 +#: ../cli/src/connections.c:1788 #, c-format -msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgid "Error: Can't obtain connections: settings services are not running." msgstr "" -"Opció no vàlida. Utilitzeu --help per a veure la llista d'opcions vàlides.\n" - -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:92 -msgid "# Created by NetworkManager\n" -msgstr "# Creat pel NetworkManager\n" - -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:98 +"Error: No es poden obtenir les connexions: no s'estan executant els serveis " +"dels paràmetres." + +#. 0 +#. 9 +#. 3 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:93 ../cli/src/devices.c:201 +#: ../cli/src/devices.c:216 +msgid "DEVICE" +msgstr "DISPOSITIU" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:64 ../cli/src/devices.c:97 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "ESTAT" + +#: ../cli/src/devices.c:74 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:75 +msgid "CAPABILITIES" +msgstr "CAPACITATS" + +#. 1 +#: ../cli/src/devices.c:76 +msgid "WIFI-PROPERTIES" +msgstr "PROPIETATS-WI-FI" + +#. 2 +#: ../cli/src/devices.c:77 +msgid "AP" +msgstr "PUNT-D'ACCÉS" + +#. 3 +#: ../cli/src/devices.c:78 +msgid "WIRED-PROPERTIES" +msgstr "PROPIETATS-AMB-FIL" + +#. 4 +#: ../cli/src/devices.c:79 +msgid "WIMAX-PROPERTIES" +msgstr "PROPIETATS-WIMAX" + +#. 5 +#. 0 +#: ../cli/src/devices.c:80 ../cli/src/devices.c:213 +msgid "NSP" +msgstr "NSP" + +#. 6 +#: ../cli/src/devices.c:81 +msgid "IP4-SETTINGS" +msgstr "PARÀMETRES-IP4" + +#. 7 +#: ../cli/src/devices.c:82 +msgid "IP4-DNS" +msgstr "DNS-IP4" + +#. 8 +#: ../cli/src/devices.c:83 +msgid "IP6-SETTINGS" +msgstr "PARÀMETRES-IP6" + +#. 9 +#: ../cli/src/devices.c:84 +msgid "IP6-DNS" +msgstr "DNS-IP6" + +#. 2 +#: ../cli/src/devices.c:95 +msgid "DRIVER" +msgstr "CONTROLADOR" + +#. 3 +#: ../cli/src/devices.c:96 +msgid "HWADDR" +msgstr "ADREÇA-FÍSICA" + +#. 0 +#: ../cli/src/devices.c:106 +msgid "CARRIER-DETECT" +msgstr "DETECCIÓ-DE-LA-PORTADORA" + +#. 1 +#: ../cli/src/devices.c:107 +msgid "SPEED" +msgstr "VELOCITAT" + +#. 0 +#: ../cli/src/devices.c:116 +msgid "CARRIER" +msgstr "PORTADORA" + +#. 0 +#: ../cli/src/devices.c:126 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:127 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:128 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:129 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:130 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:139 +msgid "CTR-FREQ" +msgstr "FREQ-CTR" + +#. 1 +#: ../cli/src/devices.c:140 +msgid "RSSI" +msgstr "RSSI" + +#. 2 +#: ../cli/src/devices.c:141 +msgid "CINR" +msgstr "CINR" + +#. 3 +#: ../cli/src/devices.c:142 +msgid "TX-POW" +msgstr "FORÇA-TRANSMISSIÓ" + +#. 4 +#: ../cli/src/devices.c:143 +msgid "BSID" +msgstr "BSID" + +#. 0 +#: ../cli/src/devices.c:152 ../cli/src/devices.c:163 +msgid "ADDRESS" +msgstr "ADREÇA" + +#. 1 +#: ../cli/src/devices.c:153 ../cli/src/devices.c:164 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:154 ../cli/src/devices.c:165 +msgid "GATEWAY" +msgstr "PASSAREL·LA" + +#. 0 +#: ../cli/src/devices.c:174 ../cli/src/devices.c:183 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:192 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:193 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:194 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:195 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:196 +msgid "RATE" +msgstr "VELOCITAT" + +#. 5 +#. 1 +#: ../cli/src/devices.c:197 ../cli/src/devices.c:214 +msgid "SIGNAL" +msgstr "SENYAL" + +#. 6 +#: ../cli/src/devices.c:198 +msgid "SECURITY" +msgstr "SEGURETAT" + +#. 7 +#: ../cli/src/devices.c:199 +msgid "WPA-FLAGS" +msgstr "INDICADORS-WPA" + +#. 8 +#: ../cli/src/devices.c:200 +msgid "RSN-FLAGS" +msgstr "INDICADORS-RSN" + +#. 10 +#. 4 +#: ../cli/src/devices.c:202 ../cli/src/devices.c:217 +msgid "ACTIVE" +msgstr "ACTIU" + +#: ../cli/src/devices.c:242 #, c-format msgid "" -"# Merged from %s\n" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi | wimax }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +" wimax [list [iface ] [nsp ]]\n" "\n" msgstr "" -"# Fusionat des de %s\n" +"Utilització: nmcli dev { ORDRE | help }\n" +"\n" +" ORDRE := { status | list | disconnect | wifi | wimax }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +" wimax [list [iface ] [nsp ]]\n" "\n" -#: ../src/dns-manager/nm-dns-manager.c:256 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "" -"NOTA: pot ser que el sistema de resolució de la libc no funcioni amb més de " -"3 servidors de noms." +#: ../cli/src/devices.c:263 +msgid "unmanaged" +msgstr "sense gestió" -#: ../src/dns-manager/nm-dns-manager.c:258 -msgid "The nameservers listed below may not be recognized." -msgstr "Pot ser que no es reconeguin els servidors de noms llistats més avall." +#: ../cli/src/devices.c:265 +msgid "unavailable" +msgstr "no disponible" -#: ../system-settings/src/main.c:381 -#, c-format -msgid "Auto %s" -msgstr "%s automàtic" +#: ../cli/src/devices.c:267 ../cli/src/network-manager.c:95 +msgid "disconnected" +msgstr "desconnectat" -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "Contrasenya per a la xarxa sense fil %s" +#: ../cli/src/devices.c:269 +msgid "connecting (prepare)" +msgstr "s'està connectant (preparació)" -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "Ha fallat la connexió a la xarxa sense fil «%s»." +#: ../cli/src/devices.c:271 +msgid "connecting (configuring)" +msgstr "s'està connectant (configuració)" -#~ msgid "Connection to the wired network failed." -#~ msgstr "Ha fallat la connexió a la xarxa amb fil." +#: ../cli/src/devices.c:273 +msgid "connecting (need authentication)" +msgstr "s'està connectant (cal autenticació)" -#~ msgid "Error displaying connection information:" -#~ msgstr "S'ha produït un error en mostrar la informació de la connexió:" +#: ../cli/src/devices.c:275 +msgid "connecting (getting IP configuration)" +msgstr "s'està connectant (obtenció de la configuració IP)" -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "" -#~ "Alguns dels recursos requerits no s'han pogut trobar (el fitxer glade)!" +#: ../cli/src/devices.c:277 ../cli/src/network-manager.c:93 +msgid "connected" +msgstr "connectat" -#~ msgid "No active connections!" -#~ msgstr "No hi ha cap connexió activa." +#: ../cli/src/devices.c:279 +msgid "connection failed" +msgstr "no s'ha pogut connectar" -#~ msgid "%d Mb/s" -#~ msgstr "%d Mb/s" +#: ../cli/src/devices.c:304 ../cli/src/devices.c:461 ../cli/src/devices.c:504 +msgid "Unknown" +msgstr "Desconegut" -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "Xarxa amb fil (%s)" +#: ../cli/src/devices.c:336 +msgid "(none)" +msgstr "(cap)" -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "Xarxa sense fil (%s)" +#: ../cli/src/devices.c:361 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: s'ha produït un error en convertir l'adreça IP4 0x%X" -#~ msgid "Unknown" -#~ msgstr "Desconegut" +#: ../cli/src/devices.c:430 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" -#~ msgid "NetworkManager Applet" -#~ msgstr "Miniaplicació NetworkManager" +#: ../cli/src/devices.c:431 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" -#~ msgid "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." +#: ../cli/src/devices.c:440 +msgid "Encrypted: " +msgstr "Encriptat: " -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "" -#~ "Miniaplicació per a l'àrea de notificació per a gestionar els vostres " -#~ "dispositius de xarxa i connexions." +#: ../cli/src/devices.c:445 +msgid "WEP " +msgstr "WEP " -#~ msgid "translator-credits" -#~ msgstr "Josep Puigdemont i Casamajó " +#: ../cli/src/devices.c:447 +msgid "WPA " +msgstr "WPA " -#~ msgid "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." +#: ../cli/src/devices.c:449 +msgid "WPA2 " +msgstr "WPA2 " -#~ msgid "VPN Login Failure" -#~ msgstr "S'ha produït un error en l'entrada VPN" +#: ../cli/src/devices.c:452 +msgid "Enterprise " +msgstr "Empresa " -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "" -#~ "Atès que s'ha produït un error en l'entrada, no s'ha pogut iniciar la " -#~ "connexió VPN «%s»." +#: ../cli/src/devices.c:461 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" -#~ msgid "VPN Start Failure" -#~ msgstr "No s'ha pogut iniciar la VPN" +#: ../cli/src/devices.c:461 +msgid "Infrastructure" +msgstr "Infraestructura" -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "" -#~ "No s'ha pogut iniciar la connexió VPN «%s» perquè s'ha produït un error en " -#~ "llançar la VPN." +#: ../cli/src/devices.c:495 +msgid "Home" +msgstr "Casa" -#~ msgid "VPN Connect Failure" -#~ msgstr "S'ha produït un error en la connexió VPN" +#: ../cli/src/devices.c:498 +msgid "Partner" +msgstr "Soci" -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "" -#~ "No s'ha pogut iniciar la connexió VPN «%s» ja que s'ha produït un error de " -#~ "connexió." +#: ../cli/src/devices.c:501 +msgid "Roaming" +msgstr "Itinerància" -#~ msgid "VPN Configuration Error" -#~ msgstr "S'ha produït un error de configuració de la VPN" +#: ../cli/src/devices.c:570 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Error: «dev list»: %s" -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "La connexió VPN «%s» no està correctament configurada." +#: ../cli/src/devices.c:572 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Error: «dev list»: %s; camps permesos: %s" -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "" -#~ "No s'ha pogut iniciar la connexió VPN «%s» perquè el servidor VPN no ha " -#~ "retornat cap configuració de xarxa adequada." +#: ../cli/src/devices.c:581 +msgid "Device details" +msgstr "Detalls del dispositiu" -#~ msgid "VPN Login Message" -#~ msgstr "Missatge d'entrada de la VPN" +#: ../cli/src/devices.c:613 ../cli/src/devices.c:1080 +msgid "(unknown)" +msgstr "(desconegut)" -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "" -#~ "La miniaplicació NetworkManager no ha pogut trobar alguns dels recursos " -#~ "requerits (no s'ha trobat el fitxer glade)." +#: ../cli/src/devices.c:614 +msgid "unknown)" +msgstr "desconegut)" -# FIXME -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "El dispositiu de xarxa «%s (%s)» no permet l'escaneig sense fil." +#: ../cli/src/devices.c:640 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "El dispositiu de xarxa «%s (%s)» no permet la detecció de l'enllaç." +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:713 +msgid "on" +msgstr "actiu" -#~ msgid "(unknown)" -#~ msgstr "(desconegut)" +#: ../cli/src/devices.c:713 +msgid "off" +msgstr "inactiu" -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "S'està preparant el dispositiu %s per a la xarxa amb fil..." +#: ../cli/src/devices.c:963 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Error: «dev status»: %s" -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "S'està preparant el dispositiu %s per a la xarxa sense fil «%s»..." +#: ../cli/src/devices.c:965 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Error: «dev status»: %s; camps permesos: %s" -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "S'està configurant el dispositiu %s per a la xarxa amb fil..." +#: ../cli/src/devices.c:972 +msgid "Status of devices" +msgstr "Estat dels dispositius" -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "S'està intentant entrar a la xarxa sense fil «%s»..." +#: ../cli/src/devices.c:1000 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Error: Falta l'argument «%s»." -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "S'està esperant per a la clau de xarxa de la xarxa sense fil «%s»..." +#: ../cli/src/devices.c:1029 ../cli/src/devices.c:1168 +#: ../cli/src/devices.c:1291 ../cli/src/devices.c:1497 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Error: No s'ha trobat el dispositiu «%s»." -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "S'està sol·licitant una adreça de xarxa per a la xarxa amb fil..." +#: ../cli/src/devices.c:1052 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Èxit: El dispositiu «%s» s'ha desconnectat correctament." -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "" -#~ "S'està sol·licitant una adreça de xarxa per a la xarxa sense fil «%s»..." +#: ../cli/src/devices.c:1077 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Error: No s'ha pogut desconnectar del dispositiu «%s» (%s): %s" -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "S'està finalitzant la connexió a la xarxa amb fil..." +#: ../cli/src/devices.c:1085 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Estat del dispositiu: %d (%s)\n" -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "S'està finalizant la connexió a la xarxa sense fil «%s»..." +#: ../cli/src/devices.c:1149 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Error: S'ha d'especificar l'iface." -#~ msgid "NetworkManager is not running" -#~ msgstr "No s'està executant el NetworkManager" +#: ../cli/src/devices.c:1267 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Error: «dev wifi»: %s" -#~ msgid "Networking disabled" -#~ msgstr "S'ha inhabilitat la xarxa" +#: ../cli/src/devices.c:1269 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Error: «dev wifi»: %s; camps permesos: %s" -#~ msgid "No network connection" -#~ msgstr "No hi ha cap connexió de xarxa" +#: ../cli/src/devices.c:1276 +msgid "WiFi scan list" +msgstr "Llista d'escaneig Wi-Fi" -#~ msgid "Wired network connection" -#~ msgstr "Connexió de xarxa amb fil" +#: ../cli/src/devices.c:1311 ../cli/src/devices.c:1365 +#: ../cli/src/devices.c:1559 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Error: No s'ha trobat el punt d'accés amb l'adreça física «%s»." -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "Connectat a una xarxa Ad-Hoc sense fil" +#: ../cli/src/devices.c:1328 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Error: El dispositiu «%s» no és un dispositiu Wi-Fi." -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "Connexió de xarxa sense fil a «%s» (%d%%)" +#: ../cli/src/devices.c:1392 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Error: L'ordre «%s» de «dev wifi» no és vàlida." -#~ msgid "VPN connection to '%s'" -#~ msgstr "Connexió VPN a «%s»" +#: ../cli/src/devices.c:1473 +#, c-format +msgid "Error: 'dev wimax': %s" +msgstr "Error: «dev wimax»: %s" -#~ msgid "VPN connecting to '%s'" -#~ msgstr "S'està connectant amb VPN a «%s»" +#: ../cli/src/devices.c:1475 +#, c-format +msgid "Error: 'dev wimax': %s; allowed fields: %s" +msgstr "Error: «dev wimax»: %s; camps permesos: %s" -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "_Connecta a d'altres xarxes sense fil..." +#: ../cli/src/devices.c:1482 +msgid "WiMAX NSP list" +msgstr "Llista de WiMAX NSP" -#~ msgid "Create _New Wireless Network..." -#~ msgstr "Crea una xarxa sense fil _nova..." +#: ../cli/src/devices.c:1517 +#, c-format +msgid "Error: NSP with name '%s' not found." +msgstr "Error: No s'ha trobat l'NSP amb el nom «%s»." -#~ msgid "_VPN Connections" -#~ msgstr "Connexions _VPN" +#: ../cli/src/devices.c:1528 +#, c-format +msgid "Error: Device '%s' is not a WiMAX device." +msgstr "Error: El dispositiu «%s» no és un dispositiu WiMAX." -#~ msgid "_Configure VPN..." -#~ msgstr "_Configura la VPN..." +#: ../cli/src/devices.c:1586 +#, c-format +msgid "Error: 'dev wimax' command '%s' is not valid." +msgstr "Error: L'ordre «%s» de «dev wimax» no és vàlida." -#~ msgid "_Disconnect VPN..." -#~ msgstr "_Desconnecta la VPN..." +#: ../cli/src/devices.c:1637 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Error: L'ordre «%s» de «dev» no és vàlida." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "S'ESTÀ-EXECUTANT" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "NET-ENABLED" +msgstr "XARXA-HABILITADA" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI-HARDWARE" +msgstr "MAQUINARI-WI-FI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WIFI" +msgstr "WI-FI" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN-HARDWARE" +msgstr "MAQUINARI-WWAN" + +#. 5 +#: ../cli/src/network-manager.c:41 +msgid "WWAN" +msgstr "WWAN" + +#. 6 +#: ../cli/src/network-manager.c:42 +msgid "WIMAX-HARDWARE" +msgstr "MAQUINARI-WIMAX" + +#. 7 +#: ../cli/src/network-manager.c:43 +msgid "WIMAX" +msgstr "WIMAX" + +#: ../cli/src/network-manager.c:67 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +" wimax [on|off]\n" +"\n" +msgstr "" +"Utilització: nmcli nm { ORDRE | help }\n" +"\n" +" ORDRE := { status | enable | sleep | wifi | wwan | wimax }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +" wimax [on|off]\n" +"\n" -#~ msgid "_Dial Up Connections" -#~ msgstr "Connexions de _marcatge" +#: ../cli/src/network-manager.c:89 +msgid "asleep" +msgstr "dormint" -#~ msgid "Connect to %s..." -#~ msgstr "Connecta a %s..." +#: ../cli/src/network-manager.c:91 +msgid "connecting" +msgstr "s'està connectant" -#~ msgid "Disconnect from %s..." -#~ msgstr "Desconnecta de %s..." +#: ../cli/src/network-manager.c:133 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Error: «nm status»: %s" -#~ msgid "No network devices have been found" -#~ msgstr "No s'ha trobat cap dispositiu de xarxa" +#: ../cli/src/network-manager.c:135 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Error: «nm status»: %s; camps permesos: %s" + +#: ../cli/src/network-manager.c:142 +msgid "NetworkManager status" +msgstr "Estat del NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:149 ../cli/src/network-manager.c:150 +#: ../cli/src/network-manager.c:151 ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:153 ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:257 +#: ../cli/src/network-manager.c:306 ../cli/src/network-manager.c:338 +#: ../cli/src/network-manager.c:370 +msgid "enabled" +msgstr "habilitat" + +#: ../cli/src/network-manager.c:149 ../cli/src/network-manager.c:150 +#: ../cli/src/network-manager.c:151 ../cli/src/network-manager.c:152 +#: ../cli/src/network-manager.c:153 ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:257 +#: ../cli/src/network-manager.c:306 ../cli/src/network-manager.c:338 +#: ../cli/src/network-manager.c:370 +msgid "disabled" +msgstr "inhabilitat" + +#: ../cli/src/network-manager.c:159 +msgid "running" +msgstr "s'està executant" + +#: ../cli/src/network-manager.c:159 +msgid "not running" +msgstr "no s'està executant" + +#: ../cli/src/network-manager.c:184 +#, c-format +msgid "Error: Couldn't connect to system bus: %s" +msgstr "Error: No s'ha pogut connectar al bus del sistema: %s" -#~ msgid "NetworkManager is not running..." -#~ msgstr "No s'està executant el NetworkManager..." +#: ../cli/src/network-manager.c:195 +#, c-format +msgid "Error: Couldn't create D-Bus object proxy." +msgstr "" +"Error: No s'ha pogut crear el servidor intermediari d'objectes del D-Bus." -#~ msgid "Enable _Networking" -#~ msgstr "Habilita la _xarxa" +#: ../cli/src/network-manager.c:201 +#, c-format +msgid "Error in sleep: %s" +msgstr "S'ha produït un en dormir: %s" -#~ msgid "Enable _Wireless" -#~ msgstr "Habilita la xarxa _sense fil" +#: ../cli/src/network-manager.c:247 ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 ../cli/src/network-manager.c:360 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Error: Aquí no és vàlid el valor «%s» de «--fields»; camps permesos: %s" -#~ msgid "Connection _Information" -#~ msgstr "_Informació de la connexió" +#: ../cli/src/network-manager.c:255 +msgid "Networking enabled" +msgstr "Xarxa habilitada" -#~ msgid "_Help" -#~ msgstr "A_juda" +#: ../cli/src/network-manager.c:266 +#, c-format +msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'." +msgstr "" +"Error: El paràmetre «enable» no és vàlid: «%s»; utilitzeu «true» (cert) o " +"«false» (fals)." -#~ msgid "_About" -#~ msgstr "_Quant a" +#: ../cli/src/network-manager.c:275 +#, c-format +msgid "Error: Sleeping status is not exported by NetworkManager." +msgstr "Error: El NetworkManager no ha exportat l'estat de dormir." -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "" -#~ "La miniaplicació NetworkManager no ha pogut trobar alguns dels recursos " -#~ "requerits. No pot continuar.\n" +#: ../cli/src/network-manager.c:283 +#, c-format +msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'." +msgstr "" +"Error: El paràmetre «sleep» no és vàlid: «%s»; utilitzeu «true» (cert) o " +"«false» (fals)." -#~ msgid "Open System" -#~ msgstr "Sistema obert" +#: ../cli/src/network-manager.c:304 +msgid "WiFi enabled" +msgstr "Wi-Fi habilitat" -#~ msgid "Shared Key" -#~ msgstr "Clau compartida" +#: ../cli/src/network-manager.c:315 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Error: El paràmetre «wifi» no és vàlid: «%s»." -#~ msgid "Automatic (Default)" -#~ msgstr "Automàtic (Predeterminat)" +#: ../cli/src/network-manager.c:336 +msgid "WWAN enabled" +msgstr "WWAN habilitat" -#~ msgid "AES-CCMP" -#~ msgstr "AES-CCMP" +#: ../cli/src/network-manager.c:347 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Error: El paràmetre «wwan» no és vàlid: «%s»." -#~ msgid "TKIP" -#~ msgstr "TKIP" +#: ../cli/src/network-manager.c:368 +msgid "WiMAX enabled" +msgstr "WiMAX habilitat" -#~ msgid "Dynamic WEP" -#~ msgstr "WEP dinàmic" +#: ../cli/src/network-manager.c:379 +#, c-format +msgid "Error: invalid 'wimax' parameter: '%s'." +msgstr "Error: El paràmetre «wimax» no és vàlid: «%s»." -#~ msgid "None" -#~ msgstr "Cap" +#: ../cli/src/network-manager.c:390 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Error: L'ordre «%s» de «nm» no és vàlida." -#~ msgid "WEP 64/128-bit ASCII" -#~ msgstr "WEP 64/128-bit ASCII" +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Utilització: %s [OPCIONS] OBJECTE { ORDRE | help }\n" +"\n" +"OPCIONS\n" +" -t[erse] sortida terse\n" +" -p[retty] sortida pretty\n" +" -m[ode] tabular|multiline mode de sortida\n" +" -f[ields] |all|common especifica els camps de la " +"sortida\n" +" -e[scape] yes|no escapa els separadors de " +"columnes en valors\n" +" -v[ersion] mostra la versió del programa\n" +" -h[elp] imprimeix aquesta ajuda\n" +"\n" +"OBJECTE\n" +" nm estat del NetworkManager\n" +" con connexions del NetworkManager\n" +" dev dispositius gestionats pel NetworkManager\n" +"\n" -#~ msgid "WEP 64/128-bit Hex" -#~ msgstr "WEP 64/128-bit Hex" +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Error: L'objecte «%s» és desconegut, proveu «nmcli help»." -#~ msgid "WEP 128-bit Passphrase" -#~ msgstr "WEP contrasenya de 128-bits" +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Error: L'opció «--terse» s'ha especificat dos cops." -#~ msgid "PEAP" -#~ msgstr "PEAP" +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Error: L'opció «--terse» és mútuament exclusiu amb «--pretty»." -#~ msgid "TLS" -#~ msgstr "TLS" +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Error: L'opció «--pretty» s'ha especificat dos cops." -#~ msgid "TTLS" -#~ msgstr "TTLS" +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Error: L'opció «--pretty» és mútuament exclusiu amb «--terse»." -#~ msgid "WPA2 Enterprise" -#~ msgstr "WPA2 Enterprise" +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Error: Falta l'argument per a l'opció «%s»." -#~ msgid "WPA Enterprise" -#~ msgstr "WPA Enterprise" +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Error: «%s» no és un argument vàlid per a l'opció «%s»." -#~ msgid "WPA2 Personal" -#~ msgstr "WPA2 personal" +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Error: Falten els camps per a les opcions «%s»." -#~ msgid "WPA Personal" -#~ msgstr "WPA personal" +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "Eina nmcli, versió %s\n" -#~ msgid "Orientation" -#~ msgstr "Orientació" - -#~ msgid "The orientation of the tray." -#~ msgstr "La orientació de l'àrea de notificació." - -#~ msgid "Wired Network (%s)" -#~ msgstr "Xarxa amb fil (%s)" - -#~ msgid "_Wired Network" -#~ msgstr "Xarxa amb _fil" - -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "Xarxa sense fil (%s)" -#~ msgstr[1] "Xarxes sense fil (%s)" +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Error: L'opció «%s» és desconeguda, proveu «nmcli -help»." -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "Xarxa sense fil" -#~ msgstr[1] "Xarxes sense fil" +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "S'ha capturat el senyal %d, s'està aturant..." -#~ msgid " (invalid Unicode)" -#~ msgstr " (Unicode invàlid)" +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Error: No s'ha pogut connectar al NetworkManager." -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "" -#~ "Per defecte, el nom de la xarxa sense fil s'estableix al nom de " -#~ "l'ordinador, %s, sense habilitar el xifratge" +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Èxit" -#~ msgid "Create new wireless network" -#~ msgstr "Crea una nova xarxa sense fil" +#: ../cli/src/settings.c:423 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (clau-hex-ascii)" -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "" -#~ "Entreu el nom els paràmetres de seguretat per a la xarxa sense fil que " -#~ "vulgueu crear." +#: ../cli/src/settings.c:425 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (contrasenya de 104/128-bit)" -#~ msgid "Create New Wireless Network" -#~ msgstr "Crea una xarxa sense fil nova" +#: ../cli/src/settings.c:428 +#, c-format +msgid "%d (unknown)" +msgstr "%d (desconegut)" -#~ msgid "Existing wireless network" -#~ msgstr "Xarxa sense fil existent" +#: ../cli/src/settings.c:454 +msgid "0 (unknown)" +msgstr "0 (desconegut)" -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "Entreu el nom de la xarxa sense fil a la que vulgueu connectar-vos." +#: ../cli/src/settings.c:460 +msgid "any, " +msgstr "qualsevol, " -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "Connecta a d'altres xarxes sense fil" +#: ../cli/src/settings.c:462 +msgid "900 MHz, " +msgstr "900 MHz, " -#~ msgid "Error connecting to wireless network" -#~ msgstr "S'ha produït un error en connectar a la xarxa sense fil..." +#: ../cli/src/settings.c:464 +msgid "1800 MHz, " +msgstr "1800 MHz, " -#~ msgid "" -#~ "The requested wireless network requires security capabilities unsupported " -#~ "by your hardware." -#~ msgstr "" -#~ "La xarxa sense fil seleccionada requereix certes característiques de " -#~ "seguretat que no estan implementades en el aquest maquinari." +#: ../cli/src/settings.c:466 +msgid "1900 MHz, " +msgstr "1900 MHz, " -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "No s'ha pogut iniciar la connexió VPN «%s»" +#: ../cli/src/settings.c:468 +msgid "850 MHz, " +msgstr "850 MHz, " -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "" -#~ "No s'ha pogut trobar el diàleg d'autenticació per al tipus de connexió " -#~ "VPN «%s». Contacteu el vostre administrador de sistemes." +#: ../cli/src/settings.c:470 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "" -#~ "S'ha produït un error en llançar el diàleg d'autenticació per al tipus de " -#~ "connexió VPN «%s». Contacteu el vostre administrador de sistemes." +#: ../cli/src/settings.c:472 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " -#~ msgid " " -#~ msgstr " " +#: ../cli/src/settings.c:474 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "" -#~ "Informació de la connexió activa" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "Contrasenya necessària per a la " -#~ "xarxa sense fil\n" -#~ "\n" -#~ "Es requereix una contrasenya o clau de xifratge per a la xarxa sense fil «%" -#~ "s»." - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "Funcionalitat de xarxa reduïda\n" -#~ "\n" -#~ "%s No serà del tot funcional." - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "Confirmació de l'entrada a la xarxa " -#~ "sense fil\n" -#~ "\n" -#~ "Heu escollit entrar a la xarxa sense fil «%s». Si esteu segur que la xarxa " -#~ "sense fil és segura, feu clic al quadre de comprovació de sota i el " -#~ "NetworkManager no us tornarà a demanarà cap més confirmació per entrar a " -#~ "aquesta xarxa en el futur." +#: ../cli/src/settings.c:476 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " -#~ msgid "Anonymous Identity:" -#~ msgstr "Identitat anònima:" +#: ../cli/src/settings.c:478 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " -#~ msgid "Authentication:" -#~ msgstr "Autenticació:" +#: ../cli/src/settings.c:480 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " -#~ msgid "Broadcast Address:" -#~ msgstr "Adreça de multidifusió:" +#: ../cli/src/settings.c:482 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " -#~ msgid "CA Certificate File:" -#~ msgstr "Fitxer del certificat CA:" +#: ../cli/src/settings.c:566 ../cli/src/settings.c:733 +msgid "auto" +msgstr "automàtic" -#~ msgid "C_onnect" -#~ msgstr "C_onnecta" +#: ../cli/src/settings.c:728 ../cli/src/settings.c:731 +#: ../cli/src/settings.c:732 ../cli/src/utils.c:172 +msgid "not set" +msgstr "sense definir" -#~ msgid "Client Certificate File:" -#~ msgstr "Fitxer del certificat del client:" - -#~ msgid "Connection Information" -#~ msgstr "Informació de la connexió" - -#~ msgid "Default Route:" -#~ msgstr "Ruta predeterminada:" - -#~ msgid "Destination Address:" -#~ msgstr "Adreça de destí:" - -#~ msgid "Driver:" -#~ msgstr "Connector:" - -#~ msgid "EAP Method:" -#~ msgstr "Mètode EAP:" - -#~ msgid "Hardware Address:" -#~ msgstr "Adreça del maquinari:" +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "el camp «%s» ha d'estar sol" -#~ msgid "IP Address:" -#~ msgstr "Adreça IP:" +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "el camp «%s» no és vàlid" -#~ msgid "Identity:" -#~ msgstr "Identitat:" +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "L'opció «--terse» requereix que s'especifiqui «--fields»" -#~ msgid "Interface:" -#~ msgstr "Interfície:" +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "" +"L'opció «--terse» requereix valors específics de l'opció «--fields» i no «%s»" -#~ msgid "Key Type:" -#~ msgstr "Tipus de clau:" +#: ../libnm-util/crypto.c:121 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "El fitxer de clau PEM no té l'etiqueta de final «%s»." -#~ msgid "Key management:" -#~ msgstr "Gestió de claus:" +#: ../libnm-util/crypto.c:131 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "No sembla que sigui un fitxer de clau privada PEM." -#~ msgid "Key:" -#~ msgstr "Clau:" +#: ../libnm-util/crypto.c:139 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "No hi ha prou memòria per a emmagatzemar les dades del fitxer PEM." -#~ msgid "" -#~ "None\n" -#~ "WEP 128-bit Passphrase\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" -#~ msgstr "" -#~ "Cap\n" -#~ "WEP contrasenya de 128 bits\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "Sistema obert\n" -#~ "Clau compartida" +#: ../libnm-util/crypto.c:155 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "" +"El format del fitxer PEM és incorrecte: la primera etiqueta no és la de Proc-" +"Type." -#~ msgid "Other Wireless Network..." -#~ msgstr "Altres xarxes sense fil..." +#: ../libnm-util/crypto.c:163 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "" +"El format del fitxer PEM és incorrecte: l'etiqueta de Proc-Type «%s» és " +"desconeguda." -#~ msgid "Passphrase:" -#~ msgstr "Contrasenya:" +#: ../libnm-util/crypto.c:173 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "" +"El format del fitxer PEM és incorrecte: la segona etiqueta no és la de DEK-" +"Info." -#~ msgid "Password:" -#~ msgstr "Contrasenya:" +#: ../libnm-util/crypto.c:184 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "" +"El format del fitxer PEM és incorrecte: no s'ha trobat cap vector " +"d'inicialització a l'etiqueta de DEK-Info." -#~ msgid "Primary DNS:" -#~ msgstr "DNS primari:" +#: ../libnm-util/crypto.c:191 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "" +"El format del fitxer PEM és incorrecte: el format del vector " +"d'inicialització a l'etiqueta DEK-Info no és vàlid." -#~ msgid "Private Key File:" -#~ msgstr "Fitxer de la clau privada:" +#: ../libnm-util/crypto.c:204 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "" +"El format del fitxer PEM és incorrecte: el criptògraf «%s» de clau privada és " +"desconegut." -#~ msgid "Private Key Password:" -#~ msgstr "Contrasenya de la clau privada:" +#: ../libnm-util/crypto.c:223 +#, c-format +msgid "Could not decode private key." +msgstr "No s'ha pogut descodificar la clau privada." -#~ msgid "Secondary DNS:" -#~ msgstr "DNS secundari:" +#: ../libnm-util/crypto.c:268 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "No s'ha trobat l'etiqueta de tancament «%2$s» al certificat PEM «%1$s»." -#~ msgid "Select the CA Certificate File" -#~ msgstr "Seleccioneu el fitxer del certificat de la CA" +#: ../libnm-util/crypto.c:278 +#, c-format +msgid "Failed to decode certificate." +msgstr "No s'ha pogut descodificar el certificat." -#~ msgid "Select the Client Certificate File" -#~ msgstr "Seleccioneu el fitxer del certificat del client" +#: ../libnm-util/crypto.c:287 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "No hi ha prou memòria per a emmagatzemar les dades del certificat." -#~ msgid "Select the Private Key File" -#~ msgstr "Seleccioneu el fitxer de la clau privada" +#: ../libnm-util/crypto.c:295 +#, c-format +msgid "Not enough memory to store file data." +msgstr "No hi ha prou memòria per a emmagatzemar les dades del fitxer." -#~ msgid "Show key" -#~ msgstr "Mostra la clau" +#: ../libnm-util/crypto.c:325 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "" +"La llargada del vector d'inicialització ha de ser un nombre parell de bytes." -#~ msgid "Show passphrase" -#~ msgstr "Mostra la contrasenya:" +#: ../libnm-util/crypto.c:334 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "No hi ha prou memòria per a emmagatzemar el vector d'inicialització." -#~ msgid "Show password" -#~ msgstr "Mostra la contrasenya:" +#: ../libnm-util/crypto.c:345 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "El vector d'inicialització conté dígits que no són hexadecimals." -#~ msgid "Show passwords" -#~ msgstr "Mostra les contrasenyes" +#: ../libnm-util/crypto.c:383 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Es desconeix el criptògraf «%s» de la clau privada." -#~ msgid "Speed:" -#~ msgstr "Velocitat:" +#: ../libnm-util/crypto.c:392 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "No hi ha prou memòria per desencriptar la clau privada." -#~ msgid "Subnet Mask:" -#~ msgstr "Màscara de subxarxa:" +#: ../libnm-util/crypto.c:512 +#, c-format +msgid "Unable to determine private key type." +msgstr "No s'ha pogut determinar el tipus de la clau privada." -#~ msgid "Type:" -#~ msgstr "Tipus:" +#: ../libnm-util/crypto.c:531 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "" +"No hi ha prou memòria per a emmagatzemar la clau privada desencriptada." -#~ msgid "User Name:" -#~ msgstr "Nom d'usuari:" +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "No s'ha pogut inicialitzar el motor criptogràfic." -#~ msgid "Wireless Network Key Required" -#~ msgstr "Es requereix una clau per a la xarxa sense fil" +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "No s'ha pogut inicialitzar el motor MD5: %s / %s." -#~ msgid "Wireless _adapter:" -#~ msgstr "_Adaptador sense fil:" +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "" +"La longitud del vector d'inicialització no és vàlida (la mida mínima és %zd)." -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "Confia sempre en _aquesta xarxa sense fil" +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "" +"No hi ha prou espai per a la memòria intermèdia de la clau desencriptada." -#~ msgid "_Don't remind me again" -#~ msgstr "_No m'ho tornis a recordar" +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "" +"No s'ha pogut inicialitzar el context del criptògraf de desencriptació: %s / " +"%s." -#~ msgid "_Fallback on this Network" -#~ msgstr "Utilitza aquesta _xarxa com a alternativa" +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "" +"No s'ha pogut definir la clau simètrica per a la desencriptació: %s / %s." -#~ msgid "_Login to Network" -#~ msgstr "_Entra a la xarxa" +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "" +"No s'ha pogut definir el vector d'inicialització per a la desencriptació: %" +"s / %s." -#~ msgid "_Network Name:" -#~ msgstr "Nom de _xarxa:" +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "No s'ha pogut desencriptar la clau privada: %s / %s." -#~ msgid "_Wireless Security:" -#~ msgstr "Seguretat de la _xarxa sense fil:" +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "" +"No s'ha pogut desencriptar la clau privada: no s'esperava la longitud del " +"farciment." -#~ msgid "Cannot add VPN connection" -#~ msgstr "No s'ha pogut afegir la connexions VPN" +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "No s'ha pogut desencriptar la clau privada." -#~ msgid "" -#~ "No suitable VPN software was found on your system. Contact your system " -#~ "administrator." -#~ msgstr "" -#~ "No s'ha pogut trobar el programari VPN adequat en aquest ordinador. " -#~ "Contacteu el vostre administrador." +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "No s'ha pogut assignar memòria per a l'encriptació." -#~ msgid "Cannot import VPN connection" -#~ msgstr "No s'ha pogut importar la connexió VPN" +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "" +"No s'ha pogut inicialitzar del context del criptògraf d'encriptació: %s / %s." -#~ msgid "" -#~ "Cannot find suitable software for VPN connection type '%s' to import the " -#~ "file '%s'. Contact your system administrator." -#~ msgstr "" -#~ "No s'ha pogut trobar el programari adequat per al tipus de connexió VPN «%" -#~ "s» per a importar el fitxer «%s». Contacteu el vostre administrador de " -#~ "sistemes." +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "No s'ha pogut establir la clau simètrica per a l'encriptació: %s / %s." -#~ msgid "Error retrieving VPN connection '%s'" -#~ msgstr "S'ha produït un error en recuperar la connexió VPN «%s»" +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "" +"No s'ha pogut establir el vector d'inicialització per a l'encriptació: %s / %" +"s." -#~ msgid "" -#~ "Could not find the UI files for VPN connection type '%s'. Contact your " -#~ "system administrator." -#~ msgstr "" -#~ "No s'han pogut trobar els fitxers d'UI per al tipus de connexió VPN «%s». " -#~ "Contacteu el vostre administrador de sistemes." +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "No s'han pogut encriptar les dades: %s / %s." -#~ msgid "Delete VPN connection \"%s\"?" -#~ msgstr "Voleu suprimir la connexió VPN «%s»?" +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "S'ha produït un error en inicialitzar les dades del certificat: %s" -#~ msgid "" -#~ "All information about the VPN connection \"%s\" will be lost and you may " -#~ "need your system administrator to provide information to create a new " -#~ "connection." -#~ msgstr "" -#~ "Tota la informació sobre la connexió VPN «%s» es perdrà, i segurament " -#~ "necessitareu que el vostre administrador us proporcioni informació per a " -#~ "crear una connexió nova." +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "No s'ha pogut descodificar el certificat: %s" -#~ msgid "Unable to load" -#~ msgstr "No es pot carregar" +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "No s'ha pogut inicialitzar el descodificador PKCS#12: %s" -#~ msgid "Cannot find some needed resources (the glade file)!" -#~ msgstr "" -#~ "No s'han pogut trobar alguns dels recursos requerits el fitxer glade)." +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "No s'ha pogut descodificar el fitxer PKCS#12: %s" -#~ msgid "Create VPN Connection" -#~ msgstr "Crea una connexió VPN" +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "No s'ha pogut verificar el fitxer PKCS#12: %s" -#~ msgid "Edit VPN Connection" -#~ msgstr "Edita la connexió VPN" +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "No s'ha pogut inicialitzar el motor criptogràfic: %d." -#~ msgid "Add a new VPN connection" -#~ msgstr "Afegeix una connexions VPN nova" +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "No s'ha pogut inicialitzar el context MD5: %d." -#~ msgid "Delete the selected VPN connection" -#~ msgstr "Suprimeix la connexió VPN seleccionada" +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "" +"La llargada del vector d'inicialització no és vàlida (la mida mínima és %d)." -#~ msgid "E_xport" -#~ msgstr "E_xporta" +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "No s'ha pogut inicialitzar la ranura del criptògraf de desencriptació." -#~ msgid "Edit the selected VPN connection" -#~ msgstr "Edita la connexió VPN seleccionada" +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "No s'ha pogut definir la clau simètrica per a la desencriptació." -#~ msgid "Export the VPN settings to a file" -#~ msgstr "Exporta els paràmetres VPN al fitxer" +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "" +"No s'ha pogut definir el vector d'inicialització per a la desencriptació." -#~ msgid "Export the selected VPN connection to a file" -#~ msgstr "Exporta la connexió VPN a un fitxer" +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "No s'ha pogut inicialitzar el context de desencriptació." -#~ msgid "Manage Virtual Private Network Connections" -#~ msgstr "Gestioneu connexions a xarxes privades virtuals" +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "No s'ha pogut desencriptar la clau privada: %d." -#~ msgid "VPN Connections" -#~ msgstr "Connexions VPN" +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"No s'ha pogut desencriptar la clau privada: les dades desencriptades són " +"massa llargues." -#~ msgid "40-bit WEP" -#~ msgstr "40-bit WEP" +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "No s'ha pogut finalitzar la desencriptació de la clau privada: %d." -#~ msgid "104-bit WEP" -#~ msgstr "104-bit WEP" +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "No s'ha pogut inicialitzar la ranura del criptògraf d'encriptació." -#~ msgid "WPA TKIP" -#~ msgstr "WPA TKIP" +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "No s'ha pogut establir la clau simètrica per encriptar." -#~ msgid "WPA CCMP" -#~ msgstr "WPA CCMP" +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "No s'ha pogut establir el vector d'inicialització per a l'encriptació." -#~ msgid "WPA Automatic" -#~ msgstr "WPA automàtic" +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "No s'ha pogut inicialitzar el context d'encriptació." -#~ msgid "WPA2 TKIP" -#~ msgstr "WPA2 TKIP" +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "No s'ha pogut encriptar: %d." -#~ msgid "WPA2 CCMP" -#~ msgstr "WPA2 CCMP" +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "No s'esperava aquesta quantitat de dades després de l'encriptació." -#~ msgid "WPA2 Automatic" -#~ msgstr "WPA2 automàtic" +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "No s'ha pogut descodificar el certificat: %d" -#~ msgid "none" -#~ msgstr "cap" +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "No s'ha pogut convertir la contrasenya a UCS2: %d" -#~ msgid "operation took too long" -#~ msgstr "l'operació ha trigat massa" +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "No s'ha pogut inicialitzar el descodificador PKCS#12: %d" -#~ msgid "received data from wrong type of sender" -#~ msgstr "s'han rebut dades d'un tipus de remitent equivocat" +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "No s'ha pogut descodificar el fitxer PKCS#12: %d" -#~ msgid "received data from unexpected sender" -#~ msgstr "s'han rebut dades d'un remitent que no s'esperava" +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "No s'ha pogut verificar el fitxer PKCS#12: %d" -#~ msgid "too much data was sent over socket and some of it was lost" -#~ msgstr "" -#~ "s'han enviat massa dades a través del sòcol, i se n'han perdut algunes" +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "No s'han pogut generar dades aleatòries." -#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." -#~ msgstr "Ara esteu connectat a la xarxa Ad-Hoc sense fil «%s»." +#: ../libnm-util/nm-utils.c:1993 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "No hi ha prou memòria per crear la clau d'encriptació." -#~ msgid "You are now connected to the wireless network '%s'." -#~ msgstr "Ara esteu connectat a la xarxa sense fil «%s»." +#: ../libnm-util/nm-utils.c:2103 +msgid "Could not allocate memory for PEM file creation." +msgstr "No s'ha pogut assignar memòria per a la creació del fitxer PEM." -#~ msgid "You are now connected to the wired network." -#~ msgstr "Ara esteu connectat a la xarxa amb fil." +#: ../libnm-util/nm-utils.c:2115 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "" +"No s'ha pogut assignar memòria per escriure el vector d'inicialització al " +"fitxer PEM." -#~ msgid "Connection Established" -#~ msgstr "S'ha establert la connexió" +#: ../libnm-util/nm-utils.c:2127 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"No s'ha pogut assignar memòria per escriure la clau encriptada al fitxer PEM." -#~ msgid "Disconnected" -#~ msgstr "Desconnectat" +#: ../libnm-util/nm-utils.c:2146 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "No s'ha pogut assignar memòria per al fitxer de dades PEM." -#~ msgid "The network connection has been disconnected." -#~ msgstr "S'ha desconnectat la connexió de xarxa." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Connexió compartida mitjançant una xarxa Wi-Fi protegida" -#~ msgid "LEAP" -#~ msgstr "LEAP" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Connexió compartida mitjançant una xarxa Wi-Fi oberta" -#~ msgid "Choose which type of VPN connection you wish to create." -#~ msgstr "Escolliu el tipus de connexió VPN que vulgueu crear." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modifica el nom de l'ordinador de forma permanent" -#~ msgid "Connect to:" -#~ msgstr "Connecta a:" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modifica les connexions del sistema" -#~ msgid "Create VPN Connection - 1 of 2" -#~ msgstr "Creació d'una connexió VPN - 1 de 2" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "" +"La política del sistema impedeix la modificació dels paràmetres del sistema" -#~ msgid "Create VPN Connection - 2 of 2" -#~ msgstr "Creació d'una connexió VPN - 2 de 2" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"La política del sistema impedeix la modificació del nom de l'ordinador de " +"forma permanent" -#~ msgid "Finish Creating VPN Connection" -#~ msgstr "Finalitza la creació de la connexió VPN" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"La política del sistema impedeix compartir connexions mitjançant una xarxa " +"Wi-Fi protegida" -#~ msgid "" -#~ "This assistant will guide you through the creation of a connection to a " -#~ "Virtual Private Network (VPN).\n" -#~ "\n" -#~ "It will require some information, such as IP addresses and secrets. " -#~ "Please see your system administrator to obtain this information." -#~ msgstr "" -#~ "Aquest auxiliar us guiarà a través de la creació d'una nova connexió VPN " -#~ "a una xarxa privada (VPN).\n" -#~ "\n" -#~ "Cal certa informació, com ara l'adreça IP i secrets, que us hauria de " -#~ "proporcionar el vostre administrador." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"La política del sistema impedeix compartir connexions mitjançant una xarxa " +"Wi-Fi oberta" -#~ msgid "VPN Error" -#~ msgstr "Error VPN" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 +msgid "Allow control of network connections" +msgstr "Permet el control de les connexions de xarxa" -#~ msgid "The VPN service said: \"%s\"" -#~ msgstr "El servei VPN digué: «%s»" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2 +msgid "Allow use of user-specific connections" +msgstr "Permet l'ús de connexions específiques per a cada usuari" -#~ msgid "VPN connection '%s' said:" -#~ msgstr "La connexió VPN «%s» digué:" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3 +msgid "Enable or disable WiFi devices" +msgstr "Habilita o inhabilita els dispositius Wi-Fi" -#~ msgid "leap_subwindow" -#~ msgstr "leap_subwindow" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4 +msgid "Enable or disable WiMAX mobile broadband devices" +msgstr "Habilita o inhabilita els dispositius de banda ampla mòbil WiMAX" -#~ msgid "wep_key_subwindow" -#~ msgstr "wep_key_subwindow" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 +msgid "Enable or disable mobile broadband devices" +msgstr "Habilita o inhabilita els dispositius de banda ampla mòbil" -#~ msgid "wep_passphrase_subwindow" -#~ msgstr "wep_passphrase_subwindow" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6 +msgid "Enable or disable system networking" +msgstr "Habilita o inhabilita la xarxa del sistema" -#~ msgid "wpa_psk_subwindow" -#~ msgstr "wpa_psk_subwindow" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 +msgid "" +"Put NetworkManager to sleep or wake it up (should only be used by system " +"power management)" +msgstr "" +"Posa el NetworkManager a dormir o desperta'l (només l'hauria d'utilitzar el " +"sistema de gestió d'energia)" -#~ msgid "" -#~ "The requested wireless network '%s' does not appear to be in range. A " -#~ "different wireless network will be used if any are available." -#~ msgstr "" -#~ "La xarxa sense fil sol·licitada «%s», sembla que no està dins del rang. " -#~ "Se'n farà servir una altra si n'hi ha cap de disponible." +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 +msgid "System policy prevents control of network connections" +msgstr "La política del sistema impedeix el control de les connexions de xarxa" -#~ msgid "Failed to get information about the interface!" -#~ msgstr "No s'ha pogut obtenir informació quant a la interfície." +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 +msgid "System policy prevents enabling or disabling WiFi devices" +msgstr "" +"La política del sistema impedeix habilitar o inhabilitar els dispositius Wi-" +"Fi" -#~ msgid "_Stop All Wireless Devices" -#~ msgstr "Atura tots els dispositius _sense fil" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +msgid "" +"System policy prevents enabling or disabling WiMAX mobile broadband devices" +msgstr "" +"La política del sistema impedeix habilitar o inhabilitar els dispositius de " +"banda ampla mòbil WiMAX" -#~ msgid "_Start All Wireless Devices" -#~ msgstr "Inicia tots els dispositius _sense fil" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 +msgid "System policy prevents enabling or disabling mobile broadband devices" +msgstr "" +"La política del sistema impedeix habilitar o inhabilitar els dispositius de " +"banda ampla mòbil" -#~ msgid "_Wireless Network Discovery" -#~ msgstr "Descobriment de _xarxes sense fil" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 +msgid "System policy prevents enabling or disabling system networking" +msgstr "" +"La política del sistema impedeix habilitar o inhabilitar la xarxa del sistema" -#~ msgid "Always Search" -#~ msgstr "Cerca sempre" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13 +msgid "System policy prevents putting NetworkManager to sleep or waking it up" +msgstr "" +"La política del sistema impedeix posar el NetworkManager a dormir o " +"despertar-lo" -#~ msgid "Search Only When Disconnected" -#~ msgstr "Cerca només en estar desconnectat" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14 +msgid "System policy prevents use of user-specific connections" +msgstr "" +"La política del sistema impedeix la utilització de connexions específiques " +"per a cada usuari" -#~ msgid "Never Search" -#~ msgstr "No cerquis mai" +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "s'ha produït un error en processar el missatge del netlink: %s" -#~ msgid "Stop All Wireless Devices" -#~ msgstr "Atura tots els dispositius sense fil" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "s'ha produït un error en esperar dades del sòcol" -#~ msgid "_Passphrase:" -#~ msgstr "_Contrasenya:" +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "" +"no s'ha pogut connectar amb el netlink per a fer un seguiment de l'estat de " +"l'enllaç: %s" -#~ msgid "_ASCII Key:" -#~ msgstr "Klau _ASCII:" +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "no s'ha pogut habilitar el gestor netlink per passar credencials: %s" -#~ msgid "_Hex Key:" -#~ msgstr "Clau _hexadecimal:" +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "" +"no s'ha pogut assignar el gestor del netlink per a fer un seguiment de " +"l'estat de l'enllaç: %s" -#~ msgid ", with no encryption enabled." -#~ msgstr ", amb el xifratge habilitat." +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "" +"no s'ha pogut assignar la memòria cau de l'enllaç del netlink per a fer un " +"seguiment de l'estat de l'enllaç: %s" -#~ msgid "ASCII Key:" -#~ msgstr "Clau ASCII:" +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "no ha pogut unir-se al grup netlink: %s" -#~ msgid "" -#~ "128-bit Passphrase (WEP)\n" -#~ "ASCII Key (WEP)\n" -#~ "Hex Key (WEP)" -#~ msgstr "" -#~ "Contrasenya de 128-bit (WEP)\n" -#~ "Clau ASCII (WEP)\n" -#~ "Clau Hexadecimal (WEP)" - -#~ msgid "" -#~ "128-bit passphrase (WEP)\n" -#~ "ASCII key (WEP)\n" -#~ "Hex key (WEP)" -#~ msgstr "" -#~ "Contrasenya de 128-bit (WEP)\n" -#~ "Clau ASCII (WEP)\n" -#~ "Clau hexadecimal (WEP)" +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "s'ha produït un error en actualitzar la memòria cau de l'enllaç: %s" -#~ msgid "Connect with _encryption enabled" -#~ msgstr "Connecta amb el _xifratge habilitat" +#: ../src/main.c:518 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "" +"Opció no vàlida. Utilitzeu --help per a veure la llista d'opcions vàlides.\n" -#~ msgid "Wireless _network:" -#~ msgstr "_Xarxa sense fil:" +#: ../src/main.c:589 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Utilitzeu --help per veure un llistat amb les opcions vàlides.\n" -#~ msgid "" -#~ "Dependent on the private network you want to connect to, you need to " -#~ "select what type of connection you want to create." -#~ msgstr "" -#~ "Depenent del tipus de xarxa privada a la que us vulgueu connectar, heu " -#~ "d'escollir el tipus de connexió que vulgueu crear." +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62 +msgid "# Created by NetworkManager\n" +msgstr "# Creat pel NetworkManager\n" -#~ msgid "Other Wireless Networks..." -#~ msgstr "Altres xarxes sense fil..." +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Fusionat des de %s\n" +"\n" -# FIXME -#~ msgid "Pause Wireless Scanning" -#~ msgstr "Atura l'escaneig sense fil" +#: ../src/dhcp-manager/nm-dhcp-manager.c:284 +msgid "no usable DHCP client could be found." +msgstr "no s'ha pogut trobar cap client DHCP." -# FIXME -#~ msgid "Resume Wireless Scanning" -#~ msgstr "Reprèn l'escaneig sense fil" +#: ../src/dhcp-manager/nm-dhcp-manager.c:293 +msgid "'dhclient' could be found." +msgstr "s'ha trobat el «dhclient»." -#~ msgid "progress bar label|%d %%" -#~ msgstr "Etiqueta de la barra de progrés|%d %%" +#: ../src/dhcp-manager/nm-dhcp-manager.c:303 +msgid "'dhcpcd' could be found." +msgstr "s'ha trobat el «dhcpcd»." -# FIXME? -#~ msgid "You must log in to access the Virtual Private Network '%s'." -#~ msgstr "Heu d'autenticar-vos per accedir a la xarxa privada virtual «%s»." +#: ../src/dhcp-manager/nm-dhcp-manager.c:311 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "el client DHCP «%s» no és compatible" -#~ msgid "_OK" -#~ msgstr "_D'acord" +#: ../src/logging/nm-logging.c:148 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Es desconeix el nivell de registre «%s»" -#~ msgid "%s" -#~ msgstr "%s" +#: ../src/logging/nm-logging.c:173 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Es desconeix el domini de registre «%s»" -#~ msgid "Wireless Networks:" -#~ msgstr "Xarxes sense fil:" +#: ../src/dns-manager/nm-dns-manager.c:367 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"NOTA: pot ser que el sistema de resolució de la libc no permeti més de 3 " +"servidors de noms." -#~ msgid "Modify Wireless Networks" -#~ msgstr "Modifica xarxes sense fil" +#: ../src/dns-manager/nm-dns-manager.c:369 +msgid "The nameservers listed below may not be recognized." +msgstr "Pot ser que no es reconeguin els servidors de noms llistats aquí sota." -#~ msgid "*" -#~ msgstr "*" +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "%s automàtic" -#~ msgid "You must log in to access the private network %s" -#~ msgstr "Heu d'autenticar-vos per accedir a la xarxa privada %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3409 +#: ../system-settings/plugins/ifnet/connection_parser.c:49 +msgid "System" +msgstr "Sistema" -#~ msgid "_About..." -#~ msgstr "_Quant a..." +#~ msgid "unable to join netlink group for monitoring link status: %s" +#~ msgstr "" +#~ "no s'ha pogut unir el grup del netlink per a fer un seguiment de l'estat " +#~ "de l'enllaç: %s" diff --git a/po/da.po b/po/da.po index cbdb2115..bbcde42d 100644 --- a/po/da.po +++ b/po/da.po @@ -8,710 +8,1851 @@ msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-02-13 20:50+0100\n" -"PO-Revision-Date: 2007-02-13 20:50+0100\n" -"Last-Translator: Lasse Bang Mikkelsen \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-12-11 15:25+0000\n" +"PO-Revision-Date: 2010-12-12 18:49+0100\n" +"Last-Translator: Anders Jenbo \n" "Language-Team: Danish \n" +"Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:417 -msgid "Cannot add VPN connection" -msgstr "Kan ikke tilføje VPN-forbindelse" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:419 +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Launchpad-Export-Date: 2010-12-12 00:44+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#: ../cli/src/connections.c:60 +#: ../cli/src/connections.c:76 +#: ../cli/src/devices.c:89 +#: ../cli/src/devices.c:102 +#: ../cli/src/devices.c:112 +#: ../cli/src/devices.c:122 +#: ../cli/src/devices.c:135 +#: ../cli/src/devices.c:146 +#: ../cli/src/devices.c:157 +#: ../cli/src/devices.c:166 +#: ../cli/src/devices.c:175 +msgid "NAME" +msgstr "NAVN" + +#. 0 +#: ../cli/src/connections.c:61 +#: ../cli/src/connections.c:77 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:62 +msgid "DEVICES" +msgstr "ENHEDER" + +#. 2 +#: ../cli/src/connections.c:63 +#: ../cli/src/connections.c:79 +msgid "SCOPE" +msgstr "ANVENDELSESOMRÅDE" + +#. 3 +#: ../cli/src/connections.c:64 +msgid "DEFAULT" +msgstr "STANDARD" + +#. 4 +#: ../cli/src/connections.c:65 +msgid "DBUS-SERVICE" +msgstr "DBUS-TJENESTE" + +#. 5 +#: ../cli/src/connections.c:66 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJEKT" + +#. 6 +#: ../cli/src/connections.c:67 +msgid "VPN" +msgstr "VPN" + +#. 7 +#. 2 +#: ../cli/src/connections.c:68 +#: ../cli/src/connections.c:84 +#: ../cli/src/devices.c:64 +msgid "DBUS-PATH" +msgstr "DBUS-STI" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:78 +#: ../cli/src/devices.c:62 +#: ../cli/src/devices.c:91 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:80 +msgid "TIMESTAMP" +msgstr "TIDSSTEMPEL" + +#. 4 +#: ../cli/src/connections.c:81 +msgid "TIMESTAMP-REAL" +msgstr "TIDSSTEMPEL-ÆGTE" + +#. 5 +#: ../cli/src/connections.c:82 +msgid "AUTOCONNECT" +msgstr "FORBIND AUTOMATISK" + +#. 6 +#: ../cli/src/connections.c:83 +msgid "READONLY" +msgstr "SKRIVEBESKYTTET" + +#: ../cli/src/connections.c:160 +#, c-format msgid "" -"No suitable VPN software was found on your system. Contact your system " -"administrator." +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" msgstr "" -"Ingen passende VPN-programmel blev fundet på dit system. Kontakt din system-" -"administrator." +"Brug: nmcli con { KOMMANDO | help }\n" +" KOMMANDO := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:200 +#: ../cli/src/connections.c:541 +#, c-format +msgid "Error: 'con list': %s" +msgstr "Fejl: 'con list': %s" -#: ../gnome/vpn-properties/nm-vpn-properties.c:461 -msgid "Cannot import VPN connection" -msgstr "Kan ikke importere VPN-forbindelse" +#: ../cli/src/connections.c:202 +#: ../cli/src/connections.c:543 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Fejl: 'con list': %s; tilladte felter: %s" + +#: ../cli/src/connections.c:210 +msgid "Connection details" +msgstr "Forbindelsesdetaljer" + +#: ../cli/src/connections.c:385 +#: ../cli/src/connections.c:606 +msgid "system" +msgstr "system" + +#: ../cli/src/connections.c:385 +#: ../cli/src/connections.c:606 +msgid "user" +msgstr "bruger" + +#: ../cli/src/connections.c:387 +msgid "never" +msgstr "aldrig" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:388 +#: ../cli/src/connections.c:389 +#: ../cli/src/connections.c:607 +#: ../cli/src/connections.c:610 +#: ../cli/src/devices.c:433 +#: ../cli/src/devices.c:558 +#: ../cli/src/devices.c:584 +#: ../cli/src/devices.c:585 +#: ../cli/src/devices.c:586 +#: ../cli/src/devices.c:587 +#: ../cli/src/devices.c:588 +#: ../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 "ja" + +#: ../cli/src/connections.c:388 +#: ../cli/src/connections.c:389 +#: ../cli/src/connections.c:607 +#: ../cli/src/connections.c:610 +#: ../cli/src/devices.c:433 +#: ../cli/src/devices.c:558 +#: ../cli/src/devices.c:584 +#: ../cli/src/devices.c:585 +#: ../cli/src/devices.c:586 +#: ../cli/src/devices.c:587 +#: ../cli/src/devices.c:588 +#: ../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 "nej" + +#: ../cli/src/connections.c:462 +#: ../cli/src/connections.c:505 +msgid "System connections" +msgstr "System forbindelser" + +#: ../cli/src/connections.c:467 +#: ../cli/src/connections.c:518 +msgid "User connections" +msgstr "Bruger forbindelser" + +#: ../cli/src/connections.c:479 +#: ../cli/src/connections.c:1342 +#: ../cli/src/connections.c:1358 +#: ../cli/src/connections.c:1367 +#: ../cli/src/connections.c:1378 +#: ../cli/src/connections.c:1463 +#: ../cli/src/devices.c:964 +#: ../cli/src/devices.c:974 +#: ../cli/src/devices.c:1076 +#: ../cli/src/devices.c:1083 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Fejl: %s parameter mangler." -#: ../gnome/vpn-properties/nm-vpn-properties.c:463 +#: ../cli/src/connections.c:492 #, c-format -msgid "" -"Cannot find suitable software for VPN connection type '%s' to import the " -"file '%s'. Contact your system administrator." -msgstr "" -"Kan ikke finde passende programmel til VPN-forbindelsestypen '%s', til " -"import af filen '%s'. Kontakt din system-administrator." +msgid "Error: %s - no such connection." +msgstr "Fejl: %s - ingen sådan forbindelse." + +#: ../cli/src/connections.c:524 +#: ../cli/src/connections.c:1391 +#: ../cli/src/connections.c:1481 +#: ../cli/src/devices.c:787 +#: ../cli/src/devices.c:854 +#: ../cli/src/devices.c:988 +#: ../cli/src/devices.c:1089 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Ukendt parameter: %s\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:580 +#: ../cli/src/connections.c:533 #, c-format -msgid "Error retrieving VPN connection '%s'" -msgstr "Fejl ved hentning af VPN-forbindelsen '%s'" +msgid "Error: no valid parameter specified." +msgstr "Fejl: ingen korrekte parameter angivet." -#: ../gnome/vpn-properties/nm-vpn-properties.c:583 +#: ../cli/src/connections.c:548 +#: ../cli/src/connections.c:1584 +#: ../cli/src/devices.c:1295 +#: ../cli/src/network-manager.c:359 #, c-format -msgid "" -"Could not find the UI files for VPN connection type '%s'. Contact your " -"system administrator." -msgstr "" -"Kunne ikke finde brugergrænseflade-filerne til VPN-forbindelsestypen '%s'. " -"Kontakt din system-administrator." +msgid "Error: %s." +msgstr "Fejl: %s." -#: ../gnome/vpn-properties/nm-vpn-properties.c:727 +#: ../cli/src/connections.c:655 #, c-format -msgid "Delete VPN connection \"%s\"?" -msgstr "Slet VPN-forbindelsen \"%s\"?" +msgid "Error: 'con status': %s" +msgstr "Fejl: 'con status': %s" -#: ../gnome/vpn-properties/nm-vpn-properties.c:730 +#: ../cli/src/connections.c:657 #, c-format -msgid "" -"All information about the VPN connection \"%s\" will be lost and you may " -"need your system administrator to provide information to create a new " -"connection." -msgstr "" -"Al information omkring VPN-forbindelsen \"%s\" vil gå tabt og du får " -"muligvis brug for din system-administrator, som kan give dig de nødvendige " -"informationer til oprettelse af en ny forbindelse." - -#: ../gnome/vpn-properties/nm-vpn-properties.c:924 -msgid "Unable to load" -msgstr "Kan ikke indlæse" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:926 -msgid "Cannot find some needed resources (the glade file)!" -msgstr "Kan ikke finde nogle krævede ressourcer (glade-filen)!" - -#. druid_window = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Create VPN Connection"), -#. NULL, -#. GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -#. GTK_STOCK_CANCEL, -#. GTK_RESPONSE_REJECT, -#. GTK_STOCK_APPLY, -#. GTK_RESPONSE_ACCEPT, -#. NULL)); -#: ../gnome/vpn-properties/nm-vpn-properties.c:1081 -msgid "Create VPN Connection" -msgstr "Opret VPN-forbindelse" - -#. gtk_container_add (GTK_CONTAINER (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label"))); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(druid), TRUE,TRUE,0); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label")), TRUE,TRUE,0); -#. toplevel = gtk_widget_get_toplevel (GTK_WIDGET (druid)); -#. gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", GTK_SIGNAL_FUNC (vpn_window_close), NULL); -#. make the druid window modal wrt. our main window -#. gtk_window_set_modal (druid_window, TRUE); -#. gtk_window_set_transient_for (GTK_WINDOW(druid_window), GTK_WINDOW (dialog)); -#. Edit dialog -#: ../gnome/vpn-properties/nm-vpn-properties.c:1099 -msgid "Edit VPN Connection" -msgstr "Redigér VPN-forbindelse" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1 -msgid "Add a new VPN connection" -msgstr "Tilføj ny VPN-forbindelse" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2 -msgid "Delete the selected VPN connection" -msgstr "Slet den valgte VPN-forbindelse" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3 -msgid "E_xport" -msgstr "E_ksportér" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4 -msgid "Edit the selected VPN connection" -msgstr "Redigér den valgte VPN-forbindelse" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5 -msgid "Export the VPN settings to a file" -msgstr "Eksportér VPN-opsætningen til en fil" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6 -msgid "Export the selected VPN connection to a file" -msgstr "Eksportér den valgte VPN-forbindelse til en fil" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7 -msgid "Manage Virtual Private Network Connections" -msgstr "Håndtér virtuelle private netværks-forbindelser (VPN)" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8 -msgid "VPN Connections" -msgstr "VPN-forbindelser" - -#: ../src/nm-ap-security-wep.c:52 -msgid "40-bit WEP" -msgstr "40-bit WEP" - -#: ../src/nm-ap-security-wep.c:54 -msgid "104-bit WEP" -msgstr "104-bit WEP" - -#: ../src/nm-ap-security-wpa-psk.c:51 -msgid "WPA TKIP" -msgstr "WPA TKIP" - -#: ../src/nm-ap-security-wpa-psk.c:53 -msgid "WPA CCMP" -msgstr "WPA CCMP" - -#: ../src/nm-ap-security-wpa-psk.c:55 -msgid "WPA Automatic" -msgstr "WPA automatisk" - -#: ../src/nm-ap-security-wpa-psk.c:60 -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" - -#: ../src/nm-ap-security-wpa-psk.c:62 -msgid "WPA2 CCMP" -msgstr "WPA2 CCMP" - -#: ../src/nm-ap-security-wpa-psk.c:64 -msgid "WPA2 Automatic" -msgstr "WPA2 automatisk" - -#: ../src/nm-ap-security.c:334 +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Fejl: 'con status': %s; tilladte fejlter: %s" + +#: ../cli/src/connections.c:664 +msgid "Active connections" +msgstr "Aktive forbindelser" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ingen aktiv forbindelse på enhed '%s'" + +#: ../cli/src/connections.c:1042 +#, c-format +msgid "no active connection or device" +msgstr "ingen aktiv forbindelse eller enhed" + +#: ../cli/src/connections.c:1092 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "enhed \"%s\" er ikke kompatibel med forbindelse \"%s\"" + +#: ../cli/src/connections.c:1094 +#, c-format +msgid "no device found for connection '%s'" +msgstr "ingen enhed fundet til forbindelsen '%s'" + +#: ../cli/src/connections.c:1105 +msgid "activating" +msgstr "aktiverer" + +#: ../cli/src/connections.c:1107 +msgid "activated" +msgstr "aktiveret" + +#: ../cli/src/connections.c:1110 +#: ../cli/src/connections.c:1133 +#: ../cli/src/connections.c:1166 +#: ../cli/src/devices.c:247 +#: ../cli/src/devices.c:559 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:149 +#: ../cli/src/settings.c:473 +msgid "unknown" +msgstr "ukendt" + +#: ../cli/src/connections.c:1119 +msgid "VPN connecting (prepare)" +msgstr "VPN-forbinder (forbered)" + +#: ../cli/src/connections.c:1121 +msgid "VPN connecting (need authentication)" +msgstr "VPN-forbinder (kræver godkendelse)" + +#: ../cli/src/connections.c:1123 +msgid "VPN connecting" +msgstr "VPN-forbinder" + +#: ../cli/src/connections.c:1125 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN-forbinder (indhenter IP-konfiguration)" + +#: ../cli/src/connections.c:1127 +msgid "VPN connected" +msgstr "VPN-forbundet" + +#: ../cli/src/connections.c:1129 +msgid "VPN connection failed" +msgstr "VPN-forbindelse fejlede" + +#: ../cli/src/connections.c:1131 +msgid "VPN disconnected" +msgstr "VPN afbrudt" + +#: ../cli/src/connections.c:1142 +msgid "unknown reason" +msgstr "ukendt årsag" + +#: ../cli/src/connections.c:1144 msgid "none" msgstr "ingen" -#: ../src/nm-netlink-monitor.c:174 +#: ../cli/src/connections.c:1146 +msgid "the user was disconnected" +msgstr "brugeren blev frakoblet" + +#: ../cli/src/connections.c:1148 +msgid "the base network connection was interrupted" +msgstr "basenetværketsforbindelsen blev afbrudt" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN servicen stoppede uventet" + +#: ../cli/src/connections.c:1152 +msgid "the VPN service returned invalid configuration" +msgstr "VPN-tjenesten retunerede en ikke gyldig konfiguration" + +#: ../cli/src/connections.c:1154 +msgid "the connection attempt timed out" +msgstr "forbindelsesforsøget udløb" + +#: ../cli/src/connections.c:1156 +msgid "the VPN service did not start in time" +msgstr "VPN-tjenesten startede ikke i tide" + +#: ../cli/src/connections.c:1158 +msgid "the VPN service failed to start" +msgstr "VPN-tjenesten kunne ikke starte" + +#: ../cli/src/connections.c:1160 +msgid "no valid VPN secrets" +msgstr "ingen korrekte VPN-hemmeligheder" + +#: ../cli/src/connections.c:1162 +msgid "invalid VPN secrets" +msgstr "ukorrekte VPN-hemmeligheder" + +#: ../cli/src/connections.c:1164 +msgid "the connection was removed" +msgstr "forbindelsen blev fjernet" + +#: ../cli/src/connections.c:1178 +#, c-format +msgid "state: %s\n" +msgstr "tilstand: %s\n" + +#: ../cli/src/connections.c:1181 +#: ../cli/src/connections.c:1207 +#, c-format +msgid "Connection activated\n" +msgstr "Forbindelse aktiveret\n" + +#: ../cli/src/connections.c:1184 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Fejl: Forbindelsesaktivering fejlede." + +#: ../cli/src/connections.c:1203 +#, c-format +msgid "state: %s (%d)\n" +msgstr "tilstand: %s (%d)\n" + +#: ../cli/src/connections.c:1213 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Fejl: Forbindelsesaktivering fejlede: %s." + +#: ../cli/src/connections.c:1230 +#: ../cli/src/devices.c:911 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Fejl: Ventetid på %d sek udløb." + +#: ../cli/src/connections.c:1273 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Fejl: Forbindelsesaktivering fejlede: %s" + +#: ../cli/src/connections.c:1287 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Fejl: Indhentelse af aktiv forbindelse for '%s' mislykkedes." + +#: ../cli/src/connections.c:1296 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Aktiv forbindelsestilstand: %s\n" + +#: ../cli/src/connections.c:1297 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Aktiv forbindelsessti: %s\n" + +#: ../cli/src/connections.c:1351 +#: ../cli/src/connections.c:1472 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Fejl: Ukendt forbindelse: %s." + +#: ../cli/src/connections.c:1386 +#: ../cli/src/devices.c:982 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Fejl: Værdi for tidsudløb \"%s\" er ikke korrekt." + +#: ../cli/src/connections.c:1399 +#: ../cli/src/connections.c:1489 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Fejl: Id eller uuid skal angives." + +#: ../cli/src/connections.c:1419 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Fejl: Ingen passende enhed fundet: %s." + +#: ../cli/src/connections.c:1421 +#, c-format +msgid "Error: No suitable device found." +msgstr "Fejl: Ingen passende enhed fundet." + +#: ../cli/src/connections.c:1516 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Advarsel: Forbindelse ikke aktiv\n" + +#: ../cli/src/connections.c:1573 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Fejl: 'con'-kommandoen '%s' er ikke gyldig." + +#: ../cli/src/connections.c:1609 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Fejl: Kunne ikke forbinde til D-Bus." + +#: ../cli/src/connections.c:1616 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Fejl: Kunne ikke indhente systemopsætning." + +#: ../cli/src/connections.c:1624 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Fejl: Kunne ikke indhente brugeropsætning." + +#: ../cli/src/connections.c:1634 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Fejl: Kan ikke indhente forbindelser: Opsætningstjenester kører ikke." + +#. 0 +#. 9 +#: ../cli/src/devices.c:61 +#: ../cli/src/devices.c:90 +#: ../cli/src/devices.c:185 +msgid "DEVICE" +msgstr "ENHED" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:63 +#: ../cli/src/devices.c:94 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "TILSTAND" + +#: ../cli/src/devices.c:73 +msgid "GENERAL" +msgstr "GENERELT" + +#. 0 +#: ../cli/src/devices.c:74 +msgid "CAPABILITIES" +msgstr "FUNKTIONALITETER" + +#. 1 +#: ../cli/src/devices.c:75 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-EGENSKABER" + +#. 2 +#: ../cli/src/devices.c:76 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:77 +msgid "WIRED-PROPERTIES" +msgstr "TRÅDET-EGENSKABER" + +#. 4 +#: ../cli/src/devices.c:78 +msgid "IP4-SETTINGS" +msgstr "IP4-INSTILLINGER" + +#. 5 +#: ../cli/src/devices.c:79 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 6 +#: ../cli/src/devices.c:80 +msgid "IP6-SETTINGS" +msgstr "IP6-INDSTILLINGER" + +#. 7 +#: ../cli/src/devices.c:81 +msgid "IP6-DNS" +msgstr "IP6-DNS" + +#. 2 +#: ../cli/src/devices.c:92 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:93 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:103 +msgid "CARRIER-DETECT" +msgstr "UDBYDER-OPFANG" + +#. 1 +#: ../cli/src/devices.c:104 +msgid "SPEED" +msgstr "HASTIGHED" + +#. 0 +#: ../cli/src/devices.c:113 +msgid "CARRIER" +msgstr "UDBYDER" + +#. 0 +#: ../cli/src/devices.c:123 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:124 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:125 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:126 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:127 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:136 +#: ../cli/src/devices.c:147 +msgid "ADDRESS" +msgstr "ADRESSE" + +#. 1 +#: ../cli/src/devices.c:137 +#: ../cli/src/devices.c:148 +msgid "PREFIX" +msgstr "PRÆFIKS" + +#. 2 +#: ../cli/src/devices.c:138 +#: ../cli/src/devices.c:149 +msgid "GATEWAY" +msgstr "ADGANGSPUNKT" + +#. 0 +#: ../cli/src/devices.c:158 +#: ../cli/src/devices.c:167 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:176 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:177 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:178 +msgid "MODE" +msgstr "TILSTAND" + +#. 3 +#: ../cli/src/devices.c:179 +msgid "FREQ" +msgstr "FREK" + +#. 4 +#: ../cli/src/devices.c:180 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:181 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:182 +msgid "SECURITY" +msgstr "SIKKERHED" + +#. 7 +#: ../cli/src/devices.c:183 +msgid "WPA-FLAGS" +msgstr "WPA-FLAG" + +#. 8 +#: ../cli/src/devices.c:184 +msgid "RSN-FLAGS" +msgstr "RSN-FLAG" + +#. 10 +#: ../cli/src/devices.c:186 +msgid "ACTIVE" +msgstr "AKTIV" + +#: ../cli/src/devices.c:209 #, c-format msgid "" -"unable to create netlink socket for monitoring wired ethernet devices - %s" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" msgstr "" -"kan ikke oprette netlink sokkel til overvågning af kablede ethernet enheder " -"- %s" +"Brug: nmcli dev { KOMMANDO | help }\n" +"\n" +" KOMMANDO := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:229 +msgid "unmanaged" +msgstr "uhåndteret" + +#: ../cli/src/devices.c:231 +msgid "unavailable" +msgstr "utilgængelig" + +#: ../cli/src/devices.c:233 +#: ../cli/src/network-manager.c:91 +msgid "disconnected" +msgstr "frakoblet" + +#: ../cli/src/devices.c:235 +msgid "connecting (prepare)" +msgstr "forbinder (forbereder)" + +#: ../cli/src/devices.c:237 +msgid "connecting (configuring)" +msgstr "forbinder (konfigurerer)" + +#: ../cli/src/devices.c:239 +msgid "connecting (need authentication)" +msgstr "forbinder (venter på godkendelse)" + +#: ../cli/src/devices.c:241 +msgid "connecting (getting IP configuration)" +msgstr "forbinder (henter IP-konfiguration)" + +#: ../cli/src/devices.c:243 +#: ../cli/src/network-manager.c:89 +msgid "connected" +msgstr "tilsluttet" + +#: ../cli/src/devices.c:245 +msgid "connection failed" +msgstr "forbindelse fejlet" + +#: ../cli/src/devices.c:268 +#: ../cli/src/devices.c:425 +msgid "Unknown" +msgstr "Ukendt" + +#: ../cli/src/devices.c:300 +msgid "(none)" +msgstr "(ingen)" + +#: ../cli/src/devices.c:325 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: Fejl under konvertering af IP4-adresse 0x%X" + +#: ../cli/src/devices.c:394 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:395 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:404 +msgid "Encrypted: " +msgstr "Krypteret: " + +#: ../cli/src/devices.c:409 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:411 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:413 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:416 +msgid "Enterprise " +msgstr "Erhverv " + +#: ../cli/src/devices.c:425 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:425 +msgid "Infrastructure" +msgstr "Infrastruktur" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Fejl: 'dev list': %s" + +#: ../cli/src/devices.c:489 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Fejl: 'dev list'': %s; tilladte felter: %s" + +#: ../cli/src/devices.c:498 +msgid "Device details" +msgstr "Enhedsdetaljer" -#: ../src/nm-netlink-monitor.c:192 +#: ../cli/src/devices.c:528 +#: ../cli/src/devices.c:927 +msgid "(unknown)" +msgstr "(ukendt)" + +#: ../cli/src/devices.c:529 +msgid "unknown)" +msgstr "ukendt)" + +#: ../cli/src/devices.c:555 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:628 +msgid "on" +msgstr "tændt" + +#: ../cli/src/devices.c:628 +msgid "off" +msgstr "slukket" + +#: ../cli/src/devices.c:810 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Fejl: 'dev status': %s" + +#: ../cli/src/devices.c:812 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Fejl: 'dev status': %s; tilladte felter: %s" + +#: ../cli/src/devices.c:819 +msgid "Status of devices" +msgstr "Status på enheder" + +#: ../cli/src/devices.c:847 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Fejl: '%s'-parameter mangler." + +#: ../cli/src/devices.c:876 +#: ../cli/src/devices.c:1015 +#: ../cli/src/devices.c:1138 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Fejl: Enhed \"%s\" ikke fundet." + +#: ../cli/src/devices.c:899 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Succes: Enhed '%s' frakoblet." + +#: ../cli/src/devices.c:924 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Fejl: Frakobling af enhed \"%s\" (%s) mislykkedes: %s" + +#: ../cli/src/devices.c:932 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Enhedstilstand: %d (%s)\n" + +#: ../cli/src/devices.c:996 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Fejl: iface skal være angivet." + +#: ../cli/src/devices.c:1114 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Fejl: 'dev wifi': %s" + +#: ../cli/src/devices.c:1116 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Fejl: 'dev wifi': %s; tilladte felter: %s" + +#: ../cli/src/devices.c:1123 +msgid "WiFi scan list" +msgstr "WiFi-skanningsliste" + +#: ../cli/src/devices.c:1158 +#: ../cli/src/devices.c:1212 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Fejl: Adgangspunkt med hwadr '%s' blev ikke fundet." + +#: ../cli/src/devices.c:1175 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Fejl: Enhed '%s' er ikke en WiFi-enhed." + +#: ../cli/src/devices.c:1239 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Fejl: 'dev wifi'-kommandoen '%s' er ikke gyldig." + +#: ../cli/src/devices.c:1286 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Fejl: 'dev'-kommanoden '%s' er ikke gyldig." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "KØRER" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "NET-ENABLED" +msgstr "NET-AKTIVERET" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WIFI" +msgstr "WIFI" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 5 +#: ../cli/src/network-manager.c:41 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:64 #, c-format msgid "" -"unable to bind to netlink socket for monitoring wired ethernet devices - %s" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | enable | sleep | wifi | wwan }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" msgstr "" -"kan ikke tilslutte netlink sokkel til overvågning af kablede ethernet " -"enheder - %s" +"Brug: nmcli nm { KOMMANDO | help }\n" +"\n" +" KOMMANDO := { status | enable | sleep | wifi | wwan }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:85 +msgid "asleep" +msgstr "sover" + +#: ../cli/src/network-manager.c:87 +msgid "connecting" +msgstr "forbinder" + +#: ../cli/src/network-manager.c:128 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Fejl: 'nm status': %s" -#: ../src/nm-netlink-monitor.c:427 -msgid "operation took too long" -msgstr "handlingen overskred tidsgrænsen" +#: ../cli/src/network-manager.c:130 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Fejl: 'nm status': %s; tilladte felter: %s" + +#: ../cli/src/network-manager.c:137 +msgid "NetworkManager status" +msgstr "Status for NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:144 +#: ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 +#: ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 +msgid "enabled" +msgstr "aktiveret" + +#: ../cli/src/network-manager.c:144 +#: ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 +#: ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 +msgid "disabled" +msgstr "deaktiveret" + +#: ../cli/src/network-manager.c:152 +msgid "running" +msgstr "kører" + +#: ../cli/src/network-manager.c:152 +msgid "not running" +msgstr "kører ikke" + +#: ../cli/src/network-manager.c:175 +#, c-format +msgid "Error: Couldn't connect to system bus: %s" +msgstr "Fejl: Kunne ikke forbinde til systembus: %s" -#: ../src/nm-netlink-monitor.c:524 -msgid "received data from wrong type of sender" -msgstr "modtog data fra forkert type afsender" +#: ../cli/src/network-manager.c:186 +#, c-format +msgid "Error: Couldn't create D-Bus object proxy." +msgstr "Fejl: Kunne ikke oprette proxy-objekt for D-Bus." -#: ../src/nm-netlink-monitor.c:537 -msgid "received data from unexpected sender" -msgstr "modtog data fra uventet afsender" +#: ../cli/src/network-manager.c:192 +#, c-format +msgid "Error in sleep: %s" +msgstr "Fejl ved søvn: %s" -#: ../src/nm-netlink-monitor.c:666 -msgid "too much data was sent over socket and some of it was lost" -msgstr "for meget data var sendt over sokkelen og noget gik tabt" +#: ../cli/src/network-manager.c:237 +#: ../cli/src/network-manager.c:286 +#: ../cli/src/network-manager.c:318 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Fejl: '--fields'-værdi '%s' er ikke gyldig her; tilladte felter: %s" -#: ../src/nm-netlink-monitor.c:774 -msgid "error occurred while waiting for data on socket" -msgstr "der opstod en fejl mens der blev ventet på data på sokkelen" +#: ../cli/src/network-manager.c:245 +msgid "Networking enabled" +msgstr "Netværk aktiveret" -#: ../src/nm-ap-security-wpa-eap.c:93 ../src/nm-ap-security-wpa-eap.c:117 -msgid "WPA2 Enterprise" -msgstr "WPA2 i virksomhed" +#: ../cli/src/network-manager.c:256 +#, c-format +msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'." +msgstr "Fejl: Ugyldig 'enable'-parameter: '%s'; brug 'true' eller 'false'." -#: ../src/nm-ap-security-wpa-eap.c:95 ../src/nm-ap-security-wpa-eap.c:122 -msgid "WPA Enterprise" -msgstr "WPA i virksomhed" +#: ../cli/src/network-manager.c:265 +#, c-format +msgid "Error: Sleeping status is not exported by NetworkManager." +msgstr "Fejl: NetworkManager eksporterer ikke søvnstatus." -#: ../src/nm-ap-security-leap.c:66 ../src/nm-ap-security-leap.c:82 -msgid "LEAP" -msgstr "LEAP" +#: ../cli/src/network-manager.c:273 +#, c-format +msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'." +msgstr "Fejl: Ugyldig 'sleep'-parameter: '%s'; brug 'true' eller 'false'." -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "Adgangskode til trådløst netværk %s" +#: ../cli/src/network-manager.c:294 +msgid "WiFi enabled" +msgstr "WiFi aktiveret" -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "Tilslutning til det trådløse netværk '%s' mislykkedes." +#: ../cli/src/network-manager.c:305 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Fejl: Ugyldig 'wifi'-parameter: '%s'." -#~ msgid "Connection to the wired network failed." -#~ msgstr "Tilslutning til det kablede netværk mislykkedes." +#: ../cli/src/network-manager.c:326 +msgid "WWAN enabled" +msgstr "WWAN aktiveret" -#~ msgid "Error displaying connection information: " -#~ msgstr "Fejl ved visning af forbindelses-information: " +#: ../cli/src/network-manager.c:337 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Fejl: Ugyldig 'wwan'-parameter: '%s'." -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "Kunne ikke finde nogle krævede ressourcer (glade-filen)!" +#: ../cli/src/network-manager.c:348 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Fejl: 'nm'-kommando '%s' er ikke gyldig." -#~ msgid "No active connections!" -#~ msgstr "Ingen aktive forbindelser!" +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Brug: %s [TILVALG] OBJEKT { KOMMANDO | help }\n" +"\n" +"TILVALG\n" +" -t[erse] kort udskrift\n" +" -p[retty] pæn udskrift\n" +" -m[ode] tabular|multiline udskriftstilstand\n" +" -f[ields] |all|common angiv felter til udskrift\n" +" -e[scape] yes|no undvig kolonneadskillere i værdier\n" +" -v[ersion] vis programversion\n" +" -h[elp] vis denne hjælpetekst\n" +"\n" +"OBJEKT\n" +" nm status for NetworkManager \n" +" con forbindelser for NetworkManager\n" +" dev enheder håndteret af NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Fejl: Objekt '%s' er ukendt, prøv 'nmcli help'." -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "Kablet Ethernet (%s)" +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Fejl: Tilvalg '--terse' er angivet anden gang." -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "Trådløst Ethernet (%s)" +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Fejl: Tilvalg '--terse' kan ikke bruges sammen med '--pretty'." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Fejl: Tilvalg '--pretty' er angivet anden gang." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Fejl: Tilvalg '--pretty' kan ikke bruges sammen med '--terse'." + +#: ../cli/src/nmcli.c:171 +#: ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Fejl: Mangler argument for tilvalget '%s'." + +#: ../cli/src/nmcli.c:180 +#: ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Fejl: '%s' er ikke et gyldigt argument for tilvalget '%s'." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Fejl: Felter for tilvalgene '%s' mangler." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli-værktøj, version %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Fejl: Tilvalg '%s' er ukendt, prøv 'nmcli -help'." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Fik signal %d, afslutter..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Fejl: Kunne ikke oprette forbinde til NetworkManager." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Succes" + +#: ../cli/src/settings.c:411 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-nøgle)" + +#: ../cli/src/settings.c:413 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bit adgangsfrase)" + +#: ../cli/src/settings.c:416 +#, c-format +msgid "%d (unknown)" +msgstr "%d (ukendt)" + +#: ../cli/src/settings.c:442 +msgid "0 (unknown)" +msgstr "0 (ukendt)" + +#: ../cli/src/settings.c:448 +msgid "any, " +msgstr "enhver, " + +#: ../cli/src/settings.c:450 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:454 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:456 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:468 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:470 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:554 +#: ../cli/src/settings.c:721 +msgid "auto" +msgstr "automatisk" + +#: ../cli/src/settings.c:716 +#: ../cli/src/settings.c:719 +#: ../cli/src/settings.c:720 +#: ../cli/src/utils.c:172 +msgid "not set" +msgstr "ikke sat" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "feltet '%s' skal stå alene" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "ugyldigt felt '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Tilvalg '--terse' kræver angivelse af '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "Tilvalg '--terse' kræver specifikke tilvalgsværdier for '--fields', ikke '%s'" + +#: ../libnm-util/crypto.c:121 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM-nøglefil havde intet slutmærke \"%s\"." + +#: ../libnm-util/crypto.c:131 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Ligner ikke en privat PEM-nøglefil." + +#: ../libnm-util/crypto.c:139 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Ikke nok hukommelse til at lagre PEM-fildata." + +#: ../libnm-util/crypto.c:155 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Fejlskrevet PEM-fil: Proc-Type var ikke første mærke." + +#: ../libnm-util/crypto.c:163 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Fejlskrevet PEM-fil: Ukendt mærke \"%s\" for Proc-type." + +#: ../libnm-util/crypto.c:173 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Fejlskrevet PEM-fil: DEK-info var ikke andet mærke." + +#: ../libnm-util/crypto.c:184 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Fejlskrevet PEM-fil: intet IV fundet i mærket DEK-Info." + +#: ../libnm-util/crypto.c:191 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Fejlskrevet PEM-fil: ugyldigt format af IV i mærket DEK-Info." + +#: ../libnm-util/crypto.c:204 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Fejlskrevet PEM-fil: ukendt privat nøgleciffer \"%s\"." + +#: ../libnm-util/crypto.c:223 +#, c-format +msgid "Could not decode private key." +msgstr "Kunne ikke afkode privat nøgle." + +#: ../libnm-util/crypto.c:268 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM-certifikatet \"%s\" har intet slutmærke \"%s\"." + +#: ../libnm-util/crypto.c:278 +#, c-format +msgid "Failed to decode certificate." +msgstr "Fejl ved afkodning af certifikat." + +#: ../libnm-util/crypto.c:287 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Ikke nok hukommelse til at gemme certifikatdata." + +#: ../libnm-util/crypto.c:295 +#, c-format +msgid "Not enough memory to store file data." +msgstr "Ikke nok hukommelse til at gemme fildata." + +#: ../libnm-util/crypto.c:325 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV skal have en længde på et lige antal byte." + +#: ../libnm-util/crypto.c:334 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Ikke nok hukommelse til at gemme IV'en." + +#: ../libnm-util/crypto.c:345 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV indeholder ikke-hexadecimale cifre." + +#: ../libnm-util/crypto.c:383 +#: ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 +#: ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Privat nøgleciffer \"%s\" var ukendt." + +#: ../libnm-util/crypto.c:392 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "Ikke nok hukommelse til at dekryptere privat nøgle." + +#: ../libnm-util/crypto.c:512 +#, c-format +msgid "Unable to determine private key type." +msgstr "Kunne ikke afgøre typen af privat nøgle." -#~ msgid "NetworkManager Applet" -#~ msgstr "NetworkManager-panelprogram" +#: ../libnm-util/crypto.c:531 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Ikke nok hukommelse til at gemme dekrypteret privat nøgle." -#~ msgid "Copyright © 2004-2005 Red Hat, Inc." -#~ msgstr "Copyright © 2004-2005 Red Hat, Inc." +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Kunne ikke initialisere kryptomotor." -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "" -#~ "Statusfelt-panelprogram til håndtering af dine netværks-enheder og -" -#~ "forbindelser." +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Kunne ikke initialisere MD5-motor: %s / %s." -#~ msgid "translator-credits" -#~ msgstr "" -#~ "David Nielsen\n" -#~ "Martin Willemoes Hansen\n" -#~ "Lasse Bang Mikkelsen\n" -#~ "\n" -#~ "Dansk-gruppen \n" -#~ "Mere info: http://www.dansk-gruppen.dk" +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Ugyldig IV-længde (skal være mindst %zd)." -#~ msgid "VPN Error" -#~ msgstr "VPN fejl" +#: ../libnm-util/crypto_gnutls.c:165 +#: ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Ikke nok hukommelse til afkodet nøglebuffer." -#~ msgid "VPN Login Failure" -#~ msgstr "VPN logind-fejl" +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Kunne ikke initialisere cifferkontekst til dekryptering: %s / %s." -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "" -#~ "Kunne ikke etablere VPN-forbindelsen '%s' pågrund af en logind-fejl." +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Kunne ikke sætte symmetrisk nøgle til dekryptering: %s / %s." -#~ msgid "VPN Start Failure" -#~ msgstr "VPN etablerings-fejl" +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Kunne ikke sætte IV til dekryptering: %s / %s." -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "" -#~ "Kunne ikke etablere VPN-forbindelsen '%s' pågrund af fejl ved start af " -#~ "VPN-program." +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Kunne ikke dekryptere den private nøgle: %s / %s." -#~ msgid "VPN Connect Failure" -#~ msgstr "VPN tilslutnings-fejl" +#: ../libnm-util/crypto_gnutls.c:210 +#: ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Kunne ikke dekryptere den private nøgle: uventet længde af fylddata." -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "" -#~ "Kunne ikke etablere VPN-forbindelsen '%s' pågrund af en forbindelses-fejl." +#: ../libnm-util/crypto_gnutls.c:221 +#: ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "Kunne ikke dekryptere den private nøgle." -#~ msgid "VPN Configuration Error" -#~ msgstr "VPN konfigurations-fejl" +#: ../libnm-util/crypto_gnutls.c:286 +#: ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Kunne ikke allokere hukommelse til kryptering." -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "VPN-forbindelsen '%s' er ikke konfigureret korrekt." +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Kunne ikke initialisere krypteringscifferkontekst: %s / %s." -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "" -#~ "Kunne ikke etablere VPN-forbindelsen '%s' fordi VPN-serveren ikke " -#~ "returnerede en passende netværks-konfiguration." +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Kunne ikke sætte symmetrisk nøgle til kryptering: %s / %s." -#~ msgid "The VPN service said: \"%s\"" -#~ msgstr "VPN-tjenesten sagde: \"%s\"" +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Kunne ikke sætte IV til kryptering: %s / %s." -#~ msgid "VPN connection '%s' said:" -#~ msgstr "VPN-forbindelsen '%s' sagde:" +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Kunne ikke kryptere data: %s / %s." -#~ msgid "VPN Login Message" -#~ msgstr "VPN logind-meddelelse" +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Fejl under initialisering af certifikatdata: %s" -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "" -#~ "NetworkManager panelprogrammet kunne ikke finde nogle krævede ressourcer " -#~ "(glade-filen blev ikke fundet)." +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Kunne ikke afkode certifikat: %s" -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "Netværks-enheden \"%s (%s)\" understøtter ikke trådløs scanning." +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Kunne ikke initialisere PKCS#12-afkoder: %s" -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "Netværks-enheden \"%s (%s)\" understøtter ikke link-detektering." +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Kunne ikke afkode PKCS#12-fil: %s" -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "Klargører enheden %s til det kablede netværk..." +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Kunne ikke bekræfte PKCS#12-fil: %s" -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "Klargører enheden %s til det trådløse netværk '%s'..." +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Kunne ikke initialisere kryptomotor: %d." -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "Konfigurerer enheden %s til det kablede netværk..." +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Kunne ikke initialisere MD5-kontekst: %d." -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "Forsøger at tilslutte til det trådløse netværk '%s'..." +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Ugyldig IV-længde (skal være mindst %d)." -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "Venter på netværksnøglen til det trådløse netværk '%s'..." +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Kunne ikke initialisere cifferplads til dekryptering." -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "Forespørger en netværks-adresse fra det kablede netværk..." +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Kunne ikke sætte symmetrisk nøgle til kryptering." -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "Forespørger en netværks-adresse fra det trådløse netværk '%s'..." +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Kunne ikke sætte IV til dekryptering." -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "Færdiggører tilslutning til det kablede netværk..." +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Kunne ikke initialisere dekrypteringskonteksten." -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "Færdiggører tilslutning til det trådløse netværk '%s'..." +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Kunne ikke dekryptere den private nøgle: %d." -#~ msgid "NetworkManager is not running" -#~ msgstr "NetworkManager kører ikke" +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Kunne ikke dekryptere den private nøgle: for stor mængde dekrypteret data." -#~ msgid "Networking disabled" -#~ msgstr "Netværks-understøttelse deaktiveret" +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Kunne ikke afslutte dekryptering af den private nøgle: %d." -#~ msgid "No network connection" -#~ msgstr "Ingen netværks-forbindelse" +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Kunne ikke initialisere cifferplads til kryptering." -#~ msgid "Wired network connection" -#~ msgstr "Kablet netværks-forbindelse" +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Kunne ikke sætte symmetrisk nøgle til kryptering." -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "Tilsluttet til et trådløst ad hoc netværk" +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Kunne ikke sætte IV til kryptering." -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "Trådløs netværks-forbindelse til '%s' (%d%%)" +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Kunne ikke initialisere krypteringskontekst." -#~ msgid "VPN connection to '%s'" -#~ msgstr "VPN-forbindelse til '%s'" +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Kunne ikke kryptere: %d." -#~ msgid "VPN connecting to '%s'" -#~ msgstr "VPN tilslutter til '%s'" +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Uventet mængde af data efter kryptering." -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "_Tilslut til andet trådløst netværk..." +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Kunne ikke afkode certifikat: %d" -#~ msgid "Create _New Wireless Network..." -#~ msgstr "Opret _nyt trådløst netværk..." +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Kunne ikke konvertere adgangskode til UCS2: %d" -#~ msgid "_VPN Connections" -#~ msgstr "_VPN-forbindelser" +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Kunne ikke initialisere PKCS#12-afkoder: %d" -#~ msgid "_Configure VPN..." -#~ msgstr "_Konfigurér VPN..." +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Kunne ikke afkode PKCS#12-fil: %d" -#~ msgid "_Disconnect VPN..." -#~ msgstr "_Afbryd VPN..." +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Kunne ikke verificere PKCS#12-fil: %d" -#~ msgid "_Dial Up Connections" -#~ msgstr "_Opkalds-forbindelser" +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Kunne ikke generere tilfældige data." -#~ msgid "Connect to %s..." -#~ msgstr "Tilslut til %s..." +#: ../libnm-util/nm-utils.c:1975 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Ikke nok hukommelse til at oprette krypteringsnøgle." -#~ msgid "Disconnect from %s..." -#~ msgstr "Afbryd fra %s..." +#: ../libnm-util/nm-utils.c:2085 +msgid "Could not allocate memory for PEM file creation." +msgstr "Kunne ikke allokere hukommelse til PEM-filoprettelse." -#~ msgid "No network devices have been found" -#~ msgstr "Ingen netværks-enheder blev fundet" +#: ../libnm-util/nm-utils.c:2097 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Kunne ikke allokere hukommelse til at skrive IV til PEM-fil." -#~ msgid "NetworkManager is not running..." -#~ msgstr "NetworkManager kører ikke..." +#: ../libnm-util/nm-utils.c:2109 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Kunne ikke allokere hukommelse til at skrive krypteret nøgle til PEM-fil." -#~ msgid "Enable _Networking" -#~ msgstr "Aktivér _netværks-understøttelse" +#: ../libnm-util/nm-utils.c:2128 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Kunne ikke allokere hukommelse til PEM-fildata." -#~ msgid "Enable _Wireless" -#~ msgstr "Aktivér _trådløst netværk" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Deling af forbindelse via et beskyttet WiFi-netværk" -#~ msgid "Connection _Information" -#~ msgstr "Forbindelses-_information" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Deling af forbindelse via et åbent WiFi-netværk" -#~ msgid "_Help" -#~ msgstr "_Hjælp" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Ændr fast systemværtsnavn" -#~ msgid "_About" -#~ msgstr "_Om" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Ændr systemforbindelser" -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "" -#~ "NetworkManager panelprogrammet kunne ikke finde nogle krævede ressourcer " -#~ "- kan ikke fortsætte.\n" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Systempolitikken forhindrer modifikation af systemindstillinger" -#~ msgid "Open System" -#~ msgstr "Åbent system" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Systempolitikken forhindrer ændring af det faste systemværtsnavn" -#~ msgid "Shared Key" -#~ msgstr "Delt nøgle" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Systempolitikken forhindrer deling af forbindelser via et beskyttet WiFi-netværk" -#~ msgid "TKIP (Default)" -#~ msgstr "TKIP (forvalgt)" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Systempolitikken forhindrer deling af forbindelser via et åbent WiFi-netværk" -#~ msgid "AES-CCMP" -#~ msgstr "AES-CCMP" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 +msgid "Allow control of network connections" +msgstr "Tillad kontrol af netværksforbindelser" -#~ msgid "None" -#~ msgstr "Ingen" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2 +msgid "Allow use of user-specific connections" +msgstr "Tillad brug af brugerspecifikke forbindelser" -#~ msgid "WEP 40/128-bit ASCII" -#~ msgstr "WEP 40/128-bit ASCII" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3 +msgid "Enable or disable WiFi devices" +msgstr "Aktiver eller deaktiver WiFi-enheder" -#~ msgid "WEP 40/128-bit hex" -#~ msgstr "WEP 40/128-bit hex" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4 +msgid "Enable or disable mobile broadband devices" +msgstr "Aktiver eller deaktiver mobile bredbåndsenheder" -#~ msgid "WEP Passphrase" -#~ msgstr "WEP-adgangskode:" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 +msgid "Enable or disable system networking" +msgstr "Aktiver eller deaktiver systemnetværk" -#~ msgid "Orientation" -#~ msgstr "Retning" +#: ../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 "Sæt NetworkManager i hvile eller væk den (bør kun bruges af systemstrømstyringen)" -#~ msgid "The orientation of the tray." -#~ msgstr "Retningen på statusikonet." +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 +msgid "System policy prevents control of network connections" +msgstr "Systempolitik forhindrer kontrol af netværksforbindelser" -#~ msgid "Wired Network (%s)" -#~ msgstr "Kablet netværk (%s)" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 +msgid "System policy prevents enabling or disabling WiFi devices" +msgstr "Systempolitik forhindrer aktivering eller deaktivering af WiFi-enheder" -#~ msgid "_Wired Network" -#~ msgstr "_Kablet netværk" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 +msgid "System policy prevents enabling or disabling mobile broadband devices" +msgstr "Systempolitik forhindrer aktivering eller deaktivering af mobile bredbåndsenheder" -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "Trådløst netværk (%s)" -#~ msgstr[1] "Trådløse netværk (%s)" - -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "Trådløst netværk" -#~ msgstr[1] "Trådløse netværk" - -#~ msgid " (invalid Unicode)" -#~ msgstr " (ugyldig Unicode)" - -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "" -#~ "Som standard navngives det trådløse netværk til din maskines navn, %s, " -#~ "uden nogen kryptering slået til" - -#~ msgid "Create new wireless network" -#~ msgstr "Opret nyt trådløst netværk" - -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "" -#~ "Indtast navn- og sikkerhedsopsætning på det trådløse netværk du ønsker at " -#~ "oprette." - -#~ msgid "Create New Wireless Network" -#~ msgstr "Opret nyt trådløst netværk" - -#~ msgid "Existing wireless network" -#~ msgstr "Eksisterende trådløst netværk" - -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "Indtast navnet på det trådløse netværk du ønsker at tilslutte dig." - -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "Tilslut til andet trådløst netværk" - -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "Kan ikke etablere VPN-forbindelsen '%s'" - -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "" -#~ "Kunne ikke finde godkendelses-vinduet til VPN-forbindelsestypen '%s'. " -#~ "Kontakt din system-administrator." - -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "" -#~ "Der opstod en fejl ved start af godkendelses-vinduet til VPN-" -#~ "forbindelsestypen '%s'. Kontakt din system-administrator." - -#~ msgid " " -#~ msgstr " " - -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "" -#~ "Information om aktiv forbindelse" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "Adgangskode påkrævet af trådløst " -#~ "netværk\n" -#~ "\n" -#~ "En adgangskode eller krypteringsnøgle er påkrævet, for at opnå adgang til " -#~ "det trådløse netværk '%s'." - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "Reduceret netværks-funktionalitet\n" -#~ "\n" -#~ "%s Den vil ikke være fuldstændig funktionsdygtig." - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "Bekræftelse af logind på trådløst " -#~ "netværk\n" -#~ "\n" -#~ "Du har valgt at logge på det trådløse netværk '%s'. Hvis du er sikker på " -#~ "at dette trådløse netværk er sikkert, afkryds nedenstående " -#~ "afkrydsningsfelt og NetworkManager vil ikke spørge i fremtiden." - -#~ msgid "Authentication:" -#~ msgstr "Godkendelse:" - -#~ msgid "Broadcast Address:" -#~ msgstr "Rundsendings-adresse:" - -#~ msgid "C_onnect" -#~ msgstr "T_ilslut" - -#~ msgid "Connection Information" -#~ msgstr "Forbindelses-information" - -#~ msgid "Default Route:" -#~ msgstr "Standard rute:" - -#~ msgid "Destination Address:" -#~ msgstr "Destinations-adresse:" - -#~ msgid "Hardware Address:" -#~ msgstr "Hardware-adresse:" - -#~ msgid "IP Address:" -#~ msgstr "IP-adresse:" - -#~ msgid "Interface:" -#~ msgstr "Enhed:" - -#~ msgid "Key:" -#~ msgstr "Nøgle:" - -#~ msgid "" -#~ "None\n" -#~ "WEP Passphrase\n" -#~ "WEP 40/128-bit hex\n" -#~ "WEP 40/128-bit ASCII\n" -#~ msgstr "" -#~ "Ingen\n" -#~ "WEP-adgangskode\n" -#~ "WEP 40/128-bit hex\n" -#~ "WEP 40/128-bit ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "Åbent system\n" -#~ "Delt nøgle" - -#~ msgid "Other Wireless Network..." -#~ msgstr "Andet trådløst netværk..." - -#~ msgid "Passphrase:" -#~ msgstr "Adgangskode:" - -#~ msgid "Password:" -#~ msgstr "Adgangskode:" - -#~ msgid "Primary DNS:" -#~ msgstr "Primær DNS:" - -#~ msgid "Secondary DNS:" -#~ msgstr "Sekundær DNS:" - -#~ msgid "Subnet Mask:" -#~ msgstr "Undernet-maske:" - -#~ msgid "Type:" -#~ msgstr "Type:" - -#~ msgid "User Name:" -#~ msgstr "Brugernavn:" - -#~ msgid "Wireless Network Key Required" -#~ msgstr "Nøgle til trådløst netværk påkrævet" - -#~ msgid "Wireless _adapter:" -#~ msgstr "Trådløs _adapter:" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +msgid "System policy prevents enabling or disabling system networking" +msgstr "Systempolitik forhindrer aktivering eller deaktivering af systemnetværk" -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "_Stol altid på dette trådløse netværk" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 +msgid "System policy prevents putting NetworkManager to sleep or waking it up" +msgstr "Systempolitik forhindrer at sætte NetworkManager i hvile eller at vække den" -#~ msgid "_Don't remind me again" -#~ msgstr "_Påmind mig ikke igen" +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 +msgid "System policy prevents use of user-specific connections" +msgstr "Systempolitik forhindrer brug af brugerspecifikke forbindelser" -#~ msgid "_Login to Network" -#~ msgstr "_Log på netværk" +#: ../src/nm-netlink-monitor.c:100 +#: ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "fejl under behandling af netlink-besked: %s" -#~ msgid "_Network Name:" -#~ msgstr "_Netværksnavn:" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "der opstod en fejl mens der blev ventet på data på soklen" -#~ msgid "_Wireless Security:" -#~ msgstr "Trådløs sikkerhed:" +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "kan ikke forbinde til netlink for at overvåge forbindelsesstatus: %s" -#~ msgid "leap_subwindow" -#~ msgstr "leap_subwindow" +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "kan ikke aktivere videregivelse af akkreditiver for netlink-håndtag: %s" -#~ msgid "wep_key_subwindow" -#~ msgstr "wep_key_subwindow" +#: ../src/nm-netlink-monitor.c:291 +#: ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "kan ikke allokere netlink-håndtag til overvågning af forbindelsesstatus: %s" -#~ msgid "wep_passphrase_subwindow" -#~ msgstr "wep_passphrase_subwindow" +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "kan ikke allokere netlink-forbindelsesmellemlager til overvågning af forbindelsesstatus: %s" -#~ msgid "wpa_psk_subwindow" -#~ msgstr "wpa_psk_subwindow" +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "kan ikke gå ind i netlink-gruppen: %s" -#~ msgid "WPA2 Personal" -#~ msgstr "Personlig WPA2" +#: ../src/nm-netlink-monitor.c:629 +#: ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "fejl ved opdatering af forbindelsesmellemlager: %s" -#~ msgid "WPA Personal" -#~ msgstr "Personlig WPA" +#: ../src/main.c:506 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "Ugyldigt tilvalg. Brug venligst --help for at se en liste af gyldige tilvalg.\n" -#~ msgid "Choose which type of VPN connection you wish to create." -#~ msgstr "Vælg hvilken type VPN-forbindelse du ønsker at oprette." +#: ../src/main.c:577 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Brug venligst --help for at få en liste af gyldige tilvalg.\n" -#~ msgid "Connect to:" -#~ msgstr "Tilslut til:" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:328 +msgid "# Created by NetworkManager\n" +msgstr "# Oprettet af NetworkManager\n" -#~ msgid "Create VPN Connection - 1 of 2" -#~ msgstr "Opret VPN-forbindelse - 1 af 2" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:344 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Sammenflettet fra %s\n" +"\n" -#~ msgid "Create VPN Connection - 2 of 2" -#~ msgstr "Opret VPN-forbindelse - 2 af 2" +#: ../src/dhcp-manager/nm-dhcp-manager.c:284 +msgid "no usable DHCP client could be found." +msgstr "kunne ikke finde en brugbar DHCP-klient." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:293 +msgid "'dhclient' could be found." +msgstr "'dhclient' blev fundet." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:303 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' blev fundet." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:311 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ikke-understøttet DHCP-klient '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Ukendt logningsniveau '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Ukendt logningsdomæne '%s'" + +#: ../src/dns-manager/nm-dns-manager.c:367 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "BEMÆRK: libc-opløseren understøtter måske ikke mere end tre navneservere." + +#: ../src/dns-manager/nm-dns-manager.c:369 +msgid "The nameservers listed below may not be recognized." +msgstr "Navneserverne vist nedenfor vil måske ikke blive genkendt." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "Auto %s" -#~ msgid "Finish Creating VPN Connection" -#~ msgstr "Færdiggør oprettelse af VPN-forbindelse" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3408 +#: ../system-settings/plugins/ifnet/connection_parser.c:49 +msgid "System" +msgstr "System" -#~ msgid "" -#~ "This assistant will guide you through the creation of a connection to a " -#~ "Virtual Private Network (VPN).\n" -#~ "\n" -#~ "It will require some information, such as IP addresses and secrets. " -#~ "Please see your system administrator to obtain this information." -#~ msgstr "" -#~ "Denne vil guide dig gennem oprettelsen af en forbindelse til et virtuelt " -#~ "privat netværk (VPN).\n" -#~ "\n" -#~ "Denne guide vil kræve nogle informationer, såsom IP-adresser og " -#~ "adgangskode. Henvend dig venligst til din system-administrator for at få " -#~ "disse informationer." diff --git a/po/eo.po b/po/eo.po new file mode 100644 index 00000000..c099b86c --- /dev/null +++ b/po/eo.po @@ -0,0 +1,1766 @@ +# Esperanto translation for NetworkManager +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the network-manager package. +# +# Patrick (Petriko) OUDEJANS < >, 2010. +# Aisano < >, 2010. +# Kim RIBEIRO < >, 2010. +# Serge LEBLANC < >, 2010. +# Kristjan SCHMIDT , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: network-manager\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-12-10 15:25+0000\n" +"PO-Revision-Date: 2010-12-11 10:32+0100\n" +"Last-Translator: Kristjan SCHMIDT \n" +"Language-Team: Esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Launchpad-Export-Date: 2010-12-10 16:56+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#: ../cli/src/connections.c:60 ../cli/src/connections.c:76 +#: ../cli/src/devices.c:89 ../cli/src/devices.c:102 ../cli/src/devices.c:112 +#: ../cli/src/devices.c:122 ../cli/src/devices.c:135 ../cli/src/devices.c:146 +#: ../cli/src/devices.c:157 ../cli/src/devices.c:166 ../cli/src/devices.c:175 +msgid "NAME" +msgstr "NOMO" + +#. 0 +#: ../cli/src/connections.c:61 ../cli/src/connections.c:77 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:62 +msgid "DEVICES" +msgstr "APARATOJ" + +#. 2 +#: ../cli/src/connections.c:63 ../cli/src/connections.c:79 +msgid "SCOPE" +msgstr "AMPLEKSO" + +#. 3 +#: ../cli/src/connections.c:64 +msgid "DEFAULT" +msgstr "DEFAŬLTA" + +#. 4 +#: ../cli/src/connections.c:65 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVO" + +#. 5 +#: ../cli/src/connections.c:66 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJEKTO" + +#. 6 +#: ../cli/src/connections.c:67 +msgid "VPN" +msgstr "VPN" + +#. 7 +#. 2 +#: ../cli/src/connections.c:68 ../cli/src/connections.c:84 +#: ../cli/src/devices.c:64 +msgid "DBUS-PATH" +msgstr "DBUS-VOJO" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:78 ../cli/src/devices.c:62 ../cli/src/devices.c:91 +msgid "TYPE" +msgstr "SPECO" + +#. 3 +#: ../cli/src/connections.c:80 +msgid "TIMESTAMP" +msgstr "TEMPINDIKO" + +#. 4 +#: ../cli/src/connections.c:81 +msgid "TIMESTAMP-REAL" +msgstr "REALA-TEMPINDIKO" + +#. 5 +#: ../cli/src/connections.c:82 +msgid "AUTOCONNECT" +msgstr "AŬTOMATA-KONEKTO" + +#. 6 +#: ../cli/src/connections.c:83 +msgid "READONLY" +msgstr "NUR-LEGI" + +#: ../cli/src/connections.c:160 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Uzo: nmcli con { KOMANDO | help }\n" +" KOMANDO := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:200 ../cli/src/connections.c:541 +#, c-format +msgid "Error: 'con list': %s" +msgstr "Eraro: 'con list': %s" + +#: ../cli/src/connections.c:202 ../cli/src/connections.c:543 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Eraro: 'con list': %s; permesataj kampoj: %s" + +#: ../cli/src/connections.c:210 +msgid "Connection details" +msgstr "Konektodetaloj" + +#: ../cli/src/connections.c:385 ../cli/src/connections.c:606 +msgid "system" +msgstr "sistemo" + +#: ../cli/src/connections.c:385 ../cli/src/connections.c:606 +msgid "user" +msgstr "uzanto" + +#: ../cli/src/connections.c:387 +msgid "never" +msgstr "neniam" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:388 ../cli/src/connections.c:389 +#: ../cli/src/connections.c:607 ../cli/src/connections.c:610 +#: ../cli/src/devices.c:433 ../cli/src/devices.c:558 ../cli/src/devices.c:584 +#: ../cli/src/devices.c:585 ../cli/src/devices.c:586 ../cli/src/devices.c:587 +#: ../cli/src/devices.c:588 ../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 "jes" + +#: ../cli/src/connections.c:388 ../cli/src/connections.c:389 +#: ../cli/src/connections.c:607 ../cli/src/connections.c:610 +#: ../cli/src/devices.c:433 ../cli/src/devices.c:558 ../cli/src/devices.c:584 +#: ../cli/src/devices.c:585 ../cli/src/devices.c:586 ../cli/src/devices.c:587 +#: ../cli/src/devices.c:588 ../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 "ne" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:505 +msgid "System connections" +msgstr "Sistemkonektoj" + +#: ../cli/src/connections.c:467 ../cli/src/connections.c:518 +msgid "User connections" +msgstr "Uzanto-konektoj" + +#: ../cli/src/connections.c:479 ../cli/src/connections.c:1342 +#: ../cli/src/connections.c:1358 ../cli/src/connections.c:1367 +#: ../cli/src/connections.c:1378 ../cli/src/connections.c:1463 +#: ../cli/src/devices.c:964 ../cli/src/devices.c:974 ../cli/src/devices.c:1076 +#: ../cli/src/devices.c:1083 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Eraro: argumento %s mankas." + +#: ../cli/src/connections.c:492 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Eraro: %s - neniu tia konekto" + +#: ../cli/src/connections.c:524 ../cli/src/connections.c:1391 +#: ../cli/src/connections.c:1481 ../cli/src/devices.c:787 +#: ../cli/src/devices.c:854 ../cli/src/devices.c:988 ../cli/src/devices.c:1089 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Nekonata parametro: %s\n" + +#: ../cli/src/connections.c:533 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Eraro: neniu valida parametro difinita." + +#: ../cli/src/connections.c:548 ../cli/src/connections.c:1584 +#: ../cli/src/devices.c:1295 ../cli/src/network-manager.c:359 +#, c-format +msgid "Error: %s." +msgstr "Eraro: %s." + +#: ../cli/src/connections.c:655 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Eraro: 'con status': %s" + +#: ../cli/src/connections.c:657 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Eraro: 'con status': %s; permesataj kampoj: %s" + +#: ../cli/src/connections.c:664 +msgid "Active connections" +msgstr "Aktivaj konektoj" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection on device '%s'" +msgstr "neniu aktiva konekto sur aparato '%s'" + +#: ../cli/src/connections.c:1042 +#, c-format +msgid "no active connection or device" +msgstr "neniu aktiva konekto aŭ aparato" + +#: ../cli/src/connections.c:1092 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "aparato '%s' ne kongruas kun konekto '%s'" + +#: ../cli/src/connections.c:1094 +#, c-format +msgid "no device found for connection '%s'" +msgstr "neniu aparato trovita por konekto '%s'" + +#: ../cli/src/connections.c:1105 +msgid "activating" +msgstr "enŝaltas" + +#: ../cli/src/connections.c:1107 +msgid "activated" +msgstr "enŝaltite" + +#: ../cli/src/connections.c:1110 ../cli/src/connections.c:1133 +#: ../cli/src/connections.c:1166 ../cli/src/devices.c:247 +#: ../cli/src/devices.c:559 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:149 ../cli/src/settings.c:473 +msgid "unknown" +msgstr "nekonate" + +#: ../cli/src/connections.c:1119 +msgid "VPN connecting (prepare)" +msgstr "VPN konektas (preparo)" + +#: ../cli/src/connections.c:1121 +msgid "VPN connecting (need authentication)" +msgstr "VPN konektas (bezonas aŭtentigon)" + +#: ../cli/src/connections.c:1123 +msgid "VPN connecting" +msgstr "VPN konektas" + +#: ../cli/src/connections.c:1125 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN konektas (akiras IP-agordaron)" + +#: ../cli/src/connections.c:1127 +msgid "VPN connected" +msgstr "VPN konektita" + +#: ../cli/src/connections.c:1129 +msgid "VPN connection failed" +msgstr "VPN-konekto fiaskis" + +#: ../cli/src/connections.c:1131 +msgid "VPN disconnected" +msgstr "VPN malkonektis" + +#: ../cli/src/connections.c:1142 +msgid "unknown reason" +msgstr "nekonata kialo" + +#: ../cli/src/connections.c:1144 +msgid "none" +msgstr "nenio" + +#: ../cli/src/connections.c:1146 +msgid "the user was disconnected" +msgstr "la uzanto estis malkonektita" + +#: ../cli/src/connections.c:1148 +msgid "the base network connection was interrupted" +msgstr "la baza retkonekto estis interrompita" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service stopped unexpectedly" +msgstr "la VPN-servo neatendite ĉesis" + +#: ../cli/src/connections.c:1152 +msgid "the VPN service returned invalid configuration" +msgstr "la VPN-servo revenigis nevalidan agordaron" + +#: ../cli/src/connections.c:1154 +msgid "the connection attempt timed out" +msgstr "la konektoprovo eltempiĝis" + +#: ../cli/src/connections.c:1156 +msgid "the VPN service did not start in time" +msgstr "la VPN-servo ne startis ĝustatempe" + +#: ../cli/src/connections.c:1158 +msgid "the VPN service failed to start" +msgstr "la VPN-servo fiaskis starti" + +#: ../cli/src/connections.c:1160 +msgid "no valid VPN secrets" +msgstr "neniu valida VPN-sekreto" + +#: ../cli/src/connections.c:1162 +msgid "invalid VPN secrets" +msgstr "nevalidaj VPN-sekretoj" + +#: ../cli/src/connections.c:1164 +msgid "the connection was removed" +msgstr "la konekto estis forigita" + +#: ../cli/src/connections.c:1178 +#, c-format +msgid "state: %s\n" +msgstr "stato: %s\n" + +#: ../cli/src/connections.c:1181 ../cli/src/connections.c:1207 +#, c-format +msgid "Connection activated\n" +msgstr "Konekto enŝaltita\n" + +#: ../cli/src/connections.c:1184 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Eraro: Enŝalto de konekto fiaskis." + +#: ../cli/src/connections.c:1203 +#, c-format +msgid "state: %s (%d)\n" +msgstr "stato: %s (%d)\n" + +#: ../cli/src/connections.c:1213 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Eraro: Enŝalto de konekto fiaskis: %s." + +#: ../cli/src/connections.c:1230 ../cli/src/devices.c:911 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Eraro: Eltempiĝo finiĝis %d sek." + +#: ../cli/src/connections.c:1273 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Eraro: Enŝalto de konekto fiaskis: %s" + +#: ../cli/src/connections.c:1287 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Eraro: Akiro de aktiva konekto por '%s' fiaskis." + +#: ../cli/src/connections.c:1296 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Stato de aktiva konekto: %s\n" + +#: ../cli/src/connections.c:1297 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Vojo de aktiva konekto: %s\n" + +#: ../cli/src/connections.c:1351 ../cli/src/connections.c:1472 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Eraro: Nekonata konekto: %s." + +#: ../cli/src/connections.c:1386 ../cli/src/devices.c:982 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Eraro: eltempiĝa valoro '%s' ne validas." + +#: ../cli/src/connections.c:1399 ../cli/src/connections.c:1489 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Eraro: id aŭ uuid devas esti specifata." + +#: ../cli/src/connections.c:1419 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Eraro: Trovis neniun taŭgan aparaton: %s." + +#: ../cli/src/connections.c:1421 +#, c-format +msgid "Error: No suitable device found." +msgstr "Eraro: Trovis neniun taŭgan aparaton." + +#: ../cli/src/connections.c:1516 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Atenton: Konekto ne aktivas\n" + +#: ../cli/src/connections.c:1573 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Eraro: 'con'-komando '%s' ne validas." + +#: ../cli/src/connections.c:1609 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Eraro: ne povis konekti al D-Bus." + +#: ../cli/src/connections.c:1616 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Eraro: Ne povis akiri sistemajn agordojn." + +#: ../cli/src/connections.c:1624 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Eraro: Ne povis akiri uzanto-agordojn." + +#: ../cli/src/connections.c:1634 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Eraro: Ne povas obteni konektojn: agordo-servoj ne aktivas." + +#. 0 +#. 9 +#: ../cli/src/devices.c:61 ../cli/src/devices.c:90 ../cli/src/devices.c:185 +msgid "DEVICE" +msgstr "APARATO" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:63 ../cli/src/devices.c:94 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATO" + +#: ../cli/src/devices.c:73 +msgid "GENERAL" +msgstr "ĜENERALA" + +#. 0 +#: ../cli/src/devices.c:74 +msgid "CAPABILITIES" +msgstr "KAPABLOJ" + +#. 1 +#: ../cli/src/devices.c:75 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-ECOJ" + +#. 2 +#: ../cli/src/devices.c:76 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:77 +msgid "WIRED-PROPERTIES" +msgstr "DRATA-ECOJ" + +#. 4 +#: ../cli/src/devices.c:78 +msgid "IP4-SETTINGS" +msgstr "IP4-AGORDOJ" + +#. 5 +#: ../cli/src/devices.c:79 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 6 +#: ../cli/src/devices.c:80 +msgid "IP6-SETTINGS" +msgstr "IP6-AGORDOJ" + +#. 7 +#: ../cli/src/devices.c:81 +msgid "IP6-DNS" +msgstr "IP6-DNS" + +#. 2 +#: ../cli/src/devices.c:92 +msgid "DRIVER" +msgstr "PELILO" + +#. 3 +#: ../cli/src/devices.c:93 +msgid "HWADDR" +msgstr "APARATADRESO" + +#. 0 +#: ../cli/src/devices.c:103 +msgid "CARRIER-DETECT" +msgstr "PORTANTO-REKONO" + +#. 1 +#: ../cli/src/devices.c:104 +msgid "SPEED" +msgstr "RAPIDO" + +#. 0 +#: ../cli/src/devices.c:113 +msgid "CARRIER" +msgstr "PORTANTO" + +#. 0 +#: ../cli/src/devices.c:123 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:124 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:125 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:126 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:127 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:136 ../cli/src/devices.c:147 +msgid "ADDRESS" +msgstr "ADRESO" + +#. 1 +#: ../cli/src/devices.c:137 ../cli/src/devices.c:148 +msgid "PREFIX" +msgstr "PREFIKSO" + +#. 2 +#: ../cli/src/devices.c:138 ../cli/src/devices.c:149 +msgid "GATEWAY" +msgstr "KLUZO" + +#. 0 +#: ../cli/src/devices.c:158 ../cli/src/devices.c:167 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:176 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:177 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:178 +msgid "MODE" +msgstr "REĜIMO" + +#. 3 +#: ../cli/src/devices.c:179 +msgid "FREQ" +msgstr "FREKV" + +#. 4 +#: ../cli/src/devices.c:180 +msgid "RATE" +msgstr "TRANSMETRAPIDO" + +#. 5 +#: ../cli/src/devices.c:181 +msgid "SIGNAL" +msgstr "SIGNALO" + +#. 6 +#: ../cli/src/devices.c:182 +msgid "SECURITY" +msgstr "SEKURECO" + +#. 7 +#: ../cli/src/devices.c:183 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGOJ" + +#. 8 +#: ../cli/src/devices.c:184 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGOJ" + +#. 10 +#: ../cli/src/devices.c:186 +msgid "ACTIVE" +msgstr "AKTIVA" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Usage: nmcli dev { KOMANDO | help }\n" +"\n" +" KOMANDO := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:229 +msgid "unmanaged" +msgstr "nemastrumata" + +#: ../cli/src/devices.c:231 +msgid "unavailable" +msgstr "neatingebla" + +#: ../cli/src/devices.c:233 ../cli/src/network-manager.c:91 +msgid "disconnected" +msgstr "nekonektite" + +#: ../cli/src/devices.c:235 +msgid "connecting (prepare)" +msgstr "konektas (preparo)" + +#: ../cli/src/devices.c:237 +msgid "connecting (configuring)" +msgstr "konektas (agordado)" + +#: ../cli/src/devices.c:239 +msgid "connecting (need authentication)" +msgstr "konektas (bezonas aŭtentigon)" + +#: ../cli/src/devices.c:241 +msgid "connecting (getting IP configuration)" +msgstr "konektas (akiras IP-agordaron)" + +#: ../cli/src/devices.c:243 ../cli/src/network-manager.c:89 +msgid "connected" +msgstr "konektita" + +#: ../cli/src/devices.c:245 +msgid "connection failed" +msgstr "konekto fiaskis" + +#: ../cli/src/devices.c:268 ../cli/src/devices.c:425 +msgid "Unknown" +msgstr "Nekonata" + +#: ../cli/src/devices.c:300 +msgid "(none)" +msgstr "(nenio)" + +#: ../cli/src/devices.c:325 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: eraro dum konverto de IP4-adreso 0x%X" + +#: ../cli/src/devices.c:394 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:395 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:404 +msgid "Encrypted: " +msgstr "Ĉifrita: " + +#: ../cli/src/devices.c:409 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:411 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:413 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:416 +msgid "Enterprise " +msgstr "Entrepreno " + +#: ../cli/src/devices.c:425 +msgid "Ad-Hoc" +msgstr "Laŭcela" + +#: ../cli/src/devices.c:425 +msgid "Infrastructure" +msgstr "Infrastrukturo" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Eraro: 'dev list': %s" + +#: ../cli/src/devices.c:489 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Eraro: 'dev list': %s; permesataj kampoj: %s" + +#: ../cli/src/devices.c:498 +msgid "Device details" +msgstr "Detaloj de aparato" + +#: ../cli/src/devices.c:528 ../cli/src/devices.c:927 +msgid "(unknown)" +msgstr "(nekonata)" + +#: ../cli/src/devices.c:529 +msgid "unknown)" +msgstr "nekonata)" + +#: ../cli/src/devices.c:555 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:628 +msgid "on" +msgstr "enŝaltite" + +#: ../cli/src/devices.c:628 +msgid "off" +msgstr "elŝaltite" + +#: ../cli/src/devices.c:810 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Eraro: 'dev status': %s" + +#: ../cli/src/devices.c:812 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Eraro: 'dev status': %s; permesataj kampoj: %s" + +#: ../cli/src/devices.c:819 +msgid "Status of devices" +msgstr "Stato de aparatoj" + +#: ../cli/src/devices.c:847 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Eraro: argumento '%s' mankas." + +#: ../cli/src/devices.c:876 ../cli/src/devices.c:1015 +#: ../cli/src/devices.c:1138 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Eraro: Aparato '%s' ne trovita." + +#: ../cli/src/devices.c:899 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Sukceso: Aparato '%s' sukcese malkonektiĝis." + +#: ../cli/src/devices.c:924 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Eraro: Aparato '%s' (%s) eraro dum malkonektiĝo: %s" + +#: ../cli/src/devices.c:932 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Stato de aparato: %d (%s)\n" + +#: ../cli/src/devices.c:996 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Eraro: 'iface' devas esti specifata." + +#: ../cli/src/devices.c:1114 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Eraro: 'dev wifi': %s" + +#: ../cli/src/devices.c:1116 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Eraro: 'dev wifi': %s; permesataj kampoj: %s" + +#: ../cli/src/devices.c:1123 +msgid "WiFi scan list" +msgstr "WiFi-skanlisto" + +#: ../cli/src/devices.c:1158 ../cli/src/devices.c:1212 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Eraro: Retkaptejo kun 'hwaddr' '%s' ne trovita" + +#: ../cli/src/devices.c:1175 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Eraro: Aparato '%s' ne estas WiFi-aparato." + +#: ../cli/src/devices.c:1239 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Eraro: 'dev wifi'-komando '%s' ne validas." + +#: ../cli/src/devices.c:1286 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Eraro: 'dev'-komando '%s' ne validas." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "AKTIVA" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "NET-ENABLED" +msgstr "RET-ENŜALTITE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI-HARDWARE" +msgstr "WIFI-APARATARO" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WIFI" +msgstr "WIFI" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN-HARDWARE" +msgstr "WWAN-APARATARO" + +#. 5 +#: ../cli/src/network-manager.c:41 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:64 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | enable | sleep | wifi | wwan }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Uzo: nmcli nm { KOMANDO | help }\n" +"\n" +" KOMANDO := { status | enable | sleep | wifi | wwan }\n" +"\n" +" status\n" +" enable [true|false]\n" +" sleep [true|false]\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:85 +msgid "asleep" +msgstr "dormas" + +#: ../cli/src/network-manager.c:87 +msgid "connecting" +msgstr "konektas" + +#: ../cli/src/network-manager.c:128 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Eraro: 'nm status': %s" + +#: ../cli/src/network-manager.c:130 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Eraro: 'nm status': %s; permesataj kampoj: %s" + +#: ../cli/src/network-manager.c:137 +msgid "NetworkManager status" +msgstr "Stato de NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328 +msgid "enabled" +msgstr "enŝaltita" + +#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328 +msgid "disabled" +msgstr "elŝaltite" + +#: ../cli/src/network-manager.c:152 +msgid "running" +msgstr "aktiva" + +#: ../cli/src/network-manager.c:152 +msgid "not running" +msgstr "neaktiva" + +#: ../cli/src/network-manager.c:175 +#, c-format +msgid "Error: Couldn't connect to system bus: %s" +msgstr "Eraro: Ne povis konekti al sistem-buso: %s." + +#: ../cli/src/network-manager.c:186 +#, c-format +msgid "Error: Couldn't create D-Bus object proxy." +msgstr "Eraro: Ne povis krei D-busan objekt-prokurservilon." + +#: ../cli/src/network-manager.c:192 +#, c-format +msgid "Error in sleep: %s" +msgstr "Eraro dum dormo: %s" + +#: ../cli/src/network-manager.c:237 ../cli/src/network-manager.c:286 +#: ../cli/src/network-manager.c:318 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Eraro: valoro '--fields' '%s' ne validas tie ĉi; permesataj kampoj: %s" + +#: ../cli/src/network-manager.c:245 +msgid "Networking enabled" +msgstr "Retkonektado enŝaltita" + +#: ../cli/src/network-manager.c:256 +#, c-format +msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'." +msgstr "Eraro: nevalida 'enŝalt'-parametro: '%s'; uzu 'true' aŭ 'false'." + +#: ../cli/src/network-manager.c:265 +#, c-format +msgid "Error: Sleeping status is not exported by NetworkManager." +msgstr "Eraro: Dorm-stato ne estas elportite de NetworkManager." + +#: ../cli/src/network-manager.c:273 +#, c-format +msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'." +msgstr "Eraro: nevalida 'dorm'-parametro: '%s'; uzu 'true' aŭ 'false'." + +#: ../cli/src/network-manager.c:294 +msgid "WiFi enabled" +msgstr "WiFi enŝaltita" + +#: ../cli/src/network-manager.c:305 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Eraro: nevalida 'wifi'-parametro: '%s'." + +#: ../cli/src/network-manager.c:326 +msgid "WWAN enabled" +msgstr "WWAN enŝaltita" + +#: ../cli/src/network-manager.c:337 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Eraro: nevalida 'wwan'-parametro: '%s'." + +#: ../cli/src/network-manager.c:348 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Eraro: 'nm'-komando '%s' ne validas." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Uzo: %s [OPCIOJ] OBJEKTO { KOMANDO | help }\n" +"\n" +"OPCIOJ\n" +" -t[erse] konciza eligo\n" +" -p[retty] bela eligo\n" +" -m[ode] tabular|multiline eliga reĝimo\n" +" -f[ields] |all|common specifigi eligo-kampojn\n" +" -e[scape] yes|no eskapaj kolumno-separoj en " +"valoroj\n" +" -v[ersion] montri programversion\n" +" -h[elp] printi tiun ĉi help-paĝon\n" +"\n" +"OBJEKTO\n" +" nm stato de NetworkManager\n" +" con konektoj de NetworkManager\n" +" dev aparatoj mastrumataj de NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Eraro: Objekto '%s' estas nekonata, provu: 'nmcli help'." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Eraro: Opcio '--terse' specifiĝis duan fojon." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Eraro: Opcioj '--terse' kaj '--pretty' ekskludas unu la alian." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Eraro: Opcio '--pretty' specifiĝis duan fojon." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Eraro: Opcioj '--pretty' kaj '--terse' ekskludas unu la alian." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Eraro: mankas argumento por elektindaĵo '%s'." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Eraro: '%s' ne estas valida argumento por elektindaĵo '%s'." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Eraro: kampoj por elektindaĵoj '%s' mankas." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "ilo 'nmcli', versio %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Eraro: Opcio '%s' estas nekonata, provu: 'nmcli -help'." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Ricevis signalon '%d', elŝaltas..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Eraro: Ne eblis konekti al NetworkManager" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Sukceso" + +#: ../cli/src/settings.c:411 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (heks-ascii-ŝlosilo)" + +#: ../cli/src/settings.c:413 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bita pasvorto)" + +#: ../cli/src/settings.c:416 +#, c-format +msgid "%d (unknown)" +msgstr "%d (nekonata)" + +#: ../cli/src/settings.c:442 +msgid "0 (unknown)" +msgstr "0 (nekonata)" + +#: ../cli/src/settings.c:448 +msgid "any, " +msgstr "ajna, " + +#: ../cli/src/settings.c:450 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:454 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:456 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:468 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:470 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:554 ../cli/src/settings.c:721 +msgid "auto" +msgstr "aŭto" + +#: ../cli/src/settings.c:716 ../cli/src/settings.c:719 +#: ../cli/src/settings.c:720 ../cli/src/utils.c:172 +msgid "not set" +msgstr "neagordita" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "kampo '%s' devas esti sola" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "nevalida kampo '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Elektindaĵo '--terse' postulas specifigon de '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "" +"Elektindaĵo '--terse' postulas specifajn elektindajn valorojn de '--fields', " +"ne '%s'" + +#: ../libnm-util/crypto.c:121 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM-ŝlosil-dosiero ne havis finan etikedon '%s'." + +#: ../libnm-util/crypto.c:131 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Tio ĉi ne aspektas kiel privat-ŝlosila PEM-dosiero." + +#: ../libnm-util/crypto.c:139 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Malsufiĉas memoro por stori datenojn de PEM-dosiero." + +#: ../libnm-util/crypto.c:155 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Misforma PEM-dosiero: 'Proc-Type' ne estas la unua etikedo." + +#: ../libnm-util/crypto.c:163 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Misforma PEM-dosiero: nekonata Proc-Type-etikedo \"%s\"." + +#: ../libnm-util/crypto.c:173 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Misforma PEM-dosiero: 'DEK-Info' ne estas la dua etikedo." + +#: ../libnm-util/crypto.c:184 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Misforma PEM-dosiero: mi ne trovis IV en la etikedo \"DEK-Info\"." + +#: ../libnm-util/crypto.c:191 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "" +"Misforma PEM-dosiero: nevalida struktturo de IV en la etikedo \"DEK-Info\"." + +#: ../libnm-util/crypto.c:204 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Misforma PEM-dosiero: nekonata privat-ŝlosila ĉifro \"%s\"." + +#: ../libnm-util/crypto.c:223 +#, c-format +msgid "Could not decode private key." +msgstr "Ne eblis malĉifri la privatan ŝlosilon." + +#: ../libnm-util/crypto.c:268 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "La PEM-certigilo \"%s\" ne havas finan etikedon \"%s\"." + +#: ../libnm-util/crypto.c:278 +#, c-format +msgid "Failed to decode certificate." +msgstr "Malsuksesis malĉifri la certigilon." + +#: ../libnm-util/crypto.c:287 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Malsufiĉas memoro por stori la datenojn de la certigilo." + +#: ../libnm-util/crypto.c:295 +#, c-format +msgid "Not enough memory to store file data." +msgstr "Malsufiĉas memoro por stori la datenojn de la dosiero." + +#: ../libnm-util/crypto.c:325 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV nepre amkplesu paran nombron da bajtoj." + +#: ../libnm-util/crypto.c:334 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Malsufiĉas memoro por stori la IV-on." + +#: ../libnm-util/crypto.c:345 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV enhavas nedeksesumajn ciferojn" + +#: ../libnm-util/crypto.c:383 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Privata Cipher-ŝlosilo '%s' estas nekonata." + +#: ../libnm-util/crypto.c:392 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "Nesufiĉa memoro por malĉifri privatan ŝlosilon." + +#: ../libnm-util/crypto.c:512 +#, c-format +msgid "Unable to determine private key type." +msgstr "Ne eblas determini la tipon de la privata ŝlosilo." + +#: ../libnm-util/crypto.c:531 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Nesufiĉa memoro por gardi privatan ŝlosilon malĉifritan." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Pretigo de la kriptografia maŝino fiaskis." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Pretigo de la MD5-maŝino fiaskis: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Nevalida amplekso por IV (devas esti almenaŭ %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Nesufiĉa memoro por bufro de la malĉifrita ŝlosilo." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Fiaskis pravalorizi la malĉifran Cipher-kuntekston: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Fiaskis agordi simetrian ŝlosilon por malĉifro: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Fiaskis agordi IV por malĉifro: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Fiaskis malĉifri la privatan ŝlosilon: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Fiaskis malĉifri la privatan ŝlosilon: neatendita ŝtopada longo." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "Fiaskis malĉifri la privatan ŝlosilon." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Ne eblis rezervi memoron por ĉifrado." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Fiaskis valorizi la ĉifradan kuntekston: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Fiaskis agordi simetrian ŝlosilon por ĉifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Fiaskis agordi IV por ĉifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Ĉifrado de datumoj malsukcesis: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Eraro dum pravalorizo de atestilaj datumoj: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Ne povis malkodi certigilon: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Ne povis pravalorizi PKCS#12-malkodilon: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Ne eblis dekodi PKCS#12-dosieron: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "No povis kontroli PKCS#12-dosieron: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Pravalorigo de la kriptografia maŝino fiaskis: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Fiaskis pravalorizi la MD5-kuntekston: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Nevalida IV-longo (devas esti almenaŭ %d)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Fiaskis pravalorizi la malĉifran Cipher-foldon." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Fiaskis agordi simetrian ŝlosilon por malĉifrado." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Fiaskis agordi IV por malĉifrado." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Fiaskis pravalorizi la malĉifran kuntekston." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Fiaskis malĉifri la privatan ŝlosilon: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Fiaskis malĉifri la privatan ŝlosilon: malĉifritaj datumoj tro longas." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Fiaskis fini malĉifradon de la privata ŝlosilo: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Fiaskis pravalorizi la ĉifran Cipher-foldon." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Fiaskis agordi simetrian ŝlosilon por ĉifrado." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Fiaskis agordi IV por ĉifrado." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Fiaskis pravalorizi la ĉifradan kuntekston." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Fiaskis ĉifri: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Neatendita nombro da datumoj post ĉifrado." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Ne povis malkodigi atestilon: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Ne povis konverti pasvorton al UCS2: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Ne povis pravalorizi PKCS#12-malkodilon: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Ne povis malkodigi PKCS#12-dosieron: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Ne povis kontroli PKCS#12-dosieron: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Ne povis generi hazardajn datumojn." + +#: ../libnm-util/nm-utils.c:1975 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Nesufiĉa memoro por fari ĉifran ŝlosilon." + +#: ../libnm-util/nm-utils.c:2085 +msgid "Could not allocate memory for PEM file creation." +msgstr "Ne povis atribui memoron por kreo de PEM-dosiero." + +#: ../libnm-util/nm-utils.c:2097 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Ne povis atribui memoron por konservi IV en PEM-dosieron." + +#: ../libnm-util/nm-utils.c:2109 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"Ne povis atribui memoron por konservi ĉifritan ŝlosilon en PEM-dosieron." + +#: ../libnm-util/nm-utils.c:2128 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Ne povis atribui memoron por datumoj de PEM-dosiero." + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Kundivido de konektoj per protektita WiFi-reto" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Kundivido de konektoj per malferma WiFi-reto" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modifi permanentan sisteman gastigan nomon" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modifi sistemajn konektojn" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Sistempolico preventas modifadon de sistemagordoj" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Sistempolico preventas modifadon de la konstanta sistem-gastnomo" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Sistempolico preventas kundividon de konektoj per protektita WiFi-reto" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Sistempolitiko preventas kundividon de konektoj per malferma WiFi-reto" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 +msgid "Allow control of network connections" +msgstr "Permesi kontrolon de retkonektoj" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2 +msgid "Allow use of user-specific connections" +msgstr "Permesi uzon de specifaj konektoj por uzantoj" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3 +msgid "Enable or disable WiFi devices" +msgstr "Enŝalti aŭ elŝalti WiFi-aparatojn" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4 +msgid "Enable or disable mobile broadband devices" +msgstr "Enŝalti aŭ elŝalti poŝtelefonajn larĝkapacitajn aparatojn" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 +msgid "Enable or disable system networking" +msgstr "Enŝalti aŭ elŝalti sistemretkonektadon" + +#: ../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 "" +"Dormigi aŭ veki NetworkManager (estu uzata nur de sistema energimastumado)" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 +msgid "System policy prevents control of network connections" +msgstr "Sistempolitiko preventas kontrolon de retkonektoj" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 +msgid "System policy prevents enabling or disabling WiFi devices" +msgstr "Sistempolitiko preventas enŝalton aŭ malŝalton de WiFi-aparatoj" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 +msgid "System policy prevents enabling or disabling mobile broadband devices" +msgstr "" +"Sistempolitiko preventas enŝalton aŭ malŝalton de poŝtelefonaj larĝkapacitaj " +"aparatoj" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +msgid "System policy prevents enabling or disabling system networking" +msgstr "Sistempolitiko preventas enŝalton aŭ malŝalton de sistema retkonektado" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 +msgid "System policy prevents putting NetworkManager to sleep or waking it up" +msgstr "Sistempolitiko preventas dormigi aŭ veki NetworkManager" + +#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 +msgid "System policy prevents use of user-specific connections" +msgstr "Sistempolitiko preventas uzon de uzant-specifaj konektoj" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "eraro dum traktado de netlink-mesaĝo: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "okazis eraro dum atendado je datumoj sur kontaktoskatolo" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ne eblas konekti al netlink por kontroli ligilan staton: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "ne povis aktivigi la netlink-tenilan legitimaĵo-pasadon: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ne povis atribui retligiltenilon por kontroli ligilstaton: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "" +"ne povis atribui ligilan kaŝmemoron de netlink por kontroli ligilstaton: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "ne eblas membriĝi al retligila grupo: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "eraro dum ĝisdatigo de ligila kaŝmemoro: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "" +"Nevalida elektindaĵo. Bonvolu uzi --help por vidi liston da validaj " +"elektindaĵoj.\n" + +#: ../src/main.c:573 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Bovolu uzi --help por vidi liston da validaj elektindaĵoj.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:328 +msgid "# Created by NetworkManager\n" +msgstr "# Kreita de NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:344 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Kunfandita el %s\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:284 +msgid "no usable DHCP client could be found." +msgstr "neniu uzebla DHCP-kliento estis trovebla" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:293 +msgid "'dhclient' could be found." +msgstr "'dhclient' povis esti trovita." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:303 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' povis esti trovita." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:311 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "nesubtenata DHCP-kliento '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Nekonata protokolnivelo '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Nekonata protokola regiono '%s'" + +#: ../src/dns-manager/nm-dns-manager.c:367 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "NOTO: la libc-solvilo eble ne povus subteni pli ol 3 nomservilojn." + +#: ../src/dns-manager/nm-dns-manager.c:369 +msgid "The nameservers listed below may not be recognized." +msgstr "La sube ligstigitaj nomserviloj eble ne estos rekonataj." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "Aŭto %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3408 +#: ../system-settings/plugins/ifnet/connection_parser.c:49 +msgid "System" +msgstr "Sistemo" diff --git a/po/fr.po b/po/fr.po index 25b6c76b..67a36db7 100644 --- a/po/fr.po +++ b/po/fr.po @@ -116,12 +116,12 @@ msgstr "" #: ../cli/src/connections.c:197 ../cli/src/connections.c:536 #, c-format msgid "Error: 'con list': %s" -msgstr "Erreur : 'con list': %s" +msgstr "Erreur: 'con list': %s" #: ../cli/src/connections.c:199 ../cli/src/connections.c:538 #, c-format msgid "Error: 'con list': %s; allowed fields: %s" -msgstr "Erreur : 'con list': %s ; champs autorisés : %s" +msgstr "Erreur: 'con list': %s; champs autorisés: %s" #: ../cli/src/connections.c:207 msgid "Connection details" @@ -197,40 +197,40 @@ msgstr "Connexions utilisateur" #: ../cli/src/devices.c:980 #, c-format msgid "Error: %s argument is missing." -msgstr "Erreur : l'argument %s est manquant." +msgstr "Erreur: l'argument %s est manquant." #: ../cli/src/connections.c:487 #, c-format msgid "Error: %s - no such connection." -msgstr "Erreur : %s - connexion introuvable." +msgstr "Erreur: %s - connexion introuvable." #: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 #: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 #: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 #, c-format msgid "Unknown parameter: %s\n" -msgstr "Paramètre inconnu : %s\n" +msgstr "Paramètre inconnu: %s\n" #: ../cli/src/connections.c:528 #, c-format msgid "Error: no valid parameter specified." -msgstr "Erreur : aucun paramètre valide spécifié." +msgstr "Erreur: aucun paramètre valide spécifié." #: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 #: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 #, c-format msgid "Error: %s." -msgstr "Erreur : %s." +msgstr "Erreur: %s." #: ../cli/src/connections.c:649 #, c-format msgid "Error: 'con status': %s" -msgstr "Erreur : 'con status' : %s" +msgstr "Erreur: 'con status': %s" #: ../cli/src/connections.c:651 #, c-format msgid "Error: 'con status': %s; allowed fields: %s" -msgstr "Erreur : 'con status' : %s ; champs autorisés : %s" +msgstr "Erreur: 'con status': %s; champs autorisés: %s" #: ../cli/src/connections.c:658 msgid "Active connections" @@ -350,7 +350,7 @@ msgstr "la connexion a été supprimée" #: ../cli/src/connections.c:1170 #, c-format msgid "state: %s\n" -msgstr "état : %s\n" +msgstr "état: %s\n" #: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 #, c-format @@ -360,98 +360,98 @@ msgstr "Connexion activée\n" #: ../cli/src/connections.c:1176 #, c-format msgid "Error: Connection activation failed." -msgstr "Erreur : Échec de l'activation de la connexion" +msgstr "Erreur: Échec de l'activation de la connexion" #: ../cli/src/connections.c:1195 #, c-format msgid "state: %s (%d)\n" -msgstr "état : %s (%d)\n" +msgstr "état: %s (%d)\n" #: ../cli/src/connections.c:1205 #, c-format msgid "Error: Connection activation failed: %s." -msgstr "Erreur : L'activation de la connexion a échoué : %s." +msgstr "Erreur: L'activation de la connexion a échoué: %s." #: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 #, c-format msgid "Error: Timeout %d sec expired." -msgstr "Erreur : Le délai d'attente de %d sec a expiré." +msgstr "Erreur: Le délai d'attente de %d sec a expiré." #: ../cli/src/connections.c:1265 #, c-format msgid "Error: Connection activation failed: %s" -msgstr "Erreur : L'activation de la connexion a échoué : %s" +msgstr "Erreur: L'activation de la connexion a échoué: %s" #: ../cli/src/connections.c:1279 #, c-format msgid "Error: Obtaining active connection for '%s' failed." -msgstr "Erreur : L'obtention d'une connexion active pour '%s' a échoué." +msgstr "Erreur: L'obtention d'une connexion active pour '%s' a échoué." #: ../cli/src/connections.c:1288 #, c-format msgid "Active connection state: %s\n" -msgstr "État de connexion active : %s\n" +msgstr "État de connexion active: %s\n" #: ../cli/src/connections.c:1289 #, c-format msgid "Active connection path: %s\n" -msgstr "État de chemin actif : %s\n" +msgstr "État de chemin actif: %s\n" #: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 #, c-format msgid "Error: Unknown connection: %s." -msgstr "Erreur : Connexion inconnue : %s." +msgstr "Erreur: Connexion inconnue: %s." #: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 #, c-format msgid "Error: timeout value '%s' is not valid." -msgstr "Erreur : Valeur de délai d'attente '%s' invalide." +msgstr "Erreur: Valeur de délai d'attente '%s' invalide." #: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 #, c-format msgid "Error: id or uuid has to be specified." -msgstr "Erreur : ID ou UUID doit être spécifié." +msgstr "Erreur: ID ou UUID doit être spécifié." #: ../cli/src/connections.c:1411 #, c-format msgid "Error: No suitable device found: %s." -msgstr "Erreur : Aucun périphérique convenable trouvé : %s." +msgstr "Erreur: Aucun périphérique convenable trouvé: %s." #: ../cli/src/connections.c:1413 #, c-format msgid "Error: No suitable device found." -msgstr "Erreur : Aucun périphérique convenable trouvé." +msgstr "Erreur: Aucun périphérique convenable trouvé." #: ../cli/src/connections.c:1505 #, c-format msgid "Warning: Connection not active\n" -msgstr "Avertissement : Connexion inactive\n" +msgstr "Avertissement: Connexion inactive\n" #: ../cli/src/connections.c:1561 #, c-format msgid "Error: 'con' command '%s' is not valid." -msgstr "Erreur : Commande 'con' '%s' invalide." +msgstr "Erreur: Commande 'con' '%s' invalide." #: ../cli/src/connections.c:1597 #, c-format msgid "Error: could not connect to D-Bus." -msgstr "Erreur : impossible de connecter à D-Bus." +msgstr "Erreur: impossible de connecter à D-Bus." #: ../cli/src/connections.c:1604 #, c-format msgid "Error: Could not get system settings." -msgstr "Erreur : Paramètres système introuvables." +msgstr "Erreur: Paramètres système introuvables." #: ../cli/src/connections.c:1612 #, c-format msgid "Error: Could not get user settings." -msgstr "Erreur : Paramètres utilisteur introuvables." +msgstr "Erreur: Paramètres utilisteur introuvables." #: ../cli/src/connections.c:1622 #, c-format msgid "Error: Can't obtain connections: settings services are not running." msgstr "" -"Erreur : Impossible d'obtenir les connexions : les services des " +"Erreur: Impossible d'obtenir les connexions: les services des " "paramètres ne sont pas en cours d'exécution." #. 0 @@ -692,7 +692,7 @@ msgstr "(aucun)" #: ../cli/src/devices.c:302 #, c-format msgid "%s: error converting IP4 address 0x%X" -msgstr "%s : erreur lors de la conversion de l'adresse IP4 0x%X" +msgstr "%s: erreur lors de la conversion de l'adresse IP4 0x%X" #: ../cli/src/devices.c:349 #, c-format @@ -706,7 +706,7 @@ msgstr "%u Mo/s" #: ../cli/src/devices.c:359 msgid "Encrypted: " -msgstr "Chiffré : " +msgstr "Chiffré: " #: ../cli/src/devices.c:364 msgid "WEP " @@ -735,12 +735,12 @@ msgstr "Infrastructure" #: ../cli/src/devices.c:442 #, c-format msgid "Error: 'dev list': %s" -msgstr "Erreur : 'dev list' : %s" +msgstr "Erreur: 'dev list': %s" #: ../cli/src/devices.c:444 #, c-format msgid "Error: 'dev list': %s; allowed fields: %s" -msgstr "Erreur : 'dev list' : %s ; champs autorisés : %s" +msgstr "Erreur: 'dev list': %s; champs autorisés: %s" #: ../cli/src/devices.c:453 msgid "Device details" @@ -772,12 +772,12 @@ msgstr "arrêt" #: ../cli/src/devices.c:710 #, c-format msgid "Error: 'dev status': %s" -msgstr "Erreur : 'dev status' : %s" +msgstr "Erreur: 'dev status': %s" #: ../cli/src/devices.c:712 #, c-format msgid "Error: 'dev status': %s; allowed fields: %s" -msgstr "Erreur : 'dev status' : %s ; champs autorisés : %s" +msgstr "Erreur: 'dev status': %s; champs autorisés: %s" #: ../cli/src/devices.c:719 msgid "Status of devices" @@ -786,42 +786,42 @@ msgstr "Statut des périphériques" #: ../cli/src/devices.c:747 #, c-format msgid "Error: '%s' argument is missing." -msgstr "Erreur : L'argument '%s' est manquant." +msgstr "Erreur: L'argument '%s' est manquant." #: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 #, c-format msgid "Error: Device '%s' not found." -msgstr "Erreur : Périphérique '%s' introuvable." +msgstr "Erreur: Périphérique '%s' introuvable." #: ../cli/src/devices.c:799 #, c-format msgid "Success: Device '%s' successfully disconnected." -msgstr "Opération réussie : Périphérique '%s' correctement déconnecté." +msgstr "Opération réussie: Périphérique '%s' correctement déconnecté." #: ../cli/src/devices.c:824 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s" -msgstr "Erreur : Échec de la déconnexion du périphérique '%s' (%s) : %s" +msgstr "Erreur: Échec de la déconnexion du périphérique '%s' (%s): %s" #: ../cli/src/devices.c:832 #, c-format msgid "Device state: %d (%s)\n" -msgstr "État du périphérique : %d (%s)\n" +msgstr "État du périphérique: %d (%s)\n" #: ../cli/src/devices.c:896 #, c-format msgid "Error: iface has to be specified." -msgstr "Erreur : iface doit être spécifié." +msgstr "Erreur: iface doit être spécifié." #: ../cli/src/devices.c:1011 #, c-format msgid "Error: 'dev wifi': %s" -msgstr "Erreur : 'dev wifi' : %s" +msgstr "Erreur: 'dev wifi': %s" #: ../cli/src/devices.c:1013 #, c-format msgid "Error: 'dev wifi': %s; allowed fields: %s" -msgstr "Erreur : 'dev wifi' : %s ; champs autorisés : %s" +msgstr "Erreur: 'dev wifi': %s; champs autorisés: %s" #: ../cli/src/devices.c:1020 msgid "WiFi scan list" @@ -830,22 +830,22 @@ msgstr "Liste du balayage WiFi" #: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 #, c-format msgid "Error: Access point with hwaddr '%s' not found." -msgstr "Erreur : Point d'accès avec hwaddr '%s' introuvable." +msgstr "Erreur: Point d'accès avec hwaddr '%s' introuvable." #: ../cli/src/devices.c:1072 #, c-format msgid "Error: Device '%s' is not a WiFi device." -msgstr "Erreur : Le périphérique '%s' n'est pas un périphérique WiFi." +msgstr "Erreur: Le périphérique '%s' n'est pas un périphérique WiFi." #: ../cli/src/devices.c:1136 #, c-format msgid "Error: 'dev wifi' command '%s' is not valid." -msgstr "Erreur : Commande 'dev wifi' '%s' invalide." +msgstr "Erreur: Commande 'dev wifi' '%s' invalide." #: ../cli/src/devices.c:1183 #, c-format msgid "Error: 'dev' command '%s' is not valid." -msgstr "Erreur : Commande 'dev' '%s' invalide." +msgstr "Erreur: Commande 'dev' '%s' invalide." #: ../cli/src/network-manager.c:35 msgid "RUNNING" @@ -907,12 +907,12 @@ msgstr "connexion" #: ../cli/src/network-manager.c:125 #, c-format msgid "Error: 'nm status': %s" -msgstr "Erreur : 'nm status' : %s" +msgstr "Erreur: 'nm status': %s" #: ../cli/src/network-manager.c:127 #, c-format msgid "Error: 'nm status': %s; allowed fields: %s" -msgstr "Erreur : 'nm status' : %s ; champs autorisés : %s" +msgstr "Erreur: 'nm status': %s; champs autorisés: %s" #: ../cli/src/network-manager.c:134 msgid "NetworkManager status" @@ -942,7 +942,7 @@ msgstr "inactif" #: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 #, c-format msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" -msgstr "Erreur : Valeur '--fields' '%s' est invalide ; champs autorisés : %s" +msgstr "Erreur: Valeur '--fields' '%s' est invalide; champs autorisés: %s" #: ../cli/src/network-manager.c:209 msgid "WiFi enabled" @@ -951,7 +951,7 @@ msgstr "WiFi activé" #: ../cli/src/network-manager.c:220 #, c-format msgid "Error: invalid 'wifi' parameter: '%s'." -msgstr "Erreur : Paramètre 'wifi' invalide : '%s'." +msgstr "Erreur: Paramètre 'wifi' invalide: '%s'." #: ../cli/src/network-manager.c:241 msgid "WWAN enabled" @@ -960,12 +960,12 @@ msgstr "WWAN activé" #: ../cli/src/network-manager.c:252 #, c-format msgid "Error: invalid 'wwan' parameter: '%s'." -msgstr "Erreur : Paramètre 'wwan' invalide : '%s'." +msgstr "Erreur: Paramètre 'wwan' invalide: '%s'." #: ../cli/src/network-manager.c:263 #, c-format msgid "Error: 'nm' command '%s' is not valid." -msgstr "Erreur : Commande 'nm' '%s' invalide." +msgstr "Erreur: Commande 'nm' '%s' invalide." #: ../cli/src/nmcli.c:69 #, c-format @@ -1008,42 +1008,42 @@ msgstr "" #: ../cli/src/nmcli.c:113 #, c-format msgid "Error: Object '%s' is unknown, try 'nmcli help'." -msgstr "Erreur : Objet '%s' inconnu, essayez 'nmcli help'." +msgstr "Erreur: Objet '%s' inconnu, essayez 'nmcli help'." #: ../cli/src/nmcli.c:143 #, c-format msgid "Error: Option '--terse' is specified the second time." -msgstr "Erreur : Option '--terse' est spécifiée la seconde fois." +msgstr "Erreur: Option '--terse' est spécifiée la seconde fois." #: ../cli/src/nmcli.c:148 #, c-format msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." -msgstr "Erreur : Option '--terse' est mutuellement exclusive avec '--pretty'." +msgstr "Erreur: Option '--terse' est mutuellement exclusive avec '--pretty'." #: ../cli/src/nmcli.c:156 #, c-format msgid "Error: Option '--pretty' is specified the second time." -msgstr "Erreur : Option '--pretty' est spécifiée la seconde fois." +msgstr "Erreur: Option '--pretty' est spécifiée la seconde fois." #: ../cli/src/nmcli.c:161 #, c-format msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." -msgstr "Erreur : Option '--pretty' est mutuellement exclusive avec '--terse'." +msgstr "Erreur: Option '--pretty' est mutuellement exclusive avec '--terse'." #: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 #, c-format msgid "Error: missing argument for '%s' option." -msgstr "Erreur : argument manquant pour l'option '%s'." +msgstr "Erreur: argument manquant pour l'option '%s'." #: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 #, c-format msgid "Error: '%s' is not valid argument for '%s' option." -msgstr "Erreur : '%s' est un argument invalide pour l'option '%s'." +msgstr "Erreur: '%s' est un argument invalide pour l'option '%s'." #: ../cli/src/nmcli.c:203 #, c-format msgid "Error: fields for '%s' options are missing." -msgstr "Erreur : Les champs pour les options '%s' sont manquants." +msgstr "Erreur: Les champs pour les options '%s' sont manquants." #: ../cli/src/nmcli.c:209 #, c-format @@ -1053,7 +1053,7 @@ msgstr "outil nmcli, version %s\n" #: ../cli/src/nmcli.c:215 #, c-format msgid "Error: Option '%s' is unknown, try 'nmcli -help'." -msgstr "Erreur : Option '%s' inconnue, essayez 'nmcli -help'." +msgstr "Erreur: Option '%s' inconnue, essayez 'nmcli -help'." #: ../cli/src/nmcli.c:234 #, c-format @@ -1063,7 +1063,7 @@ msgstr "Signal %d reçu, arrêt en cours..." #: ../cli/src/nmcli.c:259 #, c-format msgid "Error: Could not connect to NetworkManager." -msgstr "Erreur : Impossible de connecter à NetworkManager." +msgstr "Erreur: Impossible de connecter à NetworkManager." #: ../cli/src/nmcli.c:275 msgid "Success" @@ -1314,7 +1314,7 @@ msgstr "Le déchiffrement de la clé privée a échoué : %s / %s." #, c-format msgid "Failed to decrypt the private key: unexpected padding length." msgstr "" -"Le déchiffrement de la clé privée a échoué : Longueur de remplissage " +"Le déchiffrement de la clé privée a échoué: Longueur de remplissage " "inattendue." #: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 @@ -1331,25 +1331,25 @@ msgstr "Allocation de mémoire pour chiffrement impossible." #, c-format msgid "Failed to initialize the encryption cipher context: %s / %s." msgstr "" -"L'initialisation du contexte du cryptage de chiffrement a échoué : %s / " +"L'initialisation du contexte du cryptage de chiffrement a échoué: %s / " "%s." #: ../libnm-util/crypto_gnutls.c:303 #, c-format msgid "Failed to set symmetric key for encryption: %s / %s." msgstr "" -"La définition de la clé symétrique pour le chiffrement a échoué : %s / %" +"La définition de la clé symétrique pour le chiffrement a échoué: %s / %" "s." #: ../libnm-util/crypto_gnutls.c:313 #, c-format msgid "Failed to set IV for encryption: %s / %s." -msgstr "La définition d'IV pour le chiffrement a échoué : %s / %s." +msgstr "La définition d'IV pour le chiffrement a échoué: %s / %s." #: ../libnm-util/crypto_gnutls.c:322 #, c-format msgid "Failed to encrypt the data: %s / %s." -msgstr "Le chiffrement des données a échoué ; %s / %s." +msgstr "Le chiffrement des données a échoué; %s / %s." #: ../libnm-util/crypto_gnutls.c:362 #, c-format @@ -1364,17 +1364,17 @@ msgstr "Impossible de décoder le certificat : %s" #: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" -msgstr "L'initialisation du décodeur PKCS#12 a échoué : %s" +msgstr "L'initialisation du décodeur PKCS#12 a échoué: %s" #: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" -msgstr "Impossible de décoder le fichier PKCS#12 : %s" +msgstr "Impossible de décoder le fichier PKCS#12: %s" #: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" -msgstr "Impossible de vérifier le fichier PKCS#12 : %s" +msgstr "Impossible de vérifier le fichier PKCS#12: %s" #: ../libnm-util/crypto_nss.c:56 #, c-format @@ -1420,7 +1420,7 @@ msgstr "Le déchiffrement de la clé privée a échoué : %d." #, c-format msgid "Failed to decrypt the private key: decrypted data too large." msgstr "" -"Le déchiffrement de la clé privée a échoué : les données déchiffrées " +"Le déchiffrement de la clé privée a échoué: les données déchiffrées " "sont trop longues." #: ../libnm-util/crypto_nss.c:256 @@ -1466,22 +1466,22 @@ msgstr "Impossible de décoder le certificat : %d" #: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" -msgstr "Impossible de convertir le mot de passe en UCS2 : %d." +msgstr "Impossible de convertir le mot de passe en UCS2: %d." #: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" -msgstr "Impossible d'initialiser le décodeur PKCS#12 : %d" +msgstr "Impossible d'initialiser le décodeur PKCS#12: %d" #: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Impossible de décoder le fichier PKCS#12 : %d" +msgstr "Impossible de décoder le fichier PKCS#12: %d" #: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" -msgstr "Impossible de vérifier le fichier PKCS#12 : %d" +msgstr "Impossible de vérifier le fichier PKCS#12: %d" #: ../libnm-util/crypto_nss.c:557 msgid "Could not generate random data." @@ -1533,7 +1533,7 @@ msgstr "" #: ../src/nm-netlink-monitor.c:265 #, c-format msgid "unable to enable netlink handle credential passing: %s" -msgstr "impossible d'activer le passage de crédentiels de gestion netlink : %s" +msgstr "impossible d'activer le passage de crédentiels de gestion netlink: %s" #: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 #, c-format @@ -1552,7 +1552,7 @@ msgstr "" #: ../src/nm-netlink-monitor.c:502 #, c-format msgid "unable to join netlink group: %s" -msgstr "impossible de joindre le groupe netlink : %s" +msgstr "impossible de joindre le groupe netlink: %s" #: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format diff --git a/po/sv.po b/po/sv.po index dc9869ed..56b73dc1 100644 --- a/po/sv.po +++ b/po/sv.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2010-08-10 03:25+0000\n" -"PO-Revision-Date: 2010-08-12 01:57+0100\n" +"POT-Creation-Date: 2010-09-20 15:25+0000\n" +"PO-Revision-Date: 2010-12-29 12:23+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" @@ -98,7 +98,12 @@ msgstr "AUTOCONNECT" msgid "READONLY" msgstr "SKRIVSKYDDAD" -#: ../cli/src/connections.c:158 +#. 7 +#: ../cli/src/connections.c:83 +msgid "DBUS-PATH" +msgstr "DBUS-SÖKVÄG" + +#: ../cli/src/connections.c:159 #, c-format msgid "" "Usage: nmcli con { COMMAND | help }\n" @@ -117,45 +122,43 @@ msgstr "" " up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" " down id | uuid \n" -#: ../cli/src/connections.c:198 -#: ../cli/src/connections.c:537 +#: ../cli/src/connections.c:199 +#: ../cli/src/connections.c:540 #, c-format msgid "Error: 'con list': %s" msgstr "Fel: \"con list\": %s" -#: ../cli/src/connections.c:200 -#: ../cli/src/connections.c:539 +#: ../cli/src/connections.c:201 +#: ../cli/src/connections.c:542 #, c-format msgid "Error: 'con list': %s; allowed fields: %s" msgstr "Fel: \"con list\": %s; tillåtna fält: %s" -#: ../cli/src/connections.c:208 -#| msgid "Connections" +#: ../cli/src/connections.c:209 msgid "Connection details" msgstr "Anslutningsdetaljer" -#: ../cli/src/connections.c:382 -#: ../cli/src/connections.c:602 -#| msgid "System" +#: ../cli/src/connections.c:384 +#: ../cli/src/connections.c:605 msgid "system" msgstr "system" -#: ../cli/src/connections.c:382 -#: ../cli/src/connections.c:602 +#: ../cli/src/connections.c:384 +#: ../cli/src/connections.c:605 msgid "user" msgstr "användare" -#: ../cli/src/connections.c:384 +#: ../cli/src/connections.c:386 msgid "never" msgstr "aldrig" #. "CAPABILITIES" #. Print header #. "WIFI-PROPERTIES" -#: ../cli/src/connections.c:385 -#: ../cli/src/connections.c:386 -#: ../cli/src/connections.c:603 +#: ../cli/src/connections.c:387 +#: ../cli/src/connections.c:388 #: ../cli/src/connections.c:606 +#: ../cli/src/connections.c:609 #: ../cli/src/devices.c:432 #: ../cli/src/devices.c:557 #: ../cli/src/devices.c:583 @@ -190,10 +193,10 @@ msgstr "aldrig" msgid "yes" msgstr "ja" -#: ../cli/src/connections.c:385 -#: ../cli/src/connections.c:386 -#: ../cli/src/connections.c:603 +#: ../cli/src/connections.c:387 +#: ../cli/src/connections.c:388 #: ../cli/src/connections.c:606 +#: ../cli/src/connections.c:609 #: ../cli/src/devices.c:432 #: ../cli/src/devices.c:557 #: ../cli/src/devices.c:583 @@ -229,23 +232,22 @@ msgstr "ja" msgid "no" msgstr "nej" -#: ../cli/src/connections.c:458 -#: ../cli/src/connections.c:501 -#| msgid "System connections:\n" +#: ../cli/src/connections.c:461 +#: ../cli/src/connections.c:504 msgid "System connections" msgstr "systemanslutningar" -#: ../cli/src/connections.c:463 -#: ../cli/src/connections.c:514 +#: ../cli/src/connections.c:466 +#: ../cli/src/connections.c:517 msgid "User connections" msgstr "Användaranslutningar" -#: ../cli/src/connections.c:475 -#: ../cli/src/connections.c:1335 -#: ../cli/src/connections.c:1351 -#: ../cli/src/connections.c:1360 -#: ../cli/src/connections.c:1371 -#: ../cli/src/connections.c:1456 +#: ../cli/src/connections.c:478 +#: ../cli/src/connections.c:1338 +#: ../cli/src/connections.c:1354 +#: ../cli/src/connections.c:1363 +#: ../cli/src/connections.c:1374 +#: ../cli/src/connections.c:1459 #: ../cli/src/devices.c:962 #: ../cli/src/devices.c:972 #: ../cli/src/devices.c:1074 @@ -254,14 +256,14 @@ msgstr "Användaranslutningar" msgid "Error: %s argument is missing." msgstr "Fel: %s-argument saknas." -#: ../cli/src/connections.c:488 +#: ../cli/src/connections.c:491 #, c-format msgid "Error: %s - no such connection." msgstr "Fel: %s - ingen sådan anslutning." -#: ../cli/src/connections.c:520 -#: ../cli/src/connections.c:1384 -#: ../cli/src/connections.c:1474 +#: ../cli/src/connections.c:523 +#: ../cli/src/connections.c:1387 +#: ../cli/src/connections.c:1477 #: ../cli/src/devices.c:785 #: ../cli/src/devices.c:852 #: ../cli/src/devices.c:986 @@ -270,255 +272,254 @@ msgstr "Fel: %s - ingen sådan anslutning." msgid "Unknown parameter: %s\n" msgstr "Okänd parameter: %s\n" -#: ../cli/src/connections.c:529 +#: ../cli/src/connections.c:532 #, c-format msgid "Error: no valid parameter specified." msgstr "Fel: ingen giltig parameter angiven." -#: ../cli/src/connections.c:544 -#: ../cli/src/connections.c:1577 +#: ../cli/src/connections.c:547 +#: ../cli/src/connections.c:1580 #: ../cli/src/devices.c:1293 -#: ../cli/src/network-manager.c:274 +#: ../cli/src/network-manager.c:359 #, c-format msgid "Error: %s." msgstr "Fel: %s." -#: ../cli/src/connections.c:650 +#: ../cli/src/connections.c:653 #, c-format msgid "Error: 'con status': %s" msgstr "Fel: \"con status\": %s" -#: ../cli/src/connections.c:652 +#: ../cli/src/connections.c:655 #, c-format msgid "Error: 'con status': %s; allowed fields: %s" msgstr "Fel: \"con status\": %s; tillåtna fält: %s" -#: ../cli/src/connections.c:659 +#: ../cli/src/connections.c:662 msgid "Active connections" msgstr "Aktiva anslutningar" -#: ../cli/src/connections.c:1027 +#: ../cli/src/connections.c:1030 #, c-format msgid "no active connection on device '%s'" msgstr "ingen aktiv anslutning på enheten \"%s\"" -#: ../cli/src/connections.c:1035 +#: ../cli/src/connections.c:1038 #, c-format msgid "no active connection or device" msgstr "ingen aktiv anslutning eller enhet" -#: ../cli/src/connections.c:1085 +#: ../cli/src/connections.c:1088 #, c-format msgid "device '%s' not compatible with connection '%s'" msgstr "enheten \"%s\" är inte kompatibel med anslutningen \"%s\"" -#: ../cli/src/connections.c:1087 +#: ../cli/src/connections.c:1090 #, c-format -#| msgid "no active connection on device '%s'" msgid "no device found for connection '%s'" msgstr "ingen enhet hittades för anslutningen \"%s\"" -#: ../cli/src/connections.c:1098 +#: ../cli/src/connections.c:1101 msgid "activating" msgstr "aktiverar" -#: ../cli/src/connections.c:1100 +#: ../cli/src/connections.c:1103 msgid "activated" msgstr "aktiverad" -#: ../cli/src/connections.c:1103 -#: ../cli/src/connections.c:1126 -#: ../cli/src/connections.c:1159 +#: ../cli/src/connections.c:1106 +#: ../cli/src/connections.c:1129 +#: ../cli/src/connections.c:1162 #: ../cli/src/devices.c:246 #: ../cli/src/devices.c:558 -#: ../cli/src/network-manager.c:92 -#: ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:149 #: ../cli/src/settings.c:473 msgid "unknown" msgstr "okänt" -#: ../cli/src/connections.c:1112 +#: ../cli/src/connections.c:1115 msgid "VPN connecting (prepare)" msgstr "VPN ansluter (förbereder)" -#: ../cli/src/connections.c:1114 +#: ../cli/src/connections.c:1117 msgid "VPN connecting (need authentication)" msgstr "VPN ansluter (behöver autentisering)" -#: ../cli/src/connections.c:1116 +#: ../cli/src/connections.c:1119 msgid "VPN connecting" msgstr "VPN ansluter" -#: ../cli/src/connections.c:1118 +#: ../cli/src/connections.c:1121 msgid "VPN connecting (getting IP configuration)" msgstr "VPN ansluter (hämtar IP-konfiguration)" -#: ../cli/src/connections.c:1120 +#: ../cli/src/connections.c:1123 msgid "VPN connected" msgstr "VPN ansluten" -#: ../cli/src/connections.c:1122 +#: ../cli/src/connections.c:1125 msgid "VPN connection failed" msgstr "VPN-anslutning misslyckades" -#: ../cli/src/connections.c:1124 +#: ../cli/src/connections.c:1127 msgid "VPN disconnected" msgstr "VPN frånkopplad" -#: ../cli/src/connections.c:1135 +#: ../cli/src/connections.c:1138 msgid "unknown reason" msgstr "okänd anledning" -#: ../cli/src/connections.c:1137 +#: ../cli/src/connections.c:1140 msgid "none" msgstr "ingen" -#: ../cli/src/connections.c:1139 +#: ../cli/src/connections.c:1142 msgid "the user was disconnected" msgstr "användaren kopplades från" -#: ../cli/src/connections.c:1141 +#: ../cli/src/connections.c:1144 msgid "the base network connection was interrupted" msgstr "basnätverksanslutningen avbröts" -#: ../cli/src/connections.c:1143 +#: ../cli/src/connections.c:1146 msgid "the VPN service stopped unexpectedly" msgstr "VPN-tjänsten stoppades oväntat" -#: ../cli/src/connections.c:1145 +#: ../cli/src/connections.c:1148 msgid "the VPN service returned invalid configuration" msgstr "VPN-tjänsten returnerade en ogiltig konfiguration" -#: ../cli/src/connections.c:1147 +#: ../cli/src/connections.c:1150 msgid "the connection attempt timed out" msgstr "anslutningsförsöket översteg tidsgränsen" -#: ../cli/src/connections.c:1149 +#: ../cli/src/connections.c:1152 msgid "the VPN service did not start in time" msgstr "VPN-tjänsten startade inte i tid" -#: ../cli/src/connections.c:1151 +#: ../cli/src/connections.c:1154 msgid "the VPN service failed to start" msgstr "VPN-tjänsten misslyckades med att starta" -#: ../cli/src/connections.c:1153 +#: ../cli/src/connections.c:1156 msgid "no valid VPN secrets" msgstr "inga giltiga VPN-hemligheter" -#: ../cli/src/connections.c:1155 +#: ../cli/src/connections.c:1158 msgid "invalid VPN secrets" msgstr "ogiltiga VPN-hemligheter" -#: ../cli/src/connections.c:1157 +#: ../cli/src/connections.c:1160 msgid "the connection was removed" msgstr "anslutningen togs bort" -#: ../cli/src/connections.c:1171 +#: ../cli/src/connections.c:1174 #, c-format msgid "state: %s\n" msgstr "tillstånd: %s\n" -#: ../cli/src/connections.c:1174 -#: ../cli/src/connections.c:1200 +#: ../cli/src/connections.c:1177 +#: ../cli/src/connections.c:1203 #, c-format msgid "Connection activated\n" msgstr "Anslutning aktiverad\n" -#: ../cli/src/connections.c:1177 +#: ../cli/src/connections.c:1180 #, c-format msgid "Error: Connection activation failed." msgstr "Fel: Aktivering av anslutning misslyckades." -#: ../cli/src/connections.c:1196 +#: ../cli/src/connections.c:1199 #, c-format msgid "state: %s (%d)\n" msgstr "tillstånd: %s (%d)\n" -#: ../cli/src/connections.c:1206 +#: ../cli/src/connections.c:1209 #, c-format msgid "Error: Connection activation failed: %s." msgstr "Fel: Aktivering av anslutning misslyckades: %s." -#: ../cli/src/connections.c:1223 +#: ../cli/src/connections.c:1226 #: ../cli/src/devices.c:909 #, c-format msgid "Error: Timeout %d sec expired." msgstr "Fel: Tidsgränsen %d sekunder gick ut." -#: ../cli/src/connections.c:1266 +#: ../cli/src/connections.c:1269 #, c-format msgid "Error: Connection activation failed: %s" msgstr "Fel: Aktivering av anslutning misslyckades: %s" -#: ../cli/src/connections.c:1280 +#: ../cli/src/connections.c:1283 #, c-format msgid "Error: Obtaining active connection for '%s' failed." msgstr "Fel: Hämtning av aktiv anslutning för \"%s\" misslyckades." -#: ../cli/src/connections.c:1289 +#: ../cli/src/connections.c:1292 #, c-format msgid "Active connection state: %s\n" msgstr "Tillstånd för aktiv anslutning: %s\n" -#: ../cli/src/connections.c:1290 +#: ../cli/src/connections.c:1293 #, c-format msgid "Active connection path: %s\n" msgstr "Sökväg för aktiv anslutning: %s\n" -#: ../cli/src/connections.c:1344 -#: ../cli/src/connections.c:1465 +#: ../cli/src/connections.c:1347 +#: ../cli/src/connections.c:1468 #, c-format msgid "Error: Unknown connection: %s." msgstr "Fel: Okänd anslutning: %s." -#: ../cli/src/connections.c:1379 +#: ../cli/src/connections.c:1382 #: ../cli/src/devices.c:980 #, c-format msgid "Error: timeout value '%s' is not valid." msgstr "Fel: värdet \"%s\" för tidsgränsen är inte giltigt." -#: ../cli/src/connections.c:1392 -#: ../cli/src/connections.c:1482 +#: ../cli/src/connections.c:1395 +#: ../cli/src/connections.c:1485 #, c-format msgid "Error: id or uuid has to be specified." msgstr "Fel: id eller uuid måste anges." -#: ../cli/src/connections.c:1412 +#: ../cli/src/connections.c:1415 #, c-format msgid "Error: No suitable device found: %s." msgstr "Fel: Ingen lämplig enhet hittades: %s." -#: ../cli/src/connections.c:1414 +#: ../cli/src/connections.c:1417 #, c-format msgid "Error: No suitable device found." msgstr "Fel: Ingen lämplig enhet hittades." -#: ../cli/src/connections.c:1509 +#: ../cli/src/connections.c:1512 #, c-format msgid "Warning: Connection not active\n" msgstr "Varning: Anslutningen är inte aktiv\n" -#: ../cli/src/connections.c:1566 +#: ../cli/src/connections.c:1569 #, c-format msgid "Error: 'con' command '%s' is not valid." msgstr "Fel: \"con\"-kommandot \"%s\" är inte giltigt." -#: ../cli/src/connections.c:1602 +#: ../cli/src/connections.c:1605 #, c-format msgid "Error: could not connect to D-Bus." msgstr "Fel: kunde inte ansluta till D-Bus." -#: ../cli/src/connections.c:1609 +#: ../cli/src/connections.c:1612 #, c-format msgid "Error: Could not get system settings." msgstr "Fel: Kunde inte få systeminställningar." -#: ../cli/src/connections.c:1617 +#: ../cli/src/connections.c:1620 #, c-format msgid "Error: Could not get user settings." msgstr "Fel: Kunde inte få användarinställningar." -#: ../cli/src/connections.c:1627 +#: ../cli/src/connections.c:1630 #, c-format msgid "Error: Can't obtain connections: settings services are not running." msgstr "Fel: Kan inte få anslutningar: inställningstjänster är inte igång." @@ -556,7 +557,6 @@ msgstr "WIFI-EGENSKAPER" #. 2 #: ../cli/src/devices.c:75 -#| msgid "PEAP" msgid "AP" msgstr "AP" @@ -572,7 +572,6 @@ msgstr "IP4-INSTÄLLNINGAR" #. 5 #: ../cli/src/devices.c:78 -#| msgid "DNS" msgid "IP4-DNS" msgstr "IP4-DNS" @@ -583,7 +582,6 @@ msgstr "IP6-INSTÄLLNINGAR" #. 7 #: ../cli/src/devices.c:80 -#| msgid "DNS" msgid "IP6-DNS" msgstr "IP6-DNS" @@ -614,19 +612,16 @@ msgstr "BÄRARE" #. 0 #: ../cli/src/devices.c:122 -#| msgid " WEP" msgid "WEP" msgstr "WEP" #. 1 #: ../cli/src/devices.c:123 -#| msgid " WPA" msgid "WPA" msgstr "WPA" #. 2 #: ../cli/src/devices.c:124 -#| msgid " WPA2" msgid "WPA2" msgstr "WPA2" @@ -637,7 +632,6 @@ msgstr "TKIP" #. 4 #: ../cli/src/devices.c:126 -#| msgid "AES-CCMP" msgid "CCMP" msgstr "CCMP" @@ -667,13 +661,11 @@ msgstr "DNS" #. 0 #: ../cli/src/devices.c:175 -#| msgid "SSID:" msgid "SSID" msgstr "SSID" #. 1 #: ../cli/src/devices.c:176 -#| msgid "BSSID:" msgid "BSSID" msgstr "BSSID" @@ -719,16 +711,6 @@ msgstr "AKTIV" #: ../cli/src/devices.c:208 #, c-format -#| msgid "" -#| "Usage: nmcli dev { COMMAND | help }\n" -#| "\n" -#| " COMMAND := { status | list | disconnect | wifi }\n" -#| "\n" -#| " status\n" -#| " list [iface ]\n" -#| " disconnect iface [--nowait] [--timeout ]\n" -#| " wifi [list [iface ] | apinfo iface hwaddr ]\n" -#| "\n" msgid "" "Usage: nmcli dev { COMMAND | help }\n" "\n" @@ -759,7 +741,7 @@ msgid "unavailable" msgstr "otillgänglig" #: ../cli/src/devices.c:232 -#: ../cli/src/network-manager.c:89 +#: ../cli/src/network-manager.c:91 msgid "disconnected" msgstr "frånkopplad" @@ -780,7 +762,7 @@ msgid "connecting (getting IP configuration)" msgstr "ansluter (hämtar IP-konfiguration)" #: ../cli/src/devices.c:242 -#: ../cli/src/network-manager.c:87 +#: ../cli/src/network-manager.c:89 msgid "connected" msgstr "ansluten" @@ -813,27 +795,22 @@ msgid "%u MB/s" msgstr "%u MB/s" #: ../cli/src/devices.c:403 -#| msgid ", Encrypted: " msgid "Encrypted: " msgstr "Krypterad: " #: ../cli/src/devices.c:408 -#| msgid " WEP" msgid "WEP " msgstr "WEP " #: ../cli/src/devices.c:410 -#| msgid " WPA" msgid "WPA " msgstr "WPA " #: ../cli/src/devices.c:412 -#| msgid " WPA2" msgid "WPA2 " msgstr "WPA2 " #: ../cli/src/devices.c:415 -#| msgid " Enterprise" msgid "Enterprise " msgstr "Företag" @@ -852,12 +829,10 @@ msgstr "Fel: \"dev list\": %s" #: ../cli/src/devices.c:488 #, c-format -#| msgid "Error: Device '%s' (%s) disconnecting failed: %s" msgid "Error: 'dev list': %s; allowed fields: %s" msgstr "Fel: \"dev list\": %s; tillåtna fält: %s" #: ../cli/src/devices.c:497 -#| msgid "Devices" msgid "Device details" msgstr "Enhetsdetaljer" @@ -867,7 +842,6 @@ msgid "(unknown)" msgstr "(okänt)" #: ../cli/src/devices.c:528 -#| msgid "(unknown)" msgid "unknown)" msgstr "okänt)" @@ -934,7 +908,6 @@ msgstr "Fel: gränssnitt (iface) måste anges." #: ../cli/src/devices.c:1112 #, c-format -#| msgid "Error: 'dev wifi' command '%s' is not valid." msgid "Error: 'dev wifi': %s" msgstr "Fel: \"dev wifi\": %s" @@ -974,147 +947,191 @@ msgstr "KÖR" #. 1 #: ../cli/src/network-manager.c:37 -msgid "WIFI-HARDWARE" -msgstr "WIFI-MASKINVARA" +msgid "NET-ENABLED" +msgstr "NÄT-AKTIVERAT" #. 2 #: ../cli/src/network-manager.c:38 -msgid "WIFI" -msgstr "WIFI" +msgid "WIFI-HARDWARE" +msgstr "WIFI-MASKINVARA" #. 3 #: ../cli/src/network-manager.c:39 -msgid "WWAN-HARDWARE" -msgstr "WWAN-MASKINVARA" +msgid "WIFI" +msgstr "WIFI" #. 4 #: ../cli/src/network-manager.c:40 -#| msgid "NM WWAN:" +msgid "WWAN-HARDWARE" +msgstr "WWAN-MASKINVARA" + +#. 5 +#: ../cli/src/network-manager.c:41 msgid "WWAN" msgstr "WWAN" -#: ../cli/src/network-manager.c:62 +#: ../cli/src/network-manager.c:64 #, c-format +#| msgid "" +#| "Usage: nmcli nm { COMMAND | help }\n" +#| "\n" +#| " COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +#| "\n" +#| " status\n" +#| " sleep\n" +#| " wakeup\n" +#| " wifi [on|off]\n" +#| " wwan [on|off]\n" +#| "\n" msgid "" "Usage: nmcli nm { COMMAND | help }\n" "\n" -" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +" COMMAND := { status | enable | sleep | wifi | wwan }\n" "\n" " status\n" -" sleep\n" -" wakeup\n" +" enable [true|false]\n" +" sleep [true|false]\n" " wifi [on|off]\n" " wwan [on|off]\n" "\n" msgstr "" "Användning: nmcli nm { KOMMANDO | help }\n" "\n" -" KOMMANDO := { status | sleep | wakeup | wifi | wwan }\n" +" KOMMANDO := { status | enable | sleep | wifi | wwan }\n" "\n" " status\n" -" sleep\n" -" wakeup\n" +" enable [true|false]\n" +" sleep [true|false]\n" " wifi [on|off]\n" " wwan [on|off]\n" "\n" -#: ../cli/src/network-manager.c:83 +#: ../cli/src/network-manager.c:85 msgid "asleep" msgstr "sover" -#: ../cli/src/network-manager.c:85 +#: ../cli/src/network-manager.c:87 msgid "connecting" msgstr "ansluter" -#: ../cli/src/network-manager.c:125 +#: ../cli/src/network-manager.c:128 #, c-format msgid "Error: 'nm status': %s" msgstr "Fel: \"nm status\": %s" -#: ../cli/src/network-manager.c:127 +#: ../cli/src/network-manager.c:130 #, c-format msgid "Error: 'nm status': %s; allowed fields: %s" msgstr "Fel: \"nm status\": %s; tillåtna fält: %s" -#: ../cli/src/network-manager.c:134 +#: ../cli/src/network-manager.c:137 msgid "NetworkManager status" msgstr "Status för Nätverkshanterare" #. Print header -#: ../cli/src/network-manager.c:140 -#: ../cli/src/network-manager.c:141 -#: ../cli/src/network-manager.c:142 -#: ../cli/src/network-manager.c:143 -#: ../cli/src/network-manager.c:211 -#: ../cli/src/network-manager.c:243 +#: ../cli/src/network-manager.c:144 +#: ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 +#: ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 msgid "enabled" msgstr "aktiverad" -#: ../cli/src/network-manager.c:140 -#: ../cli/src/network-manager.c:141 -#: ../cli/src/network-manager.c:142 -#: ../cli/src/network-manager.c:143 -#: ../cli/src/network-manager.c:211 -#: ../cli/src/network-manager.c:243 +#: ../cli/src/network-manager.c:144 +#: ../cli/src/network-manager.c:145 +#: ../cli/src/network-manager.c:146 +#: ../cli/src/network-manager.c:147 +#: ../cli/src/network-manager.c:154 +#: ../cli/src/network-manager.c:247 +#: ../cli/src/network-manager.c:296 +#: ../cli/src/network-manager.c:328 msgid "disabled" msgstr "inaktiverad" -#: ../cli/src/network-manager.c:148 +#: ../cli/src/network-manager.c:152 msgid "running" msgstr "kör" -#: ../cli/src/network-manager.c:148 +#: ../cli/src/network-manager.c:152 msgid "not running" msgstr "kör inte" -#: ../cli/src/network-manager.c:201 -#: ../cli/src/network-manager.c:233 +#: ../cli/src/network-manager.c:175 +#, c-format +#| msgid "Error: could not connect to D-Bus." +msgid "Error: Couldn't connect to system bus: %s" +msgstr "Fel: kunde inte ansluta till systembussen: %s" + +#: ../cli/src/network-manager.c:186 +#, c-format +#| msgid "Error: could not connect to D-Bus." +msgid "Error: Couldn't create D-Bus object proxy." +msgstr "Fel: Kunde inte skapa proxy för D-Bus-objekt." + +#: ../cli/src/network-manager.c:192 +#, c-format +#| msgid "Error: 'con list': %s" +msgid "Error in sleep: %s" +msgstr "Fel i sömn: %s" + +#: ../cli/src/network-manager.c:237 +#: ../cli/src/network-manager.c:286 +#: ../cli/src/network-manager.c:318 #, c-format -#| msgid "Error: timeout value '%s' is not valid." msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" msgstr "Fel: värdet \"%s\" för \"--fields\" är inte giltigt här; tillåtna fält: %s" -#: ../cli/src/network-manager.c:209 -#| msgid "enabled" +#: ../cli/src/network-manager.c:245 +#| msgid "WiFi enabled" +msgid "Networking enabled" +msgstr "Nätverk aktiverat" + +#: ../cli/src/network-manager.c:256 +#, c-format +#| msgid "Error: invalid 'wwan' parameter: '%s'." +msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'." +msgstr "Fel: ogiltig \"enable\"-parameter: \"%s\"; använd \"true\" eller \"false\"." + +#: ../cli/src/network-manager.c:265 +#, c-format +#| msgid "Error: Could not connect to NetworkManager." +msgid "Error: Sleeping status is not exported by NetworkManager." +msgstr "Fel: Sömnstatus exporteras inte av Nätverkshanterare." + +#: ../cli/src/network-manager.c:273 +#, c-format +#| msgid "Error: invalid 'wifi' parameter: '%s'." +msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'." +msgstr "Fel: ogiltig \"sleep\"-parameter: \"%s\"; använd \"true\" eller \"false\"." + +#: ../cli/src/network-manager.c:294 msgid "WiFi enabled" msgstr "WiFi aktiverat" -#: ../cli/src/network-manager.c:220 +#: ../cli/src/network-manager.c:305 #, c-format msgid "Error: invalid 'wifi' parameter: '%s'." msgstr "Fel: ogiltig \"wifi\"-parameter: \"%s\"." -#: ../cli/src/network-manager.c:241 -#| msgid "enabled" +#: ../cli/src/network-manager.c:326 msgid "WWAN enabled" msgstr "WWAN aktiverat" -#: ../cli/src/network-manager.c:252 +#: ../cli/src/network-manager.c:337 #, c-format msgid "Error: invalid 'wwan' parameter: '%s'." msgstr "Fel: ogiltig \"wwan\"-parameter: \"%s\"." -#: ../cli/src/network-manager.c:263 +#: ../cli/src/network-manager.c:348 #, c-format msgid "Error: 'nm' command '%s' is not valid." msgstr "Fel: \"nm\"-kommandot \"%s\" är inte giltigt." #: ../cli/src/nmcli.c:69 #, c-format -#| msgid "" -#| "Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" -#| "\n" -#| "OPTIONS\n" -#| " -t[erse] terse output\n" -#| " -p[retty] pretty output\n" -#| " -v[ersion] show program version\n" -#| " -h[elp] print this help\n" -#| "\n" -#| "OBJECT\n" -#| " nm NetworkManager status\n" -#| " con NetworkManager connections\n" -#| " dev devices managed by NetworkManager\n" -#| "\n" msgid "" "Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" "\n" @@ -1152,7 +1169,6 @@ msgstr "" #: ../cli/src/nmcli.c:113 #, c-format -#| msgid "Object '%s' is unknown, try 'nmcli help'." msgid "Error: Object '%s' is unknown, try 'nmcli help'." msgstr "Fel: Objektet \"%s\" är okänt, prova \"nmcli help\"." @@ -1179,20 +1195,17 @@ msgstr "Fel: Flaggan \"--pretty\" är ömsesidigt uteslutande med \"--terse\"." #: ../cli/src/nmcli.c:171 #: ../cli/src/nmcli.c:187 #, c-format -#| msgid "Error: %s argument is missing." msgid "Error: missing argument for '%s' option." msgstr "Fel: argument för flaggan \"%s\" saknas." #: ../cli/src/nmcli.c:180 #: ../cli/src/nmcli.c:196 #, c-format -#| msgid "Error: '%s' argument is missing." msgid "Error: '%s' is not valid argument for '%s' option." msgstr "Fel: \"%s\" är inte ett giltigt argument för flaggan \"%s\"." #: ../cli/src/nmcli.c:203 #, c-format -#| msgid "Error: '%s' argument is missing." msgid "Error: fields for '%s' options are missing." msgstr "Fel: fält för \"%s\"-flaggor saknas." @@ -1203,7 +1216,6 @@ msgstr "nmcli-verktyg, version %s\n" #: ../cli/src/nmcli.c:215 #, c-format -#| msgid "Option '%s' is unknown, try 'nmcli -help'." msgid "Error: Option '%s' is unknown, try 'nmcli -help'." msgstr "Fel: Flaggan \"%s\" är okänd, prova \"nmcli -help\"." @@ -1228,18 +1240,15 @@ msgstr "%d (hex-ascii-nyckel)" #: ../cli/src/settings.c:413 #, c-format -#| msgid "WEP 128-bit Passphrase" msgid "%d (104/128-bit passphrase)" msgstr "%d (104/128-bitars lösenfras)" #: ../cli/src/settings.c:416 #, c-format -#| msgid "(unknown)" msgid "%d (unknown)" msgstr "%d (okänt)" #: ../cli/src/settings.c:442 -#| msgid "(unknown)" msgid "0 (unknown)" msgstr "0 (okänt)" @@ -1701,7 +1710,6 @@ msgid "System policy prevents sharing connections via an open WiFi network" msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trådlöst nätverk" #: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 -#| msgid "Wired network connection" msgid "Allow control of network connections" msgstr "Tillåt kontroll av nätverksanslutningar" @@ -1718,7 +1726,6 @@ msgid "Enable or disable mobile broadband devices" msgstr "Aktivera eller inaktivera mobila bredbandsenheter" #: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 -#| msgid "Enable _Networking" msgid "Enable or disable system networking" msgstr "Aktivera eller inaktivera systemnätverk" @@ -1727,12 +1734,10 @@ msgid "Put NetworkManager to sleep or wake it up (should only be used by system msgstr "Försätt Nätverkshanterare i vänteläge eller återställ efter det (bör endast användas av systemets strömhantering)" #: ../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 "Systemets policy förhindrar kontroll av nätverksanslutningar" #: ../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 "Systemets policy förhindrar aktivering eller inaktivering av WiFi-enheter" @@ -1741,7 +1746,6 @@ msgid "System policy prevents enabling or disabling mobile broadband devices" msgstr "Systemets policy förhindrar aktivering eller inaktivering av mobila bredbandsenheter" #: ../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 "Systemets policy förhindrar aktivering eller inaktivering av systemnätverk" @@ -1750,7 +1754,6 @@ msgid "System policy prevents putting NetworkManager to sleep or waking it up" msgstr "Systemets policy förhindrar att Nätverkshanterare försätts i vänteläge eller återställs efter det" #: ../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 "Systemets policy förhindrar användning av användarspecifika anslutningar" @@ -1772,7 +1775,6 @@ msgstr "kan inte ansluta till netlink för övervakning av länkstatus: %s" #: ../src/nm-netlink-monitor.c:265 #, c-format -#| msgid "unable to allocate netlink handle: %s" msgid "unable to enable netlink handle credential passing: %s" msgstr "kunde inte aktivera behörighetshantering för netlink-handtag: %s" @@ -1798,22 +1800,21 @@ msgstr "kan inte gå med i netlink-grupp: %s" msgid "error updating link cache: %s" msgstr "fel vid uppdatering av länkcache: %s" -#: ../src/main.c:502 +#: ../src/main.c:499 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "Ogiltig flagga. Använd --help för att se en lista över giltiga flaggor.\n" -#: ../src/main.c:573 +#: ../src/main.c:570 #, c-format -#| msgid "Invalid option. Please use --help to see a list of valid options.\n" msgid "%s. Please use --help to see a list of valid options.\n" msgstr "%s. Använd --help för att se en lista över giltiga flaggor.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:328 msgid "# Created by NetworkManager\n" msgstr "# Skapad av Nätverkshanterare\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:344 #, c-format msgid "" "# Merged from %s\n" @@ -1863,6 +1864,7 @@ msgid "Auto %s" msgstr "Automatisk %s" #: ../system-settings/plugins/ifcfg-rh/reader.c:3412 +#: ../system-settings/plugins/ifnet/connection_parser.c:49 msgid "System" msgstr "System" diff --git a/policy/Makefile.in b/policy/Makefile.in index d36f83e0..c5aef572 100644 --- a/policy/Makefile.in +++ b/policy/Makefile.in @@ -174,6 +174,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -188,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/policy/org.freedesktop.NetworkManager.policy b/policy/org.freedesktop.NetworkManager.policy index 66cc0635..6cc1b31d 100644 --- a/policy/org.freedesktop.NetworkManager.policy +++ b/policy/org.freedesktop.NetworkManager.policy @@ -11,9 +11,12 @@ Enable or disable system networking Включване и изключване на мрежата на системно ниво + Habilita o inhabilita la xarxa del sistema Povolit nebo zakázat systémovou síť + Aktiver eller deaktiver systemnetværk System-Netzwerke aktivieren oder deaktivieren Ενεργοποίηση ή απενεργοποίηση δικτύωσης συστήματος + Enŝalti aŭ elŝalti sistemretkonektadon Activar o desactivar la red del sistema Activar ou desactivar a rede do sistema तंत्र संजालन सक्रिय या निष्क्रिय करें @@ -33,9 +36,12 @@ 启用或禁用系统网络 System policy prevents enabling or disabling system networking Политиката на системата не позволява включване и изключване на мрежата на системно ниво + La política del sistema impedeix habilitar o inhabilitar la xarxa del sistema Systémová politika zamezuje povolit nebo zakázat systémovou síť + Systempolitik forhindrer aktivering eller deaktivering af systemnetværk Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung von System-Netzwerken Η πολιτική συστήματος δεν επιτρέπει ενεργοποίηση ή απενεργοποίηση της δικτύωσης του συστήματος + Sistempolitiko preventas enŝalton aŭ malŝalton de sistema retkonektado La política de sistema evita activar o desactivar la red del sistema A normativa do sistema evita a activación ou desactivación da rede do sistema तंत्र संजालन के युक्ति के सक्रियण या निष्क्रियण को तंत्र नीति रोकता है @@ -62,9 +68,12 @@ Put NetworkManager to sleep or wake it up (should only be used by system power management) Приспиване и събуждане на NetworkManager (за целите на модула за управление на захранването на системата) + Posa el NetworkManager a dormir o desperta'l (només l'hauria d'utilitzar el sistema de gestió d'energia) Uspat Network Manager nebo jej probudit (mělo by být používáno pouze systémovou správou napájení) + Sæt NetworkManager i hvile eller væk den (bør kun bruges af systemstrømstyringen) NetworkManager in den Schlafzustand versetzen oder daraus aufwecken (Sollte nur von der System-Energieverwaltung verwendet werden) Θέση της Διαχείρισης δικτύου σε αδράνεια ή ενεργοποίησή της (πρέπει να χρησιμοποιείται μόνο από τη διαχείριση ενέργειας του συστήματος) + Dormigi aŭ veki NetworkManager (estu uzata nur de sistema energimastumado) Poner NetworkManager a dormir o despertarlo (sólo lo debería usar el gestor de energía del sistema) Poñer o NetworkManager en suspensión e espertalo (só debe ser usado polo sistema de xestión de rede) NetworkManager को स्लीप स्थिति या वेकअप स्थिति में रखें (केवल सिस्टम पावर मैनेजमेंट के द्वारा प्रयोग किया जाएगा) @@ -84,9 +93,12 @@ 挂起或唤醒 NetworkManager (应仅用于系统电源管理) System policy prevents putting NetworkManager to sleep or waking it up Политиката на системата не позволява приспиване и събуждане на NetworkManager + La política del sistema impedeix posar el NetworkManager a dormir o despertar-lo Systémová politika zamezuje NetworkManager uspat nebo probudit + Systempolitik forhindrer at sætte NetworkManager i hvile eller at vække den Die Systemrichtlinien verhindern das in den Schlaf versetzen oder Aufwecken von NetworkManager Η πολιτική του συστήματος δεν επιτρέπει να τίθεται η διαχείριση δικτύου σε αδράνεια ή να ενεργοποιείται. + Sistempolitiko preventas dormigi aŭ veki NetworkManager La política del sistema evita poner a NetworkManager a dormir o despertarlo A normativa do sistema evita poñer o NetworkManager en suspensión ou espertalo NetworkManager को स्लीप या वेकअप स्थिति में लाने के लिए नेटवर्कमैनेजर रोकता है @@ -113,9 +125,12 @@ Enable or disable WiFi devices Включване и изключване на устройства за безжични мрежи + Habilita o inhabilita els dispositius Wi-Fi Povolit nebo zakázat zařízení WiFi + Aktiver eller deaktiver WiFi-enheder WLAN-Geräte aktivieren oder deaktivieren Ενεργοποίηση ή απενεργοποίηση συσκευών ασύρματης δικτύωσης (WiFi) + Enŝalti aŭ elŝalti WiFi-aparatojn Activar o desactivar los dispositivos inalámbricos Activar ou desactivar os dispositivos WiFi WiFi युक्तियाँ सक्रिय या निष्क्रिय करें @@ -135,9 +150,12 @@ 启用或禁用 WiFi 设备 System policy prevents enabling or disabling WiFi devices Политиката на системата не позволява включване и изключване на устройства за безжични мрежи + La política del sistema impedeix habilitar o inhabilitar els dispositius Wi-Fi Systémová politika zamezuje povolit nebo zakázat zařízení WiFi + Systempolitik forhindrer aktivering eller deaktivering af WiFi-enheder Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung von WLAN-Geräten Η πολιτική συστήματος δεν επιτρέπει ενεργοποίηση ή απενεργοποίηση συσκευών ανοιχτού ασύρματου δικτύου (WiFi) + Sistempolitiko preventas enŝalton aŭ malŝalton de WiFi-aparatoj La política de sistema evita activar o desactivar los dispositivos inalámbricos A normativa do sistema evita a activación e desactivación dos dispositivos WiFi WiFi युक्ति के सक्रियण या निष्क्रियण को तंत्र नीति रोकता है @@ -164,9 +182,12 @@ Enable or disable mobile broadband devices Включване и изключване на устройства за достъп до мобилни мрежи + Habilita o inhabilita els dispositius de banda ampla mòbil Povolit nebo zakázat mobilní širokopásmová zařízení + Aktiver eller deaktiver mobile bredbåndsenheder Mobile Breitbandgeräte aktivieren oder deaktivieren Ενεργοποίηση ή απενεργοποίηση συσκευών ευρυζωνικότητας κινητής τηλεφωνίας + Enŝalti aŭ elŝalti poŝtelefonajn larĝkapacitajn aparatojn Activar o desactivar los dispositivos de banda ancha móvil Activar ou desactivar os dispositivos de banda ancha móbiles मोबाइल ब्राडबैंड युक्तियाँ सक्रिय या निष्क्रिय करें @@ -186,9 +207,12 @@ 启用或禁用移动宽带设备 System policy prevents enabling or disabling mobile broadband devices Политиката на системата не позволява включване и изключване на устройства за мобилни мрежи + La política del sistema impedeix habilitar o inhabilitar els dispositius de banda ampla mòbil Systémová politika zamezuje povolení nebo zakázání mobilních širokopásmových zařízení + Systempolitik forhindrer aktivering eller deaktivering af mobile bredbåndsenheder Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung mobiler Breitbandgeräte Η πολιτική του συστήματος δεν επιτρέπει την ενεργοποίηση ή απενεργοποίηση συσκευών ευρυζωνικότητας κινητής τηλεφωνίας + Sistempolitiko preventas enŝalton aŭ malŝalton de poŝtelefonaj larĝkapacitaj aparatoj La política del sistema evita activar o desactivar los dispositivos de banda ancha móvil A normativa do sistema evita a activación ou desactivación dos dispositivos de banda ancha. मोबाइल ब्रॉडबैंड युक्ति के सक्रियण या निष्क्रियण को तंत्र नीति रोकता है @@ -215,9 +239,12 @@ Allow use of user-specific connections Разрешаване на използването на потребителски връзки + Permet l'ús de connexions específiques per a cada usuari Povolit použití uživatelem specifikovaných připojení + Tillad brug af brugerspecifikke forbindelser Die Verwendung von benutzerspezifischen Verbindungen erlauben Να επιτρέπεται η χρήση συνδέσεων συγκεκριμένων για το χρήστη + Permesi uzon de specifaj konektoj por uzantoj Permitir el uso de conexiones específicas de usuario Permitir o uso de conexións específicas do usuario उपयोक्ता विशिष्ट कनेक्शन के उपयोग की स्वीकृति दें @@ -237,9 +264,12 @@ 允许用户连接 System policy prevents use of user-specific connections Политиката на системата не позволява използване на потребителски връзки + La política del sistema impedeix la utilització de connexions específiques per a cada usuari Systémová politika zamezuje použití uživatelsky specifikovaných připojení + Systempolitik forhindrer brug af brugerspecifikke forbindelser Die Systemrichtlinien verhindern die Verwendung von benutzerspezifischen Verbindungen Η πολιτική συστήματος δεν επιτρέπει τη χρήση συνδέσεων συγκεκριμένων για κάθε χρήστη + Sistempolitiko preventas uzon de uzant-specifaj konektoj La política del sistema evita el uso de conexiones específicas de usuario A normativa do sistema evita o uso de conexións específicas do usuario सिस्टम नीति उपयोक्ता विशेष कनेक्शन के उपयोग को रोकता है @@ -266,9 +296,12 @@ Allow control of network connections Разрешаване на управлението на мрежовите връзки + Permet el control de les connexions de xarxa Povolit ovládání síťových připojení + Tillad kontrol af netværksforbindelser Die Kontrolle von Netzwerkverbindungen erlauben Να επιτρέπεται ο έλεγχος των συνδέσεων δικτύου + Permesi kontrolon de retkonektoj Permitir controlar las conexiones de red Permitir o control das conexións de rede संजाल कनेक्शन के नियंत्रण स्वीकार करें @@ -288,9 +321,12 @@ 允许控制网络连接 System policy prevents control of network connections Политиката на системата не позволява управляване на мрежовите връзки + La política del sistema impedeix el control de les connexions de xarxa Systémová politika zamezuje ovládání síťových připojení + Systempolitik forhindrer kontrol af netværksforbindelser Die Systemrichtlinien verhindern die Kontrolle von Netzwerkverbindungen Η πολιτική συστήματος δεν επιτρέπει τον έλεγχο των συνδέσεων δικτύου + Sistempolitiko preventas kontrolon de retkonektoj La política de sistema evita el control de las conexiones de red A normativa do sistema evita o control das conexións de rede सिस्टम कनेक्शन के नियंत्रण को सिस्टम नीति रोकता है diff --git a/policy/org.freedesktop.network-manager-settings.system.policy b/policy/org.freedesktop.network-manager-settings.system.policy index a78e8ff2..91c7cceb 100644 --- a/policy/org.freedesktop.network-manager-settings.system.policy +++ b/policy/org.freedesktop.network-manager-settings.system.policy @@ -13,10 +13,13 @@ প্ৰণালীৰ সংযোগ পৰিবৰ্তন কৰক Промяна на системни връзки সিস্টেমের সংযোগ পরিবর্তন করুন + Modifica les connexions del sistema Měnit systémová připojení + Ændr systemforbindelser Systemverbindungen bearbeiten Τροποποίηση συνδέσεων συστήματος Modify system connections + Modifi sistemajn konektojn Modificar conexiones de sistema Aldatu sistemako konexioak Modifier les connexions système @@ -49,10 +52,13 @@ প্ৰণালীত ব্যৱহৃত নিয়ম-নীতিৰ বিধিনিষেধৰ কাৰণে প্ৰণালীৰ বৈশিষ্ট্য পৰিবৰ্তন কৰা সম্ভৱ নহয় Политиката на системата не позволява промяна на системните настройки সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের বৈশিষ্ট্য পরিবর্তন করা সম্ভব নয় + La política del sistema impedeix la modificació dels paràmetres del sistema Systémová politika zabránila změně systémového nastavení + Systempolitikken forhindrer modifikation af systemindstillinger Die Systemrichtlinien verhindern das Bearbeiten von Systemeinstellungen Η πολιτική συστήματος δεν επιτρέπει τροποποίηση των ρυθμίσεων συστήματος System policy prevents modification of system settings + Sistempolico preventas modifadon de sistemagordoj Política de sistema evita modificación de configuración de sistema Sistemako arauek sistemako ezarpenak aldatzea saihesten dute La stratégie du système empêche toute modification des paramètres du système @@ -92,10 +98,13 @@ প্ৰণালীৰ স্থায়ী গৃহস্থৰ নাম পৰিবৰ্তন কৰক Промяна на името на хоста সিস্টেমের স্থায়ী হোস্ট-নেম পরিবর্তন করুন + Modifica el nom de l'ordinador de forma permanent Měnit trvalý systémový název počítače + Ændr fast systemværtsnavn Den ständigen Rechnernamen des Systems bearbeiten Αλλαγή πάγιου ονόματος συστήματος Modify persistent system hostname + Modifi permanentan sisteman gastigan nomon Modificar nombre de host de sistema persistente Aldatu sistemako ostalari-izen iraunkorra Modifier le nom d'hôte du système persistant @@ -128,10 +137,13 @@ প্ৰণালীত ব্যৱহৃত নিয়ম-নীতিৰ বিধি নিষেধৰ কাৰণে প্ৰণালীৰ স্থায়ী গৃহস্থৰ নাম পৰিবৰ্তন কৰা সম্ভৱ নহয় Политиката на системата не позволява промяна на името на хоста সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের স্থায়ী হোস্ট-নেম পরিবর্তন করা সম্ভব নয় + La política del sistema impedeix la modificació del nom de l'ordinador de forma permanent Systémová politika zabránila změně trvalého systémového názvu počítače + Systempolitikken forhindrer ændring af det faste systemværtsnavn Die Systemrichtlinien verhindern das Bearbeiten des ständigen Rechnernamens des Systems Η πολιτική συστήματος δεν επιτρέπει τροποποίηση του πάγιου ονόματος συστήματος System policy prevents modification of the persistent system hostname + Sistempolico preventas modifadon de la konstanta sistem-gastnomo Política de sistema evita modificación de nombre de host de sistema persistente Sistemako arauek sistemako ostalari-izen iraunkorra aldatzea saihesten dute La stratégie du système empêche toute modification du nom d'hôte du système persistant @@ -171,10 +183,13 @@ নিৰাপদ ৱাই-ফাইলৈ নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ Споделяне на връзката през защитена безжична мрежа নিরাপদ ওয়াই-ফাইল নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার + Connexió compartida mitjançant una xarxa Wi-Fi protegida Sdílení připojení přes chráněnou síť WiFi + Deling af forbindelse via et beskyttet WiFi-netværk Verbindungsfreigabe über ein geschütztes WLAN-Netzwerk Κοινή χρήση σύνδεσης μέσω προστατευμένου ασύρματου δικτύου Connection sharing via a protected Wi-Fi network + Kundivido de konektoj per protektita WiFi-reto Compartir conexión a través de una red WIFI protegida Konexio partekatua babestutako haririk gabeko sarearen bidez Partage de connexion via un réseau WiFi protégé @@ -207,10 +222,13 @@ প্ৰণালীৰ নিয়মনীতিয়ে নিৰাপদ ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ প্ৰতিৰোধ কৰিছে Политиката на системата не позволява споделяне на връзки през защитена безжична мрежа সিস্টেমের নিয়মনীতির কারণে, নিরাপদ ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার প্রতিরোধ করা হয়েছে + La política del sistema impedeix compartir connexions mitjançant una xarxa Wi-Fi protegida Systémová politika zabránila sdílení připojení přes chráněnou síť WiFi + Systempolitikken forhindrer deling af forbindelser via et beskyttet WiFi-netværk Die Systemrichtlinien verhindern Verbindungsfreigaben über ein geschütztes WLAN-Netzwerk Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω προστατευμένου ασύρματου δικτύου System policy prevents sharing connections via a protected Wi-Fi network + Sistempolico preventas kundividon de konektoj per protektita WiFi-reto Política de sistema evita compartir conexiones a través de una red WIFI protegida Sistemako arauek babestutako haririk gabeko sareen bidez konexioak partekatzea saihesten dute La stratégie du système empêche tout partage des connexions via un réseau WiFi protégé @@ -250,10 +268,13 @@ উন্মুক্ত ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ Споделяне на връзката през отворена безжична мрежа উন্মুক্ত ওয়াই-ফাইল নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার + Connexió compartida mitjançant una xarxa Wi-Fi oberta Sdílení připojení přes otevřenou síť WiFi + Deling af forbindelse via et åbent WiFi-netværk Verbindungsfreigabe über ein offenes WLAN-Netzwerk Κοινή χρήση σύνδεσης μέσω ανοιχτού ασύρματου δικτύου Connection sharing via an open Wi-Fi network + Kundivido de konektoj per malferma WiFi-reto Compartir conexión a través de una red WIFI abierta Konexio partekatua irekitako haririk gabeko sarearen bidez Partage de connexion via un réseau WiFi ouvert @@ -286,10 +307,13 @@ প্ৰণালীৰ নিয়মনীতিয়ে উন্মুক্ত ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ প্ৰতিৰোধ কৰিছে Политиката на системата не позволява споделяне на връзки през отворена безжична мрежа সিস্টেমের নিয়মনীতির কারণে, উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার প্রতিরোধ করা হয়েছে + La política del sistema impedeix compartir connexions mitjançant una xarxa Wi-Fi oberta Systémová politika zabránila sdílení připojení přes otevřenou síť WiFi + Systempolitikken forhindrer deling af forbindelser via et åbent WiFi-netværk Die Systemrichtlinien verhindern Verbindungsfreigaben über ein offenes WLAN-Netzwerk Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω ανοιχτού ασύρματου δικτύου System policy prevents sharing connections via an open Wi-Fi network + Sistempolitiko preventas kundividon de konektoj per malferma WiFi-reto Política de sistema evita compartir conexiones a través de una red WIFI abierta Sistemako arauek irakitako haririk gabeko sareen bidez konexioak partekatzea saihesten dute La stratégie du système empêche tout partage des connexions via un réseau WiFi ouvert diff --git a/src/Makefile.am b/src/Makefile.am index 8c01df0f..d7dccaaf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -275,8 +275,10 @@ EXTRA_DIST = \ $(NetworkManager_DATA) rundir=$(localstatedir)/run/NetworkManager +statedir=$(localstatedir)/lib/NetworkManager install-data-hook: $(mkinstalldirs) -m 0700 $(DESTDIR)$(rundir) + $(mkinstalldirs) -m 0700 $(DESTDIR)$(statedir) CLEANFILES = $(BUILT_SOURCES) diff --git a/src/Makefile.in b/src/Makefile.in index 17e8158c..bf489591 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -323,6 +323,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -337,6 +341,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -634,6 +639,7 @@ EXTRA_DIST = \ $(NetworkManager_DATA) rundir = $(localstatedir)/run/NetworkManager +statedir = $(localstatedir)/lib/NetworkManager CLEANFILES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1833,6 +1839,7 @@ nm-device-gsm-glue.h: $(top_srcdir)/introspection/nm-device-gsm.xml $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_gsm --mode=glib-server --output=$@ $< install-data-hook: $(mkinstalldirs) -m 0700 $(DESTDIR)$(rundir) + $(mkinstalldirs) -m 0700 $(DESTDIR)$(statedir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index 10240960..3a28467c 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -370,6 +370,13 @@ nm_utils_merge_ip6_config (NMIP6Config *ip6_config, NMSettingIP6Config *setting) nm_ip6_config_set_never_default (ip6_config, TRUE); } +static void +dispatcher_done_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) +{ + dbus_g_proxy_end_call (proxy, call, NULL, G_TYPE_INVALID); + g_object_unref (proxy); +} + void nm_utils_call_dispatcher (const char *action, NMConnection *connection, @@ -448,18 +455,25 @@ nm_utils_call_dispatcher (const char *action, value_hash_add_object_path (device_props, NMD_DEVICE_PROPS_PATH, nm_device_get_path (device)); } - dbus_g_proxy_call_no_reply (proxy, "Action", - G_TYPE_STRING, action, - DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, connection_hash, - DBUS_TYPE_G_MAP_OF_VARIANT, connection_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_props, - G_TYPE_INVALID); - - g_object_unref (proxy); + /* Do a non-blocking call, but wait for the reply, because dbus-glib + * sometimes needs time to complete internal housekeeping. If we use + * dbus_g_proxy_call_no_reply(), that housekeeping (specifically the + * GetNameOwner response) doesn't complete and we run into an assert + * on unreffing the proxy. + */ + dbus_g_proxy_begin_call_with_timeout (proxy, "Action", + dispatcher_done_cb, + dbus_mgr, + g_object_unref, + 5000, + G_TYPE_STRING, action, + DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, connection_hash, + DBUS_TYPE_G_MAP_OF_VARIANT, connection_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_props, + G_TYPE_INVALID); g_hash_table_destroy (connection_hash); g_hash_table_destroy (connection_props); g_hash_table_destroy (device_props); - g_object_unref (dbus_mgr); } gboolean diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am index 036dc6de..fbec9aaf 100644 --- a/src/backends/Makefile.am +++ b/src/backends/Makefile.am @@ -57,6 +57,10 @@ if TARGET_LINEXA libnmbackend_la_SOURCES += NetworkManagerLinexa.c endif +if TARGET_EXHERBO +libnmbackend_la_SOURCES += NetworkManagerExherbo.c +endif + libnmbackend_la_LIBADD += \ $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ diff --git a/src/backends/Makefile.in b/src/backends/Makefile.in index 54ad6ce9..3a640dc8 100644 --- a/src/backends/Makefile.in +++ b/src/backends/Makefile.in @@ -46,6 +46,7 @@ host_triplet = @host@ @TARGET_MANDRIVA_TRUE@am__append_10 = NetworkManagerMandriva.c @TARGET_PARDUS_TRUE@am__append_11 = NetworkManagerPardus.c @TARGET_LINEXA_TRUE@am__append_12 = NetworkManagerLinexa.c +@TARGET_EXHERBO_TRUE@am__append_13 = NetworkManagerExherbo.c subdir = src/backends DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -72,7 +73,8 @@ am__libnmbackend_la_SOURCES_DIST = NetworkManagerGeneric.c \ NetworkManagerDebian.c NetworkManagerSlackware.c \ NetworkManagerArch.c NetworkManagerPaldo.c \ NetworkManagerFrugalware.c NetworkManagerMandriva.c \ - NetworkManagerPardus.c NetworkManagerLinexa.c + NetworkManagerPardus.c NetworkManagerLinexa.c \ + NetworkManagerExherbo.c @TARGET_REDHAT_TRUE@am__objects_1 = \ @TARGET_REDHAT_TRUE@ libnmbackend_la-NetworkManagerRedHat.lo @TARGET_SUSE_TRUE@am__objects_2 = \ @@ -92,11 +94,13 @@ am__libnmbackend_la_SOURCES_DIST = NetworkManagerGeneric.c \ @TARGET_PARDUS_TRUE@ libnmbackend_la-NetworkManagerPardus.lo @TARGET_LINEXA_TRUE@am__objects_11 = \ @TARGET_LINEXA_TRUE@ libnmbackend_la-NetworkManagerLinexa.lo +@TARGET_EXHERBO_TRUE@am__objects_12 = \ +@TARGET_EXHERBO_TRUE@ libnmbackend_la-NetworkManagerExherbo.lo am_libnmbackend_la_OBJECTS = libnmbackend_la-NetworkManagerGeneric.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ - $(am__objects_10) $(am__objects_11) + $(am__objects_10) $(am__objects_11) $(am__objects_12) libnmbackend_la_OBJECTS = $(am_libnmbackend_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -224,6 +228,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -238,6 +246,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -325,7 +334,8 @@ libnmbackend_la_SOURCES = NetworkManagerGeneric.c \ NetworkManagerGeneric.h $(am__append_1) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_10) $(am__append_11) $(am__append_12) + $(am__append_10) $(am__append_11) $(am__append_12) \ + $(am__append_13) libnmbackend_la_LIBADD = $(am__append_9) \ $(top_builddir)/src/logging/libnm-logging.la $(DBUS_LIBS) \ $(GLIB_LIBS) @@ -391,6 +401,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerArch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerDebian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerExherbo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerFrugalware.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerGeneric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnmbackend_la-NetworkManagerGentoo.Plo@am__quote@ @@ -525,6 +536,14 @@ libnmbackend_la-NetworkManagerLinexa.lo: NetworkManagerLinexa.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnmbackend_la-NetworkManagerLinexa.lo `test -f 'NetworkManagerLinexa.c' || echo '$(srcdir)/'`NetworkManagerLinexa.c +libnmbackend_la-NetworkManagerExherbo.lo: NetworkManagerExherbo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnmbackend_la-NetworkManagerExherbo.lo -MD -MP -MF $(DEPDIR)/libnmbackend_la-NetworkManagerExherbo.Tpo -c -o libnmbackend_la-NetworkManagerExherbo.lo `test -f 'NetworkManagerExherbo.c' || echo '$(srcdir)/'`NetworkManagerExherbo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnmbackend_la-NetworkManagerExherbo.Tpo $(DEPDIR)/libnmbackend_la-NetworkManagerExherbo.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='NetworkManagerExherbo.c' object='libnmbackend_la-NetworkManagerExherbo.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnmbackend_la-NetworkManagerExherbo.lo `test -f 'NetworkManagerExherbo.c' || echo '$(srcdir)/'`NetworkManagerExherbo.c + mostlyclean-libtool: -rm -f *.lo diff --git a/src/backends/NetworkManagerExherbo.c b/src/backends/NetworkManagerExherbo.c new file mode 100644 index 00000000..d7e24cf6 --- /dev/null +++ b/src/backends/NetworkManagerExherbo.c @@ -0,0 +1,64 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams + * Dan Willemsen + * Robert Paskowitz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2004 Red Hat, Inc. + * (C) Copyright 2004 Dan Willemsen + * (C) Copyright 2004 Robert Paskowitz + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "NetworkManagerGeneric.h" +#include "nm-system.h" +#include "NetworkManagerUtils.h" +#include "nm-logging.h" + +/* + * nm_system_enable_loopback + * + * Bring up the loopback interface + * + */ +void nm_system_enable_loopback (void) +{ + nm_generic_enable_loopback (); +} + +/* + * nm_system_update_dns + * + * Make glibc/nscd aware of any changes to the resolv.conf file by + * restarting nscd. Only restart if already running. + * + */ +void nm_system_update_dns (void) +{ + if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); + nm_spawn_process ("/usr/sbin/nscd -i hosts"); + } +} + diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c index 8d9e68c5..e5b09384 100644 --- a/src/backends/NetworkManagerGentoo.c +++ b/src/backends/NetworkManagerGentoo.c @@ -30,12 +30,22 @@ #include #include #include +#include #include "NetworkManagerGeneric.h" #include "nm-system.h" #include "NetworkManagerUtils.h" #include "nm-logging.h" +#define BUFFER_SIZE 512 + +static void openrc_start_lo_if_necessary() +{ + /* No need to run net.lo if it is already running */ + if (nm_spawn_process ("/etc/init.d/net.lo status") != 0) + nm_spawn_process ("/etc/init.d/net.lo start"); +} + /* * nm_system_enable_loopback * @@ -44,9 +54,27 @@ */ void nm_system_enable_loopback (void) { - /* No need to run net.lo if it is already running */ - if (nm_spawn_process ("/etc/init.d/net.lo status") != 0) - nm_spawn_process("/etc/init.d/net.lo start"); + gchar *comm; + + /* If anything goes wrong trying to open /proc/1/comm, we will assume + OpenRC. */ + if (!g_file_get_contents ("/proc/1/comm", &comm, NULL, NULL)) { + nm_log_info (LOGD_CORE, "NetworkManager is running with OpenRC..."); + openrc_start_lo_if_necessary (); + return; + } + + if (g_strstr_len (comm, -1, "systemd")) { + /* We use the generic loopback enabler if using systemd. */ + nm_log_info (LOGD_CORE, "NetworkManager is running with systemd..."); + nm_generic_enable_loopback (); + } else { + /* OpenRC otherwise. */ + nm_log_info (LOGD_CORE, "NetworkManager is running with OpenRC..."); + openrc_start_lo_if_necessary(); + } + + g_free (comm); } /* diff --git a/src/bluez-manager/Makefile.in b/src/bluez-manager/Makefile.in index 9edc68b1..f7ca0b4d 100644 --- a/src/bluez-manager/Makefile.in +++ b/src/bluez-manager/Makefile.in @@ -186,6 +186,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -200,6 +204,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am index e29c6718..14ddde0b 100644 --- a/src/dhcp-manager/Makefile.am +++ b/src/dhcp-manager/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS=. tests + INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ @@ -6,15 +8,40 @@ INCLUDES = \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src -noinst_LTLIBRARIES = libdhcp-manager.la +noinst_LTLIBRARIES = libdhcp-manager.la libdhcp-dhclient.la + +################## dhclient ################## + +libdhcp_dhclient_la_SOURCES = \ + nm-dhcp-dhclient-utils.h \ + nm-dhcp-dhclient-utils.c \ + nm-dhcp-dhclient.h \ + nm-dhcp-dhclient.c + +libdhcp_dhclient_la_CPPFLAGS = \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DLOCALSTATEDIR=\"$(localstatedir)\" \ + -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ + -DDHCLIENT_V$(DHCLIENT_VERSION) + +libdhcp_dhclient_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + +################## main lib ################## libdhcp_manager_la_SOURCES = \ nm-dhcp-client.c \ nm-dhcp-client.h \ nm-dhcp-manager.c \ nm-dhcp-manager.h \ - nm-dhcp-dhclient.h \ - nm-dhcp-dhclient.c \ nm-dhcp-dhcpcd.h \ nm-dhcp-dhcpcd.c @@ -22,18 +49,15 @@ libdhcp_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ -DG_DISABLE_DEPRECATED \ - -DBINDIR=\"$(bindir)\" \ - -DDATADIR=\"$(datadir)\" \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLOCALSTATEDIR=\"$(localstatedir)\" \ -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ - -DDHCLIENT_V$(DHCLIENT_VERSION) \ -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" libdhcp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ $(top_builddir)/src/logging/libnm-logging.la \ + $(builddir)/libdhcp-dhclient.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/dhcp-manager/Makefile.in b/src/dhcp-manager/Makefile.in index 4a7cc29b..73302319 100644 --- a/src/dhcp-manager/Makefile.in +++ b/src/dhcp-manager/Makefile.in @@ -51,18 +51,27 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = +libdhcp_dhclient_la_DEPENDENCIES = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libdhcp_dhclient_la_OBJECTS = \ + libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo \ + libdhcp_dhclient_la-nm-dhcp-dhclient.lo +libdhcp_dhclient_la_OBJECTS = $(am_libdhcp_dhclient_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent libdhcp_manager_la_DEPENDENCIES = \ $(top_builddir)/marshallers/libmarshallers.la \ $(top_builddir)/src/logging/libnm-logging.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(builddir)/libdhcp-dhclient.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_libdhcp_manager_la_OBJECTS = libdhcp_manager_la-nm-dhcp-client.lo \ libdhcp_manager_la-nm-dhcp-manager.lo \ - libdhcp_manager_la-nm-dhcp-dhclient.lo \ libdhcp_manager_la-nm-dhcp-dhcpcd.lo libdhcp_manager_la_OBJECTS = $(am_libdhcp_manager_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -89,11 +98,50 @@ am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libdhcp_manager_la_SOURCES) -DIST_SOURCES = $(libdhcp_manager_la_SOURCES) +SOURCES = $(libdhcp_dhclient_la_SOURCES) $(libdhcp_manager_la_SOURCES) +DIST_SOURCES = $(libdhcp_dhclient_la_SOURCES) \ + $(libdhcp_manager_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -186,6 +234,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -200,6 +252,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -275,6 +328,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = . tests INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ @@ -283,14 +337,39 @@ INCLUDES = \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src -noinst_LTLIBRARIES = libdhcp-manager.la +noinst_LTLIBRARIES = libdhcp-manager.la libdhcp-dhclient.la + +################## dhclient ################## +libdhcp_dhclient_la_SOURCES = \ + nm-dhcp-dhclient-utils.h \ + nm-dhcp-dhclient-utils.c \ + nm-dhcp-dhclient.h \ + nm-dhcp-dhclient.c + +libdhcp_dhclient_la_CPPFLAGS = \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DLOCALSTATEDIR=\"$(localstatedir)\" \ + -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ + -DDHCLIENT_V$(DHCLIENT_VERSION) + +libdhcp_dhclient_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + + +################## main lib ################## libdhcp_manager_la_SOURCES = \ nm-dhcp-client.c \ nm-dhcp-client.h \ nm-dhcp-manager.c \ nm-dhcp-manager.h \ - nm-dhcp-dhclient.h \ - nm-dhcp-dhclient.c \ nm-dhcp-dhcpcd.h \ nm-dhcp-dhcpcd.c @@ -298,22 +377,19 @@ libdhcp_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ -DG_DISABLE_DEPRECATED \ - -DBINDIR=\"$(bindir)\" \ - -DDATADIR=\"$(datadir)\" \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLOCALSTATEDIR=\"$(localstatedir)\" \ -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ - -DDHCLIENT_V$(DHCLIENT_VERSION) \ -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" libdhcp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ $(top_builddir)/src/logging/libnm-logging.la \ + $(builddir)/libdhcp-dhclient.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -356,6 +432,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libdhcp-dhclient.la: $(libdhcp_dhclient_la_OBJECTS) $(libdhcp_dhclient_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libdhcp_dhclient_la_OBJECTS) $(libdhcp_dhclient_la_LIBADD) $(LIBS) libdhcp-manager.la: $(libdhcp_manager_la_OBJECTS) $(libdhcp_manager_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdhcp_manager_la_OBJECTS) $(libdhcp_manager_la_LIBADD) $(LIBS) @@ -365,8 +443,9 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_manager_la-nm-dhcp-client.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhclient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhcpcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdhcp_manager_la-nm-dhcp-manager.Plo@am__quote@ @@ -397,6 +476,22 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo: nm-dhcp-dhclient-utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_dhclient_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo -MD -MP -MF $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient-utils.Tpo -c -o libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo `test -f 'nm-dhcp-dhclient-utils.c' || echo '$(srcdir)/'`nm-dhcp-dhclient-utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient-utils.Tpo $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient-utils.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dhcp-dhclient-utils.c' object='libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_dhclient_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdhcp_dhclient_la-nm-dhcp-dhclient-utils.lo `test -f 'nm-dhcp-dhclient-utils.c' || echo '$(srcdir)/'`nm-dhcp-dhclient-utils.c + +libdhcp_dhclient_la-nm-dhcp-dhclient.lo: nm-dhcp-dhclient.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_dhclient_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdhcp_dhclient_la-nm-dhcp-dhclient.lo -MD -MP -MF $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient.Tpo -c -o libdhcp_dhclient_la-nm-dhcp-dhclient.lo `test -f 'nm-dhcp-dhclient.c' || echo '$(srcdir)/'`nm-dhcp-dhclient.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient.Tpo $(DEPDIR)/libdhcp_dhclient_la-nm-dhcp-dhclient.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dhcp-dhclient.c' object='libdhcp_dhclient_la-nm-dhcp-dhclient.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_dhclient_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdhcp_dhclient_la-nm-dhcp-dhclient.lo `test -f 'nm-dhcp-dhclient.c' || echo '$(srcdir)/'`nm-dhcp-dhclient.c + libdhcp_manager_la-nm-dhcp-client.lo: nm-dhcp-client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdhcp_manager_la-nm-dhcp-client.lo -MD -MP -MF $(DEPDIR)/libdhcp_manager_la-nm-dhcp-client.Tpo -c -o libdhcp_manager_la-nm-dhcp-client.lo `test -f 'nm-dhcp-client.c' || echo '$(srcdir)/'`nm-dhcp-client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdhcp_manager_la-nm-dhcp-client.Tpo $(DEPDIR)/libdhcp_manager_la-nm-dhcp-client.Plo @@ -413,14 +508,6 @@ libdhcp_manager_la-nm-dhcp-manager.lo: nm-dhcp-manager.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdhcp_manager_la-nm-dhcp-manager.lo `test -f 'nm-dhcp-manager.c' || echo '$(srcdir)/'`nm-dhcp-manager.c -libdhcp_manager_la-nm-dhcp-dhclient.lo: nm-dhcp-dhclient.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdhcp_manager_la-nm-dhcp-dhclient.lo -MD -MP -MF $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhclient.Tpo -c -o libdhcp_manager_la-nm-dhcp-dhclient.lo `test -f 'nm-dhcp-dhclient.c' || echo '$(srcdir)/'`nm-dhcp-dhclient.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhclient.Tpo $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhclient.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dhcp-dhclient.c' object='libdhcp_manager_la-nm-dhcp-dhclient.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdhcp_manager_la-nm-dhcp-dhclient.lo `test -f 'nm-dhcp-dhclient.c' || echo '$(srcdir)/'`nm-dhcp-dhclient.c - libdhcp_manager_la-nm-dhcp-dhcpcd.lo: nm-dhcp-dhcpcd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdhcp_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdhcp_manager_la-nm-dhcp-dhcpcd.lo -MD -MP -MF $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhcpcd.Tpo -c -o libdhcp_manager_la-nm-dhcp-dhcpcd.lo `test -f 'nm-dhcp-dhcpcd.c' || echo '$(srcdir)/'`nm-dhcp-dhcpcd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhcpcd.Tpo $(DEPDIR)/libdhcp_manager_la-nm-dhcp-dhcpcd.Plo @@ -435,6 +522,76 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -445,10 +602,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -467,7 +637,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -517,19 +687,48 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -546,81 +745,83 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -628,9 +829,10 @@ uninstall-am: install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 0c7f3d49..3a8b1940 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -156,11 +156,15 @@ stop_process (GPid pid, const char *iface) if (ret == -1) { /* Child already exited */ - if (errno == ECHILD) + if (errno == ECHILD) { + /* Was it really our child and it exited? */ + if (kill (pid, 0) < 0 && errno == ESRCH) + break; + } else { + /* Took too long; shoot it in the head */ + i = 0; break; - /* Took too long; shoot it in the head */ - i = 0; - break; + } } g_usleep (G_USEC_PER_SEC / 5); } diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c new file mode 100644 index 00000000..cc5255ab --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c @@ -0,0 +1,217 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + */ + +#include + +#include +#include +#include +#include + +#include "nm-dhcp-dhclient-utils.h" + +#define CLIENTID_TAG "send dhcp-client-identifier" +#define CLIENTID_FORMAT CLIENTID_TAG " \"%s\"; # added by NetworkManager" +#define CLIENTID_FORMAT_OCTETS CLIENTID_TAG " %s; # added by NetworkManager" + +#define HOSTNAME_TAG "send host-name" +#define HOSTNAME_FORMAT HOSTNAME_TAG " \"%s\"; # added by NetworkManager" + +#define ALSOREQ_TAG "also request " + +static void +add_also_request (GPtrArray *array, const char *item) +{ + int i; + + for (i = 0; i < array->len; i++) { + if (!strcmp (g_ptr_array_index (array, i), item)) + return; + } + g_ptr_array_add (array, g_strdup (item)); +} + +char * +nm_dhcp_dhclient_create_config (const char *interface, + NMSettingIP4Config *s_ip4, + guint8 *anycast_addr, + const char *hostname, + const char *orig_path, + const char *orig_contents) +{ + GString *new_contents; + GPtrArray *alsoreq; + int i; + + new_contents = g_string_new (_("# Created by NetworkManager\n")); + alsoreq = g_ptr_array_sized_new (5); + + if (orig_contents) { + char **lines, **line; + gboolean in_alsoreq = FALSE; + + g_string_append_printf (new_contents, _("# Merged from %s\n\n"), orig_path); + + lines = g_strsplit_set (orig_contents, "\n\r", 0); + for (line = lines; lines && *line; line++) { + char *p = *line; + + if (!strlen (g_strstrip (p))) + continue; + + /* Override config file "dhcp-client-id" and use one from the + * connection. + */ + if ( s_ip4 + && nm_setting_ip4_config_get_dhcp_client_id (s_ip4) + && !strncmp (p, CLIENTID_TAG, strlen (CLIENTID_TAG))) + continue; + + /* Override config file hostname and use one from the connection */ + if (hostname && !strncmp (p, HOSTNAME_TAG, strlen (HOSTNAME_TAG))) + continue; + + /* Check for "also require" */ + if (!strncmp (p, ALSOREQ_TAG, strlen (ALSOREQ_TAG))) { + in_alsoreq = TRUE; + p += strlen (ALSOREQ_TAG); + } + + if (in_alsoreq) { + char **areq, **aiter; + + /* Grab each 'also require' option and save for later */ + areq = g_strsplit_set (p, "\t ,", -1); + for (aiter = areq; aiter && *aiter; aiter++) { + if (!strlen (g_strstrip (*aiter))) + continue; + + if (*aiter[0] == ';') { + /* all done */ + in_alsoreq = FALSE; + break; + } + + if (!isalnum ((*aiter)[0])) + continue; + + if ((*aiter)[strlen (*aiter) - 1] == ';') { + /* Remove the EOL marker */ + (*aiter)[strlen (*aiter) - 1] = '\0'; + in_alsoreq = FALSE; + } + + add_also_request (alsoreq, *aiter); + } + + if (areq) + g_strfreev (areq); + + continue; + } + + /* Existing configuration line is OK, add it to new configuration */ + g_string_append (new_contents, *line); + g_string_append_c (new_contents, '\n'); + } + + if (lines) + g_strfreev (lines); + } else + g_string_append_c (new_contents, '\n'); + + /* Add NM options from connection */ + if (s_ip4) { + const char *tmp; + gboolean added = FALSE; + + tmp = nm_setting_ip4_config_get_dhcp_client_id (s_ip4); + if (tmp) { + gboolean is_octets = TRUE; + const char *p = tmp; + + while (*p) { + if (!isxdigit (*p) && (*p != ':')) { + is_octets = FALSE; + break; + } + p++; + } + + /* If the client ID is just hex digits and : then don't use quotes, + * because dhclient expects either a quoted ASCII string, or a byte + * array formated as hex octets separated by : + */ + if (is_octets) + g_string_append_printf (new_contents, CLIENTID_FORMAT_OCTETS "\n", tmp); + else + g_string_append_printf (new_contents, CLIENTID_FORMAT "\n", tmp); + added = TRUE; + } + + if (hostname) { + g_string_append_printf (new_contents, HOSTNAME_FORMAT "\n", hostname); + added = TRUE; + } + + if (added) + g_string_append_c (new_contents, '\n'); + } + + /* Define options for classless static routes */ + g_string_append (new_contents, + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n"); + g_string_append (new_contents, + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n"); + /* Web Proxy Auto-Discovery option (bgo #368423) */ + g_string_append (new_contents, "option wpad code 252 = string;\n"); + + g_string_append_c (new_contents, '\n'); + + /* Everything we want to request from the DHCP server */ + add_also_request (alsoreq, "rfc3442-classless-static-routes"); + add_also_request (alsoreq, "ms-classless-static-routes"); + add_also_request (alsoreq, "wpad"); + add_also_request (alsoreq, "ntp-servers"); + + /* And add it to the dhclient configuration */ + for (i = 0; i < alsoreq->len; i++) { + char *t = g_ptr_array_index (alsoreq, i); + + g_string_append_printf (new_contents, "also request %s;\n", t); + g_free (t); + } + g_ptr_array_free (alsoreq, TRUE); + + g_string_append_c (new_contents, '\n'); + + if (anycast_addr) { + g_string_append_printf (new_contents, "interface \"%s\" {\n" + " initial-interval 1; \n" + " anycast-mac ethernet %02x:%02x:%02x:%02x:%02x:%02x;\n" + "}\n", + interface, + anycast_addr[0], anycast_addr[1], + anycast_addr[2], anycast_addr[3], + anycast_addr[4], anycast_addr[5]); + } + + return g_string_free (new_contents, FALSE); +} + diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.h b/src/dhcp-manager/nm-dhcp-dhclient-utils.h new file mode 100644 index 00000000..77def551 --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + */ + +#ifndef NM_DHCP_DHCLIENT_UTILS_H +#define NM_DHCP_DHCLIENT_UTILS_H + +#include +#include + +#include + +char *nm_dhcp_dhclient_create_config (const char *interface, + NMSettingIP4Config *s_ip4, + guint8 *anycast_addr, + const char *hostname, + const char *orig_path, + const char *orig_contents); + +#endif /* NM_DHCP_DHCLIENT_UTILS_H */ + diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index d8781524..f6f2a540 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -39,6 +39,7 @@ #include "nm-dhcp-dhclient.h" #include "nm-utils.h" #include "nm-logging.h" +#include "nm-dhcp-dhclient-utils.h" G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT) @@ -302,12 +303,6 @@ out: } -#define DHCP_CLIENT_ID_TAG "send dhcp-client-identifier" -#define DHCP_CLIENT_ID_FORMAT DHCP_CLIENT_ID_TAG " \"%s\"; # added by NetworkManager" -#define DHCP_CLIENT_ID_FORMAT_OCTETS DHCP_CLIENT_ID_TAG " %s; # added by NetworkManager" - -#define DHCP_HOSTNAME_TAG "send host-name" -#define DHCP_HOSTNAME_FORMAT DHCP_HOSTNAME_TAG " \"%s\"; # added by NetworkManager" static gboolean merge_dhclient_config (const char *iface, @@ -318,105 +313,27 @@ merge_dhclient_config (const char *iface, const char *orig_path, GError **error) { - GString *new_contents; - char *orig_contents = NULL; + char *orig = NULL, *new; gboolean success = FALSE; g_return_val_if_fail (iface != NULL, FALSE); g_return_val_if_fail (conf_file != NULL, FALSE); - new_contents = g_string_new (_("# Created by NetworkManager\n")); - if (g_file_test (orig_path, G_FILE_TEST_EXISTS)) { GError *read_error = NULL; - if (!g_file_get_contents (orig_path, &orig_contents, NULL, &read_error)) { + if (!g_file_get_contents (orig_path, &orig, NULL, &read_error)) { nm_log_warn (LOGD_DHCP, "(%s): error reading dhclient configuration %s: %s", iface, orig_path, read_error->message); g_error_free (read_error); } } - /* Add existing options, if any, but ignore stuff NM will replace. */ - if (orig_contents) { - char **lines = NULL, **line; - - g_string_append_printf (new_contents, _("# Merged from %s\n\n"), orig_path); - - lines = g_strsplit_set (orig_contents, "\n\r", 0); - for (line = lines; lines && *line; line++) { - gboolean ignore = FALSE; - - if (!strlen (g_strstrip (*line))) - continue; - - if ( s_ip4 - && nm_setting_ip4_config_get_dhcp_client_id (s_ip4) - && !strncmp (*line, DHCP_CLIENT_ID_TAG, strlen (DHCP_CLIENT_ID_TAG))) - ignore = TRUE; - - if ( s_ip4 - && hostname - && !strncmp (*line, DHCP_HOSTNAME_TAG, strlen (DHCP_HOSTNAME_TAG))) - ignore = TRUE; - - if (!ignore) { - g_string_append (new_contents, *line); - g_string_append_c (new_contents, '\n'); - } - } - - if (lines) - g_strfreev (lines); - g_free (orig_contents); - } else - g_string_append_c (new_contents, '\n'); - - /* Add NM options from connection */ - if (s_ip4) { - const char *tmp; - - tmp = nm_setting_ip4_config_get_dhcp_client_id (s_ip4); - if (tmp) { - gboolean is_octets = TRUE; - const char *p = tmp; - - while (*p) { - if (!isxdigit (*p) && (*p != ':')) { - is_octets = FALSE; - break; - } - p++; - } - - /* If the client ID is just hex digits and : then don't use quotes, - * because dhclient expects either a quoted ASCII string, or a byte - * array formated as hex octets separated by : - */ - if (is_octets) - g_string_append_printf (new_contents, DHCP_CLIENT_ID_FORMAT_OCTETS "\n", tmp); - else - g_string_append_printf (new_contents, DHCP_CLIENT_ID_FORMAT "\n", tmp); - } - - if (hostname) - g_string_append_printf (new_contents, DHCP_HOSTNAME_FORMAT "\n", hostname); - } - - if (anycast_addr) { - g_string_append_printf (new_contents, "interface \"%s\" {\n" - " initial-interval 1; \n" - " anycast-mac ethernet %02x:%02x:%02x:%02x:%02x:%02x;\n" - "}\n", - iface, - anycast_addr[0], anycast_addr[1], - anycast_addr[2], anycast_addr[3], - anycast_addr[4], anycast_addr[5]); - } - - success = g_file_set_contents (conf_file, new_contents->str, -1, error); + new = nm_dhcp_dhclient_create_config (iface, s_ip4, anycast_addr, hostname, orig_path, orig); + g_assert (new); + success = g_file_set_contents (conf_file, new, -1, error); + g_free (new); - g_string_free (new_contents, TRUE); return success; } diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index 378a97b6..4fb703c4 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -128,6 +128,8 @@ real_ip4_start (NMDHCPClient *client, g_ptr_array_add (argv, (gpointer) "-L"); /* Disable built-in IPv4LL since we use avahi-autoipd */ + g_ptr_array_add (argv, (gpointer) "-G"); /* Let NM handle routing */ + g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */ g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH ); diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c index a1e3e5e2..f3c1e84f 100644 --- a/src/dhcp-manager/nm-dhcp-manager.c +++ b/src/dhcp-manager/nm-dhcp-manager.c @@ -317,11 +317,6 @@ nm_dhcp_manager_new (const char *client, GError **error) { NMDHCPManagerPrivate *priv; DBusGConnection *g_connection; - GType client_type; - - client_type = get_client_type (client, error); - if (!client_type) - return NULL; g_warn_if_fail (singleton == NULL); @@ -329,13 +324,14 @@ nm_dhcp_manager_new (const char *client, GError **error) priv = NM_DHCP_MANAGER_GET_PRIVATE (singleton); /* Client-specific setup */ - priv->client_type = client_type; + priv->client_type = get_client_type (client, error); if (priv->client_type == NM_TYPE_DHCP_DHCLIENT) priv->get_lease_config_func = nm_dhcp_dhclient_get_lease_config; else if (priv->client_type == NM_TYPE_DHCP_DHCPCD) priv->get_lease_config_func = nm_dhcp_dhcpcd_get_lease_config; - else - g_assert_not_reached (); + else { + nm_log_warn (LOGD_DHCP, "No usable DHCP client found! DHCP configurations will fail."); + } priv->clients = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, @@ -426,6 +422,9 @@ client_start (NMDHCPManager *self, priv = NM_DHCP_MANAGER_GET_PRIVATE (self); + /* Ensure we have a usable DHCP client */ + g_return_val_if_fail (priv->client_type != 0, NULL); + /* Kill any old client instance */ client = get_client_for_iface (self, iface, ipv6); if (client) { diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am new file mode 100644 index 00000000..b075fd68 --- /dev/null +++ b/src/dhcp-manager/tests/Makefile.am @@ -0,0 +1,28 @@ +INCLUDES = \ + -I$(top_srcdir)/include \ + -I${top_srcdir}/libnm-util \ + -I$(top_srcdir)/src/dhcp-manager + +noinst_PROGRAMS = test-dhcp-dhclient + +####### policy /etc/hosts test ####### + +test_dhcp_dhclient_SOURCES = \ + test-dhcp-dhclient.c + +test_dhcp_dhclient_CPPFLAGS = \ + $(GLIB_CFLAGS) + +test_dhcp_dhclient_LDADD = \ + -ldl \ + $(top_builddir)/src/dhcp-manager/libdhcp-dhclient.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) + +if WITH_TESTS + +check-local: test-dhcp-dhclient + $(abs_builddir)/test-dhcp-dhclient + +endif + diff --git a/src/dhcp-manager/tests/Makefile.in b/src/dhcp-manager/tests/Makefile.in new file mode 100644 index 00000000..233cd504 --- /dev/null +++ b/src/dhcp-manager/tests/Makefile.in @@ -0,0 +1,610 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = test-dhcp-dhclient$(EXEEXT) +subdir = src/dhcp-manager/tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ + $(top_srcdir)/m4/libnl-check.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_test_dhcp_dhclient_OBJECTS = \ + test_dhcp_dhclient-test-dhcp-dhclient.$(OBJEXT) +test_dhcp_dhclient_OBJECTS = $(am_test_dhcp_dhclient_OBJECTS) +am__DEPENDENCIES_1 = +test_dhcp_dhclient_DEPENDENCIES = \ + $(top_builddir)/src/dhcp-manager/libdhcp-dhclient.la \ + $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(test_dhcp_dhclient_SOURCES) +DIST_SOURCES = $(test_dhcp_dhclient_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBUS_SYS_DIR = @DBUS_SYS_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DHCLIENT_PATH = @DHCLIENT_PATH@ +DHCLIENT_VERSION = @DHCLIENT_VERSION@ +DHCPCD_PATH = @DHCPCD_PATH@ +DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +IPTABLES_PATH = @IPTABLES_PATH@ +KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDL = @LIBDL@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBM = @LIBM@ +LIBNL_CFLAGS = @LIBNL_CFLAGS@ +LIBNL_LIBS = @LIBNL_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ +NSS_CFLAGS = @NSS_CFLAGS@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POLKIT_CFLAGS = @POLKIT_CFLAGS@ +POLKIT_LIBS = @POLKIT_LIBS@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ +RANLIB = @RANLIB@ +RESOLVCONF_PATH = @RESOLVCONF_PATH@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ +UDEV_BASE_DIR = @UDEV_BASE_DIR@ +USE_NLS = @USE_NLS@ +UUID_CFLAGS = @UUID_CFLAGS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = \ + -I$(top_srcdir)/include \ + -I${top_srcdir}/libnm-util \ + -I$(top_srcdir)/src/dhcp-manager + + +####### policy /etc/hosts test ####### +test_dhcp_dhclient_SOURCES = \ + test-dhcp-dhclient.c + +test_dhcp_dhclient_CPPFLAGS = \ + $(GLIB_CFLAGS) + +test_dhcp_dhclient_LDADD = \ + -ldl \ + $(top_builddir)/src/dhcp-manager/libdhcp-dhclient.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/dhcp-manager/tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/dhcp-manager/tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test-dhcp-dhclient$(EXEEXT): $(test_dhcp_dhclient_OBJECTS) $(test_dhcp_dhclient_DEPENDENCIES) + @rm -f test-dhcp-dhclient$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_dhcp_dhclient_OBJECTS) $(test_dhcp_dhclient_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +test_dhcp_dhclient-test-dhcp-dhclient.o: test-dhcp-dhclient.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dhcp_dhclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_dhcp_dhclient-test-dhcp-dhclient.o -MD -MP -MF $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Tpo -c -o test_dhcp_dhclient-test-dhcp-dhclient.o `test -f 'test-dhcp-dhclient.c' || echo '$(srcdir)/'`test-dhcp-dhclient.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Tpo $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-dhcp-dhclient.c' object='test_dhcp_dhclient-test-dhcp-dhclient.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dhcp_dhclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_dhcp_dhclient-test-dhcp-dhclient.o `test -f 'test-dhcp-dhclient.c' || echo '$(srcdir)/'`test-dhcp-dhclient.c + +test_dhcp_dhclient-test-dhcp-dhclient.obj: test-dhcp-dhclient.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dhcp_dhclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_dhcp_dhclient-test-dhcp-dhclient.obj -MD -MP -MF $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Tpo -c -o test_dhcp_dhclient-test-dhcp-dhclient.obj `if test -f 'test-dhcp-dhclient.c'; then $(CYGPATH_W) 'test-dhcp-dhclient.c'; else $(CYGPATH_W) '$(srcdir)/test-dhcp-dhclient.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Tpo $(DEPDIR)/test_dhcp_dhclient-test-dhcp-dhclient.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-dhcp-dhclient.c' object='test_dhcp_dhclient-test-dhcp-dhclient.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dhcp_dhclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_dhcp_dhclient-test-dhcp-dhclient.obj `if test -f 'test-dhcp-dhclient.c'; then $(CYGPATH_W) 'test-dhcp-dhclient.c'; else $(CYGPATH_W) '$(srcdir)/test-dhcp-dhclient.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +@WITH_TESTS_FALSE@check-local: +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ + clean-generic clean-libtool clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +@WITH_TESTS_TRUE@check-local: test-dhcp-dhclient +@WITH_TESTS_TRUE@ $(abs_builddir)/test-dhcp-dhclient + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/dhcp-manager/tests/test-dhcp-dhclient.c b/src/dhcp-manager/tests/test-dhcp-dhclient.c new file mode 100644 index 00000000..c1cd6f80 --- /dev/null +++ b/src/dhcp-manager/tests/test-dhcp-dhclient.c @@ -0,0 +1,249 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + * + */ + +#include +#include + +#include "nm-dhcp-dhclient-utils.h" +#include "nm-utils.h" + +#define DEBUG 0 + +static void +test_config (const char *orig, + const char *expected, + const char *hostname, + const char *dhcp_client_id, + const char *iface, + guint8 *anycast_addr) +{ + NMSettingIP4Config *s_ip4; + char *new; + + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID, dhcp_client_id, NULL); + + new = nm_dhcp_dhclient_create_config (iface, + s_ip4, + anycast_addr, + hostname, + "/path/to/dhclient.conf", + orig); + g_assert (new != NULL); + +#if DEBUG + g_message ("\n- NEW ---------------------------------\n" + "%s" + "+ EXPECTED ++++++++++++++++++++++++++++++\n" + "%s" + "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + new, expected); +#endif + g_assert (strlen (new) == strlen (expected)); + g_assert (strcmp (new, expected) == 0); + g_free (new); +} + +/*******************************************/ + +static const char *orig_missing_expected = \ + "# Created by NetworkManager\n" + "\n" + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" + "option wpad code 252 = string;\n" + "\n" + "also request rfc3442-classless-static-routes;\n" + "also request ms-classless-static-routes;\n" + "also request wpad;\n" + "also request ntp-servers;\n" + "\n"; + +static void +test_orig_missing (void) +{ + test_config (NULL, orig_missing_expected, + NULL, + NULL, + "eth0", + NULL); +} + +/*******************************************/ + +static const char *override_client_id_orig = \ + "send dhcp-client-identifier 00:30:04:20:7A:08;\n"; + +static const char *override_client_id_expected = \ + "# Created by NetworkManager\n" + "# Merged from /path/to/dhclient.conf\n" + "\n" + "send dhcp-client-identifier 11:22:33:44:55:66; # added by NetworkManager\n" + "\n" + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" + "option wpad code 252 = string;\n" + "\n" + "also request rfc3442-classless-static-routes;\n" + "also request ms-classless-static-routes;\n" + "also request wpad;\n" + "also request ntp-servers;\n" + "\n"; + +static void +test_override_client_id (void) +{ + test_config (override_client_id_orig, override_client_id_expected, + NULL, + "11:22:33:44:55:66", + "eth0", + NULL); +} + +/*******************************************/ + +static const char *override_hostname_orig = \ + "send host-name \"foobar\";\n"; + +static const char *override_hostname_expected = \ + "# Created by NetworkManager\n" + "# Merged from /path/to/dhclient.conf\n" + "\n" + "send host-name \"blahblah\"; # added by NetworkManager\n" + "\n" + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" + "option wpad code 252 = string;\n" + "\n" + "also request rfc3442-classless-static-routes;\n" + "also request ms-classless-static-routes;\n" + "also request wpad;\n" + "also request ntp-servers;\n" + "\n"; + +static void +test_override_hostname (void) +{ + test_config (override_hostname_orig, override_hostname_expected, + "blahblah", + NULL, + "eth0", + NULL); +} + +/*******************************************/ + +static const char *existing_alsoreq_orig = \ + "also request something;\n" + "also request another-thing;\n" + ; + +static const char *existing_alsoreq_expected = \ + "# Created by NetworkManager\n" + "# Merged from /path/to/dhclient.conf\n" + "\n" + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" + "option wpad code 252 = string;\n" + "\n" + "also request something;\n" + "also request another-thing;\n" + "also request rfc3442-classless-static-routes;\n" + "also request ms-classless-static-routes;\n" + "also request wpad;\n" + "also request ntp-servers;\n" + "\n"; + +static void +test_existing_alsoreq (void) +{ + test_config (existing_alsoreq_orig, existing_alsoreq_expected, + NULL, + NULL, + "eth0", + NULL); +} + +/*******************************************/ + +static const char *existing_multiline_alsoreq_orig = \ + "also request something another-thing yet-another-thing\n" + " foobar baz blah;\n" + ; + +static const char *existing_multiline_alsoreq_expected = \ + "# Created by NetworkManager\n" + "# Merged from /path/to/dhclient.conf\n" + "\n" + "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" + "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" + "option wpad code 252 = string;\n" + "\n" + "also request something;\n" + "also request another-thing;\n" + "also request yet-another-thing;\n" + "also request foobar;\n" + "also request baz;\n" + "also request blah;\n" + "also request rfc3442-classless-static-routes;\n" + "also request ms-classless-static-routes;\n" + "also request wpad;\n" + "also request ntp-servers;\n" + "\n"; + +static void +test_existing_multiline_alsoreq (void) +{ + test_config (existing_multiline_alsoreq_orig, existing_multiline_alsoreq_expected, + NULL, + NULL, + "eth0", + NULL); +} + +/*******************************************/ + +#if GLIB_CHECK_VERSION(2,25,12) +typedef GTestFixtureFunc TCFunc; +#else +typedef void (*TCFunc)(void); +#endif + +#define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (TCFunc) t, NULL) + +int main (int argc, char **argv) +{ + GTestSuite *suite; + + g_test_init (&argc, &argv, NULL); + + g_type_init (); + + suite = g_test_get_root (); + + g_test_suite_add (suite, TESTCASE (test_orig_missing, NULL)); + g_test_suite_add (suite, TESTCASE (test_override_client_id, NULL)); + g_test_suite_add (suite, TESTCASE (test_override_hostname, NULL)); + g_test_suite_add (suite, TESTCASE (test_existing_alsoreq, NULL)); + g_test_suite_add (suite, TESTCASE (test_existing_multiline_alsoreq, NULL)); + + return g_test_run (); +} + diff --git a/src/dns-manager/Makefile.am b/src/dns-manager/Makefile.am index 1ffe62dc..7b5fc4f8 100644 --- a/src/dns-manager/Makefile.am +++ b/src/dns-manager/Makefile.am @@ -14,7 +14,9 @@ libdns_manager_la_SOURCES = \ nm-dns-dnsmasq.h \ nm-dns-dnsmasq.c \ nm-dns-bind.h \ - nm-dns-bind.c + nm-dns-bind.c \ + nm-dns-utils.h \ + nm-dns-utils.c libdns_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ diff --git a/src/dns-manager/Makefile.in b/src/dns-manager/Makefile.in index 496d3756..69b76815 100644 --- a/src/dns-manager/Makefile.in +++ b/src/dns-manager/Makefile.in @@ -57,7 +57,8 @@ libdns_manager_la_DEPENDENCIES = \ am_libdns_manager_la_OBJECTS = libdns_manager_la-nm-dns-manager.lo \ libdns_manager_la-nm-dns-plugin.lo \ libdns_manager_la-nm-dns-dnsmasq.lo \ - libdns_manager_la-nm-dns-bind.lo + libdns_manager_la-nm-dns-bind.lo \ + libdns_manager_la-nm-dns-utils.lo libdns_manager_la_OBJECTS = $(am_libdns_manager_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -185,6 +186,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -199,6 +204,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -289,7 +295,9 @@ libdns_manager_la_SOURCES = \ nm-dns-dnsmasq.h \ nm-dns-dnsmasq.c \ nm-dns-bind.h \ - nm-dns-bind.c + nm-dns-bind.c \ + nm-dns-utils.h \ + nm-dns-utils.c libdns_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ @@ -357,6 +365,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_manager_la-nm-dns-dnsmasq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_manager_la-nm-dns-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_manager_la-nm-dns-plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_manager_la-nm-dns-utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -417,6 +426,14 @@ libdns_manager_la-nm-dns-bind.lo: nm-dns-bind.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdns_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdns_manager_la-nm-dns-bind.lo `test -f 'nm-dns-bind.c' || echo '$(srcdir)/'`nm-dns-bind.c +libdns_manager_la-nm-dns-utils.lo: nm-dns-utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdns_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdns_manager_la-nm-dns-utils.lo -MD -MP -MF $(DEPDIR)/libdns_manager_la-nm-dns-utils.Tpo -c -o libdns_manager_la-nm-dns-utils.lo `test -f 'nm-dns-utils.c' || echo '$(srcdir)/'`nm-dns-utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdns_manager_la-nm-dns-utils.Tpo $(DEPDIR)/libdns_manager_la-nm-dns-utils.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dns-utils.c' object='libdns_manager_la-nm-dns-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdns_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdns_manager_la-nm-dns-utils.lo `test -f 'nm-dns-utils.c' || echo '$(srcdir)/'`nm-dns-utils.c + mostlyclean-libtool: -rm -f *.lo diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c index 41c8e2a6..9cc01978 100644 --- a/src/dns-manager/nm-dns-dnsmasq.c +++ b/src/dns-manager/nm-dns-dnsmasq.c @@ -33,6 +33,7 @@ #include "nm-logging.h" #include "nm-ip4-config.h" #include "nm-ip6-config.h" +#include "nm-dns-utils.h" G_DEFINE_TYPE (NMDnsDnsmasq, nm_dns_dnsmasq, NM_TYPE_DNS_PLUGIN) @@ -75,9 +76,11 @@ add_ip4_config (GString *str, NMIP4Config *ip4, gboolean split) gboolean added = FALSE; if (split) { + char **domains, **iter; + /* FIXME: it appears that dnsmasq can only handle one nameserver - * per domain (at the manpage seems to indicate that) so only use - * the first nameserver here. + * per domain (and the manpage says this too) so only use the first + * nameserver here. */ addr.s_addr = nm_ip4_config_get_nameserver (ip4, 0); memset (&buf[0], 0, sizeof (buf)); @@ -103,6 +106,17 @@ add_ip4_config (GString *str, NMIP4Config *ip4, gboolean split) added = TRUE; } } + + /* Ensure reverse-DNS works by directing queries for in-addr.arpa + * domains to the split domain's nameserver. + */ + domains = nm_dns_utils_get_ip4_rdns_domains (ip4); + if (domains) { + for (iter = domains; iter && *iter; iter++) + g_string_append_printf (str, "server=/%s/%s\n", *iter, buf); + g_strfreev (domains); + added = TRUE; + } } /* If no searches or domains, just add the namservers */ @@ -216,7 +230,7 @@ update (NMDnsPlugin *plugin, } /* Now add interface configs without split DNS */ - for (iter = (GSList *) dev_configs; iter;iter = g_slist_next (iter)) { + for (iter = (GSList *) dev_configs; iter; iter = g_slist_next (iter)) { if (NM_IS_IP4_CONFIG (iter->data)) add_ip4_config (conf, NM_IP4_CONFIG (iter->data), FALSE); else if (NM_IS_IP6_CONFIG (iter->data)) @@ -224,7 +238,7 @@ update (NMDnsPlugin *plugin, } /* And any other random configs */ - for (iter = (GSList *) other_configs; iter;iter = g_slist_next (iter)) { + for (iter = (GSList *) other_configs; iter; iter = g_slist_next (iter)) { if (NM_IS_IP4_CONFIG (iter->data)) add_ip4_config (conf, NM_IP4_CONFIG (iter->data), FALSE); else if (NM_IS_IP6_CONFIG (iter->data)) diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c index 7a6fbbc9..32800d0b 100644 --- a/src/dns-manager/nm-dns-manager.c +++ b/src/dns-manager/nm-dns-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2004 - 2005 Colin Walters - * Copyright (C) 2004 - 2010 Red Hat, Inc. + * Copyright (C) 2004 - 2011 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * and others */ @@ -583,6 +583,7 @@ update_dns (NMDnsManager *self, rc.nameservers = g_ptr_array_new (); rc.domain = NULL; rc.searches = g_ptr_array_new (); + rc.nis_domain = NULL; rc.nis_servers = g_ptr_array_new (); if (priv->ip4_vpn_config) @@ -860,7 +861,7 @@ nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, g_object_unref (config); - if (config_changed (mgr)) + if (!config_changed (mgr)) return TRUE; if (!update_dns (mgr, iface, FALSE, &error)) { @@ -905,7 +906,7 @@ nm_dns_manager_add_ip6_config (NMDnsManager *mgr, if (!g_slist_find (priv->configs, config)) priv->configs = g_slist_append (priv->configs, g_object_ref (config)); - if (config_changed (mgr)) + if (!config_changed (mgr)) return TRUE; if (!update_dns (mgr, iface, FALSE, &error)) { @@ -945,7 +946,7 @@ nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, g_object_unref (config); - if (config_changed (mgr)) + if (!config_changed (mgr)) return TRUE; if (!update_dns (mgr, iface, FALSE, &error)) { diff --git a/src/dns-manager/nm-dns-utils.c b/src/dns-manager/nm-dns-utils.c new file mode 100644 index 00000000..615adfd1 --- /dev/null +++ b/src/dns-manager/nm-dns-utils.c @@ -0,0 +1,99 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + * + */ + +#include +#include + +#include "nm-dns-utils.h" +#include "nm-utils.h" + +static void +add_ip4_to_rdns_array (guint32 ip, GPtrArray *domains) /* network byte order */ +{ + guint32 defprefix; + guchar *p; + char *str = NULL; + int i; + + defprefix = nm_utils_ip4_get_default_prefix (ip); + + /* Convert to host byte order, mask the host bits, and convert back */ + ip = ntohl (ip); + ip &= 0xFFFFFFFF << (32 - defprefix); + ip = htonl (ip); + p = (guchar *) &ip; + + if (defprefix == 8) + str = g_strdup_printf ("%u.in-addr.arpa", p[0] & 0xFF); + else if (defprefix == 16) + str = g_strdup_printf ("%u.%u.in-addr.arpa", p[1] & 0xFF, p[0] & 0xFF); + else if (defprefix == 24) + str = g_strdup_printf ("%u.%u.%u.in-addr.arpa", p[2] & 0xFF, p[1] & 0xFF, p[0] & 0xFF); + + g_return_if_fail (str != NULL); + + /* Suppress duplicates */ + for (i = 0; i < domains->len; i++) { + if (strcmp (str, g_ptr_array_index (domains, i)) == 0) + break; + } + + if (i == domains->len) + g_ptr_array_add (domains, str); + else + g_free (str); +} + +char ** +nm_dns_utils_get_ip4_rdns_domains (NMIP4Config *ip4) +{ + GPtrArray *domains = NULL; + int i; + + g_return_val_if_fail (ip4 != NULL, NULL); + + domains = g_ptr_array_sized_new (5); + + /* To calculate the reverse DNS domains for this IP4 config, we take + * all the IP addresses and routes in the config, calculate the network + * portion, and convert that to classful, and use the network bits for + * the final domain. FIXME: better handle classless routing, which might + * require us to add multiple domains for each actual network prefix to + * cover all the separate networks in that block. + */ + + for (i = 0; i < nm_ip4_config_get_num_addresses (ip4); i++) { + NMIP4Address *addr = nm_ip4_config_get_address (ip4, i); + + add_ip4_to_rdns_array (nm_ip4_address_get_address (addr), domains); + } + + for (i = 0; i < nm_ip4_config_get_num_routes (ip4); i++) { + NMIP4Route *route = nm_ip4_config_get_route (ip4, i); + + add_ip4_to_rdns_array (nm_ip4_route_get_dest (route), domains); + } + + /* Terminating NULL so we can use g_strfreev() to free it */ + g_ptr_array_add (domains, NULL); + + /* Free the array and return NULL if the only element was the ending NULL */ + return (char **) g_ptr_array_free (domains, (domains->len == 1)); +} + diff --git a/src/dns-manager/nm-dns-utils.h b/src/dns-manager/nm-dns-utils.h new file mode 100644 index 00000000..daa6711c --- /dev/null +++ b/src/dns-manager/nm-dns-utils.h @@ -0,0 +1,28 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + * + */ + +#ifndef NM_DNS_UTILS_H +#define NM_DNS_UTILS_H + +#include "nm-ip4-config.h" + +char **nm_dns_utils_get_ip4_rdns_domains (NMIP4Config *ip4); + +#endif /* NM_DNS_UTILS_H */ + diff --git a/src/dnsmasq-manager/Makefile.in b/src/dnsmasq-manager/Makefile.in index 8cb698bc..fb62d61b 100644 --- a/src/dnsmasq-manager/Makefile.in +++ b/src/dnsmasq-manager/Makefile.in @@ -183,6 +183,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -197,6 +201,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c index 701c0782..ca2f9dc4 100644 --- a/src/dnsmasq-manager/nm-dnsmasq-manager.c +++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c @@ -254,7 +254,6 @@ create_dm_cmd_line (const char *iface, struct in_addr addr; char buf[INET_ADDRSTRLEN + 15]; char localaddr[INET_ADDRSTRLEN + 1]; - int i; dm_binary = nm_find_dnsmasq (); if (!dm_binary) { @@ -278,17 +277,10 @@ create_dm_cmd_line (const char *iface, /* dnsmasq may read from it's default config file location, which if that * location is a valid config file, it will combine with the options here * and cause undesirable side-effects. Like sending bogus IP addresses - * as the gateway or whatever. So give dnsmasq a bogus config file - * location to avoid screwing up the configuration we're passing to it. + * as the gateway or whatever. So tell dnsmasq not to use any config file + * at all. */ - memset (buf, 0, sizeof (buf)); - strcpy (buf, "/tmp/"); - for (i = 5; i < 15; i++) - buf[i] = (char) (g_random_int_range ((guint32) 'a', (guint32) 'z') & 0xFF); - strcat (buf, ".conf"); - nm_cmd_line_add_string (cmd, "--conf-file"); - nm_cmd_line_add_string (cmd, buf); nm_cmd_line_add_string (cmd, "--no-hosts"); nm_cmd_line_add_string (cmd, "--keep-in-foreground"); diff --git a/src/ip6-manager/Makefile.in b/src/ip6-manager/Makefile.in index 13a3e0e9..1e8da3da 100644 --- a/src/ip6-manager/Makefile.in +++ b/src/ip6-manager/Makefile.in @@ -183,6 +183,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -197,6 +201,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index f6f6127c..7ffa2d1f 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -76,6 +76,11 @@ typedef struct { time_t expires; } NMIP6RDNSS; +typedef struct { + char domain[256]; + time_t expires; +} NMIP6DNSSL; + /******************************************************************/ typedef struct { @@ -97,6 +102,9 @@ typedef struct { GArray *rdnss_servers; guint rdnss_timeout_id; + GArray *dnssl_domains; + guint dnssl_timeout_id; + guint ip6flags_poll_id; guint32 ra_flags; @@ -122,6 +130,10 @@ nm_ip6_device_destroy (NMIP6Device *device) g_array_free (device->rdnss_servers, TRUE); if (device->rdnss_timeout_id) g_source_remove (device->rdnss_timeout_id); + if (device->dnssl_domains) + g_array_free (device->dnssl_domains, TRUE); + if (device->dnssl_timeout_id) + g_source_remove (device->dnssl_timeout_id); if (device->ip6flags_poll_id) g_source_remove (device->ip6flags_poll_id); @@ -155,6 +167,8 @@ nm_ip6_device_new (NMIP6Manager *manager, int ifindex) device->rdnss_servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); + device->dnssl_domains = g_array_new (FALSE, FALSE, sizeof (NMIP6DNSSL)); + g_hash_table_replace (priv->devices, GINT_TO_POINTER (device->ifindex), device); /* and the original value of IPv6 enable/disable */ @@ -285,7 +299,7 @@ set_rdnss_timeout (NMIP6Device *device) nm_log_dbg (LOGD_IP6, "(%s): removing expired RA-provided nameserver %s", device->iface, buf); } - g_array_remove_index_fast (device->rdnss_servers, i--); + g_array_remove_index (device->rdnss_servers, i--); continue; } @@ -300,6 +314,61 @@ set_rdnss_timeout (NMIP6Device *device) } } +static void set_dnssl_timeout (NMIP6Device *device); + +static gboolean +dnssl_expired (gpointer user_data) +{ + NMIP6Device *device = user_data; + CallbackInfo info = { device, IP6_DHCP_OPT_NONE }; + + nm_log_dbg (LOGD_IP6, "(%s): IPv6 DNSSL information expired", device->iface); + + set_dnssl_timeout (device); + emit_config_changed (&info); + return FALSE; +} + +static void +set_dnssl_timeout (NMIP6Device *device) +{ + time_t expires = 0, now = time (NULL); + NMIP6DNSSL *dnssl; + int i; + + if (device->dnssl_timeout_id) { + g_source_remove (device->dnssl_timeout_id); + device->dnssl_timeout_id = 0; + } + + /* Find the soonest expiration time. */ + for (i = 0; i < device->dnssl_domains->len; i++) { + dnssl = &g_array_index (device->dnssl_domains, NMIP6DNSSL, i); + if (dnssl->expires == 0) + continue; + + /* If the entry has already expired, remove it; the "+ 1" is + * because g_timeout_add_seconds() might fudge the timing a + * bit. + */ + if (dnssl->expires <= now + 1) { + nm_log_dbg (LOGD_IP6, "(%s): removing expired RA-provided domain %s", + device->iface, dnssl->domain); + g_array_remove_index (device->dnssl_domains, i--); + continue; + } + + if (!expires || dnssl->expires < expires) + expires = dnssl->expires; + } + + if (expires) { + device->dnssl_timeout_id = g_timeout_add_seconds (expires - now, + dnssl_expired, + device); + } +} + static CallbackInfo * callback_info_new (NMIP6Device *device, guint dhcp_opts, gboolean success) { @@ -569,13 +638,258 @@ process_prefix (NMIP6Manager *manager, struct nl_msg *msg) */ #define ND_OPT_RDNSS 25 +#define ND_OPT_DNSSL 31 + struct nd_opt_rdnss { uint8_t nd_opt_rdnss_type; uint8_t nd_opt_rdnss_len; uint16_t nd_opt_rdnss_reserved1; uint32_t nd_opt_rdnss_lifetime; /* followed by one or more IPv6 addresses */ -}; +} __attribute__ ((packed)); + +struct nd_opt_dnssl { + uint8_t nd_opt_dnssl_type; + uint8_t nd_opt_dnssl_len; + uint16_t nd_opt_dnssl_reserved1; + uint32_t nd_opt_dnssl_lifetime; + /* followed by one or more suffixes */ +} __attribute__ ((packed)); + +static gboolean +process_nduseropt_rdnss (NMIP6Device *device, struct nd_opt_hdr *opt) +{ + size_t opt_len; + struct nd_opt_rdnss *rdnss_opt; + time_t now = time (NULL); + struct in6_addr *addr; + GArray *new_servers; + NMIP6RDNSS server, *cur_server; + gboolean changed = FALSE; + guint i; + + opt_len = opt->nd_opt_len; + + if (opt_len < 3 || (opt_len & 1) == 0) + return FALSE; + + rdnss_opt = (struct nd_opt_rdnss *) opt; + + new_servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); + + /* Pad the DNS server expiry somewhat to give a bit of slack in cases + * where one RA gets lost or something (which can happen on unreliable + * links like WiFi where certain types of frames are not retransmitted). + * Note that 0 has special meaning and is therefore not adjusted. + */ + server.expires = ntohl (rdnss_opt->nd_opt_rdnss_lifetime); + if (server.expires > 0) + server.expires += now + 10; + + for (addr = (struct in6_addr *) (rdnss_opt + 1); opt_len >= 2; addr++, opt_len -= 2) { + char buf[INET6_ADDRSTRLEN + 1]; + + if (!inet_ntop (AF_INET6, addr, buf, sizeof (buf))) + strcpy(buf, "[invalid]"); + + for (i = 0; i < device->rdnss_servers->len; i++) { + cur_server = &(g_array_index (device->rdnss_servers, NMIP6RDNSS, i)); + + if (!IN6_ARE_ADDR_EQUAL (addr, &cur_server->addr)) + continue; + + cur_server->expires = server.expires; + + if (server.expires > 0) { + nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided nameserver %s (expires in %d seconds)", + device->iface, buf, + server.expires - now); + break; + } + + nm_log_dbg (LOGD_IP6, "(%s): removing RA-provided nameserver %s on router request", + device->iface, buf); + + g_array_remove_index (device->rdnss_servers, i); + changed = TRUE; + break; + } + + if (server.expires == 0) + continue; + if (i < device->rdnss_servers->len) + continue; + + nm_log_dbg (LOGD_IP6, "(%s): found RA-provided nameserver %s (expires in %d seconds)", + device->iface, buf, server.expires - now); + + server.addr = *addr; + g_array_append_val (new_servers, server); + } + + /* New servers must be added in the order they are listed in the + * RA option and before any existing servers. + * + * Note: This is the place to remove servers if we want to cap the + * number of resolvers. The RFC states that the one to expire + * first of the existing servers should be removed. + */ + if (new_servers->len) { + g_array_prepend_vals (device->rdnss_servers, + new_servers->data, new_servers->len); + changed = TRUE; + } + + g_array_free (new_servers, TRUE); + + /* Timeouts may have changed even if IPs didn't */ + set_rdnss_timeout (device); + + return changed; +} + +static const char * +parse_dnssl_domain (const unsigned char *buffer, size_t maxlen) +{ + static char domain[256]; + size_t label_len; + + domain[0] = '\0'; + + while (maxlen > 0) { + label_len = *buffer; + buffer++; + maxlen--; + + if (label_len == 0) + return domain; + + if (label_len > maxlen) + return NULL; + if ((sizeof (domain) - strlen (domain)) < (label_len + 2)) + return NULL; + + if (domain[0] != '\0') + strcat (domain, "."); + strncat (domain, (const char *)buffer, label_len); + buffer += label_len; + maxlen -= label_len; + } + + return NULL; +} + +static gboolean +process_nduseropt_dnssl (NMIP6Device *device, struct nd_opt_hdr *opt) +{ + size_t opt_len; + struct nd_opt_dnssl *dnssl_opt; + unsigned char *opt_ptr; + time_t now = time (NULL); + GArray *new_domains; + NMIP6DNSSL domain, *cur_domain; + gboolean changed; + guint i; + + opt_len = opt->nd_opt_len; + + if (opt_len < 2) + return FALSE; + + dnssl_opt = (struct nd_opt_dnssl *) opt; + + opt_ptr = (unsigned char *)(dnssl_opt + 1); + opt_len = (opt_len - 1) * 8; /* prefer bytes for later handling */ + + new_domains = g_array_new (FALSE, FALSE, sizeof (NMIP6DNSSL)); + + changed = FALSE; + + /* Pad the DNS server expiry somewhat to give a bit of slack in cases + * where one RA gets lost or something (which can happen on unreliable + * links like wifi where certain types of frames are not retransmitted). + * Note that 0 has special meaning and is therefore not adjusted. + */ + domain.expires = ntohl (dnssl_opt->nd_opt_dnssl_lifetime); + if (domain.expires > 0) + domain.expires += now + 10; + + while (opt_len) { + const char *domain_str; + + domain_str = parse_dnssl_domain (opt_ptr, opt_len); + if (domain_str == NULL) { + nm_log_dbg (LOGD_IP6, "(%s): invalid DNSSL option, parsing aborted", + device->iface); + break; + } + + /* The DNSSL encoding of domains happen to occupy the same size + * as the length of the resulting string, including terminating + * null. */ + opt_ptr += strlen (domain_str) + 1; + opt_len -= strlen (domain_str) + 1; + + /* Ignore empty domains. They're probably just padding... */ + if (domain_str[0] == '\0') + continue; + + for (i = 0; i < device->dnssl_domains->len; i++) { + cur_domain = &(g_array_index (device->dnssl_domains, NMIP6DNSSL, i)); + + if (strcmp (domain_str, cur_domain->domain) != 0) + continue; + + cur_domain->expires = domain.expires; + + if (domain.expires > 0) { + nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided domain %s (expires in %d seconds)", + device->iface, domain_str, + domain.expires - now); + break; + } + + nm_log_dbg (LOGD_IP6, "(%s): removing RA-provided domain %s on router request", + device->iface, domain_str); + + g_array_remove_index (device->dnssl_domains, i); + changed = TRUE; + break; + } + + if (domain.expires == 0) + continue; + if (i < device->dnssl_domains->len) + continue; + + nm_log_dbg (LOGD_IP6, "(%s): found RA-provided domain %s (expires in %d seconds)", + device->iface, domain_str, domain.expires - now); + + g_assert (strlen (domain_str) < sizeof (domain.domain)); + strcpy (domain.domain, domain_str); + g_array_append_val (new_domains, domain); + } + + /* New domains must be added in the order they are listed in the + * RA option and before any existing domains. + * + * Note: This is the place to remove domains if we want to cap the + * number of domains. The RFC states that the one to expire + * first of the existing domains should be removed. + */ + if (new_domains->len) { + g_array_prepend_vals (device->dnssl_domains, + new_domains->data, new_domains->len); + changed = TRUE; + } + + g_array_free (new_domains, TRUE); + + /* Timeouts may have changed even if domains didn't */ + set_dnssl_timeout (device); + + return changed; +} static NMIP6Device * process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) @@ -583,13 +897,8 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) NMIP6Device *device; struct nduseroptmsg *ndmsg; struct nd_opt_hdr *opt; - guint opts_len, i; - time_t now = time (NULL); - struct nd_opt_rdnss *rdnss_opt; - struct in6_addr *addr; - GArray *servers; - NMIP6RDNSS server, *sa, *sb; - gboolean changed; + guint opts_len; + gboolean changed = FALSE; nm_log_dbg (LOGD_IP6, "processing netlink nduseropt message"); @@ -608,8 +917,6 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) return NULL; } - servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); - opt = (struct nd_opt_hdr *) (ndmsg + 1); opts_len = ndmsg->nduseropt_opts_len; @@ -619,66 +926,19 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) if (nd_opt_len == 0 || opts_len < (nd_opt_len << 3)) break; - if (opt->nd_opt_type != ND_OPT_RDNSS) - goto next; - - if (nd_opt_len < 3 || (nd_opt_len & 1) == 0) - goto next; - - rdnss_opt = (struct nd_opt_rdnss *) opt; - - /* Pad the DNS server expiry somewhat to give a bit of slack in cases - * where one RA gets lost or something (which can happen on unreliable - * links like wifi where certain types of frames are not retransmitted). - */ - server.expires = now + ntohl (rdnss_opt->nd_opt_rdnss_lifetime) + 10; - - for (addr = (struct in6_addr *) (rdnss_opt + 1); nd_opt_len >= 2; addr++, nd_opt_len -= 2) { - char buf[INET6_ADDRSTRLEN + 1]; - - if (inet_ntop (AF_INET6, addr, buf, sizeof (buf))) { - nm_log_dbg (LOGD_IP6, "(%s): found RA-provided nameserver %s (expires in %d seconds)", - device->iface, buf, - ntohl (rdnss_opt->nd_opt_rdnss_lifetime)); - } - - server.addr = *addr; - g_array_append_val (servers, server); + switch (opt->nd_opt_type) { + case ND_OPT_RDNSS: + changed = process_nduseropt_rdnss (device, opt); + break; + case ND_OPT_DNSSL: + changed = process_nduseropt_dnssl (device, opt); + break; } - next: opts_len -= opt->nd_opt_len << 3; opt = (struct nd_opt_hdr *) ((uint8_t *) opt + (opt->nd_opt_len << 3)); } - /* See if anything (other than expiration time) changed */ - if (servers->len != device->rdnss_servers->len) - changed = TRUE; - else { - for (i = 0; i < servers->len; i++) { - sa = &(g_array_index (servers, NMIP6RDNSS, i)); - sb = &(g_array_index (device->rdnss_servers, NMIP6RDNSS, i)); - if (IN6_ARE_ADDR_EQUAL (&sa->addr, &sb->addr) == FALSE) { - changed = TRUE; - break; - } - } - changed = FALSE; - } - - if (changed) { - nm_log_dbg (LOGD_IP6, "(%s): RA-provided nameservers changed", device->iface); - } - - /* Always copy in new servers (even if unchanged) to get their updated - * expiration times. - */ - g_array_free (device->rdnss_servers, TRUE); - device->rdnss_servers = servers; - - /* Timeouts may have changed even if IPs didn't */ - set_rdnss_timeout (device); - if (changed) return device; else @@ -791,7 +1051,7 @@ netlink_notification (NMNetlinkMonitor *monitor, struct nl_msg *msg, gpointer us } } -void +gboolean nm_ip6_manager_prepare_interface (NMIP6Manager *manager, int ifindex, NMSettingIP6Config *s_ip6, @@ -801,16 +1061,17 @@ nm_ip6_manager_prepare_interface (NMIP6Manager *manager, NMIP6Device *device; const char *method = NULL; - g_return_if_fail (NM_IS_IP6_MANAGER (manager)); - g_return_if_fail (ifindex > 0); + g_return_val_if_fail (NM_IS_IP6_MANAGER (manager), FALSE); + g_return_val_if_fail (ifindex > 0, FALSE); priv = NM_IP6_MANAGER_GET_PRIVATE (manager); device = nm_ip6_device_new (manager, ifindex); - g_return_if_fail (device != NULL); - g_return_if_fail ( strchr (device->iface, '/') == NULL - && strcmp (device->iface, "all") != 0 - && strcmp (device->iface, "default") != 0); + g_return_val_if_fail (device != NULL, FALSE); + g_return_val_if_fail ( strchr (device->iface, '/') == NULL + && strcmp (device->iface, "all") != 0 + && strcmp (device->iface, "default") != 0, + FALSE); if (s_ip6) method = nm_setting_ip6_config_get_method (s_ip6); @@ -825,6 +1086,8 @@ nm_ip6_manager_prepare_interface (NMIP6Manager *manager, device->target_state = NM_IP6_DEVICE_GOT_ADDRESS; nm_utils_do_sysctl (accept_ra_path, "1\n"); } + + return TRUE; } static gboolean @@ -1014,6 +1277,14 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, int ifindex) nm_ip6_config_add_nameserver (config, &rdnss[i].addr); } + /* Add DNS domains */ + if (device->dnssl_domains) { + NMIP6DNSSL *dnssl = (NMIP6DNSSL *)(device->dnssl_domains->data); + + for (i = 0; i < device->dnssl_domains->len; i++) + nm_ip6_config_add_domain (config, dnssl[i].domain); + } + return config; } diff --git a/src/ip6-manager/nm-ip6-manager.h b/src/ip6-manager/nm-ip6-manager.h index 77c11068..2732c63e 100644 --- a/src/ip6-manager/nm-ip6-manager.h +++ b/src/ip6-manager/nm-ip6-manager.h @@ -71,7 +71,7 @@ typedef struct { GType nm_ip6_manager_get_type (void); NMIP6Manager *nm_ip6_manager_get (void); -void nm_ip6_manager_prepare_interface (NMIP6Manager *manager, +gboolean nm_ip6_manager_prepare_interface (NMIP6Manager *manager, int ifindex, NMSettingIP6Config *s_ip6, const char *accept_ra_path); diff --git a/src/logging/Makefile.in b/src/logging/Makefile.in index 36f04548..48a29b8f 100644 --- a/src/logging/Makefile.in +++ b/src/logging/Makefile.in @@ -180,6 +180,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -194,6 +198,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 5b5622fd..c5f57a13 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -235,14 +235,14 @@ void _nm_log (const char *loc, if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) { g_get_current_time (&tv); - syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s", tv.tv_sec, tv.tv_usec, loc, func, msg); } else if ((log_level & LOGL_INFO) && (level == LOGL_INFO)) - syslog (LOG_INFO, " %s\n", msg); + syslog (LOG_INFO, " %s", msg); else if ((log_level & LOGL_WARN) && (level == LOGL_WARN)) - syslog (LOG_WARNING, " %s\n", msg); + syslog (LOG_WARNING, " %s", msg); else if ((log_level & LOGL_ERR) && (level == LOGL_ERR)) { g_get_current_time (&tv); - syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s", tv.tv_sec, tv.tv_usec, loc, func, msg); } g_free (msg); } diff --git a/src/main.c b/src/main.c index 7e75f05e..b22c769d 100644 --- a/src/main.c +++ b/src/main.c @@ -49,6 +49,7 @@ #include "nm-netlink-monitor.h" #include "nm-vpn-manager.h" #include "nm-logging.h" +#include "nm-policy-hosts.h" #if !defined(NM_DIST_VERSION) # define NM_DIST_VERSION VERSION @@ -466,7 +467,7 @@ main (int argc, char *argv[]) { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, { "log-domains", 0, 0, G_OPTION_ARG_STRING, &log_domains, - "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]", + "Log domains separated by ',': any combination of [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]", "HW,RFKILL,WIFI" }, {NULL} }; @@ -713,6 +714,9 @@ main (int argc, char *argv[]) goto done; } + /* Clean leftover "# Added by NetworkManager" entries from /etc/hosts */ + nm_policy_hosts_clean_etc_hosts (); + nm_manager_start (manager); /* Bring up the loopback interface. */ diff --git a/src/modem-manager/Makefile.in b/src/modem-manager/Makefile.in index 042b202d..c640df5b 100644 --- a/src/modem-manager/Makefile.in +++ b/src/modem-manager/Makefile.in @@ -186,6 +186,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -200,6 +204,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index e07b818b..b3f7eaa1 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -876,6 +876,12 @@ modem_properties_changed (DBusGProxy *proxy, priv->mm_enabled = g_value_get_boolean (value); g_object_notify (G_OBJECT (self), NM_MODEM_ENABLED); } + + value = g_hash_table_lookup (props, "IpMethod"); + if (value && G_VALUE_HOLDS_UINT (value)) { + priv->ip_method = g_value_get_uint (value); + g_object_notify (G_OBJECT (self), NM_MODEM_IP_METHOD); + } } /*****************************************************************************/ diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index 2529e77f..7d131401 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -35,6 +35,7 @@ #include "nm-properties-changed-signal.h" #include "nm-active-connection.h" #include "nm-dbus-glib-types.h" +#include "nm-active-connection-glue.h" static void secrets_provider_interface_init (NMSecretsProviderInterface *sp_interface_class); @@ -304,64 +305,15 @@ nm_act_request_class_init (NMActRequestClass *req_class) object_class->finalize = finalize; /* properties */ - g_object_class_install_property - (object_class, PROP_SERVICE_NAME, - g_param_spec_string (NM_ACTIVE_CONNECTION_SERVICE_NAME, - "Service name", - "Service name", - NULL, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_CONNECTION, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION, - "Connection", - "Connection", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_SPECIFIC_OBJECT, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, - "Specific object", - "Specific object", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEVICES, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, - "Devices", - "Devices", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_STATE, - g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE, - "State", - "State", - NM_ACTIVE_CONNECTION_STATE_UNKNOWN, - NM_ACTIVE_CONNECTION_STATE_ACTIVATED, - NM_ACTIVE_CONNECTION_STATE_UNKNOWN, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEFAULT, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, - "Default", - "Is the default IPv4 active connection", - FALSE, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEFAULT6, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, - "Default6", - "Is the default IPv6 active connection", - FALSE, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_VPN, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN, - "VPN", - "Is a VPN connection", - FALSE, - G_PARAM_READABLE)); + nm_active_connection_install_properties (object_class, + PROP_SERVICE_NAME, + PROP_CONNECTION, + PROP_SPECIFIC_OBJECT, + PROP_DEVICES, + PROP_STATE, + PROP_DEFAULT, + PROP_DEFAULT6, + PROP_VPN); /* Signals */ signals[CONNECTION_SECRETS_UPDATED] = @@ -386,9 +338,10 @@ nm_act_request_class_init (NMActRequestClass *req_class) signals[PROPERTIES_CHANGED] = nm_properties_changed_signal_new (object_class, - G_STRUCT_OFFSET (NMActRequestClass, properties_changed)); + G_STRUCT_OFFSET (NMActRequestClass, properties_changed)); - nm_active_connection_install_type_info (object_class); + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (req_class), + &dbus_glib_nm_active_connection_object_info); } static gboolean diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 4207e145..90495bd2 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -21,8 +21,8 @@ #include #include "nm-active-connection.h" #include "NetworkManager.h" -#include "nm-active-connection-glue.h" #include "nm-logging.h" +#include "nm-dbus-glib-types.h" char * nm_active_connection_get_next_object_path (void) @@ -32,13 +32,6 @@ nm_active_connection_get_next_object_path (void) return g_strdup_printf (NM_DBUS_PATH "/ActiveConnection/%d", counter++); } -void -nm_active_connection_install_type_info (GObjectClass *klass) -{ - dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), - &dbus_glib_nm_active_connection_object_info); -} - void nm_active_connection_scope_to_value (NMConnection *connection, GValue *value) { @@ -60,4 +53,73 @@ nm_active_connection_scope_to_value (NMConnection *connection, GValue *value) } } +void +nm_active_connection_install_properties (GObjectClass *object_class, + guint prop_service_name, + guint prop_connection, + guint prop_specific_object, + guint prop_devices, + guint prop_state, + guint prop_default, + guint prop_default6, + guint prop_vpn) +{ + g_object_class_install_property (object_class, prop_service_name, + g_param_spec_string (NM_ACTIVE_CONNECTION_SERVICE_NAME, + "Service name", + "Service name", + NULL, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_connection, + g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION, + "Connection", + "Connection", + DBUS_TYPE_G_OBJECT_PATH, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_specific_object, + g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, + "Specific object", + "Specific object", + DBUS_TYPE_G_OBJECT_PATH, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_devices, + g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, + "Devices", + "Devices", + DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_state, + g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE, + "State", + "State", + NM_ACTIVE_CONNECTION_STATE_UNKNOWN, + NM_ACTIVE_CONNECTION_STATE_ACTIVATED, + NM_ACTIVE_CONNECTION_STATE_UNKNOWN, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_default, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, + "Default", + "Is the default IPv4 active connection", + FALSE, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_default6, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, + "Default6", + "Is the default IPv6 active connection", + FALSE, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, prop_vpn, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN, + "VPN", + "Is a VPN connection", + FALSE, + G_PARAM_READABLE)); +} diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h index 6a463cb2..5dde3087 100644 --- a/src/nm-active-connection.h +++ b/src/nm-active-connection.h @@ -35,8 +35,16 @@ char *nm_active_connection_get_next_object_path (void); -void nm_active_connection_install_type_info (GObjectClass *klass); - void nm_active_connection_scope_to_value (NMConnection *connection, GValue *value); +void nm_active_connection_install_properties (GObjectClass *object_class, + guint prop_service_name, + guint prop_connection, + guint prop_specific_object, + guint prop_devices, + guint prop_state, + guint prop_default, + guint prop_default6, + guint prop_vpn); + #endif /* NM_ACTIVE_CONNECTION_H */ diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 08bbc501..49e58887 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -308,7 +308,7 @@ _update_s390_subchannels (NMDeviceEthernet *self) const char *iface; GUdevClient *client; GUdevDevice *dev; - GUdevDevice *parent; + GUdevDevice *parent = NULL; const char *parent_path, *item, *driver; const char *subsystems[] = { "net", NULL }; GDir *dir; @@ -486,9 +486,43 @@ constructor (GType type, return object; } +static void +clear_secrets_tries (NMDevice *device) +{ + NMActRequest *req; + NMConnection *connection; + + req = nm_device_get_act_request (device); + if (req) { + connection = nm_act_request_get_connection (req); + /* Clear wired secrets tries on success, failure, or when deactivating */ + g_object_set_data (G_OBJECT (connection), WIRED_SECRETS_TRIES, NULL); + } +} + +static void +device_state_changed (NMDevice *device, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason, + gpointer user_data) +{ + + switch (new_state) { + case NM_DEVICE_STATE_ACTIVATED: + case NM_DEVICE_STATE_FAILED: + case NM_DEVICE_STATE_DISCONNECTED: + clear_secrets_tries (device); + break; + default: + break; + } +} + static void nm_device_ethernet_init (NMDeviceEthernet * self) { + g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), NULL); } static gboolean @@ -1751,6 +1785,9 @@ real_deactivate_quickly (NMDevice *device) NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + /* Clear wired secrets tries when deactivating */ + clear_secrets_tries (device); + if (priv->pending_ip4_config) { g_object_unref (priv->pending_ip4_config); priv->pending_ip4_config = NULL; diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index b09d1125..451284dc 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1231,6 +1231,15 @@ real_deactivate_quickly (NMDevice *dev) NMDeviceWifi *self = NM_DEVICE_WIFI (dev); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); NMAccessPoint *orig_ap = nm_device_wifi_get_activation_ap (self); + NMActRequest *req; + NMConnection *connection; + + req = nm_device_get_act_request (dev); + if (req) { + connection = nm_act_request_get_connection (req); + /* Clear wireless secrets tries when deactivating */ + g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, NULL); + } cleanup_association_attempt (self, TRUE); diff --git a/src/nm-device.c b/src/nm-device.c index e8f0b206..9c771c2a 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -790,6 +790,7 @@ addrconf6_setup (NMDevice *self) NMActRequest *req; NMConnection *connection; NMSettingIP6Config *s_ip6; + gboolean success; req = nm_device_get_act_request (self); g_assert (req); @@ -809,13 +810,14 @@ addrconf6_setup (NMDevice *self) } s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); - nm_ip6_manager_prepare_interface (priv->ip6_manager, - nm_device_get_ip_ifindex (self), - s_ip6, - priv->ip6_accept_ra_path); - priv->ip6_waiting_for_config = TRUE; + success = nm_ip6_manager_prepare_interface (priv->ip6_manager, + nm_device_get_ip_ifindex (self), + s_ip6, + priv->ip6_accept_ra_path); + if (success) + priv->ip6_waiting_for_config = TRUE; - return TRUE; + return success; } static void @@ -1951,7 +1953,9 @@ nm_device_activate_stage4_ip4_config_get (gpointer user_data) g_object_set_data (G_OBJECT (nm_device_get_act_request (self)), NM_ACT_REQUEST_IP4_CONFIG, ip4_config); +nm_log_info (LOGD_DEVICE | LOGD_IP4, "Scheduling stage 5"); nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET); +nm_log_info (LOGD_DEVICE | LOGD_IP4, "Done scheduling stage 5"); out: nm_log_info (LOGD_DEVICE | LOGD_IP4, @@ -2803,17 +2807,22 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason) { NMDevice *self = NM_DEVICE (device); NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE; + gboolean tried_ipv6 = FALSE; g_return_if_fail (self != NULL); nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason: %d).", nm_device_get_iface (self), reason); + /* Check this before deactivate_quickly is run */ + if (NM_DEVICE_GET_PRIVATE (self)->ip6_manager) + tried_ipv6 = TRUE; + nm_device_deactivate_quickly (self); /* Take out any entries in the routing table and any IP address the device had. */ - nm_system_device_flush_routes (self, nm_device_get_ip6_config (self) ? AF_UNSPEC : AF_INET); - nm_system_device_flush_addresses (self); + nm_system_device_flush_routes (self, tried_ipv6 ? AF_UNSPEC : AF_INET); + nm_system_device_flush_addresses (self, tried_ipv6 ? AF_UNSPEC : AF_INET); nm_device_update_ip4_address (self); /* Clean up nameservers and addresses */ @@ -3321,7 +3330,7 @@ dispose (GObject *object) if ( nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (self)) && (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) { NMConnection *connection; - NMSettingIP4Config *s_ip4; + NMSettingIP4Config *s_ip4 = NULL; const char *method = NULL; /* Only system connections can be left up */ @@ -3334,9 +3343,8 @@ dispose (GObject *object) * to check that. */ s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); - g_assert (s_ip4); - - method = nm_setting_ip4_config_get_method (s_ip4); + if (s_ip4) + method = nm_setting_ip4_config_get_method (s_ip4); if ( !method || !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) || !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) diff --git a/src/nm-manager.c b/src/nm-manager.c index eb393fac..8b24aa51 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2009 Novell, Inc. - * Copyright (C) 2007 - 2010 Red Hat, Inc. + * Copyright (C) 2007 - 2011 Red Hat, Inc. */ #include @@ -463,19 +463,20 @@ nm_manager_update_state (NMManager *manager) } } -static void -ignore_cb (NMSettingsConnectionInterface *connection, GError *error, gpointer user_data) -{ -} - static void update_active_connection_timestamp (NMManager *manager, NMDevice *device) { NMActRequest *req; NMConnection *connection; NMSettingConnection *s_con; - NMSettingsConnectionInterface *connection_interface; NMManagerPrivate *priv; + const char *connection_uuid; + guint64 timestamp; + guint64 *ts_ptr; + GKeyFile *timestamps_file; + char *data, *tmp; + gsize len; + GError *error = NULL; g_return_if_fail (NM_IS_DEVICE (device)); @@ -490,16 +491,38 @@ update_active_connection_timestamp (NMManager *manager, NMDevice *device) if (nm_connection_get_scope (connection) != NM_CONNECTION_SCOPE_SYSTEM) return; + /* Update timestamp in connection's object data */ + timestamp = (guint64) time (NULL); + ts_ptr = g_new (guint64, 1); + *ts_ptr = timestamp; + g_object_set_data_full (G_OBJECT (connection), NM_SYSCONFIG_SETTINGS_TIMESTAMP_TAG, ts_ptr, g_free); + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION)); g_assert (s_con); - g_object_set (s_con, NM_SETTING_CONNECTION_TIMESTAMP, (guint64) time (NULL), NULL); + connection_uuid = nm_setting_connection_get_uuid (s_con); - if (nm_setting_connection_get_read_only (s_con)) - return; + /* Save timestamp to timestamps database file */ + timestamps_file = g_key_file_new (); + if (!g_key_file_load_from_file (timestamps_file, NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, G_KEY_FILE_KEEP_COMMENTS, &error)) { + if (!(error->domain == G_FILE_ERROR && error->code == G_FILE_ERROR_NOENT)) + nm_log_warn (LOGD_SYS_SET, "error parsing timestamps file '%s': %s", NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, error->message); + g_clear_error (&error); + } + + tmp = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp); + g_key_file_set_value (timestamps_file, "timestamps", connection_uuid, tmp); + g_free (tmp); - connection_interface = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (priv->sys_settings), - nm_connection_get_path (connection)); - nm_settings_connection_interface_update (connection_interface, ignore_cb, NULL); + data = g_key_file_to_data (timestamps_file, &len, &error); + if (data) { + g_file_set_contents (NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, data, len, &error); + g_free (data); + } + if (error) { + nm_log_warn (LOGD_SYS_SET, "error saving timestamp: %s", error->message); + g_error_free (error); + } + g_key_file_free (timestamps_file); } static void @@ -1356,6 +1379,12 @@ user_proxy_init (NMManager *self) g_return_if_fail (self != NULL); g_return_if_fail (priv->user_proxy == NULL); + /* Don't try to initialize the user settings proxy if the user + * settings service doesn't actually exist. + */ + if (!nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS)) + return; + bus = nm_dbus_manager_get_connection (priv->dbus_mgr); priv->user_proxy = dbus_g_proxy_new_for_name_owner (bus, NM_DBUS_SERVICE_USER_SETTINGS, @@ -2426,6 +2455,14 @@ udev_device_removed_cb (NMUdevManager *manager, ifindex = g_udev_device_get_property_as_int (udev_device, "IFINDEX"); device = find_device_by_ifindex (self, ifindex); + if (!device) { + /* On removal we won't always be able to read properties anymore, as + * they may have already been removed from sysfs. Instead, we just + * have to fall back to the device's interface name. + */ + device = find_device_by_iface (self, g_udev_device_get_name (udev_device)); + } + if (device) priv->devices = remove_one_device (self, priv->devices, device, FALSE); } @@ -3845,6 +3882,23 @@ nm_manager_auto_user_connections_allowed (NMManager *self) && priv->user_con_perm == NM_AUTH_CALL_RESULT_YES; } +static guint64 +get_connection_timestamp (NMConnection *connection) +{ + if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) { + guint64 *ts_p; + + ts_p = (guint64 *) g_object_get_data (G_OBJECT (connection), NM_SYSCONFIG_SETTINGS_TIMESTAMP_TAG); + return ts_p != NULL ? *ts_p : 0; + } else { + NMSettingConnection *s_con; + + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con); + return nm_setting_connection_get_timestamp (s_con); + } +} + static int connection_sort (gconstpointer pa, gconstpointer pb) { @@ -3852,6 +3906,7 @@ connection_sort (gconstpointer pa, gconstpointer pb) NMSettingConnection *con_a; NMConnection *b = NM_CONNECTION (pb); NMSettingConnection *con_b; + guint64 ts_a, ts_b; con_a = (NMSettingConnection *) nm_connection_get_setting (a, NM_TYPE_SETTING_CONNECTION); g_assert (con_a); @@ -3864,10 +3919,13 @@ connection_sort (gconstpointer pa, gconstpointer pb) return 1; } - if (nm_setting_connection_get_timestamp (con_a) > nm_setting_connection_get_timestamp (con_b)) + ts_a = get_connection_timestamp (a); + ts_b = get_connection_timestamp (b); + if (ts_a > ts_b) return -1; - else if (nm_setting_connection_get_timestamp (con_a) == nm_setting_connection_get_timestamp (con_b)) + else if (ts_a == ts_b) return 0; + return 1; } @@ -3967,8 +4025,7 @@ nm_manager_start (NMManager *self) * they will be queried when the user settings service shows up on the * bus in nm_manager_name_owner_changed(). */ - if (nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS)) - user_proxy_init (self); + user_proxy_init (self); nm_udev_manager_query_devices (priv->udev_mgr); bluez_manager_resync_devices (self); @@ -4351,10 +4408,11 @@ dispose (GObject *object) /* Unregister property filter */ bus = nm_dbus_manager_get_connection (priv->dbus_mgr); - g_assert (bus); - dbus_connection = dbus_g_connection_get_connection (bus); - g_assert (dbus_connection); - dbus_connection_remove_filter (dbus_connection, prop_filter, manager); + if (bus) { + dbus_connection = dbus_g_connection_get_connection (bus); + g_assert (dbus_connection); + dbus_connection_remove_filter (dbus_connection, prop_filter, manager); + } g_object_unref (priv->dbus_mgr); if (priv->bluez_mgr) diff --git a/src/nm-policy-hostname.c b/src/nm-policy-hostname.c index 42a2e0f9..4fe69c5a 100644 --- a/src/nm-policy-hostname.c +++ b/src/nm-policy-hostname.c @@ -30,7 +30,6 @@ #include "nm-logging.h" #include "nm-policy-hostname.h" -#include "nm-policy-hosts.h" /************************************************************************/ @@ -206,74 +205,39 @@ hostname_thread_is_dead (HostnameThread *ht) /************************************************************************/ #define FALLBACK_HOSTNAME4 "localhost.localdomain" -#define FALLBACK_HOSTNAME6 "localhost6.localdomain6" gboolean -nm_policy_set_system_hostname (const char *new_hostname, - const char *ip4_addr, - const char *ip6_addr, - const char *msg) +nm_policy_set_system_hostname (const char *new_hostname, const char *msg) { char old_hostname[HOST_NAME_MAX + 1]; - int ret = 0; const char *name; - gboolean set_hostname = TRUE, changed = FALSE, old_valid = TRUE; + int ret; if (new_hostname) g_warn_if_fail (strlen (new_hostname)); - name = (new_hostname && strlen (new_hostname)) ? new_hostname : FALLBACK_HOSTNAME4; - old_hostname[HOST_NAME_MAX] = '\0'; errno = 0; ret = gethostname (old_hostname, HOST_NAME_MAX); if (ret != 0) { nm_log_warn (LOGD_DNS, "couldn't get the system hostname: (%d) %s", errno, strerror (errno)); - old_valid = FALSE; } else { /* Don't set the hostname if it isn't actually changing */ if ( (new_hostname && !strcmp (old_hostname, new_hostname)) || (!new_hostname && !strcmp (old_hostname, FALLBACK_HOSTNAME4))) - set_hostname = FALSE; - - if (old_hostname[0] == '\0') - old_valid = FALSE; - } - - if (set_hostname) { - nm_log_info (LOGD_DNS, "Setting system hostname to '%s' (%s)", name, msg); - ret = sethostname (name, strlen (name)); - if (ret != 0) { - nm_log_warn (LOGD_DNS, "couldn't set the system hostname to '%s': (%d) %s", - name, errno, strerror (errno)); return FALSE; - } } - /* But even if the hostname isn't changing, always try updating /etc/hosts - * just in case the hostname changed while NM wasn't running; we need to - * make sure that /etc/hosts has valid mappings for '127.0.0.1' and the - * current system hostname. If those exist, - * nm_policy_hosts_update_etc_hosts() will just return and won't touch - * /etc/hosts at all. - */ - if (!nm_policy_hosts_update_etc_hosts (name, - old_valid ? old_hostname : NULL, - FALLBACK_HOSTNAME4, - FALLBACK_HOSTNAME6, - ip4_addr, - ip6_addr, - &changed)) { - /* error updating /etc/hosts; fallback to localhost.localdomain */ - nm_log_info (LOGD_DNS, "Setting system hostname to '" FALLBACK_HOSTNAME4 "' (error updating /etc/hosts)"); - ret = sethostname (FALLBACK_HOSTNAME4, strlen (FALLBACK_HOSTNAME4)); - if (ret != 0) { - nm_log_warn (LOGD_DNS, "couldn't set the fallback system hostname (%s): (%d) %s", - FALLBACK_HOSTNAME4, errno, strerror (errno)); - } + name = (new_hostname && strlen (new_hostname)) ? new_hostname : FALLBACK_HOSTNAME4; + + nm_log_info (LOGD_DNS, "Setting system hostname to '%s' (%s)", name, msg); + ret = sethostname (name, strlen (name)); + if (ret != 0) { + nm_log_warn (LOGD_DNS, "couldn't set the system hostname to '%s': (%d) %s", + name, errno, strerror (errno)); } - return changed; + return (ret == 0); } diff --git a/src/nm-policy-hostname.h b/src/nm-policy-hostname.h index 9c768847..e76713f1 100644 --- a/src/nm-policy-hostname.h +++ b/src/nm-policy-hostname.h @@ -24,10 +24,7 @@ #include -gboolean nm_policy_set_system_hostname (const char *new_hostname, - const char *ip4_addr, - const char *ip6_addr, - const char *msg); +gboolean nm_policy_set_system_hostname (const char *new_hostname, const char *msg); typedef struct HostnameThread HostnameThread; diff --git a/src/nm-policy-hosts.c b/src/nm-policy-hosts.c index 7f9cff80..8bbd1d3b 100644 --- a/src/nm-policy-hosts.c +++ b/src/nm-policy-hosts.c @@ -20,526 +20,74 @@ #include #include -#include -#include -#include -#include -#include #include "nm-policy-hosts.h" #include "nm-logging.h" -#define IP4_LH "127.0.0.1" -#define IP6_LH "::1" - -gboolean -nm_policy_hosts_find_token (const char *line, const char *token) -{ - const char *start = line, *p = line; - - g_return_val_if_fail (line != NULL, FALSE); - g_return_val_if_fail (token != NULL, FALSE); - g_return_val_if_fail (strlen (token) > 0, FALSE); - - /* Walk through the line to find the next whitespace character */ - while (p <= line + strlen (line)) { - if (isblank (*p) || (*p == '\0')) { - /* Token starts with 'start' and ends with 'end' */ - if ((p > start) && *start && (p - start == strlen (token)) && !strncmp (start, token, (p - start))) - return TRUE; /* found */ - - /* not found; advance start and continue looking */ - start = p + 1; - } - p++; - } - - return FALSE; -} - -static gboolean -is_local_mapping (const char *str, gboolean ip6, const char *hostname) -{ - const char *addr = ip6 ? IP6_LH : IP4_LH; - const char *fallback = ip6 ? "localhost6" : "localhost"; - - return ( !strncmp (str, addr, strlen (addr)) - && nm_policy_hosts_find_token (str, hostname ? hostname : fallback)); -} - -static gboolean -is_ip4_addr (const char *str) -{ - struct in_addr found; - char buf[INET_ADDRSTRLEN + 2]; - const char *p = str; - guint32 i = 0; - - memset (buf, 0, sizeof (buf)); - while (*p && !isblank (*p) && (i < sizeof (buf))) - buf[i++] = *p++; - - return inet_pton (AF_INET, buf, &found) == 1 ? TRUE : FALSE; -} - -static gboolean -ip4_addr_matches (const char *str, const char *ip4_addr) -{ - struct in_addr found, given; - char buf[INET_ADDRSTRLEN + 2]; - const char *p = str; - guint32 i = 0; - - g_return_val_if_fail (ip4_addr != NULL, FALSE); - - memset (buf, 0, sizeof (buf)); - while (*p && !isblank (*p) && (i < sizeof (buf))) - buf[i++] = *p++; - - if (inet_pton (AF_INET, buf, &found) != 1) - return FALSE; - if (inet_pton (AF_INET, ip4_addr, &given) != 1) - return FALSE; - - return memcmp (&found, &given, sizeof (found)) == 0; -} - -static gboolean -is_ip6_addr (const char *str) -{ - struct in6_addr found; - char buf[INET6_ADDRSTRLEN + 2]; - const char *p = str; - guint32 i = 0; - - memset (buf, 0, sizeof (buf)); - while (*p && !isblank (*p) && (i < sizeof (buf))) - buf[i++] = *p++; - - return inet_pton (AF_INET6, buf, &found) == 1 ? TRUE : FALSE; -} - -static gboolean -ip6_addr_matches (const char *str, const char *ip6_addr) -{ - struct in6_addr found, given; - char buf[INET6_ADDRSTRLEN + 2]; - const char *p = str; - guint32 i = 0; - - g_return_val_if_fail (ip6_addr != NULL, FALSE); - - memset (buf, 0, sizeof (buf)); - while (*p && !isblank (*p) && (i < sizeof (buf))) - buf[i++] = *p++; - - if (inet_pton (AF_INET6, buf, &found) != 1) - return FALSE; - if (inet_pton (AF_INET6, ip6_addr, &given) != 1) - return FALSE; - - return memcmp (&found, &given, sizeof (found)) == 0; -} - -static char * -get_custom_hostnames (const char *line, - const char *hostname, - const char *old_hostname, - const char *short_hostname, - const char *fallback_hostname) -{ - char **items = NULL, **iter; - guint start = 0; - GString *str = NULL; - char *custom = NULL; - - g_return_val_if_fail (line != NULL, NULL); - - if (!strncmp (line, IP4_LH, strlen (IP4_LH))) - start = strlen (IP4_LH); - else if (!strncmp (line, IP6_LH, strlen (IP6_LH))) - start = strlen (IP6_LH); - - g_return_val_if_fail (start > 0, NULL); - - /* Split the line into tokens */ - items = g_strsplit_set (line + start, " \t", -1); - if (!items) - return NULL; - - str = g_string_sized_new (50); - /* Ignore current & old hostnames, and localhost-anything */ - for (iter = items; iter && *iter; iter++) { - if (*iter[0] == '\0') - continue; - if (hostname && !strcmp (*iter, hostname)) - continue; - if (old_hostname && !strcmp (*iter, old_hostname)) - continue; - if (short_hostname && !strcmp (*iter, short_hostname)) - continue; - if (fallback_hostname && !strcmp (*iter, fallback_hostname)) - continue; - if (!strcmp (*iter, "localhost")) - continue; - if (!strcmp (*iter, "localhost6")) - continue; - if (!strcmp (*iter, "localhost.localdomain")) - continue; - if (!strcmp (*iter, "localhost4.localdomain4")) - continue; - if (!strcmp (*iter, "localhost6.localdomain6")) - continue; - - /* Found a custom hostname */ - g_string_append_c (str, '\t'); - g_string_append (str, *iter); - } - - if (str->len) - custom = g_string_free (str, FALSE); - else - g_string_free (str, TRUE); - - g_strfreev (items); - return custom; -} - #define ADDED_TAG "# Added by NetworkManager" GString * -nm_policy_get_etc_hosts (const char **lines, - gsize existing_len, - const char *hostname, - const char *old_hostname, - const char *fallback_hostname4, - const char *fallback_hostname6, - const char *ip4_addr, - const char *ip6_addr, - GError **error) +nm_policy_get_etc_hosts (const char *contents, gsize contents_len) { - GString *contents = NULL; - const char **line; - gboolean found_localhost4 = FALSE; - gboolean found_localhost6 = FALSE; - gboolean found_host4 = FALSE; - gboolean found_host6 = FALSE; - gboolean found_user_host4 = FALSE; - gboolean found_user_host6 = FALSE; - gboolean initial_comments = TRUE; - gboolean added = FALSE; - gboolean hostname4_is_fallback; - gboolean hostname6_is_fallback; - gboolean host4_before = FALSE; - gboolean host6_before = FALSE; - gboolean no_stale = TRUE; - char *short_hostname = NULL; - char *custom4 = NULL; - char *custom6 = NULL; - - g_return_val_if_fail (lines != NULL, FALSE); - g_return_val_if_fail (hostname != NULL, FALSE); - - hostname4_is_fallback = !strcmp (hostname, fallback_hostname4); - hostname6_is_fallback = !strcmp (hostname, fallback_hostname6); - - /* Find the short hostname, like 'foo' from 'foo.bar.baz'; we want to - * make sure that the entries we add for this host also include the short - * hostname too so that if the resolver does not answer queries for the - * machine's actual hostname/domain, that stuff like 'ping foo' still works. - */ - if (!hostname4_is_fallback || !hostname6_is_fallback) { - char *dot; - - short_hostname = g_strdup (hostname); - dot = strchr (short_hostname, '.'); - if (dot && *(dot+1)) - *dot = '\0'; - else { - g_free (short_hostname); - short_hostname = NULL; - } - } - - /* We need the following in /etc/hosts: - * - * 1) current hostname mapped to current IPv4 addresses if IPv4 is active - * 2) current hostname mapped to current IPv6 addresses if IPv6 is active - * 3) 'localhost' mapped to 127.0.0.1 - * 4) 'localhost6' mapped to ::1 - * - * If all these things exist we don't need to bother updating the file. - */ - - if (!ip4_addr) - host4_before = TRUE; - if (!ip6_addr) - host6_before = TRUE; - - /* Look for the four cases from above */ - for (line = lines; lines && *line; line++) { - gboolean found_hostname = FALSE; - - if ((*line[0] == '\0') || (*line[0] == '#')) - continue; + char **lines = NULL, **iter; + GString *new_contents = NULL; - found_hostname = nm_policy_hosts_find_token (*line, hostname); - if (found_hostname) { - /* Found the current hostname on this line */ - if (ip4_addr && ip4_addr_matches (*line, ip4_addr)) { - found_host4 = TRUE; - if (strstr (*line, ADDED_TAG)) { - if (!host4_before) - host4_before = !found_localhost4; - } else { - found_user_host4 = TRUE; - host4_before = TRUE; /* Ignore if user added mapping manually */ - } - } else if (!ip4_addr && strstr (*line, ADDED_TAG)) { - /* If this is a stale NM-added IPv4 entry we need to remove it, - * so make sure we update /etc/hosts. - */ - if (is_ip4_addr (*line)) - no_stale = FALSE; - } + if (contents_len == 0 || !strstr (contents, ADDED_TAG)) + return NULL; - if (ip6_addr && ip6_addr_matches (*line, ip6_addr)) { - found_host6 = TRUE; - if (strstr (*line, ADDED_TAG)) { - if (!host6_before) - host6_before = !found_localhost6; - } else { - found_user_host6 = TRUE; - host6_before = TRUE; /* Ignore if user added mapping manually */ - } - } else if (!ip6_addr && strstr (*line, ADDED_TAG)) { - /* If this is a stale NM-added IPv6 entry we need to remove it, - * so make sure we update /etc/hosts. - */ - if (is_ip6_addr (*line)) - no_stale = FALSE; - } - } + new_contents = g_string_sized_new (contents_len); - if (is_local_mapping (*line, FALSE, "localhost")) { - /* a 127.0.0.1 line containing 'localhost' */ - found_localhost4 = TRUE; - custom4 = get_custom_hostnames (*line, hostname, old_hostname, short_hostname, fallback_hostname4); - if (!ip4_addr) { - /* If there's no IP-specific mapping for the current hostname - * but that hostname is present on in the local mapping line, - * we've found our IPv4 hostname mapping. If the hostname is - * the fallback *IPv6* hostname it's not going to show up in - * the IPv4 local mapping though, so fake it. - */ - if (hostname6_is_fallback || found_hostname) - found_host4 = TRUE; - } - } else if (is_local_mapping (*line, TRUE, "localhost6")) { - /* a ::1 line containing 'localhost6' */ - found_localhost6 = TRUE; - custom6 = get_custom_hostnames (*line, hostname, old_hostname, short_hostname, fallback_hostname6); - if (!ip6_addr) { - /* If there's no IP-specific mapping for the current hostname - * but that hostname is present on in the local mapping line, - * we've found our IPv6 hostname mapping. If the hostname is - * the fallback *IPv4* hostname it's not going to show up in - * the IPv6 local mapping though, so fake it. - */ - if (hostname4_is_fallback || found_hostname) - found_host6 = TRUE; - } + /* Remove "# Added ..." lines */ + lines = g_strsplit_set (contents, "\n\r", -1); + for (iter = lines; iter && *iter; iter++) { + if (!strstr (*iter, ADDED_TAG)) { + g_string_append (new_contents, *iter); + g_string_append_c (new_contents, '\n'); } - - if ( found_localhost4 - && found_host4 - && found_localhost6 - && found_host6 - && host4_before - && host6_before - && no_stale) - goto out; /* No update required */ - } - - contents = g_string_sized_new (existing_len ? existing_len + 100 : 200); - if (!contents) { - g_set_error_literal (error, 0, 0, "not enough memory"); - goto out; } + g_strfreev (lines); - /* Construct the new hosts file; replace any 127.0.0.1/::1 entry that is - * at the beginning of the file or right after initial comments and contains - * the string 'localhost' (for IPv4) or 'localhost6' (for IPv6). If there - * is no 127.0.0.1 or ::1 entry at the beginning or after initial comments - * that contains 'localhost' or 'localhost6', add one there - * and ignore any other 127.0.0.1/::1 entries that contain 'localhost' or - * 'localhost6'. + /* Remove last blank line at end of file, if one exists; this is + * an artifact of how g_strsplit_set() works. */ - for (line = lines, initial_comments = TRUE; lines && *line; line++) { - /* This is the first line after the initial comments */ - if (strlen (*line) && initial_comments && (*line[0] != '#')) { - initial_comments = FALSE; - - /* If the user added their own mapping for the hostname, just make - * a simple 'localhost' mapping and assume the user knows what they - * are doing with their manual hostname entry. Otherwise if the - * hostname wasn't found somewhere else, add it to the localhost - * mapping line to make sure it's mapped to something. - */ - - /* Add the address mappings first so they take precedence */ - if (!hostname4_is_fallback && ip4_addr && !found_user_host4) { - g_string_append_printf (contents, "%s\t%s", ip4_addr, hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - g_string_append_printf (contents, "\t%s\n", ADDED_TAG); - } - if (!hostname6_is_fallback && ip6_addr && !found_user_host6) { - g_string_append_printf (contents, "%s\t%s", ip6_addr, hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - g_string_append_printf (contents, "\t%s\n", ADDED_TAG); - } + if ( (new_contents->len > 2) + && (new_contents->str[new_contents->len - 1] == '\n')) + g_string_truncate (new_contents, new_contents->len - 1); - /* IPv4 localhost line */ - g_string_append (contents, "127.0.0.1"); - if (!hostname4_is_fallback && !ip4_addr && !found_user_host4) { - g_string_append_printf (contents, "\t%s", hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - } - g_string_append_printf (contents, "\t%s\tlocalhost", fallback_hostname4); - if (custom4) - g_string_append (contents, custom4); - g_string_append_c (contents, '\n'); - - /* IPv6 localhost line */ - g_string_append (contents, "::1"); - if (!hostname6_is_fallback && !hostname4_is_fallback && !ip6_addr && !found_user_host6) { - g_string_append_printf (contents, "\t%s", hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - } - g_string_append_printf (contents, "\t%s\tlocalhost6", fallback_hostname6); - if (custom6) - g_string_append (contents, custom6); - g_string_append_c (contents, '\n'); - - added = TRUE; - } - - /* Don't add the original line if it is a localhost mapping */ - if ( !is_local_mapping (*line, FALSE, "localhost") - && !is_local_mapping (*line, FALSE, fallback_hostname4) - && !is_local_mapping (*line, FALSE, hostname) - && !is_local_mapping (*line, TRUE, "localhost6") - && !is_local_mapping (*line, TRUE, fallback_hostname6) - && !is_local_mapping (*line, TRUE, hostname) - && !strstr (*line, ADDED_TAG)) { - - g_string_append (contents, *line); - /* Only append the new line if this isn't the last line in the file */ - if (*(line+1)) - g_string_append_c (contents, '\n'); - } - } - - /* Hmm, /etc/hosts was empty for some reason */ - if (!added) { - g_string_append (contents, "# Do not remove the following lines, or various programs\n"); - g_string_append (contents, "# that require network functionality will fail.\n"); - - /* Add the address mappings first so they take precedence */ - if (!hostname4_is_fallback && ip4_addr) { - g_string_append_printf (contents, "%s\t%s", ip4_addr, hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - g_string_append_printf (contents, "\t%s\n", ADDED_TAG); - } - if (!hostname6_is_fallback && ip6_addr) { - g_string_append_printf (contents, "%s\t%s", ip6_addr, hostname); - if (short_hostname) - g_string_append_printf (contents, "\t%s", short_hostname); - g_string_append_printf (contents, "\t%s\n", ADDED_TAG); - } - - g_string_append_printf (contents, "127.0.0.1\t%s\tlocalhost\n", fallback_hostname4); - g_string_append_printf (contents, "::1\t%s\tlocalhost6\n", fallback_hostname6); - } - -out: - g_free (custom4); - g_free (custom6); - g_free (short_hostname); - return contents; + return new_contents; } -gboolean -nm_policy_hosts_update_etc_hosts (const char *hostname, - const char *old_hostname, - const char *fallback_hostname4, - const char *fallback_hostname6, - const char *ip4_addr, - const char *ip6_addr, - gboolean *out_changed) +/* remove any leftover "# Added by NetworkManager" lines */ +void +nm_policy_hosts_clean_etc_hosts (void) { char *contents = NULL; - char **lines = NULL; - GError *error = NULL; - GString *new_contents = NULL; gsize contents_len = 0; - gboolean success = FALSE; - - g_return_val_if_fail (hostname != NULL, FALSE); - g_return_val_if_fail (out_changed != NULL, FALSE); + GError *error = NULL; + GString *new; if (!g_file_get_contents (SYSCONFDIR "/hosts", &contents, &contents_len, &error)) { nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", error ? error->code : 0, (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); - return FALSE; + return; } - /* Get the new /etc/hosts contents */ - lines = g_strsplit_set (contents, "\n\r", 0); - new_contents = nm_policy_get_etc_hosts ((const char **) lines, - contents_len, - hostname, - old_hostname, - fallback_hostname4, - fallback_hostname6, - ip4_addr, - ip6_addr, - &error); - g_strfreev (lines); - g_free (contents); - - if (new_contents) { - nm_log_info (LOGD_DNS, "Updating /etc/hosts with new system hostname"); + new = nm_policy_get_etc_hosts (contents, contents_len); + if (new && new->len) { + nm_log_info (LOGD_DNS, "Cleaning leftovers from /etc/hosts"); g_clear_error (&error); - /* And actually update /etc/hosts */ - if (!g_file_set_contents (SYSCONFDIR "/hosts", new_contents->str, -1, &error)) { - nm_log_warn (LOGD_DNS, "couldn't update " SYSCONFDIR "/hosts: (%d) %s", - error ? error->code : 0, - (error && error->message) ? error->message : "(unknown)"); + if (!g_file_set_contents (SYSCONFDIR "/hosts", new->str, -1, &error)) { + nm_log_dbg (LOGD_DNS, "couldn't update " SYSCONFDIR "/hosts: (%d) %s", + error ? error->code : 0, + (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); - } else { - success = TRUE; - *out_changed = TRUE; } - - g_string_free (new_contents, TRUE); - } else if (!error) { - /* No change required */ - success = TRUE; - } else { - nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", - error->code, error->message ? error->message : "(unknown)"); - g_clear_error (&error); } - return success; + if (new) + g_string_free (new, TRUE); } diff --git a/src/nm-policy-hosts.h b/src/nm-policy-hosts.h index ebaaf0fd..9f4bf9a9 100644 --- a/src/nm-policy-hosts.h +++ b/src/nm-policy-hosts.h @@ -23,26 +23,10 @@ #include -gboolean nm_policy_hosts_update_etc_hosts (const char *hostname, - const char *old_hostname, - const char *fallback_hostname4, - const char *fallback_hostname6, - const char *ip4_addr, - const char *ip6_addr, - gboolean *out_changed); +void nm_policy_hosts_clean_etc_hosts (void); /* Only for testcases; don't use outside of nm-policy-hosts.c */ -gboolean nm_policy_hosts_find_token (const char *line, const char *token); - -GString *nm_policy_get_etc_hosts (const char **lines, - gsize existing_len, - const char *hostname, - const char *old_hostname, - const char *fallback_hostname4, - const char *fallback_hostname6, - const char *ip4_addr, - const char *ip6_addr, - GError **error); +GString *nm_policy_get_etc_hosts (const char *contents, gsize contents_len); #endif /* NM_POLICY_HOSTS_H */ diff --git a/src/nm-policy.c b/src/nm-policy.c index e8a18d02..aed2f897 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -42,7 +42,6 @@ #include "nm-system.h" #include "nm-dns-manager.h" #include "nm-vpn-manager.h" -#include "nm-policy-hosts.h" #include "nm-policy-hostname.h" struct NMPolicy { @@ -233,9 +232,6 @@ _set_hostname (NMPolicy *policy, const char *new_hostname, const char *msg) { - char ip4_addr[INET_ADDRSTRLEN + 1]; - char ip6_addr[INET6_ADDRSTRLEN + 1]; - if (change_hostname) { NMDnsManager *dns_mgr; @@ -247,43 +243,7 @@ _set_hostname (NMPolicy *policy, g_object_unref (dns_mgr); } - /* Get the default IPv4 and IPv6 addresses so we can assign - * the hostname to them in /etc/hosts. - */ - memset (ip4_addr, 0, sizeof (ip4_addr)); - if (policy->default_device4) { - NMIP4Config *config = NULL; - NMIP4Address *addr = NULL; - - config = nm_device_get_ip4_config (policy->default_device4); - if (config) - addr = nm_ip4_config_get_address (config, 0); - - if (addr) { - struct in_addr tmp; - - tmp.s_addr = nm_ip4_address_get_address (addr); - inet_ntop (AF_INET, &tmp, ip4_addr, sizeof (ip4_addr)); - } - } - - memset (ip6_addr, 0, sizeof (ip6_addr)); - if (policy->default_device6) { - NMIP6Config *config = NULL; - NMIP6Address *addr = NULL; - - config = nm_device_get_ip6_config (policy->default_device6); - if (config) - addr = nm_ip6_config_get_address (config, 0); - - if (addr) - inet_ntop (AF_INET6, nm_ip6_address_get_address (addr), ip6_addr, sizeof (ip6_addr)); - } - - if (nm_policy_set_system_hostname (policy->cur_hostname, - strlen (ip4_addr) ? ip4_addr : NULL, - strlen (ip6_addr) ? ip6_addr : NULL, - msg)) + if (nm_policy_set_system_hostname (policy->cur_hostname, msg)) nm_utils_call_dispatcher ("hostname", NULL, NULL, NULL); } @@ -1235,15 +1195,6 @@ nm_policy_destroy (NMPolicy *policy) } g_slist_free (policy->dev_signal_ids); - /* Rewrite /etc/hosts on exit to ensure we don't leave stale IP addresses - * lying around. FIXME: this will take out a valid IP address of an - * ethernet device we're leaving active (ie, a connection we can "assume" - * when NM starts again). - */ - policy->default_device4 = NULL; - policy->default_device6 = NULL; - update_system_hostname (policy, NULL, NULL); - g_free (policy->orig_hostname); g_free (policy->cur_hostname); diff --git a/src/nm-system.c b/src/nm-system.c index 7921fec6..e8b8fec1 100644 --- a/src/nm-system.c +++ b/src/nm-system.c @@ -1187,14 +1187,14 @@ nm_system_replace_default_ip6_route (const char *iface, const struct in6_addr *g return success; } -static void flush_addresses (const char *iface, gboolean ipv4_only) +static void flush_addresses (const char *iface, int family) { int iface_idx; g_return_if_fail (iface != NULL); iface_idx = nm_netlink_iface_to_index (iface); if (iface_idx >= 0) - sync_addresses (iface, iface_idx, ipv4_only ? AF_INET : AF_UNSPEC, NULL, 0); + sync_addresses (iface, iface_idx, family, NULL, 0); } /* @@ -1203,12 +1203,11 @@ static void flush_addresses (const char *iface, gboolean ipv4_only) * Flush all network addresses associated with a network device * */ -void nm_system_device_flush_addresses (NMDevice *dev) +void nm_system_device_flush_addresses (NMDevice *dev, int family) { g_return_if_fail (dev != NULL); - flush_addresses (nm_device_get_ip_iface (dev), - nm_device_get_ip6_config (dev) == NULL); + flush_addresses (nm_device_get_ip_iface (dev), family); } @@ -1220,7 +1219,7 @@ void nm_system_device_flush_addresses (NMDevice *dev) */ void nm_system_device_flush_addresses_with_iface (const char *iface) { - flush_addresses (iface, FALSE); + flush_addresses (iface, AF_UNSPEC); } diff --git a/src/nm-system.h b/src/nm-system.h index 8cb22d74..094f40ef 100644 --- a/src/nm-system.h +++ b/src/nm-system.h @@ -55,7 +55,7 @@ gboolean nm_system_replace_default_ip4_route_vpn (const char *iface, struct rtnl_route *nm_system_add_ip4_vpn_gateway_route (NMDevice *parent_device, NMIP4Config *vpn_config); -void nm_system_device_flush_addresses (NMDevice *dev); +void nm_system_device_flush_addresses (NMDevice *dev, int family); void nm_system_device_flush_addresses_with_iface (const char *iface); void nm_system_enable_loopback (void); diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am index f213dd2e..540e5855 100644 --- a/src/ppp-manager/Makefile.am +++ b/src/ppp-manager/Makefile.am @@ -33,6 +33,8 @@ libppp_manager_la_LIBADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) +if WITH_PPP + pppd_plugindir = $(PPPD_PLUGIN_DIR) pppd_plugin_LTLIBRARIES = nm-pppd-plugin.la @@ -52,6 +54,8 @@ nm_pppd_plugin_la_LIBADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) +endif + BUILT_SOURCES = nm-ppp-manager-glue.h CLEANFILES = $(BUILT_SOURCES) diff --git a/src/ppp-manager/Makefile.in b/src/ppp-manager/Makefile.in index 1013c2c2..20cfb0ba 100644 --- a/src/ppp-manager/Makefile.in +++ b/src/ppp-manager/Makefile.in @@ -82,15 +82,19 @@ libppp_manager_la_OBJECTS = $(am_libppp_manager_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent -nm_pppd_plugin_la_DEPENDENCIES = \ - $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -am_nm_pppd_plugin_la_OBJECTS = nm_pppd_plugin_la-nm-pppd-plugin.lo +@WITH_PPP_TRUE@nm_pppd_plugin_la_DEPENDENCIES = \ +@WITH_PPP_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ +@WITH_PPP_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +am__nm_pppd_plugin_la_SOURCES_DIST = nm-pppd-plugin.c nm-pppd-plugin.h \ + nm-ppp-status.h +@WITH_PPP_TRUE@am_nm_pppd_plugin_la_OBJECTS = \ +@WITH_PPP_TRUE@ nm_pppd_plugin_la-nm-pppd-plugin.lo nm_pppd_plugin_la_OBJECTS = $(am_nm_pppd_plugin_la_OBJECTS) nm_pppd_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(nm_pppd_plugin_la_LDFLAGS) $(LDFLAGS) \ -o $@ +@WITH_PPP_TRUE@am_nm_pppd_plugin_la_rpath = -rpath $(pppd_plugindir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -119,7 +123,7 @@ am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libppp_manager_la_SOURCES) $(nm_pppd_plugin_la_SOURCES) DIST_SOURCES = $(libppp_manager_la_SOURCES) \ - $(nm_pppd_plugin_la_SOURCES) + $(am__nm_pppd_plugin_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -215,6 +219,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -229,6 +237,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -332,22 +341,22 @@ libppp_manager_la_LIBADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) -pppd_plugindir = $(PPPD_PLUGIN_DIR) -pppd_plugin_LTLIBRARIES = nm-pppd-plugin.la -nm_pppd_plugin_la_SOURCES = \ - nm-pppd-plugin.c \ - nm-pppd-plugin.h \ - nm-ppp-status.h +@WITH_PPP_TRUE@pppd_plugindir = $(PPPD_PLUGIN_DIR) +@WITH_PPP_TRUE@pppd_plugin_LTLIBRARIES = nm-pppd-plugin.la +@WITH_PPP_TRUE@nm_pppd_plugin_la_SOURCES = \ +@WITH_PPP_TRUE@ nm-pppd-plugin.c \ +@WITH_PPP_TRUE@ nm-pppd-plugin.h \ +@WITH_PPP_TRUE@ nm-ppp-status.h -nm_pppd_plugin_la_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) +@WITH_PPP_TRUE@nm_pppd_plugin_la_CPPFLAGS = \ +@WITH_PPP_TRUE@ $(DBUS_CFLAGS) \ +@WITH_PPP_TRUE@ $(GLIB_CFLAGS) -nm_pppd_plugin_la_LDFLAGS = -module -avoid-version -nm_pppd_plugin_la_LIBADD = \ - $(top_builddir)/libnm-util/libnm-util.la \ - $(DBUS_LIBS) \ - $(GLIB_LIBS) +@WITH_PPP_TRUE@nm_pppd_plugin_la_LDFLAGS = -module -avoid-version +@WITH_PPP_TRUE@nm_pppd_plugin_la_LIBADD = \ +@WITH_PPP_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ +@WITH_PPP_TRUE@ $(DBUS_LIBS) \ +@WITH_PPP_TRUE@ $(GLIB_LIBS) BUILT_SOURCES = nm-ppp-manager-glue.h CLEANFILES = $(BUILT_SOURCES) @@ -429,7 +438,7 @@ clean-pppd_pluginLTLIBRARIES: libppp-manager.la: $(libppp_manager_la_OBJECTS) $(libppp_manager_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libppp_manager_la_OBJECTS) $(libppp_manager_la_LIBADD) $(LIBS) nm-pppd-plugin.la: $(nm_pppd_plugin_la_OBJECTS) $(nm_pppd_plugin_la_DEPENDENCIES) - $(AM_V_CCLD)$(nm_pppd_plugin_la_LINK) -rpath $(pppd_plugindir) $(nm_pppd_plugin_la_OBJECTS) $(nm_pppd_plugin_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(nm_pppd_plugin_la_LINK) $(am_nm_pppd_plugin_la_rpath) $(nm_pppd_plugin_la_OBJECTS) $(nm_pppd_plugin_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index efa660b0..31a5e57a 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -165,7 +165,8 @@ dispose (GObject *object) nm_ppp_manager_stop (NM_PPP_MANAGER (object)); - g_object_unref (priv->act_req); + if (priv->act_req) + g_object_unref (priv->act_req); g_object_unref (priv->dbus_manager); G_OBJECT_CLASS (nm_ppp_manager_parent_class)->dispose (object); @@ -724,6 +725,8 @@ create_pppd_cmd_line (NMPPPManager *self, NMCmdLine *cmd; const char *ppp_debug; + g_return_val_if_fail (setting != NULL, NULL); + ppp_binary = nm_find_pppd (); if (!ppp_binary) { g_set_error (err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR, @@ -897,6 +900,15 @@ nm_ppp_manager_start (NMPPPManager *manager, priv = NM_PPP_MANAGER_GET_PRIVATE (manager); +#if !WITH_PPP + /* PPP support disabled */ + g_set_error_literal (err, + NM_PPP_MANAGER_ERROR, + NM_PPP_MANAGER_ERROR_UNKOWN, + "PPP support is not enabled."); + return FALSE; +#endif + priv->pid = 0; /* Make sure /dev/ppp exists (bgo #533064) */ diff --git a/src/supplicant-manager/Makefile.in b/src/supplicant-manager/Makefile.in index 0bc3ebcf..03b05e5d 100644 --- a/src/supplicant-manager/Makefile.in +++ b/src/supplicant-manager/Makefile.in @@ -226,6 +226,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -240,6 +244,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/supplicant-manager/tests/Makefile.in b/src/supplicant-manager/tests/Makefile.in index 1403a3f1..17113522 100644 --- a/src/supplicant-manager/tests/Makefile.in +++ b/src/supplicant-manager/tests/Makefile.in @@ -185,6 +185,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -199,6 +203,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/system-settings/Makefile.in b/src/system-settings/Makefile.in index 1bc66bac..45f4a414 100644 --- a/src/system-settings/Makefile.in +++ b/src/system-settings/Makefile.in @@ -196,6 +196,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -210,6 +214,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/system-settings/nm-default-wired-connection.c b/src/system-settings/nm-default-wired-connection.c index 1cda3d9e..0d19dea0 100644 --- a/src/system-settings/nm-default-wired-connection.c +++ b/src/system-settings/nm-default-wired-connection.c @@ -163,7 +163,7 @@ constructor (GType type, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NM_SETTING_CONNECTION_UUID, uuid, NM_SETTING_CONNECTION_READ_ONLY, priv->read_only, - NM_SETTING_CONNECTION_TIMESTAMP, time (NULL), + NM_SETTING_CONNECTION_TIMESTAMP, (guint64) time (NULL), NULL); g_free (id); diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index d929813f..75ac9879 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2010 Red Hat, Inc. + * (C) Copyright 2007 - 2011 Red Hat, Inc. * (C) Copyright 2008 Novell, Inc. */ @@ -480,8 +480,35 @@ connection_removed (NMSettingsConnectionInterface *connection, gpointer user_data) { NMSysconfigSettingsPrivate *priv = NM_SYSCONFIG_SETTINGS_GET_PRIVATE (user_data); + NMSettingConnection *s_con; + GKeyFile *timestamps_file; + const char *connection_uuid; + char *data; + gsize len; + GError *error = NULL; + /* Remove connection from the table */ g_hash_table_remove (priv->connections, connection); + + /* Remove timestamp from timestamps database file */ + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + connection_uuid = nm_setting_connection_get_uuid (s_con); + + timestamps_file = g_key_file_new (); + if (g_key_file_load_from_file (timestamps_file, NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, G_KEY_FILE_KEEP_COMMENTS, NULL)) { + g_key_file_remove_key (timestamps_file, "timestamps", connection_uuid, NULL); + data = g_key_file_to_data (timestamps_file, &len, &error); + if (data) { + g_file_set_contents (NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, data, len, &error); + g_free (data); + } + if (error) { + nm_log_warn (LOGD_SYS_SET, "error writing timestamps file '%s': %s", NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, error->message); + g_error_free (error); + } + } + g_key_file_free (timestamps_file); } static void @@ -491,6 +518,13 @@ claim_connection (NMSysconfigSettings *self, { NMSysconfigSettingsPrivate *priv = NM_SYSCONFIG_SETTINGS_GET_PRIVATE (self); + NMSettingConnection *s_con; + const char *connection_uuid; + guint64 timestamp = 0; + GKeyFile *timestamps_file; + GError *err = NULL; + char *tmp_str; + g_return_if_fail (NM_IS_SYSCONFIG_SETTINGS (self)); g_return_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection)); @@ -498,6 +532,32 @@ claim_connection (NMSysconfigSettings *self, /* A plugin is lying to us. */ return; + /* Read timestamp from database file and store it into connection's object data */ + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + connection_uuid = nm_setting_connection_get_uuid (s_con); + + timestamps_file = g_key_file_new (); + g_key_file_load_from_file (timestamps_file, NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE, G_KEY_FILE_KEEP_COMMENTS, NULL); + tmp_str = g_key_file_get_value (timestamps_file, "timestamps", connection_uuid, &err); + if (tmp_str) { + timestamp = g_ascii_strtoull (tmp_str, NULL, 10); + g_free (tmp_str); + } + + /* Update connection's timestamp */ + if (!err) { + guint64 *ts_ptr = g_new (guint64, 1); + + *ts_ptr = timestamp; + g_object_set_data_full (G_OBJECT (connection), NM_SYSCONFIG_SETTINGS_TIMESTAMP_TAG, ts_ptr, g_free); + } else { + nm_log_dbg (LOGD_SYS_SET, "failed to read connection timestamp for '%s': (%d) %s", + connection_uuid, err->code, err->message); + g_clear_error (&err); + } + g_key_file_free (timestamps_file); + g_hash_table_insert (priv->connections, g_object_ref (connection), GINT_TO_POINTER (1)); g_signal_connect (connection, NM_SETTINGS_CONNECTION_INTERFACE_REMOVED, diff --git a/src/system-settings/nm-sysconfig-settings.h b/src/system-settings/nm-sysconfig-settings.h index ae2ba683..8b2622a7 100644 --- a/src/system-settings/nm-sysconfig-settings.h +++ b/src/system-settings/nm-sysconfig-settings.h @@ -41,6 +41,8 @@ #define NM_SYSCONFIG_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SYSCONFIG_SETTINGS, NMSysconfigSettingsClass)) #define NM_SYSCONFIG_SETTINGS_UNMANAGED_SPECS "unmanaged-specs" +#define NM_SYSCONFIG_SETTINGS_TIMESTAMPS_FILE LOCALSTATEDIR"/lib/NetworkManager/timestamps" +#define NM_SYSCONFIG_SETTINGS_TIMESTAMP_TAG "timestamp-tag" typedef struct { NMSettingsService parent_instance; diff --git a/src/system-settings/nm-system-config-interface.c b/src/system-settings/nm-system-config-interface.c index 90fd93ba..9fb34278 100644 --- a/src/system-settings/nm-system-config-interface.c +++ b/src/system-settings/nm-system-config-interface.c @@ -53,7 +53,8 @@ interface_init (gpointer g_iface) "Capabilities", "Plugin capabilties", NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE, - NM_SYSTEM_CONFIG_INTERFACE_CAP_LAST - 1, + ( NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS + | NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME), NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE, G_PARAM_READABLE)); diff --git a/src/system-settings/nm-system-config-interface.h b/src/system-settings/nm-system-config-interface.h index 3daceb89..d5634aa6 100644 --- a/src/system-settings/nm-system-config-interface.h +++ b/src/system-settings/nm-system-config-interface.h @@ -41,15 +41,6 @@ G_BEGIN_DECLS */ GObject * nm_system_config_factory (void); -/* NOTE: - * When passing NMConnection objects to NetworkManager, any properties - * of that NMConnection's NMSetting objects that are secrets must be set as - * GObject data items on the NMSetting object, _not_ inside the NMSetting - * object itself. This is to ensure that the secrets are only given to - * NetworkManager itself and not exposed to clients like nm-applet that need - * connection details, but not secrets. - */ - #define NM_TYPE_SYSTEM_CONFIG_INTERFACE (nm_system_config_interface_get_type ()) #define NM_SYSTEM_CONFIG_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SYSTEM_CONFIG_INTERFACE, NMSystemConfigInterface)) #define NM_IS_SYSTEM_CONFIG_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SYSTEM_CONFIG_INTERFACE)) @@ -67,9 +58,11 @@ GObject * nm_system_config_factory (void); typedef enum { NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE = 0x00000000, NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS = 0x00000001, - NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME = 0x00000002, + NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME = 0x00000002 - NM_SYSTEM_CONFIG_INTERFACE_CAP_LAST = NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME + /* When adding more capabilities, be sure to update the "Capabilities" + * property max value in nm-system-config-interface.c. + */ } NMSystemConfigInterfaceCapabilities; typedef enum { diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 40d1d6ab..46a75b25 100644 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -194,6 +194,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -208,6 +212,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/src/tests/test-policy-hosts.c b/src/tests/test-policy-hosts.c index 8865c426..62862e75 100644 --- a/src/tests/test-policy-hosts.c +++ b/src/tests/test-policy-hosts.c @@ -23,41 +23,17 @@ #include "nm-policy-hosts.h" -#define FALLBACK_HOSTNAME4 "localhost.localdomain" -#define FALLBACK_HOSTNAME6 "localhost6.localdomain6" - -#define DEBUG 0 +#define DEBUG 1 static void -test_generic (const char *before, - const char *after, - const char *hostname, - const char *ip4_addr, - const char *ip6_addr, - gboolean expect_error) +test_generic (const char *before, const char *after) { - char **lines; GString *newc; - GError *error = NULL; /* Get the new /etc/hosts contents */ - lines = g_strsplit_set (before, "\n\r", 0); - newc = nm_policy_get_etc_hosts ((const char **) lines, - strlen (before), - hostname, - NULL, - FALLBACK_HOSTNAME4, - FALLBACK_HOSTNAME6, - ip4_addr, - ip6_addr, - &error); - g_strfreev (lines); + newc = nm_policy_get_etc_hosts (before, strlen (before)); - if (expect_error) { - g_assert (newc == NULL); - g_assert (error != NULL); - g_clear_error (&error); - } else if (after == NULL) { + if (after == NULL) { /* No change to /etc/hosts required */ #if DEBUG if (newc != NULL) { @@ -68,10 +44,8 @@ test_generic (const char *before, } #endif g_assert (newc == NULL); - g_assert (error == NULL); } else { g_assert (newc != NULL); - g_assert (error == NULL); #if DEBUG g_message ("\n- NEW ---------------------------------\n" @@ -81,7 +55,6 @@ test_generic (const char *before, "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", newc->str, after); #endif - g_assert (strlen (newc->str) == strlen (after)); g_assert (strcmp (newc->str, after) == 0); g_string_free (newc, TRUE); } @@ -99,7 +72,7 @@ static const char *generic_before = \ static void test_hosts_generic (void) { - test_generic (generic_before, NULL, "localhost.localdomain", NULL, NULL, FALSE); + test_generic (generic_before, NULL); } /*******************************************/ @@ -112,311 +85,25 @@ static const char *generic_no_boilerplate_before = \ static void test_hosts_generic_no_boilerplate (void) { - test_generic (generic_no_boilerplate_before, NULL, "localhost.localdomain", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *generic_no_boilerplate_no_lh_before = \ - "127.0.0.1 localhost.localdomain\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *generic_no_boilerplate_no_lh_after = \ - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_generic_no_boilerplate_no_lh (void) -{ - test_generic (generic_no_boilerplate_no_lh_before, - generic_no_boilerplate_no_lh_after, - "localhost.localdomain", - NULL, - NULL, - FALSE); -} - -/*******************************************/ - - -static const char *generic_no_boilerplate_no_lh_no_host_before = \ - "127.0.0.1 localhost.localdomain\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *generic_no_boilerplate_no_lh_no_host_after = \ - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_generic_no_boilerplate_no_lh_no_host (void) -{ - test_generic (generic_no_boilerplate_no_lh_no_host_before, - generic_no_boilerplate_no_lh_no_host_after, - "comet", - NULL, - NULL, - FALSE); -} - -/*******************************************/ -static const char *named_generic_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 playboy localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *named_generic_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 playboy localhost.localdomain localhost\n" - "::1 playboy localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named_generic (void) -{ - test_generic (named_generic_before, named_generic_after, "playboy", NULL, NULL, FALSE); + test_generic (generic_no_boilerplate_before, NULL); } /*******************************************/ -static const char *named4_non127_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 tomcat localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "192.168.1.2 tomcat\n"; - -static void -test_hosts_named4_non127 (void) -{ - test_generic (named4_non127_before, NULL, "tomcat", "192.168.1.2", NULL, FALSE); -} - -/*******************************************/ - -static const char *named6_non127_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 tomcat localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "3001:abba::3234 tomcat\n"; - -static void -test_hosts_named6_non127 (void) -{ - test_generic (named6_non127_before, NULL, "tomcat", NULL, "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named4_non127_more_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 tomcat localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "192.168.1.2 tomcat\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 srx.main.ebayrtm.com\n" - "127.0.0.1 cdn5.tribalfusion.com\n"; - -static void -test_hosts_named4_non127_more (void) -{ - test_generic (named4_non127_more_before, NULL, "tomcat", "192.168.1.2", NULL, FALSE); -} - -/*******************************************/ - -static const char *named6_non127_more_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 tomcat localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "3001:abba::3234 tomcat\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 srx.main.ebayrtm.com\n" - "127.0.0.1 cdn5.tribalfusion.com\n"; - -static void -test_hosts_named6_non127_more (void) -{ - test_generic (named6_non127_more_before, NULL, "tomcat", NULL, "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named_no_lh_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "192.168.1.2 tomcat\n"; - -static const char *named_no_lh_after = \ +static const char *leftover_before = \ "# Do not remove the following line, or various programs\n" "# that require network functionality will fail.\n" + "192.168.1.2 comet # Added by NetworkManager\n" "127.0.0.1 localhost.localdomain localhost\n" - "::1 tomcat localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "192.168.1.2 tomcat\n"; - -static void -test_hosts_named_no_localhost (void) -{ - test_generic (named_no_lh_before, named_no_lh_after, "tomcat", "192.168.1.2", NULL, FALSE); -} - -/*******************************************/ - -static const char *no_lh_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 tomcat\n" - "::1 localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *no_lh_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 tomcat localhost.localdomain localhost\n" - "::1 tomcat localhost6.localdomain6 localhost6\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_no_localhost (void) -{ - test_generic (no_lh_before, no_lh_after, "tomcat", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *named_last_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 sparcbook.ausil.us\n" - "::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 sparcbook.ausil.us\n"; - -static void -test_hosts_named_last (void) -{ - test_generic (named_last_before, NULL, "sparcbook.ausil.us", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *no_host4_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 srx.main.ebayrtm.com\n" - "127.0.0.1 cdn5.tribalfusion.com\n" - "127.0.0.1 a.tribalfusion.com\n"; - -static const char *no_host4_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 srx.main.ebayrtm.com\n" - "127.0.0.1 cdn5.tribalfusion.com\n" - "127.0.0.1 a.tribalfusion.com\n"; - -static void -test_hosts_no_host4 (void) -{ - test_generic (no_host4_before, no_host4_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *no_host6_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *no_host6_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_no_host6 (void) -{ - test_generic (no_host6_before, no_host6_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *named46_non127_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet\n" - "3001:abba::3234 comet\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127 (void) -{ - test_generic (named46_non127_before, NULL, "comet", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named46_non127_long_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet.space comet\n" - "3001:abba::3234 comet.space comet\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127_long (void) -{ - test_generic (named46_non127_long_before, NULL, "comet.space", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named46_non127_other4_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" "::1 localhost6.localdomain6 localhost6\n" "192.168.1.3 comet\n" "3001:abba::3234 comet\n" "\n" "127.0.0.1 lcmd.us.intellitxt.com\n"; -static const char *named46_non127_other4_after = \ +static const char *leftover_after = \ "# Do not remove the following line, or various programs\n" "# that require network functionality will fail.\n" - "192.168.1.2 comet # Added by NetworkManager\n" "127.0.0.1 localhost.localdomain localhost\n" "::1 localhost6.localdomain6 localhost6\n" "192.168.1.3 comet\n" @@ -425,416 +112,44 @@ static const char *named46_non127_other4_after = \ "127.0.0.1 lcmd.us.intellitxt.com\n"; static void -test_hosts_named46_non127_other4 (void) +test_hosts_leftover (void) { - test_generic (named46_non127_other4_before, named46_non127_other4_after, "comet", "192.168.1.2", "3001:abba::3234", FALSE); + test_generic (leftover_before, leftover_after); } /*******************************************/ -static const char *named46_non127_other4_long_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.3 comet.space\n" - "3001:abba::3234 comet.space\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *named46_non127_other4_long_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "192.168.1.2 comet.space comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.3 comet.space\n" - "3001:abba::3234 comet.space\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127_other4_long (void) -{ - test_generic (named46_non127_other4_long_before, named46_non127_other4_long_after, "comet.space", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named46_non127_other6_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet\n" - "3001:abba::9675 comet\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *named46_non127_other6_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "3001:abba::3234 comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet\n" - "3001:abba::9675 comet\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127_other6 (void) -{ - test_generic (named46_non127_other6_before, named46_non127_other6_after, "comet", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named46_non127_other6_long_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet.space\n" - "3001:abba::9675 comet.space\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *named46_non127_other6_long_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "3001:abba::3234 comet.space comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.2 comet.space\n" - "3001:abba::9675 comet.space\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127_other6_long (void) -{ - test_generic (named46_non127_other6_long_before, named46_non127_other6_long_after, "comet.space", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *unnamed46_non127_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *unnamed46_non127_after = \ +static const char *leftover_double_newline_before = \ "# Do not remove the following line, or various programs\n" "# that require network functionality will fail.\n" "192.168.1.2 comet # Added by NetworkManager\n" - "3001:abba::3234 comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_unnamed46_non127 (void) -{ - test_generic (unnamed46_non127_before, unnamed46_non127_after, "comet", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *unnamed46_non127_long_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static const char *unnamed46_non127_long_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "192.168.1.2 comet.space comet # Added by NetworkManager\n" - "3001:abba::3234 comet.space comet # Added by NetworkManager\n" "127.0.0.1 localhost.localdomain localhost\n" "::1 localhost6.localdomain6 localhost6\n" + "192.168.1.3 comet\n" + "3001:abba::3234 comet\n" "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_unnamed46_non127_long (void) -{ - test_generic (unnamed46_non127_long_before, unnamed46_non127_long_after, "comet.space", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *named46_non127_wrong_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n" - "192.168.1.3 comet # Added by NetworkManager\n" - "3001:abba::9876 comet # Added by NetworkManager\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; + "127.0.0.1 lcmd.us.intellitxt.com\n" + "\n"; -static const char *named46_non127_wrong_after = \ +static const char *leftover_double_newline_after = \ "# Do not remove the following line, or various programs\n" "# that require network functionality will fail.\n" - "192.168.1.2 comet # Added by NetworkManager\n" - "3001:abba::3234 comet # Added by NetworkManager\n" "127.0.0.1 localhost.localdomain localhost\n" "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n"; - -static void -test_hosts_named46_non127_wrong (void) -{ - test_generic (named46_non127_wrong_before, named46_non127_wrong_after, "comet", "192.168.1.2", "3001:abba::3234", FALSE); -} - -/*******************************************/ - -static const char *long_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost comet\n" - "::1 localhost6.localdomain6 localhost6\n" - "\n" - "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 adserver.adtech.de\n" - "127.0.0.1 a.as-us.falkag.net\n" - "127.0.0.1 a.as-eu.falkag.net\n" - "127.0.0.1 ads.doubleclick.com\n" - "\n" - "# random comment\n" - "127.0.0.1 m1.2mdn.net\n" - "127.0.0.1 ds.serving-sys.com\n" - "127.0.0.1 pagead2.googlesyndication.com\n" - "127.0.0.1 ad.doubleclick.com\n" - "127.0.0.1 ad.doubleclick.net\n" - "127.0.0.1 oascentral.movietickets.com\n" - "127.0.0.1 view.atdmt.com\n" - "127.0.0.1 ads.chumcity.com\n"; - -static const char *long_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n" + "192.168.1.3 comet\n" + "3001:abba::3234 comet\n" "\n" "127.0.0.1 lcmd.us.intellitxt.com\n" - "127.0.0.1 adserver.adtech.de\n" - "127.0.0.1 a.as-us.falkag.net\n" - "127.0.0.1 a.as-eu.falkag.net\n" - "127.0.0.1 ads.doubleclick.com\n" - "\n" - "# random comment\n" - "127.0.0.1 m1.2mdn.net\n" - "127.0.0.1 ds.serving-sys.com\n" - "127.0.0.1 pagead2.googlesyndication.com\n" - "127.0.0.1 ad.doubleclick.com\n" - "127.0.0.1 ad.doubleclick.net\n" - "127.0.0.1 oascentral.movietickets.com\n" - "127.0.0.1 view.atdmt.com\n" - "127.0.0.1 ads.chumcity.com\n"; - -static void -test_hosts_long (void) -{ - test_generic (long_before, long_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *custom4_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost pintglass\n" - "::1 localhost6.localdomain6 localhost6\n"; - -static const char *custom4_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost pintglass\n" - "::1 comet localhost6.localdomain6 localhost6\n"; - -static void -test_hosts_custom4 (void) -{ - test_generic (custom4_before, custom4_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *custom6_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6 pintglass\n"; - -static const char *custom6_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6 pintglass\n"; - -static void -test_hosts_custom6 (void) -{ - test_generic (custom6_before, custom6_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *custom46_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost shotglass\n" - "::1 localhost6.localdomain6 localhost6 pintglass\n"; - -static const char *custom46_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost shotglass\n" - "::1 comet localhost6.localdomain6 localhost6 pintglass\n"; - -static void -test_hosts_custom46 (void) -{ - test_generic (custom46_before, custom46_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *custom46_mixed_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 localhost.localdomain localhost shotglass\n" - "::1 localhost6.localdomain6 localhost6 pintglass\n"; - -static const char *custom46_mixed_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost shotglass\n" - "::1 comet localhost6.localdomain6 localhost6 pintglass\n"; - -static void -test_hosts_custom46_mixed (void) -{ - test_generic (custom46_mixed_before, custom46_mixed_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *stale4_removed_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "1.2.3.4 comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n"; - -static const char *stale4_removed_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n"; + "\n"; static void -test_hosts_stale4_removed (void) +test_hosts_leftover_double_newline (void) { - test_generic (stale4_removed_before, stale4_removed_after, "comet", NULL, NULL, FALSE); + test_generic (leftover_double_newline_before, leftover_double_newline_after); } /*******************************************/ -static const char *stale6_removed_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "3001:abba::3234 comet # Added by NetworkManager\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n"; - -static const char *stale6_removed_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n"; - -static void -test_hosts_stale6_removed (void) -{ - test_generic (stale6_removed_before, stale6_removed_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -static const char *stale46_removed_before = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "1.2.3.4 comet # Added by NetworkManager\n" - "3001:abba::3234 comet # Added by NetworkManager\n" - "127.0.0.1 localhost.localdomain localhost\n" - "::1 localhost6.localdomain6 localhost6\n"; - -static const char *stale46_removed_after = \ - "# Do not remove the following line, or various programs\n" - "# that require network functionality will fail.\n" - "127.0.0.1 comet localhost.localdomain localhost\n" - "::1 comet localhost6.localdomain6 localhost6\n"; - -static void -test_hosts_stale46_removed (void) -{ - test_generic (stale46_removed_before, stale46_removed_after, "comet", NULL, NULL, FALSE); -} - -/*******************************************/ - -typedef struct { - const char *line; - const char *token; - gboolean expected; -} Foo; - -static Foo foo[] = { - /* Using \t here to easily differentiate tabs vs. spaces for testing */ - { "127.0.0.1\tfoobar\tblah", "blah", TRUE }, - { "", "blah", FALSE }, - { "1.1.1.1\tbork\tfoo", "blah", FALSE }, - { "127.0.0.1 foobar\tblah", "blah", TRUE }, - { "127.0.0.1 foobar blah", "blah", TRUE }, - { "127.0.0.1 localhost", "localhost.localdomain", FALSE }, - { "192.168.1.1 blah borkbork", "blah", TRUE }, - { "192.168.1.1 foobar\tblah borkbork", "blah", TRUE }, - { "192.168.1.1\tfoobar\tblah\tborkbork", "blah", TRUE }, - { "192.168.1.1 \tfoobar \tblah \tborkbork\t ", "blah", TRUE }, - { "\t\t\t\t \t\t\tasdfadf a\t\t\t\t\t \t\t\t\t\t ", "blah", FALSE }, - { NULL, NULL, FALSE } -}; - -static void -test_find_token (void) -{ - Foo *iter = &foo[0]; - - while (iter->line) { - gboolean found; - - found = nm_policy_hosts_find_token (iter->line, iter->token); - if (found != iter->expected) { - g_warning ("find-token: unexpected token result %d for '%s' <= '%s' (expected %d)", - found, iter->line, iter->token, iter->expected); - } - g_assert (found == iter->expected); - iter++; - } -} - #if GLIB_CHECK_VERSION(2,25,12) typedef GTestFixtureFunc TCFunc; #else @@ -851,38 +166,10 @@ int main (int argc, char **argv) suite = g_test_get_root (); - g_test_suite_add (suite, TESTCASE (test_find_token, NULL)); g_test_suite_add (suite, TESTCASE (test_hosts_generic, NULL)); g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate_no_lh, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate_no_lh_no_host, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named_generic, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named4_non127, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named6_non127, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named4_non127_more, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named6_non127_more, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_long, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_other4, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_other4_long, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_other6, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_other6_long, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named46_non127_wrong, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_unnamed46_non127, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_unnamed46_non127_long, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named_no_localhost, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_no_localhost, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_named_last, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_no_host4, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_no_host6, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_long, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_custom4, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_custom6, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_custom46, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_custom46_mixed, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_stale4_removed, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_stale6_removed, NULL)); - g_test_suite_add (suite, TESTCASE (test_hosts_stale46_removed, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_leftover, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_leftover_double_newline, NULL)); return g_test_run (); } diff --git a/src/vpn-manager/Makefile.am b/src/vpn-manager/Makefile.am index b0692d70..3b206617 100644 --- a/src/vpn-manager/Makefile.am +++ b/src/vpn-manager/Makefile.am @@ -11,12 +11,14 @@ INCLUDES = \ noinst_LTLIBRARIES = libvpn-manager.la -libvpn_manager_la_SOURCES = \ - nm-vpn-manager.c \ - nm-vpn-manager.h \ - nm-vpn-service.c \ - nm-vpn-service.h \ - nm-vpn-connection.c \ +libvpn_manager_la_SOURCES = \ + nm-vpn-manager.c \ + nm-vpn-manager.h \ + nm-vpn-service.c \ + nm-vpn-service.h \ + nm-vpn-connection-base.c \ + nm-vpn-connection-base.h \ + nm-vpn-connection.c \ nm-vpn-connection.h libvpn_manager_la_CPPFLAGS = \ @@ -31,6 +33,9 @@ libvpn_manager_la_LIBADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) +nm-vpn-connection-base-glue.h: $(top_srcdir)/introspection/nm-active-connection.xml + $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection_base --mode=glib-server --output=$@ $< + nm-vpn-connection-glue.h: $(top_srcdir)/introspection/nm-vpn-connection.xml $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-server --output=$@ $< @@ -39,6 +44,7 @@ nm-vpn-plugin-bindings.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml BUILT_SOURCES = \ + nm-vpn-connection-base-glue.h \ nm-vpn-connection-glue.h \ nm-vpn-plugin-bindings.h diff --git a/src/vpn-manager/Makefile.in b/src/vpn-manager/Makefile.in index e0a4f4ed..a1d72bbe 100644 --- a/src/vpn-manager/Makefile.in +++ b/src/vpn-manager/Makefile.in @@ -58,6 +58,7 @@ libvpn_manager_la_DEPENDENCIES = \ $(am__DEPENDENCIES_1) am_libvpn_manager_la_OBJECTS = libvpn_manager_la-nm-vpn-manager.lo \ libvpn_manager_la-nm-vpn-service.lo \ + libvpn_manager_la-nm-vpn-connection-base.lo \ libvpn_manager_la-nm-vpn-connection.lo libvpn_manager_la_OBJECTS = $(am_libvpn_manager_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) @@ -186,6 +187,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -200,6 +205,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -287,11 +293,13 @@ INCLUDES = \ noinst_LTLIBRARIES = libvpn-manager.la libvpn_manager_la_SOURCES = \ - nm-vpn-manager.c \ - nm-vpn-manager.h \ - nm-vpn-service.c \ - nm-vpn-service.h \ - nm-vpn-connection.c \ + nm-vpn-manager.c \ + nm-vpn-manager.h \ + nm-vpn-service.c \ + nm-vpn-service.h \ + nm-vpn-connection-base.c \ + nm-vpn-connection-base.h \ + nm-vpn-connection.c \ nm-vpn-connection.h libvpn_manager_la_CPPFLAGS = \ @@ -307,6 +315,7 @@ libvpn_manager_la_LIBADD = \ $(GLIB_LIBS) BUILT_SOURCES = \ + nm-vpn-connection-base-glue.h \ nm-vpn-connection-glue.h \ nm-vpn-plugin-bindings.h @@ -364,6 +373,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-service.Plo@am__quote@ @@ -411,6 +421,14 @@ libvpn_manager_la-nm-vpn-service.lo: nm-vpn-service.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvpn_manager_la-nm-vpn-service.lo `test -f 'nm-vpn-service.c' || echo '$(srcdir)/'`nm-vpn-service.c +libvpn_manager_la-nm-vpn-connection-base.lo: nm-vpn-connection-base.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvpn_manager_la-nm-vpn-connection-base.lo -MD -MP -MF $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Tpo -c -o libvpn_manager_la-nm-vpn-connection-base.lo `test -f 'nm-vpn-connection-base.c' || echo '$(srcdir)/'`nm-vpn-connection-base.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Tpo $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-vpn-connection-base.c' object='libvpn_manager_la-nm-vpn-connection-base.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvpn_manager_la-nm-vpn-connection-base.lo `test -f 'nm-vpn-connection-base.c' || echo '$(srcdir)/'`nm-vpn-connection-base.c + libvpn_manager_la-nm-vpn-connection.lo: nm-vpn-connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvpn_manager_la-nm-vpn-connection.lo -MD -MP -MF $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Tpo -c -o libvpn_manager_la-nm-vpn-connection.lo `test -f 'nm-vpn-connection.c' || echo '$(srcdir)/'`nm-vpn-connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Tpo $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Plo @@ -627,6 +645,9 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am +nm-vpn-connection-base-glue.h: $(top_srcdir)/introspection/nm-active-connection.xml + $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection_base --mode=glib-server --output=$@ $< + nm-vpn-connection-glue.h: $(top_srcdir)/introspection/nm-vpn-connection.xml $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-server --output=$@ $< diff --git a/src/vpn-manager/nm-vpn-connection-base.c b/src/vpn-manager/nm-vpn-connection-base.c new file mode 100644 index 00000000..8a6fb2be --- /dev/null +++ b/src/vpn-manager/nm-vpn-connection-base.c @@ -0,0 +1,199 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2005 - 2011 Red Hat, Inc. + * Copyright (C) 2007 - 2008 Novell, Inc. + */ + +#include "NetworkManager.h" +#include "nm-vpn-connection-base.h" +#include "nm-active-connection.h" +#include "nm-vpn-connection-base-glue.h" +#include "nm-dbus-manager.h" + +G_DEFINE_ABSTRACT_TYPE (NMVpnConnectionBase, nm_vpn_connection_base, G_TYPE_OBJECT) + +#define NM_VPN_CONNECTION_BASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ + NM_TYPE_VPN_CONNECTION_BASE, \ + NMVpnConnectionBasePrivate)) + +typedef struct { + gboolean disposed; + + NMConnection *connection; + char *ac_path; + gboolean is_default; + gboolean is_default6; + NMActiveConnectionState state; +} NMVpnConnectionBasePrivate; + +enum { + PROP_0, + PROP_SERVICE_NAME, + PROP_CONNECTION, + PROP_SPECIFIC_OBJECT, + PROP_DEVICES, + PROP_STATE, + PROP_DEFAULT, + PROP_DEFAULT6, + PROP_VPN, + + LAST_PROP +}; + +/****************************************************************/ + +void +nm_vpn_connection_base_set_state (NMVpnConnectionBase *self, + NMVPNConnectionState vpn_state) +{ + NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self); + NMActiveConnectionState new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; + + /* Set the NMActiveConnection state based on VPN state */ + switch (vpn_state) { + case NM_VPN_CONNECTION_STATE_PREPARE: + case NM_VPN_CONNECTION_STATE_NEED_AUTH: + case NM_VPN_CONNECTION_STATE_CONNECT: + case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: + new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATING; + break; + case NM_VPN_CONNECTION_STATE_ACTIVATED: + new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATED; + break; + default: + break; + } + + if (new_ac_state != priv->state) { + priv->state = new_ac_state; + g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_STATE); + } +} + +const char * +nm_vpn_connection_base_get_ac_path (NMVpnConnectionBase *self) +{ + return NM_VPN_CONNECTION_BASE_GET_PRIVATE (self)->ac_path; +} + +void +nm_vpn_connection_base_export (NMVpnConnectionBase *self, + NMConnection *connection) +{ + NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self); + NMDBusManager *dbus_mgr; + + g_return_if_fail (priv->connection == NULL); + + priv->connection = g_object_ref (connection); + + dbus_mgr = nm_dbus_manager_get (); + dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (dbus_mgr), + priv->ac_path, G_OBJECT (self)); + g_object_unref (dbus_mgr); +} + +/****************************************************************/ + +static void +nm_vpn_connection_base_init (NMVpnConnectionBase *self) +{ + NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self); + + priv->state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; + priv->ac_path = nm_active_connection_get_next_object_path (); +} + +static void +dispose (GObject *object) +{ + NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (object); + + if (!priv->disposed) { + priv->disposed = TRUE; + + g_free (priv->ac_path); + g_object_unref (priv->connection); + } + + G_OBJECT_CLASS (nm_vpn_connection_base_parent_class)->dispose (object); +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_SERVICE_NAME: + nm_active_connection_scope_to_value (priv->connection, value); + break; + case PROP_CONNECTION: + g_value_set_boxed (value, nm_connection_get_path (priv->connection)); + break; + case PROP_SPECIFIC_OBJECT: + g_value_set_boxed (value, priv->ac_path); + break; + case PROP_DEVICES: + g_value_take_boxed (value, g_ptr_array_new ()); + break; + case PROP_STATE: + g_value_set_uint (value, priv->state); + break; + case PROP_DEFAULT: + g_value_set_boolean (value, priv->is_default); + break; + case PROP_DEFAULT6: + g_value_set_boolean (value, priv->is_default6); + break; + case PROP_VPN: + g_value_set_boolean (value, TRUE); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +nm_vpn_connection_base_class_init (NMVpnConnectionBaseClass *vpn_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (vpn_class); + + g_type_class_add_private (vpn_class, sizeof (NMVpnConnectionBasePrivate)); + + /* virtual methods */ + object_class->get_property = get_property; + object_class->dispose = dispose; + + /* properties */ + nm_active_connection_install_properties (object_class, + PROP_SERVICE_NAME, + PROP_CONNECTION, + PROP_SPECIFIC_OBJECT, + PROP_DEVICES, + PROP_STATE, + PROP_DEFAULT, + PROP_DEFAULT6, + PROP_VPN); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (vpn_class), + &dbus_glib_nm_vpn_connection_base_object_info); +} + diff --git a/src/vpn-manager/nm-vpn-connection-base.h b/src/vpn-manager/nm-vpn-connection-base.h new file mode 100644 index 00000000..0c17d9e8 --- /dev/null +++ b/src/vpn-manager/nm-vpn-connection-base.h @@ -0,0 +1,54 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2005 - 2011 Red Hat, Inc. + */ + +#ifndef NM_VPN_CONNECTION_BASE_H +#define NM_VPN_CONNECTION_BASE_H + +#include +#include "NetworkManagerVPN.h" +#include "nm-connection.h" + +#define NM_TYPE_VPN_CONNECTION_BASE (nm_vpn_connection_base_get_type ()) +#define NM_VPN_CONNECTION_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBase)) +#define NM_VPN_CONNECTION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBaseClass)) +#define NM_IS_VPN_CONNECTION_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_CONNECTION_BASE)) +#define NM_IS_VPN_CONNECTION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_VPN_CONNECTION_BASE)) +#define NM_VPN_CONNECTION_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBaseClass)) + +typedef struct { + GObject parent; +} NMVpnConnectionBase; + +typedef struct { + GObjectClass parent; +} NMVpnConnectionBaseClass; + +GType nm_vpn_connection_base_get_type (void); + +const char *nm_vpn_connection_base_get_ac_path (NMVpnConnectionBase *self); + +void nm_vpn_connection_base_export (NMVpnConnectionBase *self, + NMConnection *connection); + +void nm_vpn_connection_base_set_state (NMVpnConnectionBase *self, + NMVPNConnectionState vpn_state); + +#endif /* NM_VPN_CONNECTION_BASE_H */ + diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index cf844992..03e213ff 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -52,7 +52,7 @@ static void secrets_provider_interface_init (NMSecretsProviderInterface *sp_interface_class); -G_DEFINE_TYPE_EXTENDED (NMVPNConnection, nm_vpn_connection, G_TYPE_OBJECT, 0, +G_DEFINE_TYPE_EXTENDED (NMVPNConnection, nm_vpn_connection, NM_TYPE_VPN_CONNECTION_BASE, 0, G_IMPLEMENT_INTERFACE (NM_TYPE_SECRETS_PROVIDER_INTERFACE, secrets_provider_interface_init)) @@ -62,16 +62,11 @@ typedef struct { NMConnection *connection; NMActRequest *act_request; - char *ac_path; NMDevice *parent_dev; gulong device_monitor; gulong device_ip4; - gboolean is_default; - gboolean is_default6; - NMActiveConnectionState state; - NMVPNConnectionState vpn_state; NMVPNConnectionStateReason failure_reason; DBusGProxy *proxy; @@ -97,14 +92,6 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, - PROP_SERVICE_NAME, - PROP_CONNECTION, - PROP_SPECIFIC_OBJECT, - PROP_DEVICES, - PROP_STATE, - PROP_DEFAULT, - PROP_DEFAULT6, - PROP_VPN, PROP_VPN_STATE, PROP_BANNER, @@ -117,7 +104,6 @@ nm_vpn_connection_set_vpn_state (NMVPNConnection *connection, NMVPNConnectionStateReason reason) { NMVPNConnectionPrivate *priv; - NMActiveConnectionState new_ac_state; NMVPNConnectionState old_vpn_state; char *ip_iface; @@ -131,32 +117,14 @@ nm_vpn_connection_set_vpn_state (NMVPNConnection *connection, old_vpn_state = priv->vpn_state; priv->vpn_state = vpn_state; + /* Update active connection base class state */ + nm_vpn_connection_base_set_state (NM_VPN_CONNECTION_BASE (connection), vpn_state); + /* Save ip_iface since when the VPN goes down it may get freed * before we're done with it. */ ip_iface = g_strdup (priv->ip_iface); - /* Set the NMActiveConnection state based on VPN state */ - switch (vpn_state) { - case NM_VPN_CONNECTION_STATE_PREPARE: - case NM_VPN_CONNECTION_STATE_NEED_AUTH: - case NM_VPN_CONNECTION_STATE_CONNECT: - case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: - new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATING; - break; - case NM_VPN_CONNECTION_STATE_ACTIVATED: - new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATED; - break; - default: - new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; - break; - } - - if (new_ac_state != priv->state) { - priv->state = new_ac_state; - g_object_notify (G_OBJECT (connection), NM_ACTIVE_CONNECTION_STATE); - } - /* The connection gets destroyed by the VPN manager when it enters the * disconnected/failed state, but we need to keep it around for a bit * to send out signals and handle the dispatcher. So ref it. @@ -259,6 +227,9 @@ nm_vpn_connection_new (NMConnection *connection, priv->device_ip4 = g_signal_connect (parent_device, "notify::" NM_DEVICE_INTERFACE_IP4_CONFIG, G_CALLBACK (device_ip4_config_changed), self); + + nm_vpn_connection_base_export (NM_VPN_CONNECTION_BASE (self), connection); + return self; } @@ -623,6 +594,7 @@ static void really_activate (NMVPNConnection *connection) { NMVPNConnectionPrivate *priv; + GHashTable *hash; g_return_if_fail (NM_IS_VPN_CONNECTION (connection)); g_return_if_fail (nm_vpn_connection_get_vpn_state (connection) == NM_VPN_CONNECTION_STATE_NEED_AUTH); @@ -639,10 +611,12 @@ really_activate (NMVPNConnection *connection) G_CALLBACK (nm_vpn_connection_ip4_config_get), connection, NULL); + hash = nm_connection_to_hash (priv->connection); org_freedesktop_NetworkManager_VPN_Plugin_connect_async (priv->proxy, - nm_connection_to_hash (priv->connection), - nm_vpn_connection_connect_cb, - connection); + hash, + nm_vpn_connection_connect_cb, + connection); + g_hash_table_destroy (hash); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_CONNECT, @@ -688,7 +662,7 @@ nm_vpn_connection_get_active_connection_path (NMVPNConnection *connection) { g_return_val_if_fail (NM_IS_VPN_CONNECTION (connection), NULL); - return NM_VPN_CONNECTION_GET_PRIVATE (connection)->ac_path; + return nm_vpn_connection_base_get_ac_path (NM_VPN_CONNECTION_BASE (connection)); } const char * @@ -979,20 +953,9 @@ connection_state_changed (NMVPNConnection *connection, } static void -nm_vpn_connection_init (NMVPNConnection *connection) +nm_vpn_connection_init (NMVPNConnection *self) { - NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - NMDBusManager *dbus_mgr; - - priv->state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; - priv->vpn_state = NM_VPN_CONNECTION_STATE_PREPARE; - priv->ac_path = nm_active_connection_get_next_object_path (); - - dbus_mgr = nm_dbus_manager_get (); - dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (dbus_mgr), - priv->ac_path, - G_OBJECT (connection)); - g_object_unref (dbus_mgr); + NM_VPN_CONNECTION_GET_PRIVATE (self)->vpn_state = NM_VPN_CONNECTION_STATE_PREPARE; } static void @@ -1039,7 +1002,6 @@ finalize (GObject *object) g_free (priv->banner); g_free (priv->ip_iface); - g_free (priv->ac_path); G_OBJECT_CLASS (nm_vpn_connection_parent_class)->finalize (object); } @@ -1051,30 +1013,6 @@ get_property (GObject *object, guint prop_id, NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object); switch (prop_id) { - case PROP_SERVICE_NAME: - nm_active_connection_scope_to_value (priv->connection, value); - break; - case PROP_CONNECTION: - g_value_set_boxed (value, nm_connection_get_path (priv->connection)); - break; - case PROP_SPECIFIC_OBJECT: - g_value_set_boxed (value, nm_act_request_get_active_connection_path (priv->act_request)); - break; - case PROP_DEVICES: - g_value_take_boxed (value, g_ptr_array_new ()); - break; - case PROP_STATE: - g_value_set_uint (value, priv->state); - break; - case PROP_DEFAULT: - g_value_set_boolean (value, priv->is_default); - break; - case PROP_DEFAULT6: - g_value_set_boolean (value, priv->is_default6); - break; - case PROP_VPN: - g_value_set_boolean (value, TRUE); - break; case PROP_VPN_STATE: g_value_set_uint (value, priv->vpn_state); break; @@ -1101,82 +1039,21 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class) object_class->finalize = finalize; /* properties */ - g_object_class_install_property - (object_class, PROP_SERVICE_NAME, - g_param_spec_string (NM_ACTIVE_CONNECTION_SERVICE_NAME, - "Service name", - "Service name", - NULL, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_CONNECTION, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION, - "Connection", - "Connection", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_SPECIFIC_OBJECT, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, - "Specific object", - "Specific object", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEVICES, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, - "Devices", - "Devices", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_STATE, - g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE, - "State", - "State", - NM_ACTIVE_CONNECTION_STATE_UNKNOWN, - NM_ACTIVE_CONNECTION_STATE_ACTIVATED, - NM_ACTIVE_CONNECTION_STATE_UNKNOWN, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEFAULT, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, - "Default", - "Is the default IPv4 active connection", - FALSE, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DEFAULT6, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, - "Default6", - "Is the default IPv6 active connection", - FALSE, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_VPN, - g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN, - "VPN", - "Is a VPN connection", - TRUE, - G_PARAM_READABLE)); - - g_object_class_install_property - (object_class, PROP_VPN_STATE, - g_param_spec_uint (NM_VPN_CONNECTION_VPN_STATE, - "VpnState", - "Current VPN state", - NM_VPN_CONNECTION_STATE_UNKNOWN, - NM_VPN_CONNECTION_STATE_DISCONNECTED, - NM_VPN_CONNECTION_STATE_UNKNOWN, - G_PARAM_READABLE)); - - g_object_class_install_property - (object_class, PROP_BANNER, - g_param_spec_string (NM_VPN_CONNECTION_BANNER, - "Banner", - "Login Banner", - NULL, - G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_VPN_STATE, + g_param_spec_uint (NM_VPN_CONNECTION_VPN_STATE, + "VpnState", + "Current VPN state", + NM_VPN_CONNECTION_STATE_UNKNOWN, + NM_VPN_CONNECTION_STATE_DISCONNECTED, + NM_VPN_CONNECTION_STATE_UNKNOWN, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, PROP_BANNER, + g_param_spec_string (NM_VPN_CONNECTION_BANNER, + "Banner", + "Login Banner", + NULL, + G_PARAM_READABLE)); /* signals */ signals[VPN_STATE_CHANGED] = diff --git a/src/vpn-manager/nm-vpn-connection.h b/src/vpn-manager/nm-vpn-connection.h index d69674db..ab880b17 100644 --- a/src/vpn-manager/nm-vpn-connection.h +++ b/src/vpn-manager/nm-vpn-connection.h @@ -28,6 +28,7 @@ #include "nm-device.h" #include "nm-activation-request.h" #include "nm-secrets-provider-interface.h" +#include "nm-vpn-connection-base.h" #define NM_TYPE_VPN_CONNECTION (nm_vpn_connection_get_type ()) #define NM_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnection)) @@ -40,11 +41,11 @@ #define NM_VPN_CONNECTION_BANNER "banner" typedef struct { - GObject parent; + NMVpnConnectionBase parent; } NMVPNConnection; typedef struct { - GObjectClass parent; + NMVpnConnectionBaseClass parent; /* Signals */ void (*vpn_state_changed) (NMVPNConnection *connection, diff --git a/system-settings/Makefile.in b/system-settings/Makefile.in index f6e1a7a9..5defd4f3 100644 --- a/system-settings/Makefile.in +++ b/system-settings/Makefile.in @@ -189,6 +189,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -203,6 +207,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/Makefile.in b/system-settings/plugins/Makefile.in index 1e6804e1..c4f7fa63 100644 --- a/system-settings/plugins/Makefile.in +++ b/system-settings/plugins/Makefile.in @@ -194,6 +194,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -208,6 +212,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifcfg-rh/Makefile.in b/system-settings/plugins/ifcfg-rh/Makefile.in index 22383f92..9d79e8e9 100644 --- a/system-settings/plugins/ifcfg-rh/Makefile.in +++ b/system-settings/plugins/ifcfg-rh/Makefile.in @@ -264,6 +264,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -278,6 +282,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifcfg-rh/plugin.c b/system-settings/plugins/ifcfg-rh/plugin.c index e6dfa5bc..8dce0334 100644 --- a/system-settings/plugins/ifcfg-rh/plugin.c +++ b/system-settings/plugins/ifcfg-rh/plugin.c @@ -147,7 +147,6 @@ read_one_connection (SCPluginIfcfg *plugin, const char *filename) if (nm_ifcfg_connection_get_unmanaged_spec (connection)) { PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "Ignoring connection '%s' and its " "device due to NM_CONTROLLED/BRIDGE/VLAN.", cid); - g_signal_emit_by_name (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED); } else { /* Wait for the connection to become unmanaged once it knows the * UDI of it's device, if/when the device gets plugged in. @@ -218,8 +217,6 @@ connection_changed_handler (SCPluginIfcfg *plugin, g_return_if_fail (do_remove != NULL); g_return_if_fail (do_new != NULL); - PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "updating %s", path); - new = (NMIfcfgConnection *) nm_ifcfg_connection_new (path, &error, &ignore_error); if (!new) { /* errors reading connection; remove it */ @@ -234,8 +231,19 @@ connection_changed_handler (SCPluginIfcfg *plugin, return; } + /* Successfully read connection changes */ + /* When the connections are the same, nothing is done */ + if (nm_connection_compare (NM_CONNECTION (connection), + NM_CONNECTION (new), + NM_SETTING_COMPARE_FLAG_EXACT)) { + g_object_unref (new); + return; + } + + PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "updating %s", path); + old_unmanaged = nm_ifcfg_connection_get_unmanaged_spec (NM_IFCFG_CONNECTION (connection)); new_unmanaged = nm_ifcfg_connection_get_unmanaged_spec (NM_IFCFG_CONNECTION (new)); @@ -305,7 +313,9 @@ handle_connection_remove_or_new (SCPluginIfcfg *plugin, if (do_new) { connection = read_one_connection (plugin, path); if (connection) { - if (!nm_ifcfg_connection_get_unmanaged_spec (connection)) + if (nm_ifcfg_connection_get_unmanaged_spec (connection)) + g_signal_emit_by_name (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED); + else g_signal_emit_by_name (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, connection); } } diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index f25acc89..4ca9232a 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2010 Red Hat, Inc. + * Copyright (C) 2008 - 2011 Red Hat, Inc. */ #include @@ -114,7 +114,7 @@ make_connection_setting (const char *file, { NMSettingConnection *s_con; const char *ifcfg_name = NULL; - char *new_id = NULL, *uuid = NULL, *value; + char *new_id = NULL, *uuid = NULL; char *ifcfg_id; ifcfg_name = utils_get_ifcfg_name (file, TRUE); @@ -167,21 +167,6 @@ make_connection_setting (const char *file, svTrueValue (ifcfg, "ONBOOT", TRUE), NULL); - value = svGetValue (ifcfg, "LAST_CONNECT", FALSE); - if (value) { - unsigned long int tmp; - guint64 timestamp; - - errno = 0; - tmp = strtoul (value, NULL, 10); - if (errno == 0) { - timestamp = (guint64) tmp; - g_object_set (s_con, NM_SETTING_CONNECTION_TIMESTAMP, timestamp, NULL); - } else - PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid LAST_CONNECT time"); - g_free (value); - } - return NM_SETTING (s_con); } @@ -683,12 +668,7 @@ read_one_ip4_route (shvarFile *ifcfg, /* Next hop */ if (!read_ip4_address (ifcfg, gw_tag, &tmp, error)) goto out; - if (!tmp) { - g_set_error (error, IFCFG_PLUGIN_ERROR, 0, - "Missing or invalid IP4 gateway address '%d'", - tmp); - goto out; - } + /* No need to check tmp, because we don't make distinction between missing GATEWAY IP and 0.0.0.0 */ nm_ip4_route_set_next_hop (route, tmp); /* Prefix */ @@ -891,11 +871,17 @@ error: } static NMIP6Address * -parse_full_ip6_address (const char *addr_str, GError **error) +parse_full_ip6_address (shvarFile *ifcfg, + const char *network_file, + const char *addr_str, + int i, + GError **error) { - NMIP6Address *addr; + NMIP6Address *addr = NULL; char **list; - char *ip_tag, *prefix_tag; + char *ip_val, *prefix_val; + shvarFile *network_ifcfg; + char *value = NULL; struct in6_addr tmp = IN6ADDR_ANY_INIT; gboolean success = FALSE; @@ -911,27 +897,26 @@ parse_full_ip6_address (const char *addr_str, GError **error) goto error; } - ip_tag = list[0]; - prefix_tag = list[1]; + ip_val = list[0]; + prefix_val = list[1]; addr = nm_ip6_address_new (); /* IP address */ - if (ip_tag) { - if (!parse_ip6_address (ip_tag, &tmp, error)) + if (ip_val) { + if (!parse_ip6_address (ip_val, &tmp, error)) goto error; } - nm_ip6_address_set_address (addr, &tmp); /* Prefix */ - if (prefix_tag) { + if (prefix_val) { long int prefix; errno = 0; - prefix = strtol (prefix_tag, NULL, 10); + prefix = strtol (prefix_val, NULL, 10); if (errno || prefix <= 0 || prefix > 128) { g_set_error (error, IFCFG_PLUGIN_ERROR, 0, - "Invalid IP6 prefix '%s'", prefix_tag); + "Invalid IP6 prefix '%s'", prefix_val); goto error; } nm_ip6_address_set_prefix (addr, (guint32) prefix); @@ -940,6 +925,32 @@ parse_full_ip6_address (const char *addr_str, GError **error) nm_ip6_address_set_prefix (addr, 64); } + /* Gateway */ + tmp = in6addr_any; + value = svGetValue (ifcfg, "IPV6_DEFAULTGW", FALSE); + if (i != 0) { + /* We don't support gateways for IPV6ADDR_SECONDARIES yet */ + g_free (value); + value = NULL; + } + if (!value) { + /* If no gateway in the ifcfg, try global /etc/sysconfig/network instead */ + network_ifcfg = svNewFile (network_file); + if (network_ifcfg) { + value = svGetValue (network_ifcfg, "IPV6_DEFAULTGW", FALSE); + svCloseFile (network_ifcfg); + } + } + if (value) { + char *ptr; + + if ((ptr = strchr (value, '%')) != NULL) + *ptr = '\0'; /* remove %interface prefix if present */ + if (!parse_ip6_address (value, &tmp, error)) + goto error; + nm_ip6_address_set_gateway (addr, &tmp); + } + success = TRUE; error: @@ -949,6 +960,7 @@ error: } g_strfreev (list); + g_free (value); return addr; } @@ -1167,6 +1179,7 @@ make_ip4_setting (shvarFile *ifcfg, if (!g_ascii_strcasecmp (value, "bootp") || !g_ascii_strcasecmp (value, "dhcp")) method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; else if (!g_ascii_strcasecmp (value, "ibft")) { + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, never_default, NULL); /* iSCSI Boot Firmware Table: need to read values from the iSCSI * firmware for this device and create the IP4 setting using those. */ @@ -1511,8 +1524,8 @@ make_ip6_setting (shvarFile *ifcfg, list = g_strsplit_set (val, " ", 0); g_free (val); - for (iter = list; iter && *iter; iter++, i++) { - addr = parse_full_ip6_address (*iter, error); + for (iter = list, i = 0; iter && *iter; iter++, i++) { + addr = parse_full_ip6_address (ifcfg, network_file, *iter, i, error); if (!addr) { g_strfreev (list); goto error; diff --git a/system-settings/plugins/ifcfg-rh/tests/Makefile.in b/system-settings/plugins/ifcfg-rh/tests/Makefile.in index 5241e8ed..ee01e1f1 100644 --- a/system-settings/plugins/ifcfg-rh/tests/Makefile.in +++ b/system-settings/plugins/ifcfg-rh/tests/Makefile.in @@ -226,6 +226,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -240,6 +244,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in index fb89c241..54080b01 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in @@ -149,6 +149,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -163,6 +167,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index bca9af12..2fbfea66 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -29,8 +29,6 @@ #include #include -#include - #include #include #include @@ -5636,7 +5634,6 @@ test_write_wired_static (void) GByteArray *mac; guint32 mtu = 1492; char *uuid; - guint64 timestamp = 0x12344433L; const guint32 ip1 = htonl (0x01010103); const guint32 ip2 = htonl (0x01010105); const guint32 gw = htonl (0x01010101); @@ -5691,7 +5688,6 @@ test_write_wired_static (void) NM_SETTING_CONNECTION_UUID, uuid, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, - NM_SETTING_CONNECTION_TIMESTAMP, timestamp, NULL); g_free (uuid); @@ -5986,7 +5982,6 @@ test_write_wired_static_ip6_only (void) static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd }; GByteArray *mac; char *uuid; - guint64 timestamp = 0x12344433L; struct in6_addr ip6; struct in6_addr dns6; NMIP6Address *addr6; @@ -6019,7 +6014,6 @@ test_write_wired_static_ip6_only (void) NM_SETTING_CONNECTION_UUID, uuid, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, - NM_SETTING_CONNECTION_TIMESTAMP, timestamp, NULL); g_free (uuid); @@ -6276,7 +6270,6 @@ test_write_wired_static_routes (void) GByteArray *mac; guint32 mtu = 1492; char *uuid; - guint64 timestamp = 0x12344433L; const guint32 ip1 = htonl (0x01010103); const guint32 ip2 = htonl (0x01010105); const guint32 gw = htonl (0x01010101); @@ -6317,7 +6310,6 @@ test_write_wired_static_routes (void) NM_SETTING_CONNECTION_UUID, uuid, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, - NM_SETTING_CONNECTION_TIMESTAMP, timestamp, NULL); g_free (uuid); @@ -9490,11 +9482,9 @@ test_read_vlan_interface (void) int main (int argc, char **argv) { GError *error = NULL; - DBusGConnection *bus; char *base; g_type_init (); - bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); if (!nm_utils_init (&error)) FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index cf1e2663..456fa21c 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 - 2011 Red Hat, Inc. */ #include @@ -143,6 +143,7 @@ write_secret_file (const char *path, success = TRUE; out: + g_free (tmppath); return success; } @@ -884,6 +885,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) svSetValue (ifcfg, "SUBCHANNELS", NULL, FALSE); s390_subchannels = nm_setting_wired_get_s390_subchannels (s_wired); if (s390_subchannels) { + tmp = NULL; if (s390_subchannels->len == 2) { tmp = g_strdup_printf ("%s,%s", (const char *) g_ptr_array_index (s390_subchannels, 0), @@ -936,20 +938,11 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) static void write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg) { - char *tmp; - svSetValue (ifcfg, "NAME", nm_setting_connection_get_id (s_con), FALSE); svSetValue (ifcfg, "UUID", nm_setting_connection_get_uuid (s_con), FALSE); svSetValue (ifcfg, "ONBOOT", nm_setting_connection_get_autoconnect (s_con) ? "yes" : "no", FALSE); - - svSetValue (ifcfg, "LAST_CONNECT", NULL, FALSE); - if (nm_setting_connection_get_timestamp (s_con)) { - tmp = g_strdup_printf ("%" G_GUINT64_FORMAT, nm_setting_connection_get_timestamp (s_con)); - svSetValue (ifcfg, "LAST_CONNECT", tmp, FALSE); - g_free (tmp); - } } static gboolean @@ -1407,6 +1400,13 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) g_string_append_c (ip_ptr, '/'); g_string_append (ip_ptr, prefix); g_free (prefix); + + /* We only support gateway for the first IP address for now */ + if (i == 0) { + ip = nm_ip6_address_get_gateway (addr); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + svSetValue (ifcfg, "IPV6_DEFAULTGW", buf, FALSE); + } } svSetValue (ifcfg, "IPV6ADDR", ip_str1->str, FALSE); @@ -1416,6 +1416,7 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) } else { svSetValue (ifcfg, "IPV6ADDR", NULL, FALSE); svSetValue (ifcfg, "IPV6ADDR_SECONDARIES", NULL, FALSE); + svSetValue (ifcfg, "IPV6_DEFAULTGW", NULL, FALSE); } /* Write out DNS - 'DNS' key is used both for IPv4 and IPv6 */ diff --git a/system-settings/plugins/ifcfg-suse/Makefile.in b/system-settings/plugins/ifcfg-suse/Makefile.in index 3551794f..9c948c1b 100644 --- a/system-settings/plugins/ifcfg-suse/Makefile.in +++ b/system-settings/plugins/ifcfg-suse/Makefile.in @@ -212,6 +212,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -226,6 +230,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifnet/Makefile.am b/system-settings/plugins/ifnet/Makefile.am index f63f8ca7..86d5ea25 100644 --- a/system-settings/plugins/ifnet/Makefile.am +++ b/system-settings/plugins/ifnet/Makefile.am @@ -21,11 +21,10 @@ libnm_settings_plugin_ifnet_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GUDEV_CFLAGS) \ -DG_DISABLE_DEPRECATED \ - -DSYSCONFDIR=\"$(sysconfdir)\"\ - -g - + -DSYSCONFDIR=\"$(sysconfdir)\" libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version + libnm_settings_plugin_ifnet_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/libnm-glib/libnm-glib.la \ @@ -50,12 +49,9 @@ lib_ifnet_io_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DSBINDIR=\"$(sbindir)\"\ - -g + -DSBINDIR=\"$(sbindir)\" lib_ifnet_io_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS)\ $(GIO_LIBS) - - diff --git a/system-settings/plugins/ifnet/Makefile.in b/system-settings/plugins/ifnet/Makefile.in index 39515d88..c5047f5b 100644 --- a/system-settings/plugins/ifnet/Makefile.in +++ b/system-settings/plugins/ifnet/Makefile.in @@ -260,6 +260,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -274,6 +278,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -370,8 +375,7 @@ libnm_settings_plugin_ifnet_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GUDEV_CFLAGS) \ -DG_DISABLE_DEPRECATED \ - -DSYSCONFDIR=\"$(sysconfdir)\"\ - -g + -DSYSCONFDIR=\"$(sysconfdir)\" libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifnet_la_LIBADD = \ @@ -398,8 +402,7 @@ lib_ifnet_io_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DSBINDIR=\"$(sbindir)\"\ - -g + -DSBINDIR=\"$(sbindir)\" lib_ifnet_io_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/system-settings/plugins/ifnet/net_utils.c b/system-settings/plugins/ifnet/net_utils.c index 8a541979..2dc253c5 100644 --- a/system-settings/plugins/ifnet/net_utils.c +++ b/system-settings/plugins/ifnet/net_utils.c @@ -19,7 +19,6 @@ * Copyright (C) 1999-2010 Gentoo Foundation, Inc. */ -#include #include #include #include @@ -194,6 +193,32 @@ ifnet_plugin_error_quark (void) return error_quark; } +static char * +find_default_gateway_str (char *str) +{ + char *tmp; + + if ((tmp = strstr (str, "default via ")) != NULL) { + return tmp + strlen ("default via "); + } else if ((tmp = strstr (str, "default gw ")) != NULL) { + return tmp + strlen ("default gw "); + } + return NULL; +} + +static char * +find_gateway_str (char *str) +{ + char *tmp; + + if ((tmp = strstr (str, "via ")) != NULL) { + return tmp + strlen ("via "); + } else if ((tmp = strstr (str, "gw ")) != NULL) { + return tmp + strlen ("gw "); + } + return NULL; +} + gboolean reload_parsers () { @@ -362,11 +387,10 @@ has_default_route (gchar * conn_name, gboolean (*check_fn) (gchar *)) if (!tmp) return FALSE; routes = g_strdup (tmp); - tmp = strstr (routes, "default via "); + tmp = find_default_gateway_str (routes); if (!tmp) { goto error; } - tmp += strlen ("default via "); g_strstrip (tmp); if ((end = strstr (tmp, "\"")) != NULL) *end = '\0'; @@ -483,8 +507,13 @@ get_ip4_gateway (gchar * gateway) if (!gateway) return 0; - tmp = strstr (gateway, "via "); - tmp = g_strdup (tmp + strlen ("via ")); + tmp = find_gateway_str (gateway); + if (!tmp) { + PLUGIN_WARN (IFNET_PLUGIN_NAME, + "Couldn't obtain gateway in \"%s\"", gateway); + return 0; + } + tmp = g_strdup (tmp); strip_string (tmp, ' '); strip_string (tmp, '"'); if ((split = strstr (tmp, "\"")) != NULL) @@ -509,8 +538,13 @@ get_ip6_next_hop (gchar * next_hop) if (!next_hop) return 0; - tmp = strstr (next_hop, "via "); - tmp = g_strdup (tmp + strlen ("via ")); + tmp = find_gateway_str (next_hop); + if (!tmp) { + PLUGIN_WARN (IFNET_PLUGIN_NAME, + "Couldn't obtain next_hop in \"%s\"", next_hop); + return 0; + } + tmp = g_strdup (tmp); strip_string (tmp, ' '); strip_string (tmp, '"'); g_strstrip (tmp); @@ -671,8 +705,8 @@ convert_ip4_routes_block (gchar * conn_name) length = g_strv_length (ipset); for (i = 0; i < length; i++) { ip = ipset[i]; - if (strstr (ip, "default via ") || strstr (ip, "::") - || !strstr (ip, "via")) + if (find_default_gateway_str (ip) || strstr (ip, "::") + || !find_gateway_str (ip)) continue; ip = strip_string (ip, '"'); iblock = create_ip4_block (ip); @@ -712,9 +746,7 @@ convert_ip6_routes_block (gchar * conn_name) ip = strip_string (ip, '"'); if (ip[0] == '\0') continue; - printf ("ip:%s\n", ip); - if ((tmp_addr = strstr (ip, "default via ")) != NULL) { - tmp_addr += strlen ("default via "); + if ((tmp_addr = find_default_gateway_str (ip)) != NULL) { if (!is_ip6_address (tmp_addr)) continue; else { @@ -855,7 +887,7 @@ is_managed (gchar * conn_name) void get_dhcp_hostname_and_client_id (char **hostname, char **client_id) { - gchar *dhcp_client = ifnet_get_global_setting ("main", "dhcp"); + gchar *dhcp_client = NULL; const gchar *dhcpcd_conf = "/etc/dhcpcd.conf"; const gchar *dhclient_conf = "/etc/dhcp/dhclient.conf"; gchar *line = NULL, *tmp = NULL, *contents = NULL; @@ -864,6 +896,7 @@ get_dhcp_hostname_and_client_id (char **hostname, char **client_id) *hostname = NULL; *client_id = NULL; + dhcp_client = ifnet_get_global_setting ("main", "dhcp"); if (dhcp_client) { if (!strcmp (dhcp_client, "dhclient")) g_file_get_contents (dhclient_conf, &contents, NULL, @@ -871,6 +904,7 @@ get_dhcp_hostname_and_client_id (char **hostname, char **client_id) else if (!strcmp (dhcp_client, "dhcpcd")) g_file_get_contents (dhcpcd_conf, &contents, NULL, NULL); + g_free (dhcp_client); } else { if (g_file_test (dhclient_conf, G_FILE_TEST_IS_REGULAR)) g_file_get_contents (dhclient_conf, &contents, NULL, diff --git a/system-settings/plugins/ifnet/plugin.c b/system-settings/plugins/ifnet/plugin.c index 51d56024..94f9e791 100644 --- a/system-settings/plugins/ifnet/plugin.c +++ b/system-settings/plugins/ifnet/plugin.c @@ -40,7 +40,7 @@ #include "connection_parser.h" #define IFNET_PLUGIN_NAME_PRINT "ifnet" -#define IFNET_PLUGIN_INFO "(C) 1999-2010 Gentoo Foundation, Inc. To report bugs please use bugs.gentoo.org with [networkmanager] or [dagger] prefix." +#define IFNET_PLUGIN_INFO "(C) 1999-2010 Gentoo Foundation, Inc. To report bugs please use bugs.gentoo.org with [networkmanager] or [qiaomuf] prefix." #define IFNET_SYSTEM_HOSTNAME_FILE "/etc/conf.d/hostname" #define IFNET_MANAGE_WELL_KNOWN_DEFAULT TRUE #define IFNET_KEY_FILE_KEY_MANAGED "managed" diff --git a/system-settings/plugins/ifnet/tests/Makefile.am b/system-settings/plugins/ifnet/tests/Makefile.am index ead3f1fc..17a081f5 100644 --- a/system-settings/plugins/ifnet/tests/Makefile.am +++ b/system-settings/plugins/ifnet/tests/Makefile.am @@ -6,8 +6,7 @@ INCLUDES=-I$(top_srcdir)/system-settings/plugins/ifnet\ TESTS = check_ifnet check_PROGRAMS = check_ifnet check_ifnet_SOURCES = test_all.c -check_ifnet_LDFLAGS = -g -check_ifnet_CPPFLAGS = $(CHECK_CFLAGS) $(GLIB_CFLAGS) -g +check_ifnet_CPPFLAGS = $(CHECK_CFLAGS) $(GLIB_CFLAGS) check_ifnet_LDADD = $(top_srcdir)/libnm-util/libnm-util.la\ $(top_srcdir)/system-settings/plugins/ifnet/lib-ifnet-io.la\ $(CHECK_LIBS)\ diff --git a/system-settings/plugins/ifnet/tests/Makefile.in b/system-settings/plugins/ifnet/tests/Makefile.in index cef1039b..39d49b4e 100644 --- a/system-settings/plugins/ifnet/tests/Makefile.in +++ b/system-settings/plugins/ifnet/tests/Makefile.in @@ -59,9 +59,6 @@ check_ifnet_DEPENDENCIES = $(top_srcdir)/libnm-util/libnm-util.la \ AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent -check_ifnet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(check_ifnet_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -187,6 +184,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -201,6 +202,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -283,8 +285,7 @@ INCLUDES = -I$(top_srcdir)/system-settings/plugins/ifnet\ -I$(top_srcdir)/src/system-settings check_ifnet_SOURCES = test_all.c -check_ifnet_LDFLAGS = -g -check_ifnet_CPPFLAGS = $(CHECK_CFLAGS) $(GLIB_CFLAGS) -g +check_ifnet_CPPFLAGS = $(CHECK_CFLAGS) $(GLIB_CFLAGS) check_ifnet_LDADD = $(top_srcdir)/libnm-util/libnm-util.la\ $(top_srcdir)/system-settings/plugins/ifnet/lib-ifnet-io.la\ $(CHECK_LIBS)\ @@ -335,7 +336,7 @@ clean-checkPROGRAMS: rm -f $$list check_ifnet$(EXEEXT): $(check_ifnet_OBJECTS) $(check_ifnet_DEPENDENCIES) @rm -f check_ifnet$(EXEEXT) - $(AM_V_CCLD)$(check_ifnet_LINK) $(check_ifnet_OBJECTS) $(check_ifnet_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(check_ifnet_OBJECTS) $(check_ifnet_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/system-settings/plugins/ifnet/tests/test_all.c b/system-settings/plugins/ifnet/tests/test_all.c index ba983976..eff76af2 100644 --- a/system-settings/plugins/ifnet/tests/test_all.c +++ b/system-settings/plugins/ifnet/tests/test_all.c @@ -58,17 +58,22 @@ test_read_hostname () "get hostname", "hostname is not correctly read, read:%s, expected: gentoo", hostname); + g_free (hostname); } static void test_write_hostname () { gchar *hostname = read_hostname ("hostname"); + gchar *tmp; write_hostname ("gentoo-nm", "hostname"); - ASSERT (strcmp (read_hostname ("hostname"), "gentoo-nm") == 0, + tmp = read_hostname ("hostname"); + ASSERT (strcmp (tmp, "gentoo-nm") == 0, "write hostname", "write hostname error"); write_hostname (hostname, "hostname"); + g_free (tmp); + g_free (hostname); } static void @@ -85,14 +90,13 @@ test_is_static () static void test_has_default_route () { - ASSERT (has_default_ip4_route ("eth0"), "has default route", - "eth0 should have a default ipv4 route"); - ASSERT (has_default_ip6_route ("eth4"), "has default route", - "eth4 should have a default ipv6 route"); - + ASSERT (has_default_ip4_route ("eth0"), + "has default route", "eth0 should have a default ipv4 route"); + ASSERT (has_default_ip6_route ("eth4"), + "has default route", "eth4 should have a default ipv6 route"); ASSERT (!has_default_ip4_route ("eth5") - && !has_default_ip6_route ("eth5"), "has default route", - "eth5 shouldn't have a default route"); + && !has_default_ip6_route ("eth5"), + "has default route", "eth5 shouldn't have a default route"); } static void @@ -138,8 +142,8 @@ check_ip_block (ip_block * iblock, gchar * ip, gchar * netmask, gchar * gateway) str = malloc (INET_ADDRSTRLEN); tmp_ip4_addr.s_addr = iblock->ip; inet_ntop (AF_INET, &tmp_ip4_addr, str, INET_ADDRSTRLEN); - ASSERT (strcmp (ip, str) == 0, "check ip", "ip expected:%s, find:%s", - ip, str); + ASSERT (strcmp (ip, str) == 0, "check ip", + "ip expected:%s, find:%s", ip, str); tmp_ip4_addr.s_addr = iblock->netmask; inet_ntop (AF_INET, &tmp_ip4_addr, str, INET_ADDRSTRLEN); ASSERT (strcmp (netmask, str) == 0, "check netmask", @@ -170,8 +174,8 @@ test_convert_ipv4_config_block () destroy_ip_block (iblock); iblock = convert_ip4_config_block ("eth2"); ASSERT (iblock != NULL - && iblock->next == NULL, "convert error IPv4 address", - "should only get one address"); + && iblock->next == NULL, + "convert error IPv4 address", "should only get one address"); check_ip_block (iblock, "192.168.4.121", "255.255.255.0", "0.0.0.0"); destroy_ip_block (iblock); iblock = convert_ip4_config_block ("eth3"); @@ -182,7 +186,6 @@ test_convert_ipv4_config_block () ASSERT (iblock != NULL, "convert config_block", "convert error configuration"); destroy_ip_block (iblock); - } static void @@ -209,10 +212,13 @@ test_wpa_parser () ASSERT (exist_ssid ("static-wep-test"), "exist_ssid", "ssid static-wep-test is not found"); value = wpa_get_value ("static-wep-test", "key_mgmt"); - ASSERT (value && strcmp (value, "NONE") == 0, "get wpa data", + ASSERT (value + && strcmp (value, "NONE") == 0, "get wpa data", "key_mgmt of static-wep-test should be NONE, find %s", value); value = wpa_get_value ("static-wep-test", "wep_key0"); - ASSERT (value && strcmp (value, "\"abcde\"") == 0, "get wpa data", + ASSERT (value + && strcmp (value, "\"abcde\"") == 0, + "get wpa data", "wep_key0 of static-wep-test should be abcde, find %s", value); ASSERT (exist_ssid ("leap-example"), "get wsec", "ssid leap-example is not found"); @@ -228,8 +234,9 @@ test_strip_string () result = strip_string (result, '('); result = strip_string (result, ')'); result = strip_string (result, '"'); - ASSERT (strcmp (result, "default via 202.117.16.1") == 0, - "strip_string", "string isn't stripped, result is: %s", result); + ASSERT (strcmp (result, "default via 202.117.16.1") == + 0, "strip_string", + "string isn't stripped, result is: %s", result); g_free (result_b); } @@ -265,7 +272,6 @@ test_new_connection () "new connection failed: %s", error && (*error) ? (*error)->message : "NONE"); g_object_unref (connection); - } static void @@ -280,8 +286,9 @@ test_update_connection () error == NULL ? "None" : (*error)->message); ASSERT (ifnet_update_parsers_by_connection (connection, "eth0", NULL, "net.generate", - "wpa_supplicant.conf.generate", error), "update connection", - "update connection failed %s", "eth0"); + "wpa_supplicant.conf.generate", error), + "update connection", "update connection failed %s", "eth0"); + g_object_unref (connection); connection = ifnet_update_connection_from_config_block ("0xab3ace", error); ASSERT (connection != NULL, "get connection", @@ -289,8 +296,9 @@ test_update_connection () error == NULL ? "None" : (*error)->message); ASSERT (ifnet_update_parsers_by_connection (connection, "0xab3ace", NULL, "net.generate", - "wpa_supplicant.conf.generate", error), "update connection", - "update connection failed %s", "0xab3ace"); + "wpa_supplicant.conf.generate", error), + "update connection", "update connection failed %s", "0xab3ace"); + g_object_unref (connection); } static void @@ -301,14 +309,17 @@ test_add_connection () connection = ifnet_update_connection_from_config_block ("eth0", error); ASSERT (ifnet_add_new_connection - (connection, "net.generate", "wpa_supplicant.conf.generate", - error), "add connection", "add connection failed: %s", "eth0"); + (connection, "net.generate", + "wpa_supplicant.conf.generate", error), + "add connection", "add connection failed: %s", "eth0"); + g_object_unref (connection); connection = ifnet_update_connection_from_config_block ("myxjtu2", error); ASSERT (ifnet_add_new_connection - (connection, "net.generate", "wpa_supplicant.conf.generate", - error), "add connection", "add connection failed: %s", - "myxjtu2"); + (connection, "net.generate", + "wpa_supplicant.conf.generate", error), + "add connection", "add connection failed: %s", "myxjtu2"); + g_object_unref (connection); } static void @@ -322,16 +333,20 @@ test_delete_connection () "get connection failed: %s", error == NULL ? "None" : (*error)->message); ASSERT (ifnet_delete_connection_in_parsers - ("eth7", "net.generate", "wpa_supplicant.conf.generate"), + ("eth7", "net.generate", + "wpa_supplicant.conf.generate"), "delete connection", "delete connection failed: %s", "eth7"); + g_object_unref (connection); connection = ifnet_update_connection_from_config_block ("qiaomuf", error); ASSERT (connection != NULL, "get connection", "get connection failed: %s", error == NULL ? "None" : (*error)->message); ASSERT (ifnet_delete_connection_in_parsers - ("qiaomuf", "net.generate", "wpa_supplicant.conf.generate"), + ("qiaomuf", "net.generate", + "wpa_supplicant.conf.generate"), "delete connection", "delete connection failed: %s", "qiaomuf"); + g_object_unref (connection); } static void @@ -369,10 +384,8 @@ main (void) wpa_parser_destroy (); ifnet_init ("net"); wpa_parser_init ("wpa_supplicant.conf"); - printf("Initialization complete\n"); - + printf ("Initialization complete\n"); run_all (TRUE); - ifnet_destroy (); wpa_parser_destroy (); return 0; diff --git a/system-settings/plugins/ifupdown/Makefile.in b/system-settings/plugins/ifupdown/Makefile.in index de327e6e..590d62a3 100644 --- a/system-settings/plugins/ifupdown/Makefile.in +++ b/system-settings/plugins/ifupdown/Makefile.in @@ -258,6 +258,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -272,6 +276,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/ifupdown/interface_parser.c b/system-settings/plugins/ifupdown/interface_parser.c index 4635db2c..9be853a4 100644 --- a/system-settings/plugins/ifupdown/interface_parser.c +++ b/system-settings/plugins/ifupdown/interface_parser.c @@ -51,6 +51,7 @@ void add_block(const char *type, const char* name) void add_data(const char *key,const char *data) { if_data *ret; + char *idx; // Check if there is a block where we can attach our data if (first == NULL) @@ -58,6 +59,11 @@ void add_data(const char *key,const char *data) ret = (if_data*) calloc(1,sizeof(struct _if_data)); ret->key = g_strdup(key); + // Normalize keys. Convert '_' to '-', as ifupdown accepts both variants. + // When querying keys via ifparser_getkey(), use '-'. + while ((idx = strrchr(ret->key, '_'))) { + *idx = '-'; + } ret->data = g_strdup(data); if (last->info == NULL) diff --git a/system-settings/plugins/ifupdown/plugin.c b/system-settings/plugins/ifupdown/plugin.c index 33c058e5..2446548c 100644 --- a/system-settings/plugins/ifupdown/plugin.c +++ b/system-settings/plugins/ifupdown/plugin.c @@ -362,12 +362,55 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) while (block) { if(!strcmp ("auto", block->type) || !strcmp ("allow-hotplug", block->type)) g_hash_table_insert (auto_ifaces, block->name, GUINT_TO_POINTER (1)); - else if (!strcmp ("iface", block->type) && strcmp ("lo", block->name)) { + else if (!strcmp ("iface", block->type)) { NMIfupdownConnection *exported; + /* Bridge configuration */ + if(!strncmp ("br", block->name, 2)) { + /* Try to find bridge ports */ + const char *ports = ifparser_getkey (block, "bridge-ports"); + if (ports) { + int i; + int state = 0; + char **port_ifaces; + + PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); + + port_ifaces = g_strsplit_set (ports, " \t", -1); + for (i = 0; i < g_strv_length (port_ifaces); i++) { + char *token = port_ifaces[i]; + /* Skip crazy stuff like regex or all */ + if (!strcmp ("all", token)) { + continue; + } + /* Small SM to skip everything inside regex */ + if (!strcmp ("regex", token)) { + state++; + continue; + } + if (!strcmp ("noregex", token)) { + state--; + continue; + } + if (state == 0 && strlen (token) > 0) { + PLUGIN_PRINT("SCPlugin-Ifupdown", "adding bridge port %s to well_known_interfaces", token); + g_hash_table_insert (priv->well_known_interfaces, g_strdup (token), "known"); + } + } + g_strfreev (port_ifaces); + } + goto next; + } + + /* Skip loopback configuration */ + if(!strcmp ("lo", block->name)) { + goto next; + } + /* Remove any connection for this block that was previously found */ exported = g_hash_table_lookup (priv->iface_connections, block->name); if (exported) { + PLUGIN_PRINT("SCPlugin-Ifupdown", "deleting %s from iface_connections", block->name); nm_settings_connection_interface_delete (NM_SETTINGS_CONNECTION_INTERFACE (exported), ignore_cb, NULL); @@ -377,12 +420,16 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) /* add the new connection */ exported = nm_ifupdown_connection_new (block); if (exported) { + PLUGIN_PRINT("SCPlugin-Ifupdown", "adding %s to iface_connections", block->name); g_hash_table_insert (priv->iface_connections, block->name, exported); - g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); } + PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to well_known_interfaces", block->name); + g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); } else if (!strcmp ("mapping", block->type)) { g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); + PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to well_known_interfaces", block->name); } + next: block = block->next; } diff --git a/system-settings/plugins/ifupdown/tests/Makefile.in b/system-settings/plugins/ifupdown/tests/Makefile.in index cb08914e..b6db0bdc 100644 --- a/system-settings/plugins/ifupdown/tests/Makefile.in +++ b/system-settings/plugins/ifupdown/tests/Makefile.in @@ -184,6 +184,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -198,6 +202,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/keyfile/Makefile.am b/system-settings/plugins/keyfile/Makefile.am index 1c1fd4a7..128775ee 100644 --- a/system-settings/plugins/keyfile/Makefile.am +++ b/system-settings/plugins/keyfile/Makefile.am @@ -16,6 +16,8 @@ libkeyfile_io_la_SOURCES = \ writer.c \ writer.h \ errors.c \ + utils.c \ + utils.h \ common.h libkeyfile_io_la_CPPFLAGS = \ @@ -49,6 +51,8 @@ libnm_settings_plugin_keyfile_la_LIBADD = \ $(DBUS_LIBS) \ $(GIO_LIBS) +keyfiledir=$(sysconfdir)/NetworkManager/system-connections + install-data-hook: $(mkinstalldirs) -m 0755 $(DESTDIR)$(keyfiledir) diff --git a/system-settings/plugins/keyfile/Makefile.in b/system-settings/plugins/keyfile/Makefile.in index 5d731c17..96172ca3 100644 --- a/system-settings/plugins/keyfile/Makefile.in +++ b/system-settings/plugins/keyfile/Makefile.in @@ -75,7 +75,8 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = libkeyfile_io_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libkeyfile_io_la_OBJECTS = libkeyfile_io_la-reader.lo \ - libkeyfile_io_la-writer.lo libkeyfile_io_la-errors.lo + libkeyfile_io_la-writer.lo libkeyfile_io_la-errors.lo \ + libkeyfile_io_la-utils.lo libkeyfile_io_la_OBJECTS = $(am_libkeyfile_io_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -257,6 +258,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -271,6 +276,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -361,6 +367,8 @@ libkeyfile_io_la_SOURCES = \ writer.c \ writer.h \ errors.c \ + utils.c \ + utils.h \ common.h libkeyfile_io_la_CPPFLAGS = \ @@ -393,6 +401,7 @@ libnm_settings_plugin_keyfile_la_LIBADD = \ $(DBUS_LIBS) \ $(GIO_LIBS) +keyfiledir = $(sysconfdir)/NetworkManager/system-connections all: all-recursive .SUFFIXES: @@ -480,6 +489,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkeyfile_io_la-errors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkeyfile_io_la-reader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkeyfile_io_la-utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkeyfile_io_la-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_settings_plugin_keyfile_la-nm-keyfile-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_settings_plugin_keyfile_la-plugin.Plo@am__quote@ @@ -535,6 +545,14 @@ libkeyfile_io_la-errors.lo: errors.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeyfile_io_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkeyfile_io_la-errors.lo `test -f 'errors.c' || echo '$(srcdir)/'`errors.c +libkeyfile_io_la-utils.lo: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeyfile_io_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkeyfile_io_la-utils.lo -MD -MP -MF $(DEPDIR)/libkeyfile_io_la-utils.Tpo -c -o libkeyfile_io_la-utils.lo `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkeyfile_io_la-utils.Tpo $(DEPDIR)/libkeyfile_io_la-utils.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='libkeyfile_io_la-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeyfile_io_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkeyfile_io_la-utils.lo `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + libnm_settings_plugin_keyfile_la-nm-keyfile-connection.lo: nm-keyfile-connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_settings_plugin_keyfile_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_settings_plugin_keyfile_la-nm-keyfile-connection.lo -MD -MP -MF $(DEPDIR)/libnm_settings_plugin_keyfile_la-nm-keyfile-connection.Tpo -c -o libnm_settings_plugin_keyfile_la-nm-keyfile-connection.lo `test -f 'nm-keyfile-connection.c' || echo '$(srcdir)/'`nm-keyfile-connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_settings_plugin_keyfile_la-nm-keyfile-connection.Tpo $(DEPDIR)/libnm_settings_plugin_keyfile_la-nm-keyfile-connection.Plo diff --git a/system-settings/plugins/keyfile/common.h b/system-settings/plugins/keyfile/common.h index 7d94a705..6c8f9ceb 100644 --- a/system-settings/plugins/keyfile/common.h +++ b/system-settings/plugins/keyfile/common.h @@ -23,6 +23,9 @@ #include +#define SWP_TAG ".swp" +#define SWPX_TAG ".swpx" + #define KEYFILE_PLUGIN_NAME "keyfile" #define KEYFILE_PLUGIN_INFO "(c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list." diff --git a/system-settings/plugins/keyfile/plugin.c b/system-settings/plugins/keyfile/plugin.c index 27ae0a06..da6456d9 100644 --- a/system-settings/plugins/keyfile/plugin.c +++ b/system-settings/plugins/keyfile/plugin.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,7 @@ #include "nm-keyfile-connection.h" #include "writer.h" #include "common.h" +#include "utils.h" #define CONF_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf" #define OLD_CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf" @@ -89,6 +91,9 @@ read_connections (NMSystemConfigInterface *config) NMKeyfileConnection *connection; char *full_path; + if (utils_should_ignore_file (item)) + continue; + full_path = g_build_filename (KEYFILE_DIR, item, NULL); PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "parsing %s ... ", item); connection = nm_keyfile_connection_new (full_path, &error); @@ -192,6 +197,11 @@ dir_changed (GFileMonitor *monitor, GError *error = NULL; name = g_file_get_path (file); + if (utils_should_ignore_file (name)) { + g_free (name); + return; + } + connection = g_hash_table_lookup (priv->hash, name); switch (event_type) { @@ -203,15 +213,18 @@ dir_changed (GFileMonitor *monitor, break; case G_FILE_MONITOR_EVENT_CREATED: case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: - PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name); - if (connection) { /* Update */ NMKeyfileConnection *tmp; tmp = nm_keyfile_connection_new (name, &error); if (tmp) { - update_connection_settings (connection, tmp); + if (!nm_connection_compare (NM_CONNECTION (connection), + NM_CONNECTION (tmp), + NM_SETTING_COMPARE_FLAG_EXACT)) { + PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name); + update_connection_settings (connection, tmp); + } g_object_unref (tmp); } else { /* Error; remove the connection */ @@ -221,6 +234,8 @@ dir_changed (GFileMonitor *monitor, remove_connection (SC_PLUGIN_KEYFILE (config), connection, name); } } else { + PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "updating %s", name); + /* New */ connection = nm_keyfile_connection_new (name, &error); if (connection) { @@ -404,8 +419,23 @@ get_unmanaged_specs (NMSystemConfigInterface *config) udis = g_strsplit (str, ";", -1); g_free (str); - for (i = 0; udis[i] != NULL; i++) - specs = g_slist_append (specs, udis[i]); + for (i = 0; udis[i] != NULL; i++) { + /* Verify unmanaged specification and add it to the list */ + if (strlen (udis[i]) > 4 && !strncmp (udis[i], "mac:", 4) && ether_aton (udis[i] + 4)) { + char *p = udis[i]; + + /* To accept uppercase MACs in configuration file, we have to convert values to lowercase here. + * Unmanaged MACs in specs are always in lowercase. */ + while (*p) { + *p = g_ascii_tolower (*p); + p++; + } + specs = g_slist_append (specs, udis[i]); + } else { + g_warning ("Error in file '%s': invalid unmanaged-devices entry: '%s'", priv->conf_file, udis[i]); + g_free (udis[i]); + } + } g_free (udis); /* Yes, g_free, not g_strfreev because we need the strings in the list */ } diff --git a/system-settings/plugins/keyfile/reader.c b/system-settings/plugins/keyfile/reader.c index 841315d9..8d52afe6 100644 --- a/system-settings/plugins/keyfile/reader.c +++ b/system-settings/plugins/keyfile/reader.c @@ -33,10 +33,7 @@ #include #include #include -#include -#include -#include -#include +#include #include #include #include @@ -169,7 +166,7 @@ next: } static void -ip4_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip4_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { GPtrArray *addresses; const char *setting_name = nm_setting_get_name (setting); @@ -275,7 +272,7 @@ next: } static void -ip4_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip4_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { GPtrArray *routes; const char *setting_name = nm_setting_get_name (setting); @@ -289,7 +286,7 @@ ip4_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) } static void -ip4_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip4_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { const char *setting_name = nm_setting_get_name (setting); GArray *array = NULL; @@ -462,7 +459,7 @@ next: } static void -ip6_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip6_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { GPtrArray *addresses; const char *setting_name = nm_setting_get_name (setting); @@ -591,7 +588,7 @@ next: } static void -ip6_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip6_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { GPtrArray *routes; const char *setting_name = nm_setting_get_name (setting); @@ -612,7 +609,7 @@ free_one_ip6_dns (gpointer data, gpointer user_data) } static void -ip6_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +ip6_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { const char *setting_name = nm_setting_get_name (setting); GPtrArray *array = NULL; @@ -649,7 +646,7 @@ ip6_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) } static void -mac_address_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +mac_address_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) { const char *setting_name = nm_setting_get_name (setting); struct ether_addr *eth; @@ -732,10 +729,11 @@ read_hash_of_string (GKeyFile *file, NMSetting *setting, const char *key) g_strfreev (keys); } -static void -ssid_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +static GByteArray * +get_uchar_array (GKeyFile *keyfile, + const char *setting_name, + const char *key) { - const char *setting_name = nm_setting_get_name (setting); GByteArray *array = NULL; char *p, *tmp_string; gint *tmp_list; @@ -764,42 +762,135 @@ ssid_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) if (new_format) { array = g_byte_array_sized_new (strlen (tmp_string)); g_byte_array_append (array, (guint8 *) tmp_string, strlen (tmp_string)); - goto done; } + g_free (tmp_string); } - g_free (tmp_string); - /* Old format; list of ints */ - tmp_list = g_key_file_get_integer_list (keyfile, setting_name, key, &length, NULL); - array = g_byte_array_sized_new (length); - for (i = 0; i < length; i++) { - int val = tmp_list[i]; - unsigned char v = (unsigned char) (val & 0xFF); + if (!array) { + /* Old format; list of ints */ + tmp_list = g_key_file_get_integer_list (keyfile, setting_name, key, &length, NULL); + array = g_byte_array_sized_new (length); + for (i = 0; i < length; i++) { + int val = tmp_list[i]; + unsigned char v = (unsigned char) (val & 0xFF); - if (val < 0 || val > 255) { - g_warning ("%s: %s / %s ignoring invalid byte element '%d' (not " - " between 0 and 255 inclusive)", __func__, setting_name, - key, val); - } else - g_byte_array_append (array, (const unsigned char *) &v, sizeof (v)); + if (val < 0 || val > 255) { + g_warning ("%s: %s / %s ignoring invalid byte element '%d' (not " + " between 0 and 255 inclusive)", __func__, setting_name, + key, val); + } else + g_byte_array_append (array, (const unsigned char *) &v, sizeof (v)); + } + g_free (tmp_list); } - g_free (tmp_list); -done: - if (array->len) + if (array->len == 0) { + g_byte_array_free (array, TRUE); + array = NULL; + } + return array; +} + +static void +ssid_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) +{ + const char *setting_name = nm_setting_get_name (setting); + GByteArray *array; + + array = get_uchar_array (keyfile, setting_name, key); + if (array) { g_object_set (setting, key, array, NULL); - else { + g_byte_array_free (array, TRUE); + } else { + g_warning ("%s: ignoring invalid SSID for %s / %s", + __func__, setting_name, key); + } +} + +static char * +get_cert_path (const char *keyfile_path, GByteArray *cert_path) +{ + const char *base; + char *p = NULL, *path, *dirname, *tmp; + + g_return_val_if_fail (keyfile_path != NULL, NULL); + g_return_val_if_fail (cert_path != NULL, NULL); + + base = path = g_malloc0 (cert_path->len + 1); + memcpy (path, cert_path->data, cert_path->len); + + if (path[0] == '/') + return path; + + p = strrchr (path, '/'); + if (p) + base = p + 1; + + dirname = g_path_get_dirname (keyfile_path); + tmp = g_build_path ("/", dirname, base, NULL); + g_free (dirname); + g_free (path); + return tmp; +} + +#define SCHEME_PATH "file://" + +static void +cert_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path) +{ + const char *setting_name = nm_setting_get_name (setting); + GByteArray *array; + gboolean success = FALSE; + + array = get_uchar_array (keyfile, setting_name, key); + if (array) { + /* Value could be either: + * 1) the raw key/cert data as a blob + * 2) a path scheme (ie, starts with "file://") + * 3) a plain path + */ + if ( (array->len > strlen (SCHEME_PATH)) + && g_str_has_prefix ((const char *) array->data, SCHEME_PATH) + && (array->data[array->len - 1] == '\0')) { + /* It's the PATH scheme, can just set plain data */ + g_object_set (setting, key, array, NULL); + success = TRUE; + } else if ( (array->len < 500) + && g_utf8_validate ((const char *) array->data, array->len, NULL)) { + GByteArray *val; + char *path; + + path = get_cert_path (keyfile_path, array); + if (g_file_test (path, G_FILE_TEST_EXISTS)) { + /* Construct the proper value as required for the PATH scheme */ + val = g_byte_array_sized_new (strlen (SCHEME_PATH) + array->len + 1); + g_byte_array_append (val, (const guint8 *) SCHEME_PATH, strlen (SCHEME_PATH)); + g_byte_array_append (val, array->data, array->len); + g_byte_array_append (val, (const guint8 *) "\0", 1); + g_object_set (setting, key, val, NULL); + g_byte_array_free (val, TRUE); + success = TRUE; + } + g_free (path); + } + + if (!success) { + /* Assume it's a simple blob value of the certificate or private key's data */ + g_object_set (setting, key, array, NULL); + } + + g_byte_array_free (array, TRUE); + } else { g_warning ("%s: ignoring invalid SSID for %s / %s", __func__, setting_name, key); } - g_byte_array_free (array, TRUE); } typedef struct { const char *setting_name; const char *key; gboolean check_for_key; - void (*parser) (NMSetting *setting, const char *key, GKeyFile *keyfile); + void (*parser) (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path); } KeyParser; /* A table of keys that require further parsing/conversion because they are @@ -861,9 +952,38 @@ static KeyParser key_parsers[] = { NM_SETTING_WIRELESS_SSID, TRUE, ssid_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CA_CERT, + TRUE, + cert_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CLIENT_CERT, + TRUE, + cert_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PRIVATE_KEY, + TRUE, + cert_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_CA_CERT, + TRUE, + cert_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_CLIENT_CERT, + TRUE, + cert_parser }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, + TRUE, + cert_parser }, { NULL, NULL, FALSE } }; +typedef struct { + GKeyFile *keyfile; + const char *keyfile_path; +} ReadInfo; + static void read_one_setting_value (NMSetting *setting, const char *key, @@ -871,7 +991,7 @@ read_one_setting_value (NMSetting *setting, GParamFlags flags, gpointer user_data) { - GKeyFile *file = user_data; + ReadInfo *info = user_data; const char *setting_name; GType type; GError *err = NULL; @@ -911,7 +1031,7 @@ read_one_setting_value (NMSetting *setting, * like IP addresses and routes where more than one value is actually * encoded by the setting property, this won't be true. */ - if (check_for_key && !g_key_file_has_key (file, setting_name, key, &err)) { + if (check_for_key && !g_key_file_has_key (info->keyfile, setting_name, key, &err)) { /* Key doesn't exist or an error ocurred, thus nothing to do. */ if (err) { g_warning ("Error loading setting '%s' value: %s", setting_name, err->message); @@ -924,7 +1044,7 @@ read_one_setting_value (NMSetting *setting, * parsers below. */ if (parser && parser->setting_name) { - (*parser->parser) (setting, key, file); + (*parser->parser) (setting, key, info->keyfile, info->keyfile_path); return; } @@ -933,30 +1053,30 @@ read_one_setting_value (NMSetting *setting, if (type == G_TYPE_STRING) { char *str_val; - str_val = g_key_file_get_string (file, setting_name, key, NULL); + str_val = g_key_file_get_string (info->keyfile, setting_name, key, NULL); g_object_set (setting, key, str_val, NULL); g_free (str_val); } else if (type == G_TYPE_UINT) { int int_val; - int_val = g_key_file_get_integer (file, setting_name, key, NULL); + int_val = g_key_file_get_integer (info->keyfile, setting_name, key, NULL); if (int_val < 0) g_warning ("Casting negative value (%i) to uint", int_val); g_object_set (setting, key, int_val, NULL); } else if (type == G_TYPE_INT) { int int_val; - int_val = g_key_file_get_integer (file, setting_name, key, NULL); + int_val = g_key_file_get_integer (info->keyfile, setting_name, key, NULL); g_object_set (setting, key, int_val, NULL); } else if (type == G_TYPE_BOOLEAN) { gboolean bool_val; - bool_val = g_key_file_get_boolean (file, setting_name, key, NULL); + bool_val = g_key_file_get_boolean (info->keyfile, setting_name, key, NULL); g_object_set (setting, key, bool_val, NULL); } else if (type == G_TYPE_CHAR) { int int_val; - int_val = g_key_file_get_integer (file, setting_name, key, NULL); + int_val = g_key_file_get_integer (info->keyfile, setting_name, key, NULL); if (int_val < G_MININT8 || int_val > G_MAXINT8) g_warning ("Casting value (%i) to char", int_val); @@ -965,7 +1085,7 @@ read_one_setting_value (NMSetting *setting, char *tmp_str; guint64 uint_val; - tmp_str = g_key_file_get_value (file, setting_name, key, NULL); + tmp_str = g_key_file_get_value (info->keyfile, setting_name, key, NULL); uint_val = g_ascii_strtoull (tmp_str, NULL, 10); g_free (tmp_str); g_object_set (setting, key, uint_val, NULL); @@ -975,7 +1095,7 @@ read_one_setting_value (NMSetting *setting, gsize length; int i; - tmp = g_key_file_get_integer_list (file, setting_name, key, &length, NULL); + tmp = g_key_file_get_integer_list (info->keyfile, setting_name, key, &length, NULL); array = g_byte_array_sized_new (length); for (i = 0; i < length; i++) { @@ -999,7 +1119,7 @@ read_one_setting_value (NMSetting *setting, int i; GSList *list = NULL; - sa = g_key_file_get_string_list (file, setting_name, key, &length, NULL); + sa = g_key_file_get_string_list (info->keyfile, setting_name, key, &length, NULL); for (i = 0; i < length; i++) list = g_slist_prepend (list, sa[i]); @@ -1009,9 +1129,9 @@ read_one_setting_value (NMSetting *setting, g_slist_free (list); g_strfreev (sa); } else if (type == DBUS_TYPE_G_MAP_OF_STRING) { - read_hash_of_string (file, setting, key); + read_hash_of_string (info->keyfile, setting, key); } else if (type == DBUS_TYPE_G_UINT_ARRAY) { - if (!read_array_of_uint (file, setting, key)) { + if (!read_array_of_uint (info->keyfile, setting, key)) { g_warning ("Unhandled setting property type (read): '%s/%s' : '%s'", setting_name, key, G_VALUE_TYPE_NAME (value)); } @@ -1022,15 +1142,16 @@ read_one_setting_value (NMSetting *setting, } static NMSetting * -read_setting (GKeyFile *file, const char *name) +read_setting (GKeyFile *file, const char *keyfile_path, const char *setting_name) { NMSetting *setting; + ReadInfo info = { file, keyfile_path }; - setting = nm_connection_create_setting (name); + setting = nm_connection_create_setting (setting_name); if (setting) - nm_setting_enumerate_values (setting, read_one_setting_value, (gpointer) file); + nm_setting_enumerate_values (setting, read_one_setting_value, &info); else - g_warning ("Invalid setting name '%s'", name); + g_warning ("Invalid setting name '%s'", setting_name); return setting; } @@ -1061,13 +1182,12 @@ connection_from_file (const char *filename, GError **error) gboolean bad_owner, bad_permissions; NMConnection *connection = NULL; NMSettingConnection *s_con; - NMSettingBluetooth *s_bt; NMSetting *setting; gchar **groups; gsize length; int i; gboolean vpn_secrets = FALSE; - const char *ctype, *tmp; + const char *ctype; GError *verify_error = NULL; if (stat (filename, &statbuf) != 0 || !S_ISREG (statbuf.st_mode)) { @@ -1100,7 +1220,7 @@ connection_from_file (const char *filename, GError **error) continue; } - setting = read_setting (key_file, groups[i]); + setting = read_setting (key_file, filename, groups[i]); if (setting) nm_connection_add_setting (connection, setting); } @@ -1114,38 +1234,11 @@ connection_from_file (const char *filename, GError **error) ctype = nm_setting_connection_get_connection_type (s_con); setting = nm_connection_get_setting_by_name (connection, ctype); if (ctype) { - gboolean add_serial = FALSE; - NMSetting *new_setting = NULL; - if (!setting && !strcmp (ctype, NM_SETTING_WIRED_SETTING_NAME)) - new_setting = nm_setting_wired_new (); - else if (!strcmp (ctype, NM_SETTING_BLUETOOTH_SETTING_NAME)) { - s_bt = (NMSettingBluetooth *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH); - if (s_bt) { - tmp = nm_setting_bluetooth_get_connection_type (s_bt); - if (tmp && !strcmp (tmp, NM_SETTING_BLUETOOTH_TYPE_DUN)) - add_serial = TRUE; - } - } else if (!strcmp (ctype, NM_SETTING_GSM_SETTING_NAME)) - add_serial = TRUE; - else if (!strcmp (ctype, NM_SETTING_CDMA_SETTING_NAME)) - add_serial = TRUE; - - /* Bluetooth DUN, GSM, and CDMA connections require a serial setting */ - if (add_serial && !nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL)) - new_setting = nm_setting_serial_new (); - - if (new_setting) - nm_connection_add_setting (connection, new_setting); + nm_connection_add_setting (connection, nm_setting_wired_new ()); } } - /* Serial connections require a PPP setting too */ - if (nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL)) { - if (!nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP)) - nm_connection_add_setting (connection, nm_setting_ppp_new ()); - } - /* Handle vpn secrets after the 'vpn' setting was read */ if (vpn_secrets) { NMSettingVPN *s_vpn; diff --git a/system-settings/plugins/keyfile/tests/Makefile.in b/system-settings/plugins/keyfile/tests/Makefile.in index 6311cae5..8a80502c 100644 --- a/system-settings/plugins/keyfile/tests/Makefile.in +++ b/system-settings/plugins/keyfile/tests/Makefile.in @@ -221,6 +221,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -235,6 +239,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am index d6ee0183..0ce03209 100644 --- a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am +++ b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = \ +KEYFILES = \ Test_Wired_Connection \ Test_GSM_Connection \ Test_Wireless_Connection \ @@ -6,10 +6,18 @@ EXTRA_DIST = \ Test_Wired_Connection_IP6 \ ATT_Data_Connect_BT \ ATT_Data_Connect_Plain \ - Test_String_SSID + Test_String_SSID \ + Test_Wired_TLS_Old \ + Test_Wired_TLS_New + +CERTS = \ + test-ca-cert.pem \ + test-key-and-cert.pem + +EXTRA_DIST = $(KEYFILES) $(CERTS) check-local: - @for f in $(EXTRA_DIST); do \ + @for f in $(KEYFILES); do \ chmod 0600 $(abs_srcdir)/$$f; \ done diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.in b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.in index 04794678..9f821d20 100644 --- a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.in +++ b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.in @@ -149,6 +149,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -163,6 +167,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -238,7 +243,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = \ +KEYFILES = \ Test_Wired_Connection \ Test_GSM_Connection \ Test_Wireless_Connection \ @@ -246,8 +251,15 @@ EXTRA_DIST = \ Test_Wired_Connection_IP6 \ ATT_Data_Connect_BT \ ATT_Data_Connect_Plain \ - Test_String_SSID + Test_String_SSID \ + Test_Wired_TLS_Old \ + Test_Wired_TLS_New +CERTS = \ + test-ca-cert.pem \ + test-key-and-cert.pem + +EXTRA_DIST = $(KEYFILES) $(CERTS) all: all-am .SUFFIXES: @@ -436,7 +448,7 @@ uninstall-am: check-local: - @for f in $(EXTRA_DIST); do \ + @for f in $(KEYFILES); do \ chmod 0600 $(abs_srcdir)/$$f; \ done diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_New b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_New new file mode 100644 index 00000000..4cd86686 --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_New @@ -0,0 +1,22 @@ + +[connection] +id=Wired TLS +uuid=5ee46013-9469-4c6a-a60a-0c7a1e1c7488 +type=802-3-ethernet + +[802-1x] +eap=tls; +identity=Bill Smith +ca-cert=test-ca-cert.pem +client-cert=test-key-and-cert.pem +private-key=test-key-and-cert.pem +private-key-password=12345testing + +[ipv4] +method=auto + +[802-3-ethernet] +duplex=full + +[ipv6] +method=ignore diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_Old b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_Old new file mode 100644 index 00000000..61afdd91 --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_TLS_Old @@ -0,0 +1,22 @@ + +[connection] +id=Wired TLS +uuid=5ee46013-9469-4c6a-a60a-0c7a1e1c7488 +type=802-3-ethernet + +[802-1x] +eap=tls; +identity=Bill Smith +ca-cert=102;105;108;101;58;47;47;47;104;111;109;101;47;100;99;98;119;47;68;101;115;107;116;111;112;47;99;101;114;116;105;110;102;114;97;47;67;65;47;101;97;112;116;101;115;116;95;99;97;95;99;101;114;116;46;112;101;109;0; +client-cert=102;105;108;101;58;47;47;47;104;111;109;101;47;100;99;98;119;47;68;101;115;107;116;111;112;47;99;101;114;116;105;110;102;114;97;47;99;108;105;101;110;116;46;112;101;109;0; +private-key=102;105;108;101;58;47;47;47;104;111;109;101;47;100;99;98;119;47;68;101;115;107;116;111;112;47;99;101;114;116;105;110;102;114;97;47;99;108;105;101;110;116;46;112;101;109;0; +private-key-password=12345testing + +[ipv4] +method=auto + +[802-3-ethernet] +duplex=full + +[ipv6] +method=ignore diff --git a/system-settings/plugins/keyfile/tests/keyfiles/test-ca-cert.pem b/system-settings/plugins/keyfile/tests/keyfiles/test-ca-cert.pem new file mode 100644 index 00000000..ef1be20d --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/test-ca-cert.pem @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEjzCCA3egAwIBAgIJAOvnZPt59yIZMA0GCSqGSIb3DQEBBQUAMIGLMQswCQYD +VQQGEwJVUzESMBAGA1UECBMJQmVya3NoaXJlMRAwDgYDVQQHEwdOZXdidXJ5MRcw +FQYDVQQKEw5NeSBDb21wYW55IEx0ZDEQMA4GA1UECxMHVGVzdGluZzENMAsGA1UE +AxMEdGVzdDEcMBoGCSqGSIb3DQEJARYNdGVzdEB0ZXN0LmNvbTAeFw0wOTAzMTAx +NTEyMTRaFw0xOTAzMDgxNTEyMTRaMIGLMQswCQYDVQQGEwJVUzESMBAGA1UECBMJ +QmVya3NoaXJlMRAwDgYDVQQHEwdOZXdidXJ5MRcwFQYDVQQKEw5NeSBDb21wYW55 +IEx0ZDEQMA4GA1UECxMHVGVzdGluZzENMAsGA1UEAxMEdGVzdDEcMBoGCSqGSIb3 +DQEJARYNdGVzdEB0ZXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAKot9j+/+CX1/gZLgJHIXCRgCItKLGnf7qGbgqB9T2ACBqR0jllKWwDKrcWU +xjXNIc+GF9Wnv+lX6G0Okn4Zt3/uRNobL+2b/yOF7M3Td3/9W873zdkQQX930YZc +Rr8uxdRPP5bxiCgtcw632y21sSEbG9mjccAUnV/0jdvfmMNj0i8gN6E0fMBiJ9S3 +FkxX/KFvt9JWE9CtoyL7ki7UIDq+6vj7Gd5N0B3dOa1y+rRHZzKlJPcSXQSEYUS4 +HmKDwiKSVahft8c4tDn7KPi0vex91hlgZVd3usL2E/Vq7o5D9FAZ5kZY0AdFXwdm +J4lO4Mj7ac7GE4vNERNcXVIX59sCAwEAAaOB8zCB8DAdBgNVHQ4EFgQUuDU3Mr7P +T3n1e3Sy8hBauoDFahAwgcAGA1UdIwSBuDCBtYAUuDU3Mr7PT3n1e3Sy8hBauoDF +ahChgZGkgY4wgYsxCzAJBgNVBAYTAlVTMRIwEAYDVQQIEwlCZXJrc2hpcmUxEDAO +BgNVBAcTB05ld2J1cnkxFzAVBgNVBAoTDk15IENvbXBhbnkgTHRkMRAwDgYDVQQL +EwdUZXN0aW5nMQ0wCwYDVQQDEwR0ZXN0MRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRl +c3QuY29tggkA6+dk+3n3IhkwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC +AQEAVRG4aALIvCXCiKfe7K+iJxjBVRDFPEf7JWA9LGgbFOn6pNvbxonrR+0BETdc +JV1ET4ct2xsE7QNFIkp9GKRC+6J32zCo8qtLCD5+v436r8TUG2/t2JRMkb9I2XVT +p7RJoot6M0Ltf8KNQUPYh756xmKZ4USfQUwc58MOSDGY8VWEXJOYij9Pf0e0c52t +qiCEjXH7uXiS8Pgq9TYm7AkWSOrglYhSa83x0f8mtT8Q15nBESIHZ6o8FAS2bBgn +B0BkrKRjtBUkuJG3vTox+bYINh2Gxi1JZHWSV1tN5z3hd4VFcKqanW5OgQwToBqp +3nniskIjbH0xjgZf/nVMyLnjxg== +-----END CERTIFICATE----- diff --git a/system-settings/plugins/keyfile/tests/keyfiles/test-key-and-cert.pem b/system-settings/plugins/keyfile/tests/keyfiles/test-key-and-cert.pem new file mode 100644 index 00000000..dec9aa1b --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/test-key-and-cert.pem @@ -0,0 +1,118 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,4DE0615F23D82107 + +QPNCO5Dobvz9dDhN32KkZRoEifW+HDm2PCbRQhKDiscGwB6LgypvVjHNsZiFKwzz +L4R51UqgQeJx7GSGJqE626e9z9J+UNBhop02aOO2X0eSPdvBzr/uJ6Umiyr1xqD7 +zWf7u9l5kXElDJRhK+87GMBewp4Ie9NeXDjhF8hzC5Kiulen4AH3AYnfH3S7DimU +h8GFMg8inrudrTbcjBhCdPeHG2jCygOxw3InRFz7uaN6LIhOaPQvmvpP4Cc1WRnW +ZPq9o+eU3fPWPD5t+Op/VzYLvKwgBy/yK1rQXUm6ZMO7MhhRJ94ZCsJv+nVWpJlv +QyBlxDKxwfkfYbDELdnnDQdHdMbKatLqa0KhSkgpp8LywBtanPz731tyT0r7b3na +eLdra59lRU7ZQLPEdS3lPZd2O/KQvWf8wbg7MjXS9LxQ7R5HOPu6DNJlwXVZBmmo +cAfu2q8ubU2IePvWLD1GOrBi6hE9TiGvFJkw+wBK+t72sz3njv9Xm/zlxruaEk5m +RW/kybU3FP4PtjriBbskz3/VZaaxuRN7OoOYTkmyHmG1ADgcRUV6fea19qqsBlN8 +xb+SRtoH28oT/JVWU5neE2dbNzk5LeVO+w70NNdR5s5xqkBhbGGaJxvXwNP4ltFr +T06SMh8znOLKwWB00aRtwfU7jOwR3mOleQO4ugIHmau3zp1TqzAHW8XtpuV7qVeI +ESZOZuf0vW43BtNzgLXt1+r+bmsMsRwhnyomL9M0TUyyBdVYY9GkzTG9pOESheRo +RSvAZ8qKGUliTpgBcbt2v1+NqkszcHa6FxuvS8YU4uo5/GqsgTxHTNIB232hIrrZ +EIm6QL9TC5oFXMjy6UNqoCm5Nb8DBJ6aErt7pt7aoktqUW3O3QIzQT3IbZ4nAcTt +lVF4d7j29I9t7bcC8GOVU1neilguZUss4ghJg9x4zI5UZdR7hZ8fbFT47TyxB+j5 +r0YdmjbjVTaSyaN2JGh1wvb4TzawGNVx/U2EJE16HigOtPfsfQRJ3x+FROKBdVa4 +aIFYXkRBeIPxX6n9pcw0lBCsnXo6/5iTjQSk2VqO3rHO/wyWiEjNczhL33dY2A8W +GG5ECMO5SqXZHQQzpABqK94dxe3UC8aEESO5NhEqDuV7qQGol0qPKrUA3wb0jb2e +DrejJ9HS2m1SUDmjpvvmEGy6GN7CRibbKt5rNZdJNNvWArOF5d0F6wkixQLl73oE +lq5gLQQk9n7ClleKLhlQpBCorxilBbzmSUekkJLi0eaZiBBFWBX9udqnUZloXTgO +8qwuO8K/GPR9Jy1/UH2Vh1H+wivaqKTVgEb0NotzgzECgTEFKJafl7rUNs1OZRZ3 +VBjevi6+iDpxVFgF71kXfdUC4ph0E1XDl0ja2rrKQGivMkUhWJ57+4EV5+hBkAnt +G0RV45NwHXLrK2bd8F9PlRk2XHW6mIcFRXsW1DjeBhk/sQjvlO9R01GRSgcXtekJ +tmX17FWrMrzXHpvy1IC3fk4RVnSjpzQ8O+17YE8/la9wVaeZZzHyYFmMT7VXjIhW +QozJQ0vJ2jxJRh5GYn3tpJzdaeRfvTBik0pChNdUTnWP+BJ35xoCTs8iwJbmgVZ1 +-----END RSA PRIVATE KEY----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, ST=Berkshire, L=Newbury, O=My Company Ltd, OU=Testing, CN=test/emailAddress=test@test.com + Validity + Not Before: Mar 10 15:13:16 2009 GMT + Not After : Mar 8 15:13:16 2019 GMT + Subject: C=US, ST=Berkshire, O=My Company Ltd, OU=Testing, CN=test1/emailAddress=test@test.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:cd:34:b1:2e:b0:04:c6:f4:2b:a2:c0:a0:39:7a: + 82:ed:96:c4:f7:19:83:91:5c:b4:e7:9c:de:ec:48: + ec:2d:e4:51:08:26:42:ac:d3:98:26:7a:72:f7:49: + c2:9e:66:05:c6:47:29:fe:3b:ac:6b:af:6f:5e:a8: + 03:5a:73:33:ba:19:03:00:35:f5:00:bc:a8:be:14: + ce:46:69:e3:6d:ed:34:37:85:55:87:62:b3:b7:c9: + c0:cc:9a:aa:61:05:5b:cd:a2:17:42:d3:e5:6f:1c: + 60:8d:c2:15:41:46:f8:12:54:d0:38:57:e1:fd:8d: + 44:c8:fb:56:b3:b9:6c:e9:f8:9e:21:11:57:1b:8b: + f9:cf:e3:17:e7:d8:fd:ac:d1:01:c6:92:30:f3:2d: + c9:d6:c1:f0:3d:fd:ca:30:dd:75:74:e7:d1:6b:75: + d8:c5:4d:43:61:fe:f6:ad:7e:4c:63:7c:03:17:a2: + 06:8f:d0:8b:69:d3:7a:07:0f:0b:a2:cf:0c:70:38: + ba:cc:55:35:60:84:58:d8:d2:be:1f:ef:76:a9:ba: + ae:6a:dc:08:97:80:de:42:00:b7:d4:ce:9a:b0:36: + 2a:c7:6f:45:04:7c:ea:41:19:d8:b9:19:04:1f:11: + a9:22:80:bd:69:08:15:0d:3c:de:cd:7e:88:6c:0f: + a3:43 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + Netscape Comment: + OpenSSL Generated Certificate + X509v3 Subject Key Identifier: + CE:03:7E:EF:E7:DE:C9:87:BF:DE:56:F4:C8:A3:40:F6:C8:6F:05:8C + X509v3 Authority Key Identifier: + keyid:B8:35:37:32:BE:CF:4F:79:F5:7B:74:B2:F2:10:5A:BA:80:C5:6A:10 + DirName:/C=US/ST=Berkshire/L=Newbury/O=My Company Ltd/OU=Testing/CN=test/emailAddress=test@test.com + serial:EB:E7:64:FB:79:F7:22:19 + + Signature Algorithm: md5WithRSAEncryption + 7a:20:93:63:40:73:7d:33:01:2e:c0:13:52:a4:a7:e1:4d:82: + f4:fb:b2:7b:d0:2b:5a:3f:0e:3c:28:61:71:ab:01:4d:fe:89: + b5:cd:2f:97:59:93:53:9d:51:86:48:dd:b9:e4:73:5e:22:0b: + 12:0d:25:39:76:16:44:06:0c:40:45:21:6b:a6:b1:e0:bf:76: + 1b:36:f3:1e:41:82:57:d9:59:b7:60:40:43:1c:1d:79:f6:48: + 32:5c:4e:e2:06:89:96:41:d2:54:1f:4a:6f:f6:78:a5:3c:02: + 85:21:e2:65:e1:8a:6d:24:19:95:f8:c0:35:ab:bd:ff:3d:f1: + fb:50:2d:30:1e:67:a6:7c:50:f9:d5:77:66:77:5a:14:0f:5c: + cd:21:09:9b:a3:92:57:19:dd:01:a4:18:c5:f9:70:e4:17:43: + 8d:b1:e6:61:e9:50:89:83:4f:ce:a4:57:68:58:40:70:ae:71: + 1c:47:66:d2:30:54:50:ea:3a:87:32:64:3b:18:42:fe:5a:19: + 07:64:f7:f1:b1:10:07:fd:a7:d2:a7:a8:05:79:5b:25:ba:69: + 7b:1a:3e:b1:3e:e4:17:17:01:ba:eb:54:ae:83:00:ed:66:62: + 8d:c0:3e:8a:b4:27:5f:e9:01:ce:20:c3:34:a9:28:c0:6f:c7: + 3b:65:fe:f9 +-----BEGIN CERTIFICATE----- +MIIEojCCA4qgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBizELMAkGA1UEBhMCVVMx +EjAQBgNVBAgTCUJlcmtzaGlyZTEQMA4GA1UEBxMHTmV3YnVyeTEXMBUGA1UEChMO +TXkgQ29tcGFueSBMdGQxEDAOBgNVBAsTB1Rlc3RpbmcxDTALBgNVBAMTBHRlc3Qx +HDAaBgkqhkiG9w0BCQEWDXRlc3RAdGVzdC5jb20wHhcNMDkwMzEwMTUxMzE2WhcN +MTkwMzA4MTUxMzE2WjB6MQswCQYDVQQGEwJVUzESMBAGA1UECBMJQmVya3NoaXJl +MRcwFQYDVQQKEw5NeSBDb21wYW55IEx0ZDEQMA4GA1UECxMHVGVzdGluZzEOMAwG +A1UEAxMFdGVzdDExHDAaBgkqhkiG9w0BCQEWDXRlc3RAdGVzdC5jb20wggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNNLEusATG9CuiwKA5eoLtlsT3GYOR +XLTnnN7sSOwt5FEIJkKs05gmenL3ScKeZgXGRyn+O6xrr29eqANaczO6GQMANfUA +vKi+FM5GaeNt7TQ3hVWHYrO3ycDMmqphBVvNohdC0+VvHGCNwhVBRvgSVNA4V+H9 +jUTI+1azuWzp+J4hEVcbi/nP4xfn2P2s0QHGkjDzLcnWwfA9/cow3XV059FrddjF +TUNh/vatfkxjfAMXogaP0Itp03oHDwuizwxwOLrMVTVghFjY0r4f73apuq5q3AiX +gN5CALfUzpqwNirHb0UEfOpBGdi5GQQfEakigL1pCBUNPN7NfohsD6NDAgMBAAGj +ggEfMIIBGzAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVy +YXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUzgN+7+feyYe/3lb0yKNA9shvBYww +gcAGA1UdIwSBuDCBtYAUuDU3Mr7PT3n1e3Sy8hBauoDFahChgZGkgY4wgYsxCzAJ +BgNVBAYTAlVTMRIwEAYDVQQIEwlCZXJrc2hpcmUxEDAOBgNVBAcTB05ld2J1cnkx +FzAVBgNVBAoTDk15IENvbXBhbnkgTHRkMRAwDgYDVQQLEwdUZXN0aW5nMQ0wCwYD +VQQDEwR0ZXN0MRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3QuY29tggkA6+dk+3n3 +IhkwDQYJKoZIhvcNAQEEBQADggEBAHogk2NAc30zAS7AE1Kkp+FNgvT7snvQK1o/ +DjwoYXGrAU3+ibXNL5dZk1OdUYZI3bnkc14iCxINJTl2FkQGDEBFIWumseC/dhs2 +8x5BglfZWbdgQEMcHXn2SDJcTuIGiZZB0lQfSm/2eKU8AoUh4mXhim0kGZX4wDWr +vf898ftQLTAeZ6Z8UPnVd2Z3WhQPXM0hCZujklcZ3QGkGMX5cOQXQ42x5mHpUImD +T86kV2hYQHCucRxHZtIwVFDqOocyZDsYQv5aGQdk9/GxEAf9p9KnqAV5WyW6aXsa +PrE+5BcXAbrrVK6DAO1mYo3APoq0J1/pAc4gwzSpKMBvxztl/vk= +-----END CERTIFICATE----- diff --git a/system-settings/plugins/keyfile/tests/test-keyfile.c b/system-settings/plugins/keyfile/tests/test-keyfile.c index 7bf63ef5..afa9baa2 100644 --- a/system-settings/plugins/keyfile/tests/test-keyfile.c +++ b/system-settings/plugins/keyfile/tests/test-keyfile.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2010 Red Hat, Inc. + * Copyright (C) 2008 - 2011 Red Hat, Inc. */ #include @@ -27,8 +27,6 @@ #include #include -#include - #include #include #include @@ -39,6 +37,7 @@ #include #include #include +#include #include "nm-test-helpers.h" @@ -1448,7 +1447,6 @@ test_read_bt_dun_connection (void) NMSettingConnection *s_con; NMSettingBluetooth *s_bluetooth; NMSettingSerial *s_serial; - NMSettingPPP *s_ppp; NMSettingGsm *s_gsm; GError *error = NULL; const GByteArray *array; @@ -1595,14 +1593,6 @@ test_read_bt_dun_connection (void) TEST_BT_DUN_FILE, NM_SETTING_SERIAL_SETTING_NAME); - /* ===== PPP SETTING ===== */ - - s_ppp = NM_SETTING_PPP (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP)); - ASSERT (s_ppp != NULL, - "connection-verify-ppp", "failed to verify %s: missing %s setting", - TEST_BT_DUN_FILE, - NM_SETTING_PPP_SETTING_NAME); - g_object_unref (connection); } @@ -1691,13 +1681,6 @@ test_write_bt_dun_connection (void) NM_SETTING_GSM_NUMBER, "*99#", NULL); - /* Serial setting */ - nm_connection_add_setting (connection, nm_setting_serial_new ()); - - /* PPP setting */ - nm_connection_add_setting (connection, nm_setting_ppp_new ()); - - /* Write out the connection */ owner_uid = geteuid (); owner_grp = getegid (); @@ -1732,7 +1715,6 @@ test_read_gsm_connection (void) NMConnection *connection; NMSettingConnection *s_con; NMSettingSerial *s_serial; - NMSettingPPP *s_ppp; NMSettingGsm *s_gsm; NMSetting *s_bluetooth; GError *error = NULL; @@ -1874,14 +1856,6 @@ test_read_gsm_connection (void) TEST_GSM_FILE, NM_SETTING_SERIAL_SETTING_NAME); - /* ===== PPP SETTING ===== */ - - s_ppp = NM_SETTING_PPP (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP)); - ASSERT (s_ppp != NULL, - "connection-verify-ppp", "failed to verify %s: missing %s setting", - TEST_GSM_FILE, - NM_SETTING_PPP_SETTING_NAME); - g_object_unref (connection); } @@ -1953,13 +1927,6 @@ test_write_gsm_connection (void) NM_SETTING_GSM_NETWORK_TYPE, NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA, NULL); - /* Serial setting */ - nm_connection_add_setting (connection, nm_setting_serial_new ()); - - /* PPP setting */ - nm_connection_add_setting (connection, nm_setting_ppp_new ()); - - /* Write out the connection */ owner_uid = geteuid (); owner_grp = getegid (); @@ -1986,14 +1953,368 @@ test_write_gsm_connection (void) g_object_unref (connection); } +#define TEST_WIRED_TLS_OLD_FILE TEST_KEYFILES_DIR"/Test_Wired_TLS_Old" + +static void +test_read_wired_8021x_tls_old_connection (void) +{ + NMConnection *connection; + NMSetting *s_wired; + NMSetting8021x *s_8021x; + GError *error = NULL; + const char *tmp; + gboolean success; + + connection = connection_from_file (TEST_WIRED_TLS_OLD_FILE, &error); + if (connection == NULL) { + g_assert (error); + g_warning ("Failed to read %s: %s", TEST_WIRED_TLS_OLD_FILE, error->message); + g_assert (connection); + } + + success = nm_connection_verify (connection, &error); + if (!success) { + g_assert (error); + g_warning ("Failed to verify %s: %s", TEST_WIRED_TLS_OLD_FILE, error->message); + g_assert (success); + } + + /* ===== Wired Setting ===== */ + s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); + g_assert (s_wired != NULL); + + /* ===== 802.1x Setting ===== */ + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + g_assert (s_8021x != NULL); + + g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1); + tmp = nm_setting_802_1x_get_eap_method (s_8021x, 0); + g_assert (g_strcmp0 (tmp, "tls") == 0); + + tmp = nm_setting_802_1x_get_identity (s_8021x); + g_assert (g_strcmp0 (tmp, "Bill Smith") == 0); + + tmp = nm_setting_802_1x_get_private_key_password (s_8021x); + g_assert (g_strcmp0 (tmp, "12345testing") == 0); + + tmp = nm_setting_802_1x_get_ca_cert_path (s_8021x); + g_assert (g_strcmp0 (tmp, "/home/dcbw/Desktop/certinfra/CA/eaptest_ca_cert.pem") == 0); + + tmp = nm_setting_802_1x_get_client_cert_path (s_8021x); + g_assert (g_strcmp0 (tmp, "/home/dcbw/Desktop/certinfra/client.pem") == 0); + + tmp = nm_setting_802_1x_get_private_key_path (s_8021x); + g_assert (g_strcmp0 (tmp, "/home/dcbw/Desktop/certinfra/client.pem") == 0); + + g_object_unref (connection); +} + +#define TEST_WIRED_TLS_NEW_FILE TEST_KEYFILES_DIR"/Test_Wired_TLS_New" + +static void +test_read_wired_8021x_tls_new_connection (void) +{ + NMConnection *connection; + NMSetting *s_wired; + NMSetting8021x *s_8021x; + GError *error = NULL; + const char *tmp; + gboolean success; + + connection = connection_from_file (TEST_WIRED_TLS_NEW_FILE, &error); + if (connection == NULL) { + g_assert (error); + g_warning ("Failed to read %s: %s", TEST_WIRED_TLS_NEW_FILE, error->message); + g_assert (connection); + } + + success = nm_connection_verify (connection, &error); + if (!success) { + g_assert (error); + g_warning ("Failed to verify %s: %s", TEST_WIRED_TLS_NEW_FILE, error->message); + g_assert (success); + } + + /* ===== Wired Setting ===== */ + s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); + g_assert (s_wired != NULL); + + /* ===== 802.1x Setting ===== */ + s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + g_assert (s_8021x != NULL); + + g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1); + tmp = nm_setting_802_1x_get_eap_method (s_8021x, 0); + g_assert (g_strcmp0 (tmp, "tls") == 0); + + tmp = nm_setting_802_1x_get_identity (s_8021x); + g_assert (g_strcmp0 (tmp, "Bill Smith") == 0); + + tmp = nm_setting_802_1x_get_private_key_password (s_8021x); + g_assert (g_strcmp0 (tmp, "12345testing") == 0); + + tmp = nm_setting_802_1x_get_ca_cert_path (s_8021x); + g_assert (g_strcmp0 (tmp, "test-ca-cert.pem") == 0); + + tmp = nm_setting_802_1x_get_client_cert_path (s_8021x); + g_assert (g_strcmp0 (tmp, "test-key-and-cert.pem") == 0); + + tmp = nm_setting_802_1x_get_private_key_path (s_8021x); + g_assert (g_strcmp0 (tmp, "test-key-and-cert.pem") == 0); + + g_object_unref (connection); +} + +#define TEST_WIRED_TLS_CA_CERT TEST_KEYFILES_DIR"/test-ca-cert.pem" +#define TEST_WIRED_TLS_CLIENT_CERT TEST_KEYFILES_DIR"/test-key-and-cert.pem" +#define TEST_WIRED_TLS_PRIVKEY TEST_KEYFILES_DIR"/test-key-and-cert.pem" + +static NMConnection * +create_wired_tls_connection (NMSetting8021xCKScheme scheme) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIP4Config *s_ip4; + NMSetting *s_wired; + NMSetting8021x *s_8021x; + char *uuid; + gboolean success; + GError *error = NULL; + + connection = nm_connection_new (); + g_assert (connection != NULL); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + g_assert (s_con); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Wired Really Secure TLS", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NULL); + g_free (uuid); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + g_assert (s_ip4); + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + /* Wired setting */ + s_wired = nm_setting_wired_new (); + g_assert (s_wired); + nm_connection_add_setting (connection, s_wired); + + /* 802.1x setting */ + s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); + g_assert (s_8021x); + nm_connection_add_setting (connection, NM_SETTING (s_8021x)); + + nm_setting_802_1x_add_eap_method (s_8021x, "tls"); + g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL); + + success = nm_setting_802_1x_set_ca_cert (s_8021x, + TEST_WIRED_TLS_CA_CERT, + scheme, + NULL, + &error); + if (!success) { + g_assert (error); + g_warning ("Failed to set CA cert %s: %s", TEST_WIRED_TLS_CA_CERT, error->message); + g_assert (success); + } + + success = nm_setting_802_1x_set_client_cert (s_8021x, + TEST_WIRED_TLS_CLIENT_CERT, + scheme, + NULL, + &error); + if (!success) { + g_assert (error); + g_warning ("Failed to set client cert %s: %s", TEST_WIRED_TLS_CA_CERT, error->message); + g_assert (success); + } + + success = nm_setting_802_1x_set_private_key (s_8021x, + TEST_WIRED_TLS_PRIVKEY, + "test1", + scheme, + NULL, + &error); + if (!success) { + g_assert (error); + g_warning ("Failed to set private key %s: %s", TEST_WIRED_TLS_CA_CERT, error->message); + g_assert (success); + } + + return connection; +} + +static void +test_write_wired_8021x_tls_connection_path (void) +{ + NMConnection *connection; + char *tmp; + gboolean success; + NMConnection *reread; + char *testfile = NULL; + GError *error = NULL; + GKeyFile *keyfile; + + connection = create_wired_tls_connection (NM_SETTING_802_1X_CK_SCHEME_PATH); + g_assert (connection != NULL); + + /* Write out the connection */ + success = write_connection (connection, TEST_SCRATCH_DIR, geteuid (), getegid (), &testfile, &error); + if (!success) { + g_assert (error); + g_warning ("Failed to write keyfile: %s", error->message); + g_assert (success); + } + g_assert (testfile); + + /* Read the connection back in and compare it to the one we just wrote out */ + reread = connection_from_file (testfile, &error); + if (!reread) { + g_assert (error); + g_warning ("Failed to re-read test connection: %s", error->message); + g_assert (reread); + } + + success = nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT); + if (!reread) { + g_warning ("Written and re-read connection weren't the same"); + g_assert (success); + } + + /* Ensure the cert and key values are properly written out */ + keyfile = g_key_file_new (); + g_assert (keyfile); + success = g_key_file_load_from_file (keyfile, testfile, G_KEY_FILE_NONE, &error); + if (!success) { + g_assert (error); + g_warning ("Failed to re-read test file %s: %s", testfile, error->message); + g_assert (success); + } + + /* CA cert */ + tmp = g_key_file_get_string (keyfile, + NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CA_CERT, + NULL); + g_assert (g_strcmp0 (tmp, TEST_WIRED_TLS_CA_CERT) == 0); + g_free (tmp); + + /* Client cert */ + tmp = g_key_file_get_string (keyfile, + NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CLIENT_CERT, + NULL); + g_assert (g_strcmp0 (tmp, TEST_WIRED_TLS_CLIENT_CERT) == 0); + g_free (tmp); + + /* Private key */ + tmp = g_key_file_get_string (keyfile, + NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PRIVATE_KEY, + NULL); + g_assert (g_strcmp0 (tmp, TEST_WIRED_TLS_PRIVKEY) == 0); + g_free (tmp); + + g_key_file_free (keyfile); + unlink (testfile); + g_free (testfile); + + g_object_unref (reread); + g_object_unref (connection); +} + +static void +test_write_wired_8021x_tls_connection_blob (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSetting8021x *s_8021x; + gboolean success; + NMConnection *reread; + char *testfile = NULL; + char *new_ca_cert; + char *new_client_cert; + char *new_priv_key; + const char *uuid; + GError *error = NULL; + + connection = create_wired_tls_connection (NM_SETTING_802_1X_CK_SCHEME_BLOB); + g_assert (connection != NULL); + + /* Write out the connection */ + success = write_connection (connection, TEST_SCRATCH_DIR, geteuid (), getegid (), &testfile, &error); + if (!success) { + g_assert (error); + g_warning ("Failed to write keyfile: %s", error->message); + g_assert (success); + } + g_assert (testfile); + + /* Check that the new certs got written out */ + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con); + uuid = nm_setting_connection_get_uuid (s_con); + g_assert (uuid); + + new_ca_cert = g_strdup_printf ("%s/%s-ca-cert.der", TEST_SCRATCH_DIR, uuid); + g_assert (new_ca_cert); + g_assert (g_file_test (new_ca_cert, G_FILE_TEST_EXISTS)); + + new_client_cert = g_strdup_printf ("%s/%s-client-cert.der", TEST_SCRATCH_DIR, uuid); + g_assert (new_client_cert); + g_assert (g_file_test (new_client_cert, G_FILE_TEST_EXISTS)); + + new_priv_key = g_strdup_printf ("%s/%s-private-key.pem", TEST_SCRATCH_DIR, uuid); + g_assert (new_priv_key); + g_assert (g_file_test (new_priv_key, G_FILE_TEST_EXISTS)); + + /* Read the connection back in and compare it to the one we just wrote out */ + reread = connection_from_file (testfile, &error); + if (!reread) { + g_assert (error); + g_warning ("Failed to re-read test connection: %s", error->message); + g_assert (reread); + } + + /* Ensure the re-read connection's certificates use the path scheme */ + s_8021x = (NMSetting8021x *) nm_connection_get_setting (reread, NM_TYPE_SETTING_802_1X); + g_assert (s_8021x); + g_assert (nm_setting_802_1x_get_ca_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH); + g_assert (nm_setting_802_1x_get_client_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH); + g_assert (nm_setting_802_1x_get_private_key_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH); + + unlink (testfile); + g_free (testfile); + + /* Clean up written certs */ + unlink (new_ca_cert); + g_free (new_ca_cert); + + unlink (new_client_cert); + g_free (new_client_cert); + + unlink (new_priv_key); + g_free (new_priv_key); + + g_object_unref (reread); + g_object_unref (connection); +} + int main (int argc, char **argv) { GError *error = NULL; - DBusGConnection *bus; char *base; g_type_init (); - bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); if (!nm_utils_init (&error)) FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); @@ -2019,10 +2340,14 @@ int main (int argc, char **argv) test_read_gsm_connection (); test_write_gsm_connection (); + test_read_wired_8021x_tls_old_connection (); + test_read_wired_8021x_tls_new_connection (); + test_write_wired_8021x_tls_connection_path (); + test_write_wired_8021x_tls_connection_blob (); + base = g_path_get_basename (argv[0]); fprintf (stdout, "%s: SUCCESS\n", base); g_free (base); - dbus_g_connection_unref (bus); return 0; } diff --git a/system-settings/plugins/keyfile/utils.c b/system-settings/plugins/keyfile/utils.c new file mode 100644 index 00000000..de64f791 --- /dev/null +++ b/system-settings/plugins/keyfile/utils.c @@ -0,0 +1,97 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager system settings service + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include +#include +#include "utils.h" + + +static const char temp_letters[] = +"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + +/* + * Check '.[a-zA-Z0-9]{6}' file suffix used for temporary files by g_file_set_contents() (mkstemp()). + */ +static gboolean +check_mkstemp_suffix (const char *path) +{ + const char *ptr; + + g_return_val_if_fail (path != NULL, FALSE); + + /* Matches *.[a-zA-Z0-9]{6} suffix of mkstemp()'s temporary files */ + ptr = strrchr (path, '.'); + if (ptr && (strspn (ptr + 1, temp_letters) == 6) && (! ptr[7])) + return TRUE; + return FALSE; +} + +static gboolean +check_prefix (const char *base, const char *tag) +{ + int len, tag_len; + + g_return_val_if_fail (base != NULL, TRUE); + g_return_val_if_fail (tag != NULL, TRUE); + + len = strlen (base); + tag_len = strlen (tag); + if ((len > tag_len) && !strncasecmp (base, tag, tag_len)) + return TRUE; + return FALSE; +} + +static gboolean +check_suffix (const char *base, const char *tag) +{ + int len, tag_len; + + g_return_val_if_fail (base != NULL, TRUE); + g_return_val_if_fail (tag != NULL, TRUE); + + len = strlen (base); + tag_len = strlen (tag); + if ((len > tag_len) && !strcasecmp (base + len - tag_len, tag)) + return TRUE; + return FALSE; +} + +gboolean +utils_should_ignore_file (const char *filename) +{ + char *base; + gboolean ignore = FALSE; + + g_return_val_if_fail (filename != NULL, TRUE); + + base = g_path_get_basename (filename); + g_return_val_if_fail (base != NULL, TRUE); + + /* Ignore files with certain patterns */ + if ( (check_prefix (base, ".") && check_suffix (base, SWP_TAG)) /* vim temporary files: .filename.swp */ + || (check_prefix (base, ".") && check_suffix (base, SWPX_TAG)) /* vim temporary files: .filename.swpx */ + || check_mkstemp_suffix (base)) /* temporary files created by mkstemp() */ + ignore = TRUE; + + g_free (base); + return ignore; +} + diff --git a/system-settings/plugins/keyfile/utils.h b/system-settings/plugins/keyfile/utils.h new file mode 100644 index 00000000..3c1a6104 --- /dev/null +++ b/system-settings/plugins/keyfile/utils.h @@ -0,0 +1,30 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager system settings service + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef _UTILS_H_ +#define _UTILS_H_ + +#include +#include "common.h" + +gboolean utils_should_ignore_file (const char *filename); + +#endif /* _UTILS_H_ */ + diff --git a/system-settings/plugins/keyfile/writer.c b/system-settings/plugins/keyfile/writer.c index ffac35cf..62ccdfa9 100644 --- a/system-settings/plugins/keyfile/writer.c +++ b/system-settings/plugins/keyfile/writer.c @@ -16,12 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2008 - 2010 Red Hat, Inc. + * Copyright (C) 2008 - 2011 Red Hat, Inc. */ +#include +#include #include #include +#include #include + #include #include #include @@ -32,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -67,6 +72,8 @@ write_array_of_uint (GKeyFile *file, static void ip4_dns_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -156,6 +163,8 @@ write_ip4_values (GKeyFile *file, static void ip4_addr_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -172,6 +181,8 @@ ip4_addr_writer (GKeyFile *file, static void ip4_route_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -188,6 +199,8 @@ ip4_route_writer (GKeyFile *file, static void ip6_dns_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -296,6 +309,8 @@ ip6_array_to_addr_prefix (GValueArray *values) static void ip6_addr_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -334,6 +349,8 @@ ip6_addr_writer (GKeyFile *file, static void ip6_route_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -389,6 +406,8 @@ ip6_route_writer (GKeyFile *file, static void mac_address_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -456,6 +475,8 @@ write_hash_of_string (GKeyFile *file, static void ssid_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, NMSetting *setting, const char *key, const GValue *value) @@ -497,10 +518,236 @@ ssid_writer (GKeyFile *file, } } +typedef struct ObjectType { + const char *key; + const char *suffix; + const char *privkey_pw_prop; + NMSetting8021xCKScheme (*scheme_func) (NMSetting8021x *setting); + NMSetting8021xCKFormat (*format_func) (NMSetting8021x *setting); + const char * (*path_func) (NMSetting8021x *setting); + const GByteArray * (*blob_func) (NMSetting8021x *setting); +} ObjectType; + +static const ObjectType objtypes[10] = { + { NM_SETTING_802_1X_CA_CERT, + "ca-cert", + NULL, + nm_setting_802_1x_get_ca_cert_scheme, + NULL, + nm_setting_802_1x_get_ca_cert_path, + nm_setting_802_1x_get_ca_cert_blob }, + + { NM_SETTING_802_1X_PHASE2_CA_CERT, + "inner-ca-cert", + NULL, + nm_setting_802_1x_get_phase2_ca_cert_scheme, + NULL, + nm_setting_802_1x_get_phase2_ca_cert_path, + nm_setting_802_1x_get_phase2_ca_cert_blob }, + + { NM_SETTING_802_1X_CLIENT_CERT, + "client-cert", + NULL, + nm_setting_802_1x_get_client_cert_scheme, + NULL, + nm_setting_802_1x_get_client_cert_path, + nm_setting_802_1x_get_client_cert_blob }, + + { NM_SETTING_802_1X_PHASE2_CLIENT_CERT, + "inner-client-cert", + NULL, + nm_setting_802_1x_get_phase2_client_cert_scheme, + NULL, + nm_setting_802_1x_get_phase2_client_cert_path, + nm_setting_802_1x_get_phase2_client_cert_blob }, + + { NM_SETTING_802_1X_PRIVATE_KEY, + "private-key", + NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, + nm_setting_802_1x_get_private_key_scheme, + nm_setting_802_1x_get_private_key_format, + nm_setting_802_1x_get_private_key_path, + nm_setting_802_1x_get_private_key_blob }, + + { NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, + "inner-private-key", + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, + nm_setting_802_1x_get_phase2_private_key_scheme, + nm_setting_802_1x_get_phase2_private_key_format, + nm_setting_802_1x_get_phase2_private_key_path, + nm_setting_802_1x_get_phase2_private_key_blob }, + + { NULL }, +}; + +static gboolean +write_cert_key_file (const char *path, + const GByteArray *data, + GError **error) +{ + char *tmppath; + int fd = -1, written; + gboolean success = FALSE; + + tmppath = g_malloc0 (strlen (path) + 10); + g_assert (tmppath); + memcpy (tmppath, path, strlen (path)); + strcat (tmppath, ".XXXXXX"); + + errno = 0; + fd = mkstemp (tmppath); + if (fd < 0) { + g_set_error (error, KEYFILE_PLUGIN_ERROR, 0, + "Could not create temporary file for '%s': %d", + path, errno); + goto out; + } + + /* Only readable by root */ + errno = 0; + if (fchmod (fd, S_IRUSR | S_IWUSR) != 0) { + close (fd); + unlink (tmppath); + g_set_error (error, KEYFILE_PLUGIN_ERROR, 0, + "Could not set permissions for temporary file '%s': %d", + path, errno); + goto out; + } + + errno = 0; + written = write (fd, data->data, data->len); + if (written != data->len) { + close (fd); + unlink (tmppath); + g_set_error (error, KEYFILE_PLUGIN_ERROR, 0, + "Could not write temporary file for '%s': %d", + path, errno); + goto out; + } + close (fd); + + /* Try to rename */ + errno = 0; + if (rename (tmppath, path) == 0) + success = TRUE; + else { + unlink (tmppath); + g_set_error (error, KEYFILE_PLUGIN_ERROR, 0, + "Could not rename temporary file to '%s': %d", + path, errno); + } + +out: + g_free (tmppath); + return success; +} + +static void +cert_writer (GKeyFile *file, + const char *keyfile_dir, + const char *uuid, + NMSetting *setting, + const char *key, + const GValue *value) +{ + const char *setting_name = nm_setting_get_name (setting); + NMSetting8021xCKScheme scheme; + NMSetting8021xCKFormat format; + const char *path = NULL, *ext = "der"; + const ObjectType *objtype = NULL; + int i; + + for (i = 0; i < G_N_ELEMENTS (objtypes) && objtypes[i].key; i++) { + if (g_strcmp0 (objtypes[i].key, key) == 0) { + objtype = &objtypes[i]; + break; + } + } + g_return_if_fail (objtype != NULL); + + scheme = objtypes->scheme_func (NM_SETTING_802_1X (setting)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) { + path = objtype->path_func (NM_SETTING_802_1X (setting)); + g_assert (path); + g_key_file_set_string (file, setting_name, key, path); + } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) { + const GByteArray *blob; + GByteArray *enc_key = NULL; + gboolean success; + GError *error = NULL; + char *new_path; + + /* Write the blob out to a file on-disk. If this item is a private + * key, it'll be the decrypted private key data, which we need to + * re-encrypt and write out to disk, but not if it's PKCS#12, since + * that format is already encrypted as a blob. Whee. + */ + blob = objtype->blob_func (NM_SETTING_802_1X (setting)); + + if (objtype->format_func) { /* check for a private key */ + char *password = NULL, *generated_pw = NULL; + + format = objtype->format_func (NM_SETTING_802_1X (setting)); + if (format == NM_SETTING_802_1X_CK_FORMAT_PKCS12) { + ext = "p12"; + } else { + /* Encrypt the unencrypted private key */ + g_object_get (setting, objtype->privkey_pw_prop, &password, NULL); + blob = enc_key = nm_utils_rsa_key_encrypt (blob, password, &generated_pw, &error); + if (!enc_key) { + g_warning ("Failed to re-encrypt private key: %s", error->message); + g_error_free (error); + g_free (password); + return; + } + + if (generated_pw) { + /* Set the string in both the keyfile and the setting in + * case the private key password will be set either before + * or after this function is called. + */ + g_key_file_set_string (file, setting_name, objtype->privkey_pw_prop, generated_pw); + g_object_set (setting, objtype->privkey_pw_prop, generated_pw, NULL); + } + g_free (password); + g_free (generated_pw); + + ext = "pem"; + } + } + g_assert (blob || enc_key); + + /* Write the raw data out to the standard file so that we can use paths + * from now on instead of pushing around the certificate data itself. + */ + new_path = g_strdup_printf ("%s/%s-%s.%s", keyfile_dir, uuid, objtype->suffix, ext); + g_assert (new_path); + + success = write_cert_key_file (new_path, blob, &error); + if (success) { + /* Write the path value to the keyfile */ + g_key_file_set_string (file, setting_name, key, new_path); + } else { + g_warning ("Failed to write certificate/key %s: %s", new_path, error->message); + g_error_free (error); + } + + g_free (new_path); + if (enc_key) + g_byte_array_free (enc_key, TRUE); + } else + g_assert_not_reached (); +} + typedef struct { const char *setting_name; const char *key; - void (*writer) (GKeyFile *keyfile, NMSetting *setting, const char *key, const GValue *value); + void (*writer) (GKeyFile *keyfile, + const char *keyfile_dir, + const char *uuid, + NMSetting *setting, + const char *key, + const GValue *value); } KeyWriter; /* A table of keys that require further parsing/conversion because they are @@ -549,9 +796,33 @@ static KeyWriter key_writers[] = { { NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_SSID, ssid_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CA_CERT, + cert_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_CLIENT_CERT, + cert_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PRIVATE_KEY, + cert_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_CA_CERT, + cert_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_CLIENT_CERT, + cert_writer }, + { NM_SETTING_802_1X_SETTING_NAME, + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, + cert_writer }, { NULL, NULL, NULL } }; +typedef struct { + GKeyFile *keyfile; + const char *keyfile_dir; + const char *uuid; +} WriteInfo; + static void write_setting_value (NMSetting *setting, const char *key, @@ -559,7 +830,7 @@ write_setting_value (NMSetting *setting, GParamFlags flag, gpointer user_data) { - GKeyFile *file = (GKeyFile *) user_data; + WriteInfo *info = user_data; const char *setting_name; GType type = G_VALUE_TYPE (value); KeyWriter *writer = &key_writers[0]; @@ -580,7 +851,7 @@ write_setting_value (NMSetting *setting, pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (setting), key); if (pspec) { if (g_param_value_defaults (pspec, (GValue *) value)) { - g_key_file_remove_key (file, setting_name, key, NULL); + g_key_file_remove_key (info->keyfile, setting_name, key, NULL); return; } } @@ -588,7 +859,7 @@ write_setting_value (NMSetting *setting, /* Look through the list of handlers for non-standard format key values */ while (writer->setting_name) { if (!strcmp (writer->setting_name, setting_name) && !strcmp (writer->key, key)) { - (*writer->writer) (file, setting, key, value); + (*writer->writer) (info->keyfile, info->keyfile_dir, info->uuid, setting, key, value); return; } writer++; @@ -599,21 +870,21 @@ write_setting_value (NMSetting *setting, str = g_value_get_string (value); if (str) - g_key_file_set_string (file, setting_name, key, str); + g_key_file_set_string (info->keyfile, setting_name, key, str); } else if (type == G_TYPE_UINT) - g_key_file_set_integer (file, setting_name, key, (int) g_value_get_uint (value)); + g_key_file_set_integer (info->keyfile, setting_name, key, (int) g_value_get_uint (value)); else if (type == G_TYPE_INT) - g_key_file_set_integer (file, setting_name, key, g_value_get_int (value)); + g_key_file_set_integer (info->keyfile, setting_name, key, g_value_get_int (value)); else if (type == G_TYPE_UINT64) { char *numstr; numstr = g_strdup_printf ("%" G_GUINT64_FORMAT, g_value_get_uint64 (value)); - g_key_file_set_value (file, setting_name, key, numstr); + g_key_file_set_value (info->keyfile, setting_name, key, numstr); g_free (numstr); } else if (type == G_TYPE_BOOLEAN) { - g_key_file_set_boolean (file, setting_name, key, g_value_get_boolean (value)); + g_key_file_set_boolean (info->keyfile, setting_name, key, g_value_get_boolean (value)); } else if (type == G_TYPE_CHAR) { - g_key_file_set_integer (file, setting_name, key, (int) g_value_get_char (value)); + g_key_file_set_integer (info->keyfile, setting_name, key, (int) g_value_get_char (value)); } else if (type == DBUS_TYPE_G_UCHAR_ARRAY) { GByteArray *array; @@ -626,7 +897,7 @@ write_setting_value (NMSetting *setting, for (i = 0; i < array->len; i++) tmp_array[i] = (int) array->data[i]; - g_key_file_set_integer_list (file, setting_name, key, tmp_array, array->len); + g_key_file_set_integer_list (info->keyfile, setting_name, key, tmp_array, array->len); g_free (tmp_array); } } else if (type == DBUS_TYPE_G_LIST_OF_STRING) { @@ -642,13 +913,13 @@ write_setting_value (NMSetting *setting, for (iter = list; iter; iter = iter->next) array[i++] = iter->data; - g_key_file_set_string_list (file, setting_name, key, (const gchar **const) array, i); + g_key_file_set_string_list (info->keyfile, setting_name, key, (const gchar **const) array, i); g_free (array); } } else if (type == DBUS_TYPE_G_MAP_OF_STRING) { - write_hash_of_string (file, setting, key, value); + write_hash_of_string (info->keyfile, setting, key, value); } else if (type == DBUS_TYPE_G_UINT_ARRAY) { - if (!write_array_of_uint (file, setting, key, value)) { + if (!write_array_of_uint (info->keyfile, setting, key, value)) { g_warning ("Unhandled setting property type (write) '%s/%s' : '%s'", setting_name, key, g_type_name (type)); } @@ -693,6 +964,7 @@ write_connection (NMConnection *connection, gboolean success = FALSE; char *filename, *path; int err; + WriteInfo info; if (out_path) g_return_val_if_fail (*out_path == NULL, FALSE); @@ -701,8 +973,10 @@ write_connection (NMConnection *connection, if (!s_con) return success; - key_file = g_key_file_new (); - nm_connection_for_each_setting_value (connection, write_setting_value, key_file); + info.keyfile = key_file = g_key_file_new (); + info.keyfile_dir = keyfile_dir; + info.uuid = nm_setting_connection_get_uuid (s_con); + nm_connection_for_each_setting_value (connection, write_setting_value, &info); data = g_key_file_to_data (key_file, &len, error); if (!data) goto out; diff --git a/test/Makefile.am b/test/Makefile.am index 8e235e43..7bdaf0db 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -10,9 +10,9 @@ AM_CPPFLAGS = \ -DNM_RUN_DIR=\"$(rundir)\" \ -DDATADIR=\"$(datadir)\" -bin_PROGRAMS = nm-tool +bin_PROGRAMS = nm-tool nm-online -noinst_PROGRAMS = nm-online libnm-glib-test +noinst_PROGRAMS = libnm-glib-test nm_tool_SOURCES = nm-tool.c nm_tool_LDADD = \ diff --git a/test/Makefile.in b/test/Makefile.in index 913753ca..64a31543 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -34,8 +34,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = nm-tool$(EXEEXT) -noinst_PROGRAMS = nm-online$(EXEEXT) libnm-glib-test$(EXEEXT) +bin_PROGRAMS = nm-tool$(EXEEXT) nm-online$(EXEEXT) +noinst_PROGRAMS = libnm-glib-test$(EXEEXT) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -202,6 +202,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -216,6 +220,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ diff --git a/tools/Makefile.in b/tools/Makefile.in index f25b26d4..f51c7422 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -149,6 +149,10 @@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ +NM_MICRO_VERSION = @NM_MICRO_VERSION@ +NM_MINOR_VERSION = @NM_MINOR_VERSION@ +NM_VERSION = @NM_VERSION@ NSS_CFLAGS = @NSS_CFLAGS@ NSS_LIBS = @NSS_LIBS@ OBJDUMP = @OBJDUMP@ @@ -163,6 +167,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -- cgit 1.3.0-6-gf8a5