Commit graph

251 commits

Author SHA1 Message Date
Gabor Kelemen
3b00919b7a core: mark strings for translation (bgo #666652) 2012-01-17 15:53:16 +01:00
Gabor Kelemen
d3c1383b4e core: fix domain for g_option_context_set_translation_domain() (bgo #666652) 2012-01-17 15:51:28 +01:00
Gabor Kelemen
48852e112e core: setlocale(), so that locale's env variables are honored (bgo #666516) 2012-01-17 15:17:06 +01:00
Dan Williams
b2eaf7228e firewall: add firewall log domain and use it in firewall code 2011-12-06 16:51:17 -06:00
Dan Williams
c1344ec097 trivial: small cleanup checking error 2011-12-05 12:14:40 -06:00
Dan Williams
2ade420479 netlink: consolidate netlink monitor error handling and initialization
The fact that any of this code was in main.c was a hangover from
a long time ago and it should really go with the rest of the
netlink monitor code.
2011-12-03 17:38:07 -06:00
Dan Williams
2ea0f3e9c2 backends: clean them up somewhat
Put the two functions they provide into their own header so
places that need them don't have to include nm-system.h.
2011-11-17 18:55:07 -06:00
Jiri Popelka
1c0aeb4575 firewall: add firewall manager
src/firewall-manager tracks whether firewall is on the bus or not.
In nm-device.c at stage5 (ip-config-commit) before we actually
apply the IP configuration to the interface, we send the
IP interface name and zone to firewall and asynchronously wait
for a D-Bus reply.  Then after we get the reply
(or if the firewall isn't running) we proceed with
applying the IP configuration to the interface.
2011-11-09 22:02:02 -06:00
Jiří Klimeš
4d1d3b9935 core: fix building for GLib thread API changes (GLib >= 2.31.0) (bgo #662695) 2011-10-31 15:30:02 +01:00
Jiří Klimeš
3e79f06566 trivial: remove unwanted exclamation mark to fix compilation 2011-10-03 15:54:25 +02:00
Thomas Bechtold
ab7a8fcf98 core: improve config error handling
* better error messages
  * fix memory leak in parse_state_file ()
  * create intermediate parent directories as needed for state file
2011-10-03 00:46:37 -05:00
Dan Williams
a38032e96c core: split nm_manager_get() to simplify manager creation
OLPC Mesh code now doesn't have to be updated every time we change
the manager's creation arguments.  We could make all these arguments
GObject properties of the manager too, but that's more code and
we'd eventually like to figure out a better solution for letting
non-NMManager code listen for device addition/removal.
2011-09-27 09:40:54 -05:00
Dan Williams
52e96be3c4 core: split out config file handling
Make config file stuff somewhat clearer and easier to understand,
and possibly easier to extend later.
2011-09-27 09:40:50 -05:00
Dan Williams
1f835b0adb core: remove unused arguments from nm_manager_get() 2011-09-27 09:24:36 -05:00
Dan Williams
3620353050 core: add --version and allow it and --help to be run without root 2011-04-28 16:55:35 -05:00
Dan Williams
688da0fe4f core: better fix for ignoring return value of write(2)
Casting to (void) still doesn't do it, so just assign it to
something and ignore it, in conjunction with
-Wno-unused-but-set-variable
2011-04-14 17:10:05 -05:00
Dan Williams
f7428864ae core: fix ignoring return value of write(2) 2011-04-14 17:09:54 -05:00
Dan Williams
b6e66c8ff4 core: don't call g_main_loop_quit() from the signal handler
Besides not being technically reliable (although it mostly works)
we could get into situations where systemd would kill the cgroup
which resulted in NM getting a SIGCHLD for dhclient children before
the SIGTERM quit the mainloop.  This caused NM to think that the
dhclient process died unexpectedly, and to tear down the connection
even though what NM really wanted to do was just leave everything
running so that the connection could be taken over on restart.
2011-04-08 14:36:14 -05:00
Dan Williams
745c262568 Revert "core: don't trap SIGINT"
This reverts commit 3a47e57f68.

Forgot Ctl+C does SIGINT, which we use a ton when developing.  Oops!
2011-02-15 12:24:05 -06:00
Dan Williams
3a47e57f68 core: don't trap SIGINT
Let debuggers handle it like they're supposed to.
2011-02-15 11:35:56 -06:00
Jiří Klimeš
6fb021d5ea core: log the error when nm_settings_new() fails 2011-02-14 17:18:13 +01:00
Dan Williams
6d344a43e9 Merge remote-tracking branch 'origin/rm-userset'
There; it's merged.  Yay!
2011-02-12 22:51:12 -06:00
Ozan Çağlayan
e9c8ba4e3d trivial: fix RFKILL log domain manpage and help text 2011-02-09 10:56:14 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
0587ef1179 Merge remote branch 'origin/master' into wimax 2011-01-02 17:24:23 -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
Dan Williams
fd5e8c2f05 core: fix leak parsing config file 2010-12-10 18:50:49 -06:00
Dan Williams
1ec6b67162 settings: rename NMSysconfigSettings to NMSettings 2010-10-27 20:05:23 -05:00
Dan Williams
84def2fedf settings: remove connection tracking from NMManager
NMSysconfigSettings has the authoritative list of connections, no reason
to duplicate all that tracking code in NMManager.  Add the missing bits
that the manager had to NMSysconfigSettings, and point NMPolicy at the
settings object instead of NMManager for that.
2010-10-27 15:47:10 -05:00
Dan Williams
64b6cd1ebc core: add DNS plugin config options 2010-09-09 17:14:20 -05:00
Dan Williams
9b2b809aae core: rename NMNamedManager -> NMDnsManager 2010-09-07 22:08:18 -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
0a700de047 core: read nm-system-settings.conf first (rh #606160)
Even though we prefer NetworkManager.conf, we need to check the
old nm-system-settings.conf first to preserve compat with older
setups.  In package managed systems dropping a NetworkManager.conf
onto the system would make NM use it instead of nm-system-settings.conf,
changing behavior during an upgrade.  We don't want that.
2010-07-21 16:47:31 -07:00
Dan Williams
c4f3bf002b Merge remote branch 'origin/master' into wimax 2010-05-19 08:55:26 -07:00
Dan Williams
a7e0e62311 core: tell GIO to use local implementation (rh #588745)
GIO will apparently normally try to use the remote VFS implemenation
on the session bus.  But NM (as a root service) shouldn't ever be
trying to talk to anything on the session bus.  Squash that.
2010-05-13 10:52:07 -07:00
Dan Williams
e46577ffe5 core: rearrange version macros a bit 2010-04-23 12:12:47 -07:00
Jiří Klimeš
b0548425d7 logging: log NetworkManager version; use distribution version when configured 2010-04-23 15:25:32 +02:00
Dan Williams
7e5d6a42b0 logging: use --log-domains for consistency 2010-04-08 09:11:00 -07:00
Dan Williams
f354bd3d9f logging: allow OLPC mesh logging to be used 2010-04-07 13:33:49 -07:00
Dan Williams
adc9ef60fc logging: move config file logging options into their own section 2010-04-07 11:31:38 -07:00
Dan Williams
8faf8c91ef logging: add DEVICE logging domain 2010-04-06 16:25:42 -07:00
Dan Williams
6e97fc4441 logging: tweak default log levels 2010-04-06 16:19:30 -07:00
Dan Williams
3e8a05d28e logging: allow logging control from the config file 2010-04-06 15:57:24 -07:00
Dan Williams
c0a455d344 core: clean up logging in main.c 2010-04-06 15:48:31 -07:00
Dan Williams
8e1ad97056 core: options help text cleanup 2010-04-06 15:28:33 -07:00
Dan Williams
e19bac4cd0 core: use fprintf before logging is set up 2010-04-06 15:27:35 -07:00
Dan Williams
32128b04ca logging: add basic logging capabilities 2010-04-06 15:23:08 -07:00
Dan Williams
55728349a1 core: properly clear non-fatal errors from state file parsing 2010-03-23 14:12:32 -07:00
Jiří Klimeš
798d68caa4 dhcp: more intelligent default DHCP client detection 2010-03-06 00:07:06 -08:00
Jiří Klimeš
dbacb05d2a core: fix GErrors pileup 2010-03-03 10:11:11 +01:00