Commit Graph

4869 Commits

Author SHA1 Message Date
Dan Williams
8a1fe31b31 core: fix compilation on glib < 2.23.4
Where G_FILE_MONITOR_EVENT_MOVED isn't defined yet.
2010-07-02 10:42:32 -07:00
Dan Williams
62d03cf33e core: better missing firmware handling when firmware appears (rh #609587)
Monitor the kernel firmware directory (set at configure-time with
--with-kernel-firmware-dir=<path>) for changes, and if there
are any, try bringing up devices that are missing firmware.
2010-07-01 10:32:11 -07:00
Dan Williams
c38d1c28ff core: fix potential use-after-free resetting IPv6 accept_ra value 2010-06-30 13:37:34 -07:00
Dan Williams
4eea398b06 libnm-glib: fix invalid memory access during property notification
If an NMObject listened to property change notifications from
other NMObjects and then in response to that queued up other
property changes of it's own, those would get added to the
property change list that was being iterated through already.
Each name in the change list is freed after being notified,
but the change list itself is actually freed when all
properties have been notified.  So an object that queues up
another change notification ends up in _nm_object_queue_notify()
which iterates the change list where half of the data elements
are already freed...
2010-06-30 11:51:40 -07:00
Jiří Klimeš
2412792cfd cli: print IPv6 stuff for 'nmcli dev list' 2010-06-29 18:36:22 +02:00
Dan Williams
26312c087e core: simplify DHCP hostname handling
Reduce memory usage by not duplicating the IP4 setting.
2010-06-28 17:17:24 -07:00
Dan Williams
6893b3d0dd libnm-util: ensure empty VPN secrets are not used (rh #587784) 2010-06-28 15:15:23 -07:00
Dan Williams
3d4b6163b9 dhcp: try /etc/dhcp too for !SUSE && !DEBIAN && !GENTOO (rh #607759) 2010-06-28 11:18:12 -07:00
Jiří Klimeš
2767195a9c nm-tool: print IPv6 settings in nm-tool 2010-06-28 19:23:35 +02:00
Jiří Klimeš
aa104f9950 libnm-glib: fix handling of 'nameservers' property in NMIP6Config 2010-06-28 19:05:40 +02:00
Jiří Klimeš
d83872f46d ipv6: fix a crash when getting 'nameservers' property over D-Bus
dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/IP6Config/0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.NetworkManager string:Nameservers
2010-06-28 18:46:59 +02:00
Dan Williams
067ed11d34 build: bump version of git master for post-0.8.1 2010-06-27 09:02:38 -07:00
Žygimantas Beručka
44d2f9c436 po: update Lithuanian translation (bgo #622738) 2010-06-26 10:27:28 -07:00
Dan Williams
0ea9329b6e wifi: don't request periodic scans when connection is BSSID-locked (bgo #513820)
In this case the large user of periodic scanning, intra-ESS roaming,
isn't used due to the specific AP lock, so don't scan periodically.
2010-06-26 10:03:48 -07:00
Dan Williams
91ab673b5c ifcfg-rh: ensure SSIDs don't get double-quoted when written out (rh #606518) 2010-06-25 09:56:53 -07:00
Dan Williams
157959a1c5 core: fall back to current MAC address if permanent one is invalid
Not all drivers will return errors when even when they don't provide
the GPERMADDR ethtool call; sometimes you'll get 00:00:00:00:00:00
which is clearly not right.  In this case, fall back to the current
HW address just like if the ethtool GPERMADDR call failed.
2010-06-24 15:18:53 -07:00
Dan Williams
88eb6ced3f core: consolidate and clean up MAC cloning code
- Just use a byte array to old MAC addresses so we don't need to
  use .ether_addr_octet everywhere
- Consolidate setting the current MAC address into one location
- Make sure that if the GPERMADDR call fails we use the current MAC
  (this wasn't done for wired devices)
- Make log messages consistent
2010-06-24 15:14:53 -07:00
Dan Williams
3beea85a0b core: s/obtain/update for permanant HW address 2010-06-24 14:21:49 -07:00
Dan Williams
dc02eee652 vpn: ensure the IP interface passed to the dispatcher is the tunnel iface
priv->ip_iface gets destroyed in vpn_cleanup() when the class
signal handler handles FAILED/DISCONNECTED, but the dispatcher
is only called *after* that, so it gets a NULL ip_iface.  Fix that
so that the dispatcher always gets the tunnel interface for
vpn-up and vpn-down.
2010-06-23 14:17:52 -07:00
Dan Williams
138876b4b1 policy: add public address mappings before localhost ones
Otherwise glibc will count the localhost IPv6 (::1) mapping as
resolving to the IPv4 localhost mapping as well, so this:

127.0.0.1   localhost.localdomain localhost
::1         foobar localhost6.localdomain6 localhost6
192.168.1.2 fooar

causes a lookup of 'foobar' (or even just 'ping foobar') to resolve
to 127.0.0.1, even though the hostname is *not* listed on the
IPv4 localhost line.  Apparently glibc just looks for the hostname
on any IPv4 or IPv6 localhost line.

We need to ensure that even if you don't have a routable IP address
for one of [IPv4, IPv6] that the hostname resolves to the localhost
address for that IP version, otherwise lots of stuff starts
breaking.  But for the IP versions that you do have a routable IP
address, we want the hostname to map to that IP address too.
2010-06-23 13:24:12 -07:00
Dan Williams
759bf79466 dns: include domain part of hostname in resolv.conf 'searches' (rh #600407)
Add the current domain name (from the hostname) to the searches list.
The bug report is that when the hostname is set to something like
'dcbw.foobar.com' (ie an FQDN) that pinging 'dcbw' doesn't work
because the resolver doesn't have anything to append to 'dcbw' when
looking it up.
2010-06-23 12:02:16 -07:00
Jiří Klimeš
b880cbe829 trivial: fix a typo in nm-tool 2010-06-23 10:53:44 +02:00
Dan Williams
3ec6ffe85f core: remove debugging delay from new user connection handling
Introduced by 25e758c770 when ensuring
that the code that waits for connections to become advertised by teh
user settings service worked correctly.
2010-06-22 10:26:13 -07:00
Jiří Klimeš
1b49f941a6 core: MAC address spoofing/cloning (rh #447827) (bgo #553771)
This commit implements MAC cloning feature in NetworkManager. To support that,
'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless
interfaces. The permanent MAC address is obtained when creating the device, and
is used for 'locking' connections to the device. If a cloned MAC is specified
in connection to be activated, the MAC is set to the interface in stage1. While
disconecting, the permanent MAC is set back to the interface.
2010-06-22 14:21:25 +02:00
Jiří Klimeš
a8e0c2637b ifcfg-rh: test case for WEP ASCII keys 2010-06-22 12:51:02 +02:00
Dan Williams
debb16cfc0 policy: map hostname to current IP address (bgo #619931)
Instead of always mapping the current hostname to 127.0.0.1 or
whatever the user mapped it to manually, make sure the hostname
maps to the default device's IPv4 and IPv6 address if there's
a default device.

This helps out services that do a lookup on the machine hostname
to determine the IP address, which while a broken behavior (since
there are too many edge-cases) is pretty wide-spread and thus
we should support it.
2010-06-21 21:18:25 -07:00
Dan Williams
171dcf51b5 policy: pass default IPv4 and IPv6 addresses to hostname functions
In preparation for updating /etc/hosts to assign the current hostname
to the current IP address to allow programs that (somewhat incorrectly)
do DNS lookups on the machine's current hostname to find out its
IP address.
2010-06-17 23:01:40 -07:00
Dan Williams
89572383a3 wifi: fix updating of IBSS BSSIDs
First by is OR-ed with 0x02, it won't always equal 0x02.
2010-06-17 22:35:03 -07:00
Jiří Klimeš
4e02c67a94 ifcfg-rh: fix reading/writing ASCII WEP keys
ifcfg-rh plugin didn't prepend 's:' prefix when writing out ASCII WEP
keys. That rendered the keys file invalid. Moreover, the reading part
was incorrect too not having recognized correct ASCII keys.
2010-06-17 14:57:25 +02:00
Dan Williams
6ab5a9597a libnm-glib: add IpInterface property 2010-06-10 10:21:19 -07:00
Dan Williams
763f2f1d01 core: expose device's IP interface when activated
Lets apps find out what the actual kernel interface name is for the
device so they can do fun stuff with it.
2010-06-10 10:16:39 -07:00
Dan Williams
69f25ca5cb policy: fix possible crash when looking up hostname
Regression in 773c006a4c
2010-06-10 10:12:04 -07:00
Dan Williams
691698fe47 dnsmasq: don't allow rogue config file screwing up connection sharing
dnsmasq may read from its default config file location, which if that
location is a valid config file, it will combine with the options here
and cause undesirable side-effects.  Like sending bogus IP addresses
as the gateway or whatever.  So give dnsmasq a bogus config file
location to avoid screwing up the configuration we're passing to it.
2010-06-09 16:58:06 -07:00
Jiří Klimeš
7e054ff138 core: add a multicast route entry for connections with link-local IPv4 address 2010-06-09 15:01:23 +02:00
Henrique P. Machado
d3688c7bcd po: updated Brazilian Portuguese translation (bgo #620777) 2010-06-08 14:11:23 -07:00
Dan Williams
773c006a4c policy: support IPv6 address reverse-lookup for hostname too 2010-06-08 10:40:08 -07:00
Dan Williams
276fed0322 initscript: fix RH initscript return value on double-start (rh #584321) (rh #448393) 2010-06-07 22:42:33 -07:00
Dan Williams
6d719a0a38 core: NULL user_proxy means no user settings allowed
Which means we should return an error to the caller.
2010-06-04 13:55:45 -07:00
Dan Williams
0e047687b3 core: remove some debugging left-overs 2010-06-04 13:05:54 -07:00
Dan Williams
5c31397091 core: don't auto-activate user connections if the user lacks permissions 2010-06-04 13:05:27 -07:00
Dan Williams
ae4b47ca99 core: PolicyKit protect Deactivate and Disconnect 2010-06-04 00:42:10 -07:00
Dan Williams
25e758c770 core: PolicyKit protect connection activation 2010-06-03 23:20:11 -07:00
Dan Williams
6cbe50ffbd core: add nm_auth_uid_authorized() to check user permissions
Basically cleaned up is_user_request_authorized() from nm-manager.c.
2010-06-03 23:04:10 -07:00
Dan Williams
78c4e0798e core: check permissions on the user settings service too
And if the permissions change, make sure we allow or deny user
settings connections as appropriate.
2010-06-03 13:03:07 -07:00
Dan Williams
f31022bfbc core: use return_no_pk_error() more and fix returned error messages 2010-06-02 11:20:38 -07:00
Dan Williams
299ab139e4 core: add policy for overall network control
Allows for locking down connections completely and disallowing
certain users from touching networking at all.
2010-06-02 02:23:51 -07:00
Dan Williams
a08227525c core: simplify auth chain permission callback handling 2010-06-02 02:16:14 -07:00
Dan Williams
6476c697d8 Merge remote branch 'origin/master' into perm 2010-06-01 15:34:53 -07:00
Dan Williams
a3e3405fff po: updated German translation (bgo #620122) 2010-06-01 00:39:01 -07:00
Dan Williams
a3d8cb9b6d core: rework pending activation to be more flexible
In preparation for more granular permissions.
2010-06-01 00:36:46 -07:00