Commit Graph

8762 Commits

Author SHA1 Message Date
Jiří Klimeš
6fb021d5ea core: log the error when nm_settings_new() fails 2011-02-14 17:18:13 +01:00
Jiří Klimeš
c6f479922e cli: print header while listing connections (nmcli -p con list)
It was removed by mistake when user connections were removed.
2011-02-14 17:01:33 +01:00
Jiří Klimeš
ec4d126d5a libnm-glib/build: make WiMAX support optional 2011-02-14 16:08:00 +01:00
Jiří Klimeš
a6de5792d1 cli/build: make WiMAX support optional 2011-02-14 16:06:37 +01:00
Dan Williams
b6c436d8d7 libnm-util: reject detail in permissions for now
Already did this in the permissions accessors, this mirrors that
behavior in the GObject property setters.
2011-02-13 00:21:41 -06:00
Dan Williams
57e928d4f8 release: bump version to 0.8.992 2011-02-12 23:25:04 -06:00
Dan Williams
4475c79b00 libnm-util: bump soname to indicate ABI break 2011-02-12 23:24:30 -06:00
Dan Williams
14b2fe1477 libnm-glib: bump soname to indicate ABI break 2011-02-12 23:23:10 -06:00
Dan Williams
6d344a43e9 Merge remote-tracking branch 'origin/rm-userset'
There; it's merged.  Yay!
2011-02-12 22:51:12 -06:00
Dan Williams
e08db5cae5 libnm-util: warn if trying to set NULL VPN secrets 2011-02-12 22:37:33 -06:00
Dan Williams
d61a312ca2 libnm-util: make sure NULL secrets don't slip in via g_object_set()
We already do this for nm_setting_vpn_add_secret()
2011-02-12 22:26:48 -06:00
Dan Williams
c7ec68e0ba libnm-glib: handle initially invisible connections correctly
Don't delete them if we don't have permission for them, since
we may get permission for them later via Update.  But to listen
for Update we need the connection around.
2011-02-12 22:00:30 -06:00
Dan Williams
d94590a52c libnm-glib: fix connection visibility handling
When the connection becomes invisible to a user (ie, the permissions
of the connection no longer allow that user to view the connection)
then we have to hid the connection from clients.  But we can't
just dispose of it, because visibility changes are signaled with
Update signals on the connection itself, and thus we need to keep
the connection around just in case it becomes visible to the user
again.  But if it's invisible, make sure we clear out the settings
since they may have changed.
2011-02-12 21:48:30 -06:00
Dan Williams
2ef55166c8 libnm-util: fix parsing permission if it includes detail 2011-02-11 23:05:53 -06:00
Dan Williams
f82f0aa654 settings: fix NewConnection signal emission 2011-02-11 22:26:14 -06:00
Dan Williams
4d2957b3ae settings: fix NMSettingsConnection D-Bus Remove signal emission
We can't unregister the object with the bus during the remove signal,
because dbus-glib doesn't send the signal out over the bus until late
in the signal emission process, after we've unregisterd the object.
Thus the signal doesn't go out.  Fix that.
2011-02-11 22:26:12 -06:00
Dan Williams
e386ebef39 libnm-glib: use define instead of string for Removed signal
Less error-prone and makes a mistype a compile error.
2011-02-11 22:26:10 -06:00
Dan Williams
cba20a98ca keyfile: use defines instead of strings for Removed signal 2011-02-11 22:26:09 -06:00
Dan Williams
76147fc5e1 settings: use the right permission for connection updates that change visibility
Make sure to use modify.system if the Update request changes the
visibility of the connection, since that update request would
affect more users than just the caller.
2011-02-11 22:26:08 -06:00
Dan Williams
a21c01a243 settings: check harder for system-owned secrets when validating agents
Can't just check whether we have existing system secrets, because
that doesn't catch the case for a completely new connection where
there may not be any secrets yet, but any that we do get should
be system-owned.
2011-02-11 22:26:07 -06:00
Dan Williams
dede4d3948 settings: fix warnings when no existing secrets are present
Since the hash table will be NULL in that case, don't try to do
anything with it.
2011-02-11 22:26:06 -06:00
Dan Williams
562dc6e0b6 settings: check modify 'own' not 'system' for personal connections
When a connection is visible only to one user, check 'own' instead
of 'system', allowing 'own' to be less restrictive since the change
won't affect any other users.
2011-02-11 22:26:05 -06:00
Dan Williams
2e2b4373eb core: add ulong data helpers to NMAuthChain
Otherwise callers would have to do the work themselves to ensure that
the top 32 bits of the ulong didn't get chopped off on 32-bit
platorms.
2011-02-11 16:43:03 -06:00
Dan Williams
016c56078d policy: rename HOSTNAME_MODIFY -> MODIFY_HOSTNAME for consistency 2011-02-11 11:32:57 -06:00
Dan Williams
ba8f562836 policy: add a "modify own" permission for single-user-visible connections
This policy will allow users to modify their personal connections (ie
maybe VPN connections, etc) distinctly from system-wide connections that
affect more than just their user.  It makes sense to be more lenient when
making changes to settings that don't affect other users.
2011-02-11 11:31:14 -06:00
Dan Williams
f2c317e3d2 policy: rename "modfiy" permission to "modify system"
Meaning stays the same, but this will allow us to differentiate
in the future between personal connections (ie, just visible to
one user) and system connections (visible to more than one user).
2011-02-11 11:19:02 -06:00
Dan Williams
76467e53e5 libnm-glib-vpn: add some helpers for auth dialogs
The helpers read and return the data items and secrets that the applet
sends to the auth dialog.
2011-02-10 18:48:32 -06:00
Dan Williams
e42e392418 settings: ensure not-saved or not-required VPN secrets don't propagate
We don't want these secrets in the NMSettingsConnection's internal
secrets cache since they shoulnd't ever be read off-disk, and they
should be discarded immedaitely after use.  Similarly, we want to
remove any of these secrets that do come through from a secrets
request that doesn't allow user-interaction, since not-saved secrets
aren't allowed there.
2011-02-10 18:45:13 -06:00
Dan Williams
67051f6445 keyfile: don't write not-saved or not-required VPN secrets
VPN secrets need special handling here since they are in a 3rd
level hash.
2011-02-10 18:43:20 -06:00
Dan Williams
2ec115bb64 vpn: clear secrets after successful activation
We're already connected; shouldn't need secrets again but
if we do, we'll ask for them again.  Fixes an issue where
reconnect would use an old one-time-password.
2011-02-10 18:07:04 -06:00
Dan Williams
ee2c19a64f agents: correctly handle VPN secrets when marking them as not required
We need to iterate through each item in the VPN's 'secrets' property
and mark it as not required, instead of just marking the 'secrets'
property itself as not required.  Yeah, VPN secrets are a bit
annoying.
2011-02-10 11:36:00 -06:00
Dan Williams
9d2889a4a7 agents: send available secrets to the agents
The caller has already taken care of making sure that the
agent is privileged enough to have secrets, so send them along
if the caller gave them to us.
2011-02-10 11:34:35 -06:00
Dan Williams
a6edda0b13 vpn: more logging during secrets requests 2011-02-10 11:34:13 -06:00
Jiří Klimeš
5f6b68862e cli: fix "format not a string literal and no format arguments" cc error
The string could contain printf format sequences.
2011-02-10 16:30:00 +01:00
Jiří Klimeš
83dc4032b7 libnm-glib: fix comment/doc for nm_client_networking_get_enabled() 2011-02-10 15:20:56 +01:00
Jiří Klimeš
f29b709590 cli: improve/add NM running checks
Check whether NetworkManager is running and return new error
NMC_RESULT_ERROR_NM_NOT_RUNNING when appropriate.
2011-02-10 14:39:47 +01:00
Dan Williams
d871512467 ifcfg-rh: handle different connections with the same ID
Since ifcfg-rh uses the connection's ID as the filename by default,
we could run into a situation where two connections with the same
ID are visible to different users.  We don't want one connection
overwriting the other in that case, so we need to pick a new name
for the one we're about to write.
2011-02-09 20:44:27 -06:00
Jiří Klimeš
4242f18fb2 cli: don't poke NetworkManager D-Bus service names when it's not running
When getting status of NetworkManager via 'nmcli nm ...' and NetworkManager
is not running, do not call its D-Bus methods. It prevents NM to be implicitly
executed when configured as D-Bus activated service.
2011-02-10 01:54:04 +01:00
Dan Williams
1f313f36f0 settings: do some basic validate in AddConnection
Like making sure the connection verifies, and making sure the
new connection's UUID is indeed unique.
2011-02-09 18:41:48 -06:00
Dan Williams
db41fe3cf2 settings: add error for already existing UUID 2011-02-09 18:41:17 -06:00
Dan Williams
275e5c5e62 keyfile: handle different connections with the same ID
Since keyfile uses the connection's ID as the filename by default,
we could run into a situation where two connections with the same
ID are visible to different users.  We don't want one connection
overwriting the other in that case, so we need to pick a new name
for one of them.  Append the connection's UUID to the end to
minimize the risk of further conflicts for that name.
2011-02-09 18:09:47 -06:00
Dan Williams
eddc66e36d keyfile: split nm_keyfile_plugin_write_connection()
The non-test function doesn't need to take as many arguments, which
makes the code a lot cleaner to look at in the plugin and connection
subclass.
2011-02-09 17:23:10 -06:00
Dan Williams
f1d0293517 keyfile: trivial code simplification 2011-02-09 17:11:13 -06:00
Dan Williams
d654836c6f keyfile: require a UUID in the connection settings
The connection needs a UUID, period.
2011-02-09 17:07:43 -06:00
Dan Williams
a96b4c5082 keyfile: use nm_connection_get_id() more 2011-02-09 17:07:24 -06:00
Dan Williams
3ea9458016 keyfile: use nm_connection_get_id() and nm_connection_get_uuid() 2011-02-09 16:41:33 -06:00
Dan Williams
c5235f87db libnm-util: add connection helpers for ID and UUID
Shortcuts.  Getting the ID and UUID is used in a ton of places
and this helps cut down on code.
2011-02-09 16:34:42 -06:00
Dan Williams
09d608b99c trivial: more spacing cleanups 2011-02-09 16:30:30 -06:00
Dan Williams
be628d9f9b trivial: spacing cleanups 2011-02-09 16:28:57 -06:00
Ozan Çağlayan
e9c8ba4e3d trivial: fix RFKILL log domain manpage and help text 2011-02-09 10:56:14 -06:00