Commit Graph

7740 Commits

Author SHA1 Message Date
Jiří Klimeš
b60a70217e trivial: fix cut&paste error in a comment 2010-09-03 14:15:41 +02:00
Wulf C. Krueger
623f09c586 build: don't install systemd files with --without-systemdsystemunitdir (bgo #628439) 2010-09-01 17:25:25 -05:00
Michael Kotsarinis
c0b7dc9734 po: update Greek translation (bgo #628541) 2010-09-01 17:12:34 -05:00
Dan Williams
e86ef05d84 wifi: ensure Enabled state is preserved regardless of rfkill (bgo #624479)
Previously the "Enable Wireless" state was somewhat tied to rfkill state,
in that when NM started up, rfkill state would take precedence over what
was listed in the state file, and if you rmmodded your wifi driver and
then modprobed it again after disabling wifi from the menu, wifi would
magically become re-enabled becuase rfkill state changed.

Fix that by creating a third wifi/wwan enable state that tracks the
actual user preference instead of just the rfkill state so that when
the user disables wifi it stays disabled, regardless of what happens
with rfkill.
2010-09-01 17:09:59 -05:00
Dan Williams
d9c2755cfc core: clean up avahi-autiopd D-Bus proxy on exit 2010-08-31 15:47:16 -05:00
Dan Williams
a33843ac3d core: listen to UPower for suspend/resume signals
This means you don't need pm-utils anymore, and that gnome-power-manager
doesn't need to poke NM explicitly for suspend/resume operations.
The old explicit sleep/wake request is still around for pm-utils or
gpm to use, but NM will listen for UPower events and act on them
regardless of what pm-utils or gpm do.
2010-08-31 15:45:55 -05:00
Dan Williams
4f2266de64 settings: simplify NMSysconfigConnection disposal
Use GHashTableIters again.
2010-08-27 12:49:01 -05:00
Dan Williams
25a59910b9 settings: simplify nm_sysconfig_connection_get_session_access_list()
Clearer and fewer LOC to use GHashTableIter here.
2010-08-27 12:44:57 -05:00
Dan Williams
4c23ac3c6c settings: remove some unused code
priv->access_list is allocated during object initialization and
only destroyed when the object is destroyed, so it will always
be valid over the lifetime of the object.  Thus no need to check
if it exists or not.
2010-08-27 12:39:47 -05:00
Dan Williams
c5e06c16ce settings: fix memory leak
The GSList returned by nm_session_manager_get_sessions() must be
freed by the caller.  s/connection/self to make it clear what
object is actually being handled here too.
2010-08-27 12:36:35 -05:00
Dan Williams
423a319af0 trivial: whitespace & style fixes 2010-08-27 12:20:04 -05:00
Dan Williams
e40511d2e9 trivial: style fix 2010-08-27 12:17:31 -05:00
Dan Williams
b2fdf36d8d trivial: add modelines to session tracker files 2010-08-27 12:16:03 -05:00
Dan Williams
cdcf74da89 settings: simplify initial CK session retrieval
Get rid of the InitInfo struct since it's so small and just store
that information in the main object's private data; less complicated.
Also fix an edge-case where the init-done signal would not get
emitted if CK wasn't tracking any sessions at the time.
2010-08-27 12:13:41 -05:00
Dan Williams
3697aa7d75 trivial: whitespace cleanup 2010-08-27 11:51:19 -05:00
Dan Williams
26327e7646 settings: simplify settings object registration
And fix a leak of the D-Bus manager too.
2010-08-26 18:11:46 -05:00
Dan Williams
e5c5622626 core: flatten connection listing from the settings service
While it may not reduce the LOC it saves a few memory allocations
and is somewhat less error prone since callers don't need to free
the returned lists.
2010-08-26 18:05:33 -05:00
Patrik Martinsson
9b54cb1ec6 dispatcher: add dhcp4-change and dhcp6-change events (bgo #563654)
New dispatcher events on DHCP lease changes.
2010-08-26 17:39:44 -05:00
Dan Williams
f58f2d7f39 ifnet: update for settings rework 2010-08-26 15:10:29 -05:00
Dan Williams
3945f75bda core: consolidate all permissions checking into main D-Bus interface
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before.  This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.

It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
2010-08-26 14:26:12 -05:00
Dan Williams
022d8e665c Merge remote branch 'origin/master' into gsoc 2010-08-26 09:18:37 -05:00
Jiří Klimeš
a093792cd0 man: add "EXIT STATUS" section to nmcli man page 2010-08-26 16:11:59 +02:00
Dan Williams
f917852de3 core: validate Enable/Disable WiFi and WWAN requests (rh #626337)
Since these were properties they are harder to validate the caller as
dbus-glib doesn't have any hooks before the property is set.  So we
install a low-level dbus filter function to catch property Set
requests before they get to dbus-glib and handle the property access
there.
2010-08-25 15:12:32 -05:00
Mu Qiao
38f3e5ca61 ifnet: add Gentoo system settings plugin 2010-08-24 12:09:30 -05:00
Dan Williams
3f2d741b0d trivial: gitignore update 2010-08-24 12:04:42 -05:00
Fran Diéguez
81099a35a7 po: update Galician translation (bgo #627682) 2010-08-24 10:42:18 -05:00
Rajesh Ranjan
3f2e933f24 po: updated Hindi translation (rh #589230) 2010-08-24 10:23:37 -05:00
Mathieu Trudel-Lapierre
78a827813e dhcp: fix dhclient version handling (gentoo #332157) (gentoo #331547) 2010-08-24 10:13:22 -05:00
Dan Williams
6f2cd9e959 core: more systemd service file fixes 2010-08-18 17:01:26 -05:00
Jorge González
d3fc2a16ce po: updated Spanish translation (bgo #627080) 2010-08-18 12:06:26 -05:00
Dan Williams
46afadc02c vpn: handle VPN service installation/removal dynamically (rh #489114) (lp:458595)
Use inotify to watch /etc/NetworkManager/VPN for new .name files and handle
their installation and removal on-the-fly instead of just at startup.
2010-08-17 15:05:00 -05:00
Dan Williams
c4db66c7ed vpn: fix refcounting of the VPN manager 2010-08-17 15:04:54 -05:00
Dan Williams
a5c15a2ca3 vpn: don't try to do stuff with a VPN connection that may not exist
If the activation of the VPN connection failed (like if its service
was not installed), it'll be NULL here.  Don't try to use it.
2010-08-17 15:04:50 -05:00
Dan Williams
6e7f9b4670 core: really fix polkit >= 0.97 this time 2010-08-17 09:36:14 -05:00
Daniel Gnoutcheff
6ebc201636 WIP: NMSysconfig: enforce access controls 2010-08-15 03:25:58 -04:00
Dan Williams
31d5d82cb0 core: really fix the polkit >= 0.97 build issue
The function we're looking for is in libpolkit-gobject-1, not
libpolkit-1.
2010-08-13 19:12:42 -05:00
Dan Williams
f0e8055cf9 core: fix builds with polkit >= 0.97
polkit_authority_get() is deprecated, should use
polkit_authority_get_sync() instead.
2010-08-13 13:18:58 -05:00
Zephaniah E. Loss-Cutler-Hull
d5468c8527 vpn: let plugins forbid VPN connections from getting the default route (bgo #621698)
Minor fixes and cleanups by dcbw.
2010-08-12 23:53:42 -05:00
Dan Williams
ba355b6a7e ifupdown: make testcase parsing quiet
Removes messages about invalid ENI formatting when running the
testcases.
2010-08-12 22:44:07 -05:00
Peter Marschall
a5b77939fb ifupdown: make parser for /etc/network/interfaces more robust
The previous implementation of the parser for /etc/network/interfaces had
quite a few drawbacks:
- it expected the lines to be terminated with "\n", even the last line
- it ignored line wraps with "\\" followed by "\n"
- it expected over-long lines to be shorter than 510 characters
- it ignored line wraps on over-long lines
- it treated spaces and tabs differently
- it did not make sure to really tokenize on word boundaries
- it treated the equivalent stanzas "auto" and "allow-auto" differently
- it ignored the fact that the "allow-*" stanzas can take multiple arguments
  that need to be separated to be recognized NetworkManager's processing later
- it allowed "non-block" stanzas to appear before a block

This patch is a rewrite of the parser to fix the issues mentioned:
- it accepts the last line even if it is not terminated by "\n"
- it skips over-long lines, emits a warning and even takes into account
  that over-long lines may be wrapped to next lines
- it un-wraps wrapped lines
- it uses spaces and tabs equivalently to tokenize the input
- it treats "allow-auto" as a synonym to "auto"
- it splits multi-argument "auto"/"allow-*" into multiple
  single-argument stanzas of the same type
- it warns on data stanzas before the first block stanza
2010-08-12 22:41:05 -05:00
Dan Williams
4397f4463a ifupdown: add ifparser testcases
ENI snippets from Peter Marschall <peter@adpm.de>
2010-08-12 22:35:13 -05:00
Daniel Gnoutcheff
b0fb908e18 WIP: Adding ConsoleKit session tracking framework 2010-08-12 21:54:56 -04:00
Dan Williams
e386548132 ifupdown: split parsers into convenience library for easier testcase creation 2010-08-12 18:15:21 -05:00
Mathieu Trudel-Lapierre
d39fda7722 dhcp: don't fail with dhclient v3 2010-08-12 17:52:20 -05:00
Daniel Nylander
73e5b74c6c po: updated Swedish translation (bgo #626693) 2010-08-12 16:22:37 -05:00
Dan Williams
4b44a2bd54 core: add systemd unit support 2010-08-12 11:15:26 -05:00
Dan Williams
37c578a2a2 core: fix unmanaging of devices when quitting
When NM quits, we don't want to unmanage a device that has
an active connection and can take that connection over again when
NM starts back up.  This makes '/etc/init.d/NetworkManager restart'
work seamlessly.  All other devices get unmanaged so their
connection (and any dependent VPN connections or wpa_supplicant
processes) get terminated.  This bug caused active VPN connections
over wifi to be left running even when they didn't have IP
connectivity.

There were two bugs:

1) the NMDevice class implemented connection_match_config() for
all device subclasses, but only Ethernet devices can assume
connections at startup.  Thus the quit-time check passed for
active wifi devices too, and they weren't properly cleaned up

2) The logic for figuring out which devices to clean up after when
quitting was somewhat flawed; we want to default to unmanaging
devices and then skip that step for ones that meet specific
criteria.  Instead the code defaulted to leaving all devices active
at shutdown.
2010-08-11 17:31:25 -05:00
Dan Williams
92babdb658 core: work around dbus-glib property access bug (CVE-2010-1172) (rh #585394)
More info:
https://bugzilla.redhat.com/show_bug.cgi?id=585394
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1172

dbus-glib was not properly enforcing the 'access' permissions on
object properties exported using its API.  There were 2 specific bugs:

1) dbus-glib did not enforce the introspection read/write property
permissions, so if the GObject property definition allowed write
access (which is sometimes desirable), D-Bus clients could modify
that value even if the introspection said it was read-only

2) dbus-glib was not filtering out GObject properties that were
not listed in the introspection XML.  Thus, if the GObject defined
more properties than were listed in the introspection XML (which is
also often useful, and NM uses this quite a bit) those properties
would also be exposed to D-Bus clients.

To fix this completely, you need to:

1) get dbus-glib master when the patch is commited, OR grab the
patch from https://bugzilla.redhat.com/show_bug.cgi?id=585394 and
build a new dbus-glib

2) rebuild NetworkManager against the new dbus-glib
2010-08-11 15:54:08 -05:00
Dan Williams
96a9ce41fb core: ensure dhcp_manager exists before trying to unref it (bgo #626610)
If a new device wasn't supported, it gets destroyed by the
NMDevice constructor() method.  But in the constructor paths
the DHCP manager isn't created yet, and so we attempt to unref
a non-existent DHCP manager.  Usually just a harmless warning,
but apparently a crash sometimes.
2010-08-11 13:12:19 -05:00
Aron Xu
a4e6519d11 po: updated Simplified Chinese translation (bgo #626628) 2010-08-11 12:50:46 -05:00