Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
479bd2b12e libnm-util: update 802.1x setting documentation 2011-07-02 15:38:41 -05:00
Dan Williams
2943453bf8 libnm-util: update WiMAX setting documentation 2011-07-02 15:38:27 -05:00
Dan Williams
af55e25f14 libnm-glib: fix GObject introspection annotation 2011-07-02 14:49:02 -05:00
Dan Williams
5459d9db8c policy: don't auto-activate shared wifi if user is not authorized (CVE-2011-2176) (rh #715492)
If a shared wifi connection is restricted to a certain set of users
and none of those users have authorization to start shared wifi
connections, don't auto-start the connection.
2011-07-01 15:41:00 -05:00
Dan Williams
669de165ca core: request authorization for shared wifi connections (CVE-2011-2176) (rh #715492)
Ensure the user is authorized to start shared wifi connections.
2011-07-01 15:41:00 -05:00
Dan Williams
f9aa019ba8 settings: add function for validating connection's active user permissions
Returns TRUE if any user the connection is visible too is active and
has the given permission.
2011-07-01 15:41:00 -05:00
Dan Williams
5cf1addbdf core: add utility function to get a connection's shared wifi permission
If the connection is a shared wifi connection, return the appropriate
permission the user must obtain to use the connection.
2011-07-01 15:41:00 -05:00
Dan Williams
2420c37e24 agents: add nm_agent_manager_get_agent_by_user()
Return any registered agent for a given username.
2011-07-01 15:41:00 -05:00
Dan Williams
ded905ceb1 agents: track agent wifi permissions
When an agent registers, request wifi sharing permissions for that
agent's user and only register the agent when the permissions are
known.
2011-07-01 15:41:00 -05:00
Dan Williams
85708fa5d7 agents: store agent permissions for later
Let something else do the actual checking but provide an
interface to let that something else track the permissions
of the user that owns the agent.
2011-07-01 15:38:38 -05:00
Dan Williams
3b226980c7 agents: track agent username
Look up the username of the user whose session the agent is
part of andkeep that around for later.
2011-07-01 15:38:38 -05:00
Dan Williams
c08279dff4 core: add nm_auth_chain_steal_data()
New function for removing data from the auth chain without
destroying it.
2011-07-01 15:38:38 -05:00
Dan Williams
937970f60c core: allow multiple authority changed callbacks
We'll need this later; just keep all registered callbacks
in a list and track them by func/data.
2011-07-01 15:38:38 -05:00
Dan Williams
db6638623b core: don't schedule authentication requests twice
If an error occurred, or PolicyKit is disabled, we don't want to
schedule two idle handlers to return the result of an authentication
request.  We'll soon be queuing up multiple requests at the same
time so we don't want this to happen.
2011-07-01 15:38:38 -05:00
Dan Williams
220fb52621 api: update documentation about secret agents and SaveSecrets() 2011-07-01 15:38:38 -05:00
Jiří Klimeš
69b767bbf0 core: connections failed due to missing secrets are re-tried when an secret agent registers (rh #706204)
Use case:
A user has an auto-activatable connection with secrets in a keyring. While
booting NM starts and tries to activate the connection, but it fails because of
missing secrets. Then the user logs in, but the connection is marked as invalid
and is not tried again.

This commit solves the issue by removing invalid flag and activating the
connection when a secret agent registers.

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2011-07-01 09:14:05 +02:00
Jiří Klimeš
18b81930ce ifcfg-rh: change MACADDR_BLACKLIST to HWADDR_BLACKLIST (to correspond to HWADDR key) 2011-06-30 17:58:31 +02:00
Jiří Klimeš
b1afd46f65 ifcfg-rh: support "mac-address-blacklist" property in ifcfg-rh plugin
ifcfg-rh plugin now reads/writes the property as MACADDR_BLACKLIST variable.
The variable is space-separated list of MAC addresses in the standard
hex-digits-and-colons notation.
E.g. MACADDR_BLACKLIST="7e:d8:c0:85:58:7f 00:1e:65:30:d5:c7"
2011-06-30 16:46:33 +02:00
Jiří Klimeš
a6733c8b4f core: add MAC address blacklisting feature for WiFi and ethernet connections
"mac-address-blacklist" property is added to the ethernet and WiFi connections.
It is the MAC addresses list of devices on which the connection won't be
activated.

Original patch (NM_0_8 branch) from Thomas Bechtold <thomasbechtold@jpberlin.de>
2011-06-30 16:46:26 +02:00
Jiří Klimeš
f340c44fed ifcfg-rh: fix an assertion failure and read-after-free error for invalid MACs 2011-06-30 14:52:49 +02:00
Dan Williams
6187b85052 wifi: immediately request new 802.1x 'always-ask' passwords if they fail
Instead of retrying the password a number of times, immediately fail the
connection and ask for a new pasword if (1) the request fails during the
802.1x authentication and (2) the password is an 'always-ask' 802.1x
password.  The password is bad anyway, and in the case of RSA/OTP tokens
the code may have already changed, so it's pointless to keep retrying
the same password when it's already stale.
2011-06-29 18:19:56 -05:00
Dan Williams
a27cd8e5d9 wifi: allow supplicant disconnect request more often
Use a broader range of supplicant interface states to determine
when to tell the supplicant to idle; we want to allow the
disconnect in all of these states, not just some of them.

Second, allow the active network to be removed from the supplicant's
list in most of these states, even when the supplicant interface is
inactive or disconnected.
2011-06-29 18:19:55 -05:00
Jiří Klimeš
fdfbe00aac policy: remove "invalid mark" for failed connections after 5 mins
If there is a temporary connection failure (e.g. due to unavailable DHCP), the
connection is marked as invalid after several retries. Reset the flag after
5 mins to allow next auto-reconnection.
2011-06-23 11:45:16 +02:00
Dan Williams
a5850e82bc ifcfg-rh: fix distcheck after c2dbd1f836
IPV6_FAILURE_FATAL is now read and defaults to TRUE for ifcfg files
even if IPv6 is turned off.  That means that if we write a connection
for which NM_SETTING_IP6_CONFIG_MAY_FAIL is FALSE but IPv6 is disabled,
ifcfg-rh won't write out IPV6_FAILURE_FATAL (because IPv6 is disabled
so why bother writing out IPv6-related settings) but on re-read it will
treat the absence of IPV6_FAILURE_FATAL as TRUE/yes.  This leads to
a mismatch between the connection that was written out (which will
have NM_SETTING_IP6_CONFIG_MAY_FAIL=FALSE and no IPV6_FAILURE_FATAL)
and the re-read connection (which will have
NM_SETTING_IP6_CONFIG_MAY_FAIL=TRUE since a missing IPV6_FAILURE_FATAL
is treated as NM_SETTING_IP6_CONFIG_MAY_FAIL=TRUE).
2011-06-20 18:41:56 -05:00
Dan Williams
538cef0805 libnm-glib: fix make distcheck 2011-06-20 11:40:04 -05:00
Jorge González
69f76d3245 po: updated Spanish translation (bgo #651385) 2011-06-20 16:46:29 +02:00
Dan Williams
cfd6ba1690 libnm-glib: fix demarshalling of Dhcp6Config property changes
This bit apparently got forgotten in 10ea7a911c
2011-06-18 17:16:48 -05:00
Michal Schmidt
ffbb7df4b8 systemd: fix NetworkManager-wait-online.service to wait for link up (rh #710502)
Since commit 0ce4b6b412
NetworkManager-wait-online.service quits immediately if there is no link yet.
Fix it by removing the '-x' option.

But if we do just that, NM-w-o would add a useless 30 seconds delay in the
case when NM is not running at all.
Solve this by adding a Requisite= dependency on NM.

https://bugzilla.redhat.com/show_bug.cgi?id=710502
2011-06-17 14:02:39 +02:00
Jiří Klimeš
502548b6ca ifcfg-rh: fix IPV4_FAILURE_FATAL handling and memory leaks, when IPv4 is disabled 2011-06-16 12:30:38 +02:00
Jiří Klimeš
c2dbd1f836 ifcfg-rh: read some more IPv6-related values as well even if IPV6INIT=no
We need to read IPV6_FAILURE_FATAL and other values, even if IPv6 is disabled.
Else the variables would use default values, which may not be right. Then
switching between methods "Ignore" and "Automatic" in a GUI would change value of
IPV6_FAILURE_FATAL property, even if it's not touched explicitly.
2011-06-16 11:14:52 +02:00
Dan Williams
fb62f395ea vpn: fix handling of connections with only system secrets
The core problem was the nm_connection_need_secrets() call in
nm-agent-manager.c's get_start() function; for VPN settings this
always returns TRUE.  Thus if a VPN connection had only system
secrets, when the agent manager checked if additional secrets
were required, they would be, and agents would be asked for
secrets they didn't have and couldn't provide.  Thus the
connection would fail.  nm_connection_need_secrets() simply
can't know if VPN secrets are really required because it
doesn't know anything about the internal VPN private data;
only the plugin itself can tell us if secrets are required.

If the system secrets are sufficient we shouldn't be asking any
agents for secrets at all.  So implement a three-step secrets
path for VPN connections.  First we retrieve existing system
secrets, and ask the plugin if these are sufficient.  Second we
request both existing system secrets and existing agent secrets
and again ask the plugin if these are sufficient.  If both those
fail, we ask agents for new secrets.
2011-06-15 12:19:47 -05:00
Jiří Klimeš
2d4619421c cli: simplify find_device_for_connection() 2011-06-15 15:00:55 +02:00
Jiří Klimeš
8d43875cbe libnm-glib: add nm_client_get_device_by_iface() for NMClient 2011-06-15 14:58:04 +02:00
Jiří Klimeš
acc3025dfc core: socket() returns -1 on failure 2011-06-15 11:03:29 +02:00
Jiří Klimeš
17bc5867dc ifcfg-rh: socket() returns -1 on failure 2011-06-15 10:43:07 +02:00
Dan Williams
5075ffe324 todo: add notes about vpn async secrets requests 2011-06-14 17:22:49 -05:00
Jiří Klimeš
b4a72d1ad7 libnm-glib: fix crash for AddAndActivateConnection() D-Bus call (bgo #652512)
When a partial connection is passed to nm_client_add_and_activate_connection(),
but it doesn't contain any settings, nm_connection_to_hash() returns NULL and
there's a crash later on the NULL hash.
2011-06-14 19:39:23 +02:00
Jiří Klimeš
6fe22d99f0 ifcfg-rh: fix possible crash when route file creation fails 2011-06-14 17:15:51 +02:00
Jiří Klimeš
c32914fa3b libnm-util: remove unused D-Bus dbus_g_bus_get() call from test-secrets.c 2011-06-14 16:22:09 +02:00
Jiří Klimeš
80df1e3aca libnm-util: remove unused D-Bus dbus_g_bus_get() call from test-secrets.c 2011-06-14 16:17:05 +02:00
Jiří Klimeš
31f8b65931 libnm-util: remove unused D-Bus dbus_g_bus_get() call from test-setting-8021x.c 2011-06-14 16:14:40 +02:00
Jiří Klimeš
28b5809cbe libnm-util: remove unused D-Bus dbus_g_bus_get() call from test-settings-defaults.c 2011-06-14 16:10:40 +02:00
Jiří Klimeš
74954136dd supplicant: remove unused D-Bus dbus_g_bus_get() call from test-supplicant-config.c 2011-06-14 16:03:28 +02:00
Jiří Klimeš
e8b5e2910d dhcp: remove unused D-Bus dbus_g_bus_get() call from test-dhcp-options.c 2011-06-14 15:54:08 +02:00
Jiří Klimeš
9eaf31f49a policy: don't cache "(none)" hostname on startup (rh #706094) 2011-06-14 13:21:14 +02:00
Aleksander Morgado
19019a8e0b build: fix automake portability warnings 2011-06-13 10:38:52 -05:00
Aleksander Morgado
33e6997599 libnm-util: added missing U2600 GSM band enumeration 2011-06-13 10:38:32 -05:00
Dan Williams
5e3c51fa4e wifi/mesh: require WEXT 21 or later
Seriously, get a kernel more recent than 2007.  Really.
2011-06-08 17:09:14 -05:00
Jiří Klimeš
9549c70d94 core: fix auto-connect to hidden SSIDs (rh #707406)
Previously (in NM 0.8.x) most WiFi connection were from user settings service.
And the service updated 'seen-bssids' property when got connected.
But the settings service in 0.9 don't do that. That inhibits auto-connecting to
hidden networks. This commit takes care of updating 'seen-bssids'. However, we
don't want to write out the conection each time it's activated (touching /etc).
So, seen BSSIDs are kept separately from the connection in a look-aside file.

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2011-06-08 14:51:27 -05:00
Jiří Klimeš
060e865ecd core: trivial whitespace fixes 2011-06-08 14:51:27 -05:00