mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 19:10:17 +01:00
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.
This commit is contained in:
parent
1bbc624477
commit
c0f5872b5a
1 changed files with 1 additions and 2 deletions
|
|
@ -884,8 +884,7 @@ pk_hostname_cb (NMAuthChain *chain,
|
|||
result = nm_auth_chain_get_result (chain, NM_AUTH_PERMISSION_SETTINGS_HOSTNAME_MODIFY);
|
||||
|
||||
/* Caller didn't successfully authenticate */
|
||||
if ( result != NM_AUTH_CALL_RESULT_YES
|
||||
&& result != NM_AUTH_CALL_RESULT_AUTH) {
|
||||
if (result != NM_AUTH_CALL_RESULT_YES) {
|
||||
error = g_error_new_literal (NM_SETTINGS_ERROR,
|
||||
NM_SETTINGS_ERROR_NOT_PRIVILEGED,
|
||||
"Insufficient privileges.");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue