Commit Graph

15047 Commits

Author SHA1 Message Date
Dan Williams
ad80a58c15 libnm-glib: add testcases and testing infrastructure
Tests for addition and removal of connections.
2010-12-28 17:11:27 -06:00
Dan Williams
dd6d72d6a1 libnm-glib: handle errors on AddConnection reply 2010-12-28 16:40:07 -06:00
Dan Williams
ad9270da79 libnm-glib: ensure connection is initialized before AddConnection callback 2010-12-27 15:03:44 -06:00
Dan Williams
8bb9394e92 trivial: whitespace fixes 2010-12-24 07:02:35 -06:00
Dan Williams
eb27406fdc libnm-glib: handle visibility changes for updated connections 2010-12-23 09:59:57 -06:00
Dan Williams
77f3d6c81c libnm-glib: add signal prototype to class definition 2010-12-23 09:09:13 -06:00
Dan Williams
136139f699 policy: only autoactivate connections visible to some user
If the connection is restricted to certain users, don't auto-activate
that connection unless at least one of those users is logged in.
2010-12-23 08:14:18 -06:00
Dan Williams
f7e27ea239 settings: allow settings service to return partial secrets
This allows the admin to define generic secrets for all users the
connection is visible to, but allows user-specific secrets as well.
2010-12-22 15:12:12 -06:00
Dan Williams
08ba12929d dhclient: add testcase for multiline 'also require' statements 2010-12-19 12:10:57 -06:00
Dan Williams
e079f25a2b dhclient: explicitly request WPAD option (bgo #368423) 2010-12-17 23:09:20 -06:00
Dan Williams
297e3c6463 dhclient: split out dhclient config merging and add testcases 2010-12-17 23:09:20 -06:00
Dan Williams
39eed50e47 policy: stop touching /etc/hosts
Handling of /etc/hosts is highly site- and admin- specific in
many more complex cases, and it's exceedingly hard and error-
prone for NetworkManager to handle all those cases.  So remove
this functionality entirely.  That's not a big loss, as it
turns out there's a much more elegant solution.

The only requirement is that the machine's hostname map back
to an IP address owned by the machine.  That requirement can
be satisifed by nss-myhostname or even possibly the distro's
installer.  If the user does not want nss-myhostname then it
can be uninstalled.  Distros should use a "recommends" feature
in their packaging system so that the NetworkManager package
does *not* have a hard requirement on nss-myhostname.  Thus
everyone is happy; things Just Work when nss-myhostname is
installed, but more advanced users can uninstall it and
customize /etc/hosts as they wish.

Another alternative is a dispatcher script that listents for
the 'hostname' event, and updates /etc/hosts according to the
administrator's preference.
2010-12-17 09:28:49 -06:00
Jiří Klimeš
5705850779 examples: add C example showing APs' information 2010-12-17 13:42:07 +01:00
Jiří Klimeš
592a1d4668 cli: add D-Bus object path field for APs (e.g.:nmcli -f NAME,SSID,BSSID,SIGNAL,DBUS-PATH dev wifi list) 2010-12-17 11:37:10 +01:00
Dan Williams
6f37a967eb dns: direct IPv4 reverse DNS queries to split DNS servers
When split DNS is used for a local caching nameserver, make sure
that reverse DNS queries for hosts within the VPN tunnel are directed
to the VPN's nameservers, not to the public upstream nameservers.
2010-12-16 17:49:22 -06:00
Jiří Klimeš
b3800183b4 libnm-util: fix nm_utils_security_valid() checks for Ad-Hoc APs (rh #632123)
Without the fix fake Ad-Hoc APs created by nm-applet's "Create New Wireless
Network..." don't pass the check and nm-applet can crash.
2010-12-16 14:03:04 +01:00
Dan Williams
7e5ab41d13 build: remove random leftover bits of GConf stuff 2010-12-15 18:03:49 -06:00
Dan Williams
9c7afa193c libnm-glib: fix export of NMDHCP6Config symbols
Found by Giovanni Campagna <gcampagna@src.gnome.org>
2010-12-15 17:53:13 -06:00
Pierre Ossman
83bc663914 ip6: support for DNS Search List option (bgo #637077)
RFC6101 adds the DNS Search List option to router advertisements. This
allows stateless configuration of suffixes to try when doing DNS lookups.
Make sure we catch these when provided by the kernel and reconfigure
things appropriately.

NOTE: this commit depends on a kernel patch:

http://marc.info/?l=linux-netdev&m=129216173321352&w=2
2010-12-15 17:44:20 -06:00
Pierre Ossman
4e8cb2f193 ip6: restructure RDNSS code to be RFC compliant (bgo #637075)
RFC5006/RFC6106 specifies fairly clearly how to handle multiple RDDNS options.
Unfortunately the previous code didn't deal with this and hence would
misbehave in all but the simplest setups. The new code should be fully
compliant with the following exceptions:

- Router lifetime not respected
- No "sufficient number" management.
- DHCPv6 servers might not be prioritised over RDDNS ones.
2010-12-15 17:37:14 -06:00
Pierre Ossman
8229107589 ip6: rdnss structure needs to be packed (bgo #637075)
The code assumes this structure is packed, so let's make sure it actually is.
2010-12-15 17:30:35 -06:00
Kristjan SCHMIDT
5281c92311 po: add Esperanto translation (bgo #637011) 2010-12-15 15:18:28 -06:00
Dan Williams
4f058e2dc4 agent: ask secret agents for secrets when connection doesn't have any
Filter registered agents for each secrets request to ensure that the
connection for which secrets are requested is visible to that agent,
and add that agent to the queue.  Ask each agent in the queue until
one returns usable secrets.  Ensure that if new agents register
or existing agents quit during the secrets request, that the queue
is updated accordingly, and ensure that an agent that's already
been asked for secrets, unregisters, and re-registers before the
secrets request is comple, isn't asked for secrets twice.
2010-12-14 15:34:34 -06:00
Dan Williams
5e19b02f0b dbus: allow NetworkManager to talk to secret agents 2010-12-14 15:32:12 -06:00
Dan Williams
9df9abb06f tests: make agent tester stick around until Ctl+C 2010-12-14 15:31:53 -06:00
Dan Williams
16a8a951e9 ifcfg-rh: PSK isn't necessary for valid WPA connection
We'll ask secret agents for it if it's not stored in the connection.
2010-12-14 15:26:40 -06:00
Dan Williams
ca1338007c tests: add secret agent API test tool 2010-12-14 15:04:14 -06:00
Dan Williams
fc82bbc412 agent: allow the '.' character in agent identifiers 2010-12-14 11:19:39 -06:00
Dan Williams
81bc9c8572 libnm-glib: allow the '.' character in agent identifiers 2010-12-14 11:19:19 -06:00
Dan Williams
ffac6b33c6 agent: fix infinite loop checking agent identifier 2010-12-14 11:14:24 -06:00
Dan Williams
585a4a1351 agent: actually register D-Bus introspection
So that the agent manager can get exported on the bus.
2010-12-14 11:12:56 -06:00
Dan Williams
84abb13554 libnm-glib: fix infinite loop checking agent identifier 2010-12-14 11:12:24 -06:00
Dan Williams
85fa487a48 tests: fix missing Makefile dep 2010-12-14 10:51:00 -06:00
Dan Williams
1496f8056f libnm-glib: add secret agent base class 2010-12-14 00:03:22 -06:00
Dan Williams
62a2c34e27 core: simplify secrets handling during activation
Instead of a bizare mechanism of signals back to the manager
object that used to be required because of the user/system settings
split, let each place that needs secrets request those secrets
itself.  This flattens the secrets request process a ton and
the code flow significantly.

Previously the get secrets flow was something like this:

nm_act_request_get_secrets ()
    nm_secrets_provider_interface_get_secrets ()
        emits manager-get-secrets signal
            provider_get_secerts ()
                system_get_secrets ()
                    system_get_secrets_idle_cb ()
                        nm_sysconfig_connection_get_secrets ()
                            system_get_secrets_reply_cb ()
                                nm_secrets_provider_interface_get_secrets_result ()
                                    signal failure or success

now instead we do something like this:

nm_agent_manager_get_secrets ()
    nm_agent_manager_get_secrets ()
        request_start_secrets ()
            nm_sysconfig_connection_get_secrets ()
                return failure or success to callback
2010-12-13 21:14:23 -06:00
Jiří Klimeš
d4ac3cd593 libnm-util: fix a memory leaks in nm_setting_to_string() 2010-12-13 20:55:02 +01:00
Jiří Klimeš
a6dccad94c examples: trivial comment fix 2010-12-13 17:13:16 +01:00
Jiří Klimeš
1beb2632a0 examples: fix double free() error in get-active-connections 2010-12-13 16:36:46 +01:00
Jiří Klimeš
ca6e6b620d examples: add C examples for listing connections from system settings service 2010-12-13 16:18:35 +01:00
Dan Williams
58088129f7 settings: only use one hint nm_sysconfig_connection_get_secrets()
Never used more than one anyway.
2010-12-12 21:29:13 -06:00
Dan Williams
ff101f4946 settings: remove callback from nm_sysconfig_connection_get_secrets()
No reason it needs to use the callback pattern anymore.
2010-12-12 21:17:34 -06:00
Dan Williams
e3ba9162c2 supplicant: fix state handling after READY has been reached
We only want to prevent regression to > READY after READY has
been reached, since the interface state will track the supplicant
connection state which legitimately jumps around.
2010-12-11 12:33:15 -06:00
Dan Williams
ea16af7c18 supplicant: fix up return arguments for Disconnect and RemoveNetwork 2010-12-11 12:31:10 -06:00
Dan Williams
1cd17ac896 supplicant: fix leak updating BSS properties 2010-12-11 11:59:40 -06:00
Dan Williams
fd5e8c2f05 core: fix leak parsing config file 2010-12-10 18:50:49 -06:00
Dan Williams
e716e7507b agent: log agent registration 2010-12-10 13:32:45 -06:00
Dan Williams
a30cf19858 agent: add agent manager and minimal agent class 2010-12-10 12:38:19 -06:00
Dan Williams
66291ec204 logging: LOGD_USER_SET -> LOGD_AGENTS 2010-12-10 12:36:02 -06:00
Dan Williams
cf7cc2492d logging: LOGD_SYS_SET -> LOGD_SETTINGS 2010-12-10 12:32:22 -06:00
Dan Williams
0a8f7aeb56 core: use #defines for NMDBusManager signal names
Helps catch typos at compile time instead of runtime.
2010-12-10 11:36:55 -06:00