diff -ru gnome-panel-2.24.0/gnome-panel/libpanel-util/panel-session-manager.c new/gnome-panel/libpanel-util/panel-session-manager.c
--- gnome-panel-2.24.0/gnome-panel/libpanel-util/panel-session-manager.c	2008-09-22 17:21:03.000000000 -0400
+++ new/gnome-panel/libpanel-util/panel-session-manager.c	2008-10-09 12:56:14.000000000 -0400
@@ -141,6 +141,39 @@
 	}
 }
 
+gboolean
+panel_session_manager_is_shutdown_available (PanelSessionManager *manager)
+{
+	GError *error;
+	DBusGProxy *proxy;
+        gboolean is_shutdown_available;
+
+	g_return_if_fail (PANEL_IS_SESSION_MANAGER (manager));
+
+	error = NULL;
+
+	if (!panel_dbus_service_ensure_connection (PANEL_DBUS_SERVICE (manager),
+						   &error)) {
+		g_warning ("Could not connect to session manager: %s",
+			   error->message);
+		g_error_free (error);
+		return;
+	}
+
+	proxy = panel_dbus_service_get_proxy (PANEL_DBUS_SERVICE (manager));
+
+	if (!dbus_g_proxy_call (proxy, "CanShutdown", &error,
+				G_TYPE_INVALID, G_TYPE_BOOLEAN,
+				&is_shutdown_available, G_TYPE_INVALID) &&
+	    error != NULL) {
+		g_warning ("Could not ask session manager if shut down is available: %s",
+			   error->message);
+		g_error_free (error);
+		return FALSE;
+	}
+        return is_shutdown_available;
+}
+
 PanelSessionManager *
 panel_session_manager_get (void)
 {
diff -ru gnome-panel-2.24.0/gnome-panel/libpanel-util/panel-session-manager.h new/gnome-panel/libpanel-util/panel-session-manager.h
--- gnome-panel-2.24.0/gnome-panel/libpanel-util/panel-session-manager.h	2008-09-22 17:21:03.000000000 -0400
+++ new/gnome-panel/libpanel-util/panel-session-manager.h	2008-10-09 12:57:27.000000000 -0400
@@ -63,6 +63,7 @@
 void panel_session_manager_request_logout   (PanelSessionManager           *session,
 					     PanelSessionManagerLogoutType  mode);
 void panel_session_manager_request_shutdown (PanelSessionManager *session);
+gboolean panel_session_manager_is_shutdown_available (PanelSessionManager *session);
 
 G_END_DECLS
 
diff -ru gnome-panel-2.24.0/gnome-panel/panel-action-button.c new/gnome-panel/panel-action-button.c
--- gnome-panel-2.24.0/gnome-panel/panel-action-button.c	2008-10-09 12:59:52.000000000 -0400
+++ new/gnome-panel/panel-action-button.c	2008-10-09 13:05:28.000000000 -0400
@@ -190,15 +190,13 @@
 static gboolean
 panel_action_shutdown_reboot_is_disabled (void)
 {
-	return panel_lockdown_get_disable_log_out();
-#if 0
-	/* FIXME: waiting for a gnome-session dbus api to know if
-	 * shutdown/reboot is possible:
-	 * http://bugzilla.gnome.org/show_bug.cgi?id=536915 */
-	return (panel_lockdown_get_disable_log_out() ||
-	(!gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN) &&
-	 !gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT)));
-#endif
+	PanelSessionManager *manager;
+
+	if (panel_lockdown_get_disable_log_out())
+		return TRUE;
+
+	manager = panel_session_manager_get ();
+	return !panel_session_manager_is_shutdown_available (manager);
 }
 
 /* Run Application
