| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Fixes: d081aa1d845440b77208d79fad141c395fa91b0d
|
| |\
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| | |
This way we generate the error messages on the client side and therefore
can localize them.
|
| | |
| |
| |
| |
| | |
RSN with SAE is what's called WPA3-Personal.
Also, if there's neither PSK nor 802.1x, it's not WPA2.
|
| | |
| |
| |
| |
| | |
This allows us to test if we distinguish WPA1, WPA2 and WPA3 in the
client.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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...).
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Ordered before wpa-psk so that if the AP supports both WPA-PSK and SAE,
SAE ends up preferred.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| | |
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
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| | |
Validate them, like we do on a connection addition.
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
^~~~~~~~~~~~~~~~~~~~~~~~
|
| |\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/288
|
| | | |
|
| | |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
Fixes: 3bda3fb60c104114192e4e3c9c4ba0bef84d3a00
|
| | |
| |
| |
| | |
nm_secret_agent_simple_enable()
|
| | |
| |
| |
| | |
No "NM" prefix for internal structure.
|
| | |
| |
| |
| | |
Refactor memory handling to use cleanup attribute.
|
| | |
| |
| |
| | |
And don't waste 4 bytes per boolean.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Use NM_GOBJECT_PROPERTIES_DEFINE() and _notify() and get rid of
the extra tab for indentation.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
The completion of the request and the deletion usually goes hand in
hand. Add a function to unify them.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
It's ugly to keep the request in the list. Just remove it
right away.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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_*()).
|
| | |
| |
| |
| |
| | |
We don't need the entire GString. It's only to keep the buffer alive
for long enough.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|