Commit Graph

7740 Commits

Author SHA1 Message Date
Dan Williams
7b50607fc9 settings: consolidate settings connection purged and removed signals
They almost do the same thing.
2010-10-26 11:36:38 -05:00
Dan Williams
d2d48676fc settings: remove older session monitor code 2010-10-26 11:19:29 -05:00
Dan Williams
925d69c6d1 core: use new session monitor in system connection class 2010-10-26 11:15:19 -05:00
Dan Williams
39ed9c2956 core: get D-Bus manager during auth if not provided 2010-10-26 11:00:30 -05:00
Jiří Klimeš
bc76e40dec trivial: make connection activating error more precise 2010-10-26 13:46:17 +02:00
Dan Williams
1b21949380 core: move session monitor to core
We'll need it for agent authentication too, so move it out of
system settings specific code.
2010-10-25 23:43:04 -05:00
Dan Williams
0c409d75ea settings: add a simpler session monitor
Heavily modified from polkitbackendsessionmonitor.c, thanks davidz!
2010-10-25 23:24:44 -05:00
Dan Williams
8b006f331d dhcp: add support for Fedora dhclient RFC3442 routes (rh #639935)
Add support for Fedora's dhclient's built-in RFC3442 classless static
routes format.

Since the Fedora format uses the same name as the dhcpcd format, we
need to refactor a bunch of the code to ensure we can distinguish
between the types.  Do this at runtime now by consolidating the
classless static routes parsing code into the DHCP Client base class
and rework the unit tests so that we can test all variations of the
classless static route parsing code at the same time.

This also fixes a bug with the dhcpcd classless static route
gateway handling that would return the wrong gateway address.

Many thanks to Jiri Popelka from Red Hat for the initial patch
and explanations.
2010-10-21 13:34:40 -05:00
Rimas Kudelis
80b9047e1c po: udpated Lithuanian translation (bgo #632634) 2010-10-20 17:25:12 -05:00
Vladimír Machat
92aae19b67 po: updated Czech translation (bgo #632329) 2010-10-19 11:21:40 -05:00
Miloš Popović
d030a52845 po: updated Serbian Latin translation (bgo #632454) 2010-10-19 11:18:54 -05:00
Милош Поповић
98d759e417 po: updated Serbian translation (bgo #632454) 2010-10-19 11:17:51 -05:00
Dan Williams
8f7aedc7e0 Merge remote branch 'origin/master' into rm-userset 2010-10-18 19:02:27 -05:00
Dan Williams
b368b8fea3 Merge remote branch 'origin/sup-rework' 2010-10-18 18:40:42 -05:00
Dan Williams
8310593ce4 core: ignore authorization for sleep/wake requests (but restrict to root) (rh #638640)
Everyone uses pm-utils still for sleep/wake support, and that's
traditionally how NM was put to sleep and woken up.  But pm-utils
uses dbus-send without --print-reply so dbus-send quits immediately
after sending the message.  That doesn't give NM enough time to
get the senders UID and thus validate the request, so the request
gets denied, and sometimes NM stays asleep after the machine is
woken up.

Instead, don't get the sender's UID and try to authorize it, but
just let the request go through.  Rely on D-Bus permissions to
make sure that only root can call sleep/wake methods.
2010-10-15 10:33:34 -05:00
Jiří Klimeš
9f2b48ef08 libnm-glib: call D-Bus with a timeout when Set()ting properties
The caller needs to be authenticated, so wait a bit to be sure
it didn't quit too quickly.
2010-10-15 09:41:34 +02:00
Dan Williams
fee318abdb settings: remove groups checking
See "libnm-util: simplify permissions somewhat; remove groups"
for more rationale.  Might come back later.
2010-10-12 18:01:11 -05:00
Dan Williams
82772191a9 libnm-util: simplify permissions somewhat; remove groups
Groups may come later, but they are also quite a bit more complicated
because getting the groups a user is in may require network access
if that user is backed by LDAP.  And it gets worse because you have
no idea that the glibc calls like getgrouplist(3) are backed by
the network and may take an arbitrary amount of time to complete.
Punt that.
2010-10-12 17:55:08 -05:00
Dan Williams
f532f41c02 supplicant: ratelimit supplicant activation
If the supplicant dies a number of times within a short period of
time, make it go sit in the corner for a bit instead of continuously
trying to start it and have it die again.

Instead of just exposing a "running" value, instead make a meta
"available" value that's a combination of whether the supplicant
is actually running plus whether we want to talk to it right now
or not.
2010-10-12 14:18:42 -05:00
Dan Williams
39e111e5eb supplicant: ignore unknown wpa_supplicant states
Don't treat them as DISCONNECTED.
2010-10-11 20:35:54 -05:00
Dan Williams
48e37de3a4 supplicant: prevent a race condition due to D-Bus activation
interface_add() could get called from two places: by the wifi/eth
device class when activating (which if the supplicant isn't yet
running will D-Bus activate it) and from the NameOwnerChanged
handler for the wpa_supplicant dbus service smgr_running_cb().

So if the supplicant wasn't running, nm_supplicant_interface_new()
would call interface_add() to bring the supplicant to life via
activation, then go on and create priv->iface_proxy.  When the
supplicant appeared and D-Bus sent the NameOwnerChanged,
smgr_running_cb() would also call interface_add(), creating a
second priv->iface_proxy.  The first one got lost and lived after
its parent NMSupplicantInterface was killed, and could still
respond to signals over the bus.

Prevent that by adding another state, STARTING, that indicates
that we've already started talking to the supplicant.  Also be
extra paranoid about disconnecting signal handlers on the proxy.
2010-10-11 20:30:40 -05:00
Dan Williams
5858c6103e supplicant: make sure we remove the right interface
It shouldn't ever happen that two interface objects for the same
network interface are active at the same time, but make sure we
yell if it does.
2010-10-11 20:27:51 -05:00
Alex Vogt
d40c81b06a linexa: add basic Linexa support 2010-10-08 23:03:10 -05:00
Dan Williams
be97e7f104 build: include <config.h> for kill(2), isblank(3), and isascii(3)
config.h defines _GNU_SOURCE, which in turn defines the bits necessary
for kill, isblank, and isascii.  So wherever we use those, we need
to make sure config.h is included.
2010-10-08 22:46:55 -05:00
cee1
9ee77769af trivial: add missing includes 2010-10-08 16:43:16 -05:00
Dan Williams
bbf3f12d7b policy: prevent hostname duplication in /etc/hosts 2010-10-07 18:24:59 -05:00
Dan Williams
ad3cb6d832 policy: add testcases for removing stale hosts mappings (bgo #629020) (rh #630146) 2010-10-07 18:14:29 -05:00
Dan Williams
ee9ce6027b policy: preserve custom hostnames on local-mapping lines (rh #627269)
Try to preserve custom hostnames (ie, anything not a localhost* variant,
the current hostname, or the previous hostname) when rewriting the
127.0.0.1/::1 localhost mapping lines.
2010-10-07 18:08:52 -05:00
Dan Williams
4a7c77ac95 dnsmasq: actually kill stale dnsmasq process
Interpret the return value of kill(2) correctly...
2010-10-07 14:07:58 -05:00
Dan Williams
35b1ed9082 dns: actually kill stale dnsmasq process
Interpret the return value of kill(2) correctly...
2010-10-07 14:07:52 -05:00
Dan Williams
8502f0c874 core: fix use-after-free getting user connections
G_SLICE debugging uncovered a use-after-free when freeing the
batched user connection settings callback list.  We don't
actually care about the DBusPendingCalls anyway, so just make
the list a counter and simplify the code in the process.
2010-10-07 13:52:51 -05:00
Dan Williams
03517015cc core: check address family, not route family 2010-10-07 12:09:17 -05:00
Dan Williams
aeeac548a8 dns: fix use-after-free in plugin error path 2010-10-07 12:04:41 -05:00
Dan Williams
82dd97c4b7 policy: ensure stale IP mappings are not left in /etc/hosts (bgo #629020) (rh #630146)
NM-added mappings for active IP addresses were not getting properly
removed when the address disappeared of NM quit, because the bits
of code that determine whether or not /etc/hosts should change were
not taking the disappearance of the IP address into account, and
were leaving the file unchanged.

To fix that, if there is no default IP address, but there are NM-added
IP address entries in /etc/hosts, make sure we update /etc/hosts and
remove them.
2010-10-07 00:29:44 -05:00
Martin Pitt
febb3d2cb4 system-settings: add timestamp to default auto wired connections (bgo #583756) 2010-10-06 17:14:54 -05:00
Martin Pitt
61e86600d5 dhcp: fix uninitialized variable usage with dhcp3 2010-10-06 17:12:10 -05:00
Gabor Kelemen
c35a763c17 po: update Hungarian translation (bgo #631186) 2010-10-06 15:51:53 -05:00
Piotr Drąg
66ef151da1 po: update Polish translation (bgo #631153) 2010-10-06 15:49:16 -05:00
Brett Witherspoon
d18911aabd doc: don't install docs when docs are disabled (bgo #631133) 2010-10-06 15:47:58 -05:00
Dan Williams
516ea8bf12 wifi: simplify supplicant interface signal handling 2010-10-06 15:43:41 -05:00
Dan Williams
f3a1366b55 supplicant: collapse supplicant interface states
We only really need one state for the supplicant interface which
simplifies handling in the Wifi and Wired device classes quite a
bit.  It also simplifies the supplicant interface class too.

One behavioral change in the device classes is not running the
supplicant interface state changes from an idle; we'll have to
see if that causes problems.  ISTR long ago that processing the
state change signals directly caused some issues, but we've
significantly reworked somethings since then so we may be able
to get away with this now.
2010-10-06 11:05:21 -05:00
Dan Williams
4d63f08403 supplicant: reorganize supplicant manager class
Gets rid of prototypes and simplifies the code a bit.
2010-10-05 14:20:23 -05:00
Dan Williams
262db04e20 supplicant: use a GHashTable instead of a GSList for tracking interfaces
It's just less code. Yay.
2010-10-05 14:19:56 -05:00
Dan Williams
71c4e2338b supplicant: simplify supplicant interface object
Move GObject stuff to the bottom to reduce prototype abuse and
remove unneeded prefixes from stuff that's private to the class
itself.  We also don't need the 'supplicant-manager' or 'device'
properties since they weren't used anywhere.
2010-10-05 14:19:43 -05:00
Dan Williams
410c354384 Revert "supplicant: simplify supplicant interface object"
This reverts commit 43b55f719f.
2010-10-05 14:17:53 -05:00
Dan Williams
8738aad6f2 Revert "supplicant: use a GHashTable instead of a GSList for tracking interfaces"
This reverts commit 0e61ddcd27.
2010-10-05 14:17:48 -05:00
Dan Williams
aadc6d6a7e Revert "supplicant: reorganize supplicant manager class"
This reverts commit edd2369eb8.
2010-10-05 14:17:40 -05:00
Dan Williams
edd2369eb8 supplicant: reorganize supplicant manager class
Gets rid of prototypes and simplifies the code a bit.
2010-10-04 23:25:18 -05:00
Dan Williams
0e61ddcd27 supplicant: use a GHashTable instead of a GSList for tracking interfaces
It's just less code. Yay.
2010-10-04 19:42:25 -05:00
Dan Williams
43b55f719f supplicant: simplify supplicant interface object
Move GObject stuff to the bottom to reduce prototype abuse and
remove unneeded prefixes from stuff that's private to the class
itself.  We also don't need the 'supplicant-manager' or 'device'
properties since they weren't used anywhere.
2010-10-04 19:37:17 -05:00