Commit graph

22 commits

Author SHA1 Message Date
Dan Williams
0e6a5365d4 core: move secrets handling to NMSettingsConnection
It's the thing that owns the secrets anyway, and it simplifies things to
have the secrets handling there instead of half in NMActRequest and
half in NMManager.  It also means we can get rid of the ugly signals
that NMSettingsConnection had to emit to get agent's secrets, and
we can consolidate the requests for the persistent secrets that the
NMSettingsConnection owned into NMSettingsConnection itself instead
of also in NMAgentManager.

Since the NMActRequest and the NMVPNConnection classes already tracked
the underlying NMSettingsConnection representing the activation, its
trivial to just have them ask the NMSettingsConnection for secrets
instead of talking to the NMAgentManager.  Thus, only the
NMSettingsConnection now has to know about the agent manager, and it
presents a cleaner interface to other objects further up the chain,
instead of having bits of the secrets request splattered around the
activation request, the VPN connection, the NMManager, etc.
2011-01-27 10:41:02 -06:00
Dan Williams
b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams
b38f39cfc6 core: build keyfile plugin into NetworkManager
Since settings storage is now handled by NetworkManager, we must
have the ability to read/write all connection types at all times.
Since the 'keyfile' plugin is the only plugin that can handle all
connection types, build it into NetworkManager.
2011-01-12 18:12:23 -06:00
Dan Williams
215306f5a1 core: add AddAndActivate D-Bus method
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
2011-01-10 23:39:12 -06:00
Dan Williams
cf7cc2492d logging: LOGD_SYS_SET -> LOGD_SETTINGS 2010-12-10 12:32:22 -06:00
Dan Williams
9d077444a9 settings: remove settings dict from connection 'updated' signal
New connections should not be pushed out in the Updated signal
because signals cannot be restricted to particular clients, and
some clients may not have permission to view the connection.

Upon receiving the Updated signal, clients should re-read the
connection using GetSettings to ensure that the client still
has permissions to view the connection, and to get the updated
settings.
2010-12-02 14:34:38 -06:00
Dan Williams
858fc2c4b8 trivial: remove incorrect comment 2010-11-18 14:21:21 -06:00
Dan Williams
a53c31427d settings: make use of nm_auth_uid_in_acl() 2010-11-18 14:05:33 -06:00
Dan Williams
eccca738aa core: make nm_auth_get_caller_uid() error description non-const
For consistency with the next commit, so we don't need to remember
when to free the description or not.
2010-11-18 13:47:04 -06:00
Dan Williams
ac2438518d settings: don't allow addition of invisible connections
Ensure that only connections which are visible to the user adding
the connection may be added.
2010-11-18 12:53:24 -06:00
Dan Williams
fe3002d9f1 settings: fix permission checking during add 2010-11-18 12:40:38 -06:00
Dan Williams
c0f5872b5a settings: don't accept possible auth as success for saving hostname
Since user interaction is allowed when the permission for SaveHostname
is requested, if the user didn't authorize completely when polkit
returns, we don't want to proceed with the request.  Otherwise we might
get into a situation where it's possible for the user to authorize,
but they didn't, and previously the code would allow the request.
2010-11-17 17:54:04 -06:00
Dan Williams
1bbc624477 settings: port AddConnection to NMAuthChain
More code saved.  Yay.
2010-11-17 17:53:37 -06:00
Dan Williams
670da10764 settings: port SaveHostname to NMAuthChain
Every line of code we remove can then be spent on
rainbows and kittens.
2010-11-17 17:44:33 -06:00
Dan Williams
02d942320d core: fix nm_settings_get_connections() result confusion
It used to reference items in the list, but no longer does because
that's stupid.  Fixes some merge damage and a leak.
2010-11-17 17:42:22 -06:00
Dan Williams
3de9332f09 trivial: be a bit more paranoid about re-exporting connections 2010-11-17 17:33:00 -06:00
Dan Williams
453ea4d5c7 settings: make sure we use a clear error every time 2010-10-29 23:13:57 -05:00
Dan Williams
85db10a13f settings: fix connection addition
Need to make sure we actually export the connection over D-Bus (via
claim_connection()) before we try to return its object path in the
AddConnection reply.  Second, we need to send the path as a string
in the reply, not an object, since the return type is an object path.
2010-10-29 22:10:32 -05:00
Dan Williams
9d725be3a9 settings: fix signature of connection updated handler 2010-10-29 22:05:23 -05:00
Dan Williams
37845af954 settings: return new connection object path from AddConnection
Finally.
2010-10-29 14:34:33 -05:00
Dan Williams
3f64bf5e36 settings: rename NM_SYSCONFIG_SETTINGS_ERROR -> NM_SETTINGS_ERROR 2010-10-27 20:38:26 -05:00
Dan Williams
83ab4ec2ee settings: system-settings -> settings 2010-10-27 20:22:14 -05:00
Renamed from src/system-settings/nm-settings.c (Browse further)