diff options
author | Pavel Šimerda <psimerda@redhat.com> | 2015-01-02 21:20:38 +0100 |
---|---|---|
committer | Pavel Šimerda <psimerda@redhat.com> | 2015-01-05 18:38:22 +0100 |
commit | 5fb31ba5d1c54ae9bf723e20fb1e4a83cf2a0496 (patch) | |
tree | 5191dfdd4b1b6a80a906e257a950c9fe1e901795 /src/nm-auth-utils.c | |
parent | 335bbc63357cc963628ad97f465433d1936fe0ba (diff) | |
download | NetworkManager-5fb31ba5d1c54ae9bf723e20fb1e4a83cf2a0496.tar.gz |
session: switch code to nm_session_monitor_session_exists()
Acked-By: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-auth-utils.c')
-rw-r--r-- | src/nm-auth-utils.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/nm-auth-utils.c b/src/nm-auth-utils.c index 9ace162921..1c20622ad3 100644 --- a/src/nm-auth-utils.c +++ b/src/nm-auth-utils.c @@ -425,7 +425,6 @@ nm_auth_is_subject_in_acl (NMConnection *connection, { NMSettingConnection *s_con; const char *user = NULL; - GError *local = NULL; gulong uid; g_return_val_if_fail (connection != NULL, FALSE); @@ -443,17 +442,13 @@ nm_auth_is_subject_in_acl (NMConnection *connection, return TRUE; /* Reject the request if the request comes from no session at all */ - if (!nm_session_monitor_uid_has_session (smon, uid, &user, &local)) { - if (out_error_desc) { - *out_error_desc = g_strdup_printf ("No session found for uid %lu (%s)", - uid, - local && local->message ? local->message : "unknown"); - } - g_clear_error (&local); + if (!nm_session_monitor_session_exists (uid, FALSE)) { + if (out_error_desc) + *out_error_desc = g_strdup_printf ("No session found for uid %lu", uid); return FALSE; } - if (!user) { + if (!nm_session_monitor_uid_to_user (uid, &user)) { if (out_error_desc) *out_error_desc = g_strdup_printf ("Could not determine username for uid %lu", uid); return FALSE; |