Commit graph

1977 commits

Author SHA1 Message Date
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
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
Dan Williams
773c006a4c policy: support IPv6 address reverse-lookup for hostname too 2010-06-08 10:40:08 -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
a3d8cb9b6d core: rework pending activation to be more flexible
In preparation for more granular permissions.
2010-06-01 00:36:46 -07:00
Dan Williams
c4946a6dfe core: fix some problems with the user auth rework 2010-05-31 16:47:38 -07:00
Dan Williams
3b6917f74b core: make nm_auth_is_caller_root() more generic 2010-05-31 09:45:26 -07:00
Jiří Klimeš
12d26643e9 libnm-util: add nm_utils_wifi_* functions to handle frequencies/channels 2010-05-31 15:32:13 +02:00
Dan Williams
41faf87b0e core: root can always enable/disable and sleep/wake 2010-05-30 08:30:37 -07:00
Dan Williams
65818d517e core: PolicyKit-protect sleep/wake
Default to 'not allowed', distros that need backwards compatibility
can flip this to 'yes' if they need to. At this point, only power
management scripts should call these functions.
2010-05-29 23:11:45 -07:00
Dan Williams
c013490ba3 core: PolicyKit-protect enable/disable networking method 2010-05-29 23:00:46 -07:00
Dan Williams
716a9c6c0d core: add permissions framework for various operations (rh #585182) (bgo #619323) 2010-05-28 18:23:00 -07:00
Dan Williams
6810ef1422 core: don't shadow 'sleep' 2010-05-28 13:06:14 -07:00
Dan Williams
fea6431a20 core/libnm-glib: implement better missing firmware support (rh #594578)
Track missing firmware and ensure the device can't be used when firmware
is missing.  Add a property for missing firmware so that clients can do
something intelligent with this information.
2010-05-25 10:52:25 -07:00
Dan Williams
ba17174798 core: NL_CB_VERBOSE breaks error propagation (rh #594578)
Plus we don't really need the VERBOSE bits anyway.
2010-05-24 17:21:04 -07:00
Dan Williams
2e92d84ef0 modem: fix WWAN hardware enable state tracking (rh #591622) 2010-05-24 17:07:46 -07:00
Dan Williams
fa70542c61 core: add networking enable/disable knob distinct from sleep/wake (rh #589108) (bgo #346615)
Since forever we've used sleep/wake as the way to implement
Networking Enabled.  When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.

This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
2010-05-22 09:51:22 -07:00
Dan Williams
a729d2f649 ip6: remove standalone DHCP method since DHCPv6 can't provide gateways
All IPv6 enabled sites are expected to provide router advertisement
support apparently.  If standalone DHCP is really used in the wild
then we can clearly re-enable it later.
2010-05-20 10:24:13 -07:00
Dan Williams
87ac1bd5f5 vpn: s/tundev/ip_iface 2010-05-18 16:47:43 -07:00
Dan Williams
0b8ee13ee0 ip6: pad RDNSS server expiry slightly to avoid hiccups (rh #590202)
Pad the DNS server expiry somewhat to give a bit of slack in cases
where one RA gets lost or something (which can happen on unreliable
links like wifi where certain types of frames are not retransmitted).
2010-05-14 09:48:46 -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
c62cfd2b63 dns: fix undefined reference when netconf is enabled (bgo #618300)
Thanks to Dominique Leuenberger.
2010-05-10 16:35:14 -07:00
Dan Williams
3e68d33583 ip6: only honor kernel-provided RA flags if an RA was received (rh #588560)
The kernel apparently caches the value and will send Managed/Other flags
in the newlink message even if the router is no longer reachable and
and RA hasn't been received for a while.  So we need to make sure we
check for IF_RA_RCVD before paying attention to Managed/Other.
2010-05-10 15:19:03 -07:00
Dan Williams
391fb0f0f2 ip6: set accept_ra to initial value for ignored connections (rh #588619) 2010-05-05 13:20:18 -07:00
Dan Williams
266e389cd3 bt: more debug logging 2010-05-05 13:09:12 -07:00
Dan Williams
57d9cc3c4a bt: increase DUN modem find timeout a bit 2010-05-05 12:53:20 -07:00
Dan Williams
e2f848c2d9 bt: ensure connect timeout is canceled on success (rh #586961) 2010-05-05 12:52:45 -07:00
Dan Williams
17b49b957c ip6: don't flush link-local IPv6 routes (rh #587836)
Since a link-local address should pretty much always be
assigned to an active interface, avoid flushing the routes
that allow link-local communication to work.
2010-05-04 20:24:17 -07:00
Dan Williams
1c5236029c core: pass ifindex and address family when flushing routes
Use the interfaces kernel index when we can to avoid unecessary
iface->index lookups; and let callers figure out which address
family they really want to flush.
2010-05-04 20:23:09 -07:00
Dan Williams
ad1017974b core: treat missing IPv6 setting as "ignore" (rh #588814)
Caused IPv6 configuration to fail the device even if IPv6 was supposed
to be disabled/ignored.
2010-05-04 16:14:29 -07:00
Dan Williams
d9cca49784 logging: silence ignorable warning
Since the NMDevice's interface isn't always the same as a kernel
interface name, we won't always have an entry in /proc/sys/net for it.
2010-05-04 16:12:52 -07:00
Dan Williams
79df93ce33 logging: log PID with syslog messages 2010-05-04 15:03:59 -07:00
Dan Williams
46c5a48ff2 ip6: use IN6_ARE_ADDR_EQUAL not memcmp 2010-05-04 12:45:36 -07:00
Dan Williams
291211ac2b dbus: ensure only root can change debug levels 2010-05-04 12:07:57 -07:00
Dan Williams
defaee09e5 logging: correctly print new logging level and domains on changes
Previously the input would simply be printed, but if you're not
changing either the level or domains (ie sending "") then the
unchanged logging domains wouldn't be printed, only "".
2010-05-04 12:06:00 -07:00