[gdm] manager: return ACCESS DENIED for most open-reauth-channel failures
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] manager: return ACCESS DENIED for most open-reauth-channel failures
- Date: Thu, 31 Oct 2013 20:23:35 +0000 (UTC)
commit ae7beb63cb254c2b7e5aedb9d034133c4de90b85
Author: Ray Strode <rstrode redhat com>
Date: Thu Oct 31 15:00:26 2013 -0400
manager: return ACCESS DENIED for most open-reauth-channel failures
gnome-shell only falls back to opening a new session if the reauth
channel fails to open because of denied access. For XDMCP we currently
fail for other reasons.
This commit returns ACCESS DENIED for those cases as well, so the
intended fallback happens.
Based on a patch by Jeremy White <jwhite codeweavers com>
https://bugzilla.gnome.org/show_bug.cgi?id=690926
daemon/gdm-manager.c | 34 ++++++++++++++++++++++++++++------
1 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 17e8ca5..f2c00ed 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -725,9 +725,14 @@ gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager
ret = gdm_dbus_get_pid_for_name (sender, &pid, &error);
if (!ret) {
- g_prefix_error (&error, "Error while retrieving caller session id: ");
- g_dbus_method_invocation_return_gerror (invocation, error);
+ g_debug ("GdmManager: could not get pid of caller: %s",
+ error->message);
g_error_free (error);
+
+ g_dbus_method_invocation_return_error_literal (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Error getting process id of caller");
return TRUE;
}
@@ -735,9 +740,14 @@ gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager
ret = gdm_dbus_get_uid_for_name (sender, &caller_uid, &error);
if (!ret) {
- g_prefix_error (&error, "Error while retrieving caller session id: ");
- g_dbus_method_invocation_return_gerror (invocation, error);
+ g_debug ("GdmManager: could not get uid of caller: %s",
+ error->message);
g_error_free (error);
+
+ g_dbus_method_invocation_return_error_literal (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Error getting user id of caller");
return TRUE;
}
@@ -746,15 +756,27 @@ gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager
seat_id = get_seat_id_for_pid (connection, pid, &error);
if (seat_id == NULL) {
- g_dbus_method_invocation_return_gerror (invocation, error);
+ g_debug ("GdmManager: could not get seat id of caller: %s",
+ error->message);
g_error_free (error);
+
+ g_dbus_method_invocation_return_error_literal (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Error getting seat id of caller");
return TRUE;
}
session_id = get_session_id_for_user_on_seat (connection, username, seat_id, &error);
if (session_id == NULL) {
- g_dbus_method_invocation_return_gerror (invocation, error);
+ g_debug ("GdmManager: could not get session id for caller: %s",
+ error->message);
g_error_free (error);
+
+ g_dbus_method_invocation_return_error_literal (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Error getting session id for caller");
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]