summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* core: rename NMDBusManager to NMBusManagerdanw/pre-gdbus-bgo622927Dan Winship2015-07-2117-327/+319
| | | | | | | | | | | | | | Our gdbus generated types use the same names as their corresponding "real" types, but with "NM" changed to "NMDBus". Unfortunately, that means that introspection/nmdbus-manager.c (the generated type for src/nm-manager.c) uses the same type name as the entirely unrelated src/nm-dbus-manager.c. Fix this by removing the "d" from src/nm-dbus-manager.c. (We could rename the generated type instead, but then it becomes inconsistent with all the other generated types, and we're already using it as "NMDBusManager" in libnm/nm-manager.c.)
* settings: fix/reorganize NMSettingConnection secrets codeDan Winship2015-07-211-36/+71
| | | | | | | | | | | | | | | | | NMSettingConnection's for_each_secret() function works in a slightly-too-GHashTable-specific way. Reorganize the code now to make the change to GVariants easier later. Also, fix a few bugs: - In the (unlikely) case of a non-secret being stored in vpn.secrets, we were treating it as though it was a secret with flags NONE. - The code was comparing against NONE when it meant !AGENT_OWNED in a few places. (With the current set of NMSettingSecretFlags values, this worked, but in the future it might not.) - In some cases we never called for_each_secret() with the @remove_non_secrets flag, meaning we might have ended up passing non-secrets to other code.
* settings: rework NMSecretAgent disconnection detectionDan Winship2015-07-213-41/+69
| | | | | | Have NMSecretAgent emit "disconnected" when it detects that it has been disconnected, rather than having both the agent and the agent manager monitor it separately.
* bluetooth, vpn-manager: use GDBusProxies to monitor servicesDan Winship2015-07-213-106/+81
| | | | | | Create a GDBusProxy for the service to be monitored and use that to tell whether it is running, rather than using NMDBusManager and the global NameOwnerChanged signal.
* core: port NMDhcp4Config/NMDhcp6Config to GVariantDan Winship2015-07-216-182/+94
| | | | | | | | | | | | | | In the gdbus port, the :options properties will be GVariant-valued (and thus immutable), so having APIs that let you repeatedly modify them would make things complicated. Since we actually only ever set all the options at once, just change the APIs to do that, rather than setting the options one-by-one. Since nm-dispatcher already works in terms of GVariant, it makes things simpler there if NMDhcp[46]Config can return its options as a GVariant. And since we'll need it to be a GVariant internally later anyway, just port everything to GVariant now, and convert it to a GHashTable for dbus-glib only in get_property().
* core: move D-Bus export/unexport into NMExportedObjectDan Winship2015-07-2141-352/+307
| | | | | | | | | | | Move D-Bus export/unexport handling into NMExportedObject and remove type-specific export/get_path methods (export paths are now specified at the class level, and NMExportedObject handles the counters for all exported types automatically). Since all exportable objects now use the same get_path() method, we can also add some helper methods to simplify get_property() implementations for object-path and object-path-array properties.
* core: add an NMExportedObject base classDan Winship2015-07-2156-515/+399
| | | | | | | | | | | | | | | Add NMExportedObject, make it the base class of all D-Bus-exported types, and move the nm-properties-changed-signal logic into it. (Also, make NMSettings use the same properties-changed code as everything else, which it was not previously doing, presumably for historical reasons). (This is mostly just shuffling code around at this point, but NMExportedObject will be more important in the gdbus port, since gdbus-codegen doesn't do a very good job of supporting objects that export multiple interfaces [as each NMDevice subclass does, for example], so we will need more glue/helper code in NMExportedObject then.)
* core: add missing g_dbus_error_strip_remote_error() callsDan Winship2015-07-219-10/+34
|
* libnm-glib: drop private bus supportDan Winship2015-07-217-210/+106
| | | | | Anything that actually *needs* private bus support will be built against libnm these days anyway.
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-21370-562/+374
| | | | | | | | | | | | | | | | Rather than randomly including one or more of <glib.h>, <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to nm-glib.h, include <gio/gio.h> from there, and then change all .c files in NM to include "nm-glib.h" rather than including the glib headers directly. (Public headers files still have to include the real glib headers, since nm-glib.h isn't installed...) Also, remove glib includes from header files that are already including a base object header file (which must itself already include the glib headers).
* include: add nm-dbus-compat.hDan Winship2015-07-2114-40/+107
| | | | | | | | | Add a file containing the defines like DBUS_INTERFACE_DBUS from dbus-shared.h, and use it from the gdbus-using files. Also, convert a bunch of other places that were previously hardcoding the string values to use the defines instead, and fix the ifcfg-rh plugin to properly namespace its own D-Bus-related defines.
* ppp-manager: trivial: move class_init functionDan Winship2015-07-211-62/+62
|
* introspection: trivial fixesDan Winship2015-07-214-0/+11
| | | | | | Add some missing files to libnmdbus.la. Add missing name-fixing annotations to the XML to make all generated NMDBus types match the names of their corresponding NM types.
* libnm: fix nm_access_point_get_last_seen() code doc after 1e85c358Dan Williams2015-07-171-1/+1
| | | | Fixes: 1e85c358
* libnm-core: fix GOI annotations after 019943bbDan Williams2015-07-171-3/+3
| | | | Fixes: 019943bb
* cli: fix verifying flag-based properties (rh #1244048)Jiří Klimeš2015-07-171-3/+63
| | | | | | | | | | | | | | Some of the properties changed from GParamSpecUInt to GParamSpecFlags, namely NM_SETTING_VLAN_FLAGS NM_SETTING_DCB_APP_FCOE_FLAGS NM_SETTING_DCB_APP_ISCSI_FLAGS NM_SETTING_DCB_APP_FIP_FLAGS NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS NM_SETTING_DCB_PRIORITY_GROUP_FLAGS (commit fcfb4b40badbb5cd944cee0c9819cb2649d0bb58) https://bugzilla.redhat.com/show_bug.cgi?id=1244048
* docs: fix a copy/paste error in description of VLAN flagsJiří Klimeš2015-07-171-1/+1
|
* merge: vpn: delay quitting when a new secrets request comes in (bgo #752237)Dan Williams2015-07-162-110/+76
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=752237
| * libnm/libnm-glib: don't quit in the middle of asking for secrets (bgo #752237)Dan Williams2015-07-162-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | If the VPN plugin terminated and the user started it again, then the quit timer will still be running and it sometimes happens that the VPN plugin will quit while the UI is asking the user for secrets. That's not very nice, so don't do that. Reproducer: while connect to the VPN, suspend your laptop. Then resume it, and immediately re-start the VPN connection. Watch the secrets dialog disappear within a very short time. https://bugzilla.gnome.org/show_bug.cgi?id=752237
| * libnm/libnm-glib: clean up VPN plugin timeoutsDan Williams2015-07-162-112/+50
|/ | | | Use nm_clear_g_source().
* connectivity: log warning when using https:// URIThomas Haller2015-07-161-1/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=747866
* connectivity: explicitly check for 511/Network Authentication Required ↵Dan Williams2015-07-161-15/+21
| | | | | | | | | (RFC6585) (bgo #670394) If the response affirmatively indicates you're behind a portal, we might as well use that information. https://bugzilla.gnome.org/show_bug.cgi?id=670394
* config/rpm: use plain HTTP URI for connectivity checkingThomas Haller2015-07-161-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=747866
* libnm: handle illegal characters in nm_utils_ssid_to_utf8() (rh #1243078)David Shea2015-07-162-0/+30
| | | | | | | | | | | | g_convert_with_fallback() will fail if the SSID contains characters that are not legal in the source encoding, which, if $LANG is not set, will be ASCII. If this happens, replace all non-ASCII and non-printable characters with '?'. It is possible that nm_utils_ssid_to_utf8() will now return an empty string (e.g., the source string is actually big-endian UTF-16 and g_strcanon() stops on the first byte), but it will not return NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1243078
* cli: fix a crash adding a slave connection with 'nmcli -a con add'Jiří Klimeš2015-07-151-2/+4
| | | | | | | | | | | | | | Valid types: [generic, 802-3-ethernet (ethernet), pppoe, 802-11-wireless (wifi), wimax, gsm, cdma, infiniband, adsl, bluetooth, vpn, 802-11-olpc-mesh (olpc-mesh), vlan, bond, team, bridge, bond-slave, team-slave, bridge-slave] Connection type: team-slave Interface name [*]: eth5 Master: nm-team Program received signal SIGSEGV, Segmentation fault. 0x000000000041ae6d in normalized_master_for_slave (connections=connections@entry=0x7fffec0019a0, master=<optimized out>, master@entry=0x73b470 "nm-team", type=type@entry=0x72f7c0 "team", out_type=out_type@entry=0x0) at connections.c:3218 3218 *out_type = con_type; Fixes: aa12bb353bca34be1bea0625c8e6e7715f24deb3
* cli: fix formating of "nmcli con add help" outputJiří Klimeš2015-07-151-2/+2
|
* cli: add 'slave-type' parameter for "nmcli con add" to bash completionJiří Klimeš2015-07-151-3/+9
| | | | Fixes: 1375d9c13ad6062f2c84089242f0dcfac1bd8e07
* settings: call dispatcher when setting hostname with systemdJiří Klimeš2015-07-151-0/+2
| | | | | | | | | Now that we set hostname with systemd, call dispatcher in nm-settings.c. gethostname() in nm-policy.c already sees the new hostname. Fixes: 6dc35e66d45e490482ac2909385099d77c26ed93 Fixes: 6c3d71c431ef63005f9005e68ff49b21b153ee9f Fixes:Beaker:NetworkManager_Test44_dispatcher_hostname
* build: fix comment for NM_MORE_LOGGINGLubomir Rintel2015-07-151-1/+1
| | | | Reported-by: Michael Biebl <biebl@debian.org>
* contrib/rpm: WEXT depends on enabled wifiDan Horák2015-07-141-5/+5
|
* logging: merge branch 'th/logging-sd-journal-bgo752136'Thomas Haller2015-07-1412-80/+334
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=752136
| * logging: refactor level conversion from switch() to @level_desc lookup-arrayThomas Haller2015-07-141-59/+29
| |
| * logging: add compile time default for logging.backend configurationThomas Haller2015-07-143-6/+28
| |
| * logging: add "journal-syslog-style" logging backend to log the old formatThomas Haller2015-07-142-8/+22
| | | | | | | | This mode logs the same message line as we do for "syslog".
| * logging: make use of journal configurableThomas Haller2015-07-147-6/+40
| |
| * logging: add native systemd-journald support to nm-loggingThomas Haller2015-07-142-16/+170
| |
| * build: detect systemd-journald supportThomas Haller2015-07-141-0/+25
| |
| * logging: factor our construction of logging message in _nm_log_impl()Thomas Haller2015-07-141-9/+17
| |
| * logging: refactor @syslog_opened variable to @log_backendThomas Haller2015-07-141-5/+12
| |
| * logging: allow calling nm_logging_syslog_openlog() only onceThomas Haller2015-07-141-8/+8
| |
| * logging: remove nm_logging_syslog_closelog()Thomas Haller2015-07-144-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove nm_logging_syslog_closelog(). The reasons are: - closelog() is optional according to the manual. - we called nm_logging_syslog_closelog() at the end of the main() function. But we have destructors running afterwards, so we were closing the log before logging the last line. Apparently that had no bad consequences either, so why was closelog() even useful? Also, it's hard to determine when we log the last line and only closelog() afterwards. - closelog() does not revert what openlog() did, this is ugly.
| * config: move debug command line option to NMConfigThomas Haller2015-07-143-4/+13
| | | | | | | | | | | | | | | | | | | | Whether NM runs in debug mode is also interesting to other components outside of "main.c". Expose global_opt.debug via a new nm_config_get_is_debug() function. Actually, we should move parsing of all command line options to NMConfig, as NMConfig is the central instance to provide such information.
| * config: add nm_config_data_get_value_cached() functionThomas Haller2015-07-142-0/+22
|/ | | | | | | nm_config_data_get_value() returns an allocated string. This is inconvenient for the caller. Add a utility function nm_config_data_get_value_cached() that caches the returned value. Of course, use with care as the returned string will be invalidated by each call to nm_config_data_get_value_cached().
* route-manager: merge branch 'th/route-full-sync'Thomas Haller2015-07-1419-165/+362
|\ | | | | | | | | | | | | | | Fix route manager not to delete externally added routes but only routes that were previously added by route manager. Also, add a test case and refactor the _exists() functions to have them more useful.
| * route-manager/test: add test for full-syncThomas Haller2015-07-141-0/+89
| |
| * test: add nmtst_platform_ip4_route() utilsThomas Haller2015-07-141-0/+32
| |
| * platform: replace addr/route exists() functions by get()Thomas Haller2015-07-148-98/+96
| | | | | | | | | | Rename exists() functions to get() and return the cached platform object.
| * route-manager: align trace logging statementThomas Haller2015-07-141-6/+6
| |
| * routes: fix race syncing routes by not doing full-syncThomas Haller2015-07-141-6/+20
| | | | | | | | | | | | | | | | | | | | In most cases, when syncing routes, we should only remove routes that were configured by us previously. Otherwise, there is a race that we can remove routes added externally. Now, when applying IP configuration for a device, only do a full-sync at the first time when we activate the device. Later on, only remove routes that were added by us.
| * routes/trival: add argument @routes_full_sync to IP config commitThomas Haller2015-07-147-10/+16
| | | | | | | | The argument is still unused, so no behavioral change yet.