summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* platform: limit the maximum size of sysctl cachebg/sysctl-lru-cacheBeniamino Galvani2019-02-051-15/+46
| | | | | | | | | | When the logging level is DEBUG or TRACE, we keep all the sysctl values we read in a cache to log how they change. Currently there is no limit on the size of this cache and it can take a large amount of memory. Implement a LRU cache where the oldest entries are deleted to make space for new ones.
* man: explain purpose of connectivity checking in `man NetworkManager.conf`Thomas Haller2019-02-051-0/+9
|
* clients/tests: fix client testsThomas Haller2019-02-051-3/+3
| | | | Fixes: d081aa1d845440b77208d79fad141c395fa91b0d
* merge: branch 'lr/sae'Lubomir Rintel2019-02-0525-2392/+2579
|\ | | | | | | | | | | | | | | This adds support for SAE authentication as used for 802.11s Meshing, but also WPA3-Personal. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/9 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/65
| * cli: verify connections before sending them over to daemonlr/saeLubomir Rintel2019-02-051-0/+23
| | | | | | | | | | This way we generate the error messages on the client side and therefore can localize them.
| * clients/cli: if the AP supports SAE, claim WPA3 supportLubomir Rintel2019-02-053-267/+271
| | | | | | | | | | RSN with SAE is what's called WPA3-Personal. Also, if there's neither PSK nor 802.1x, it's not WPA2.
| * clients/test: vary RSN capabilities across APsLubomir Rintel2019-02-056-2310/+2333
| | | | | | | | | | This allows us to test if we distinguish WPA1, WPA2 and WPA3 in the client.
| * clients/cli: don't translate abbreviationsLubomir Rintel2019-02-051-8/+4
| |
| * client/cli: send a PSK when using SAELubomir Rintel2019-02-051-2/+4
| |
| * client/cli: add support for SAE key management flagLubomir Rintel2019-02-051-1/+3
| |
| * client/devices: get rid of useless g_strdup()sLubomir Rintel2019-02-051-20/+14
| | | | | | | | | | | | And, while at that, add a hint to the developer adding new items. It's helps avoid a mistake that I believe is common (because I just made it twice...).
| * clients/secret-agent: respond to SAE password requestsLubomir Rintel2019-02-051-2/+1
| |
| * clients/meta-setting-desc: allow setting wifi-sec.key-mgmt to SAELubomir Rintel2019-02-051-1/+1
| |
| * wifi/utils: complete key-mgmt=sae for SAE capable APsLubomir Rintel2019-02-051-0/+6
| | | | | | | | | | Ordered before wpa-psk so that if the AP supports both WPA-PSK and SAE, SAE ends up preferred.
| * settings/ifcfg: add support for KEY_MGMT=SAELubomir Rintel2019-02-055-5/+60
| |
| * supplicant: add support for SAE key managementLubomir Rintel2019-02-053-11/+90
| | | | | | | | | | | | When SAE key managmenet is used, the supplicant can still use the "psk" property. Only when the pass phrase doesn't conform to WPA-PSK limitations, the sae_password must be used.
| * libnm-core/setting-wireless-security: add support for SAE key managementLubomir Rintel2019-02-052-17/+25
| | | | | | | | | | | | | | | | | | This adds support for configuring the Wi-Fi connections to use SAE. SAE is a password-based authentication mechanism that replaces WPA-PSK in WPA3-Personal. The pass phrase is still stored in the "psk" property, with some limitations lifted.
| * wifi/ap: expose SAE capabilityLubomir Rintel2019-02-051-1/+4
| | | | | | | | | | | | | | wpa_supplicant as of version 2.7 still doesn't tell us whether it supports SAE. Patch in review: http://lists.infradead.org/pipermail/hostap/2019-January/039338.html
| * libnm-core/dbus: add flag that indicates SAE support for an APLubomir Rintel2019-02-051-0/+3
| |
| * clients/common: drop unuseful wifi-sec.psk validationLubomir Rintel2019-02-051-13/+0
| | | | | | | | | | | | | | The generic connection validation produces a good result: Error: failed to modify 802-11-wireless-security.psk: ':(' is not a valid PSK. vs.: Error: Failed to add 'wifi666' connection: 802-11-wireless-security.psk: property is invalid
| * settings: don't allow updating a connection with invalid secretsLubomir Rintel2019-02-051-0/+3
| | | | | | | | Validate them, like we do on a connection addition.
| * man: fix a typoLubomir Rintel2019-02-051-1/+1
|/
* build/meson: add intermediate shared/nm-utils base libraryThomas Haller2019-02-059-86/+93
| | | | | | | | | | Like also done for autotools, create and use intermediate libraries from "shared/nm-utils/". Also, replace "shared_dep" by "shared_nm_utils_base_dep". We don't need super fine-grained selection of what we link. We can always link in "shared/libnm-utils-base.a", and let the linker throw away unsed parts.
* build/meson: always set SESSION_TRACKING_SYSTEMD defineThomas Haller2019-02-051-0/+2
| | | | | | | | | Like we do with autotools, otherwise we get a warning: [576/1030] Compiling C object src/25a6634@@NetworkManager@sta/nm-session-monitor.c.o. ../src/nm-session-monitor.c:31:5: warning: "SESSION_TRACKING_SYSTEMD" is not defined, evaluates to 0 [-Wundef] #if SESSION_TRACKING_SYSTEMD && SESSION_TRACKING_ELOGIND ^~~~~~~~~~~~~~~~~~~~~~~~
* secret-agent: merge branch 'th/secret-agent-cleanup'Thomas Haller2019-02-0516-668/+711
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/288
| * wifi,clients/secret-agent: use defines for property names in secret hintsThomas Haller2019-02-052-2/+2
| |
| * core: pass hints as strv to nm_act_request_get_secrets()Thomas Haller2019-02-055-14/+15
| | | | | | | | | | Extend nm_act_request_get_secrets() API to allow for the underlying flexibility (of the API that it calls) to accept a strv list of hints.
| * clients/secret-agent: refactor code in request_secrets_from_ui() to return earlyThomas Haller2019-02-051-39/+40
| |
| * clients/secret-agent: fix leaks in request_secrets_from_ui()Thomas Haller2019-02-051-3/+2
| | | | | | | | Fixes: 3bda3fb60c104114192e4e3c9c4ba0bef84d3a00
| * clients/secret-agent: use g_hash_table_get_keys_as_array() in ↵Thomas Haller2019-02-051-6/+5
| | | | | | | | nm_secret_agent_simple_enable()
| * libnm/secret-agent/trivial: rename internal init-data structureThomas Haller2019-02-051-9/+9
| | | | | | | | No "NM" prefix for internal structure.
| * libnm/secret-agent: use cleanup attribute in NMSecretAgentOldPrivateThomas Haller2019-02-051-56/+49
| | | | | | | | Refactor memory handling to use cleanup attribute.
| * libnm/secret-agent: reorder fields in NMSecretAgentOldPrivateThomas Haller2019-02-051-8/+9
| | | | | | | | And don't waste 4 bytes per boolean.
| * libnm/secret-agent: use CList instead of GSList for tracking requestsThomas Haller2019-02-051-33/+34
| | | | | | | | | | | | | | Always always when we want a linked list, CList is a better choice than GSList. It's more convenient to use and is more efficient. Also, use GSlice allocator for GetSecretRequest data.
| * clients/secret-agent: fix cancel_get_secrets() implementationThomas Haller2019-02-052-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The callback must be invoked, as also documented. Otherwise, the tracked info gets leaked. Let NMSecretAgentOld (the caller) be a bit resilient against bugs in the client, and avoid a crash by prematurely remove the request-info from the pending list. That does not fully workaround the bug (it leads to a leak), but at least it does not cause other "severe" issues. The leak was present earlier as well.
| * libnm/secret-agent: refactor GObject properties in NMSecretAgentOldThomas Haller2019-02-051-36/+31
| | | | | | | | | | Use NM_GOBJECT_PROPERTIES_DEFINE() and _notify() and get rid of the extra tab for indentation.
| * libnm/secret-agent: reorder codeThomas Haller2019-02-051-94/+104
| |
| * clients/secret-agent: sink reference for variant passed to callbackThomas Haller2019-02-051-3/+3
| | | | | | | | | | | | | | | | | | NMSecretAgentOld's get_secrets_cb() gets this right and takes a floating reference. So this was correct. However, make this a bit more robust, and don't pass on floating references. This was, we don't require the callee to consume the reference.
| * clients/secret-agent: add complete function for invoking secret callbackThomas Haller2019-02-051-21/+25
| | | | | | | | | | The completion of the request and the deletion usually goes hand in hand. Add a function to unify them.
| * clients: don't tread secret agent as NMSecretAgentOldThomas Haller2019-02-059-15/+14
| | | | | | | | | | | | | | | | Most of the times we actually need a NMSecretAgentSimple typed pointer. This way, need need to cast less. But even if we would need to cast more, it's better to have pointers point to the actual type, not merely to avoid shortcomings of C.
| * clients/secret-agent: use nm-utils error reason for callback while disposing ↵Thomas Haller2019-02-051-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMSecretAgentSimple No caller cared about the NM_SECRET_AGENT_ERROR_AGENT_CANCELED reason. In particular, because previously the requests would keep the secret-agent instance alive, and this never happend. Also, NM_SECRET_AGENT_ERROR_AGENT_CANCELED precicley exists for NMSecretAgentOld:cancel_get_secrets() (as documented). During finalize we are not cancelled -- at least not the same way as cancel_get_secrets(). Setting NM_SECRET_AGENT_ERROR_AGENT_CANCELED is wrong. Anyway, we have a default error for such cases already.
| * clients/secret-agent: minor cleanup of child-watch-id for secret-agentThomas Haller2019-02-051-8/+12
| | | | | | | | | | | | | | The code was correct. But it's hard to follow when and whether the child-watch-id was destroyed at the right time. Instead, always let _auth_dialog_data_free() clear the signal handlers.
| * clients/secret-agent: don't let request keep secret-agent aliveThomas Haller2019-02-051-3/+11
| | | | | | | | | | | | | | | | Don't let RequestData keep the parent NMSecretAgentSimple instance alive. Previously, the code in finalize() was never actually reached. Also, move the final callback from finalize() to dispose(). It feels wrong to invoke callbacks from finalize().
| * clients/secret-agent: cancel pending operationsThomas Haller2019-02-051-1/+1
| | | | | | | | | | | | | | We must actually cancel the GCancellable. Otherwise, the pending async operations are not cancelled. _auth_dialog_write_done() doesn't care about that, but _auth_dialog_read_done() does. It must not touch the destroyed data, after the operation is cancelled.
| * clients/secret-agent: remove request in finalize loop earlyThomas Haller2019-02-051-0/+1
| | | | | | | | | | It's ugly to keep the request in the list. Just remove it right away.
| * clients/secret-agent: rework tracking of requests in secret-agent-simpleThomas Haller2019-02-051-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that previously the @requests hash took the request-id as key and the RequestData as value. Likewise, the destroy functions of the head would destroy the key and the value. However, RequestData also had a field "request_id". But that pointer was not owned (nor freed) by the RequestData structure. Instead, it was relied that the hash kept the request-id alive long enough. That is confusing. Let RequestData own the request-id. Also, we don't need to track a separate key. Just move the request-id as first filed in RequestData, and use compare/hash functions that handle that correctly (nm_pstr_*()).
| * clients/secret-agent: only pass char buffer to _auth_dialog_write_done()Thomas Haller2019-02-051-4/+9
| | | | | | | | | | We don't need the entire GString. It's only to keep the buffer alive for long enough.
| * clients/secret-agent: various cleanups in secret-agent-simpleThomas Haller2019-02-051-59/+54
| |
| * clients/secret-agent: drop strv_has() implementationThomas Haller2019-02-051-15/+1
| |
| * clients/secret-agent/trival: rename internal types, functions and variablesThomas Haller2019-02-051-159/+159
| | | | | | | | | | | | | | | | | | | | Code that is internal to a source file should not have a "nm" prefix. That is what differenciates it from declarations in header files. It makes it clearer that these names are only defined in the current file. Also, our implementations of virtual functions shall have the same name as the function pointer of the VTable (or at least, it shouldn't have a "nm" prefix).