Commit graph

5231 commits

Author SHA1 Message Date
Dan Williams
f7e27ea239 settings: allow settings service to return partial secrets
This allows the admin to define generic secrets for all users the
connection is visible to, but allows user-specific secrets as well.
2010-12-22 15:12:12 -06:00
Dan Williams
4f058e2dc4 agent: ask secret agents for secrets when connection doesn't have any
Filter registered agents for each secrets request to ensure that the
connection for which secrets are requested is visible to that agent,
and add that agent to the queue.  Ask each agent in the queue until
one returns usable secrets.  Ensure that if new agents register
or existing agents quit during the secrets request, that the queue
is updated accordingly, and ensure that an agent that's already
been asked for secrets, unregisters, and re-registers before the
secrets request is comple, isn't asked for secrets twice.
2010-12-14 15:34:34 -06:00
Dan Williams
5e19b02f0b dbus: allow NetworkManager to talk to secret agents 2010-12-14 15:32:12 -06:00
Dan Williams
9df9abb06f tests: make agent tester stick around until Ctl+C 2010-12-14 15:31:53 -06:00
Dan Williams
16a8a951e9 ifcfg-rh: PSK isn't necessary for valid WPA connection
We'll ask secret agents for it if it's not stored in the connection.
2010-12-14 15:26:40 -06:00
Dan Williams
ca1338007c tests: add secret agent API test tool 2010-12-14 15:04:14 -06:00
Dan Williams
fc82bbc412 agent: allow the '.' character in agent identifiers 2010-12-14 11:19:39 -06:00
Dan Williams
81bc9c8572 libnm-glib: allow the '.' character in agent identifiers 2010-12-14 11:19:19 -06:00
Dan Williams
ffac6b33c6 agent: fix infinite loop checking agent identifier 2010-12-14 11:14:24 -06:00
Dan Williams
585a4a1351 agent: actually register D-Bus introspection
So that the agent manager can get exported on the bus.
2010-12-14 11:12:56 -06:00
Dan Williams
84abb13554 libnm-glib: fix infinite loop checking agent identifier 2010-12-14 11:12:24 -06:00
Dan Williams
85fa487a48 tests: fix missing Makefile dep 2010-12-14 10:51:00 -06:00
Dan Williams
1496f8056f libnm-glib: add secret agent base class 2010-12-14 00:03:22 -06:00
Dan Williams
62a2c34e27 core: simplify secrets handling during activation
Instead of a bizare mechanism of signals back to the manager
object that used to be required because of the user/system settings
split, let each place that needs secrets request those secrets
itself.  This flattens the secrets request process a ton and
the code flow significantly.

Previously the get secrets flow was something like this:

nm_act_request_get_secrets ()
    nm_secrets_provider_interface_get_secrets ()
        emits manager-get-secrets signal
            provider_get_secerts ()
                system_get_secrets ()
                    system_get_secrets_idle_cb ()
                        nm_sysconfig_connection_get_secrets ()
                            system_get_secrets_reply_cb ()
                                nm_secrets_provider_interface_get_secrets_result ()
                                    signal failure or success

now instead we do something like this:

nm_agent_manager_get_secrets ()
    nm_agent_manager_get_secrets ()
        request_start_secrets ()
            nm_sysconfig_connection_get_secrets ()
                return failure or success to callback
2010-12-13 21:14:23 -06:00
Dan Williams
58088129f7 settings: only use one hint nm_sysconfig_connection_get_secrets()
Never used more than one anyway.
2010-12-12 21:29:13 -06:00
Dan Williams
ff101f4946 settings: remove callback from nm_sysconfig_connection_get_secrets()
No reason it needs to use the callback pattern anymore.
2010-12-12 21:17:34 -06:00
Dan Williams
e716e7507b agent: log agent registration 2010-12-10 13:32:45 -06:00
Dan Williams
a30cf19858 agent: add agent manager and minimal agent class 2010-12-10 12:38:19 -06:00
Dan Williams
66291ec204 logging: LOGD_USER_SET -> LOGD_AGENTS 2010-12-10 12:36:02 -06:00
Dan Williams
cf7cc2492d logging: LOGD_SYS_SET -> LOGD_SETTINGS 2010-12-10 12:32:22 -06:00
Dan Williams
0a8f7aeb56 core: use #defines for NMDBusManager signal names
Helps catch typos at compile time instead of runtime.
2010-12-10 11:36:55 -06:00
Dan Williams
ffb808f4c4 core: fix possible leak in error path 2010-12-10 10:46:09 -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
87aa9a1412 test: add helper for testing connection addition 2010-11-18 14:27:47 -06:00
Dan Williams
042468a86e settings: convert more hand-rolled polkit to NMAuthChain 2010-11-18 14:24:58 -06:00
Dan Williams
858fc2c4b8 trivial: remove incorrect comment 2010-11-18 14:21:21 -06:00
Dan Williams
c11ba3ea10 settings: GHashTable isn't a GObject subclass 2010-11-18 14:05:57 -06:00
Dan Williams
a53c31427d settings: make use of nm_auth_uid_in_acl() 2010-11-18 14:05:33 -06:00
Dan Williams
47eaf97d67 core: add nm_auth_uid_in_acl()
For checking whether a specific user ID is:
  1) in a known session
  2) allowed by the connection's permissions ACL
2010-11-18 13:49:47 -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
c3c9d93b1d settings: fix session checking for connection operations 2010-11-18 13:04:15 -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
64c817ddcc test: add hostname test helper 2010-11-18 12:51:35 -06:00
Dan Williams
fe3002d9f1 settings: fix permission checking during add 2010-11-18 12:40:38 -06:00
Dan Williams
09a6f45ead libnm-util: fix symbol visibility of nm_setting_connection_permissions_user_allowed 2010-11-18 12:29:50 -06:00
Dan Williams
9db44c42ee settings: remove unused variables 2010-11-18 10:55:21 -06:00
Dan Williams
ca063e4d0c libnm-util: add nm_setting_connection_permissions_has_user()
Utility function to determine whether a given username is in the ACL.
2010-11-18 10:36:18 -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
98dab62d92 core: simplify device disconnect flow 2010-11-17 17:02:21 -06:00
Dan Williams
1064397904 core: add helper to access authentication result 2010-11-17 16:56:34 -06:00
Dan Williams
3391a00354 core: fix up merge damage 2010-11-16 18:23:27 -06:00
Dan Williams
cfaa80b261 Merge remote branch 'origin/master' into rm-userset 2010-11-16 18:08:48 -06:00
Dan Williams
568f5e073b release: bump version to 0.8.990
Bump master branch version way past stable branch version for
development purposes.
2010-11-16 17:57:57 -06:00
Jiří Klimeš
d32a29ec52 ifcfg-rh: quiet ifcfg-rh plugin when re-read connection is the same as in-memory one
It occurs, for example, when NM updates connection's timestamp.
2010-11-10 17:28:36 +01:00
Jiří Klimeš
0376f6b1ce keyfile: ignore temporary files (bgo #602868)
Ignore temporary files created by vim editor and temporary files created
internally by g_file_set_contents() (mkstemp()) when writing connections.
2010-11-10 16:21:25 +01:00
Dan Williams
c580444fd7 keyfile: quiet keyfile plugin when re-read connection is the same as in-memory one
It occurs, for example, when NM updates connection's timestamp.
2010-11-10 16:14:51 +01:00