diff options
author | Thomas Haller <thaller@redhat.com> | 2018-04-09 18:13:28 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-13 09:09:46 +0200 |
commit | 41abf9f8e81423eff0ef888d17a5454d0b5750bf (patch) | |
tree | ffbd8d6caf494d640c7a21e928251be51b9ba79f /src/nm-auth-utils.c | |
parent | 2ea2df3184d45567fa9c44f5ef90634a779bfb75 (diff) | |
download | NetworkManager-41abf9f8e81423eff0ef888d17a5454d0b5750bf.tar.gz |
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
Diffstat (limited to 'src/nm-auth-utils.c')
-rw-r--r-- | src/nm-auth-utils.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/nm-auth-utils.c b/src/nm-auth-utils.c index ffb8f39d78..d641621bf2 100644 --- a/src/nm-auth-utils.c +++ b/src/nm-auth-utils.c @@ -72,10 +72,8 @@ _ASSERT_call (AuthCall *call) static void auth_call_free (AuthCall *call) { -#if WITH_POLKIT if (call->call_id) nm_auth_manager_check_authorization_cancel (call->call_id); -#endif nm_clear_g_source (&call->call_idle_id); c_list_unlink_stale (&call->auth_call_lst); @@ -255,7 +253,6 @@ auth_call_complete_idle_cb (gpointer user_data) return G_SOURCE_REMOVE; } -#if WITH_POLKIT static void pk_call_cb (NMAuthManager *auth_manager, NMAuthManagerCallId *call_id, @@ -295,7 +292,6 @@ pk_call_cb (NMAuthManager *auth_manager, auth_call_complete (call); } -#endif void nm_auth_chain_add_call (NMAuthChain *self, @@ -324,21 +320,12 @@ nm_auth_chain_add_call (NMAuthChain *self, call->call_idle_id = g_idle_add (auth_call_complete_idle_cb, call); } else { /* Non-root always gets authenticated when using polkit */ -#if WITH_POLKIT call->call_id = nm_auth_manager_check_authorization (auth_manager, self->subject, permission, allow_interaction, pk_call_cb, call); -#else - if (!call->chain->error) { - call->chain->error = g_error_new_literal (NM_MANAGER_ERROR, - NM_MANAGER_ERROR_FAILED, - "Polkit support is disabled at compile time"); - } - call->call_idle_id = g_idle_add (auth_call_complete_idle_cb, call); -#endif } } |