--- gdm-2.14.8/daemon/gdm.c.orig Tue May 30 22:12:33 2006 +++ gdm-2.14.8/daemon/gdm.c Fri Jun 9 17:20:56 2006 @@ -2844,6 +2844,7 @@ GSList *li; gchar *cookie = g_strdup (&msg[strlen (GDM_SUP_AUTH_LOCAL " ")]); + gdm_debug("Trying to handle '%s'", GDM_SUP_AUTH_LOCAL); g_strstrip (cookie); if (strlen (cookie) != 16*2) /* 16 bytes in hex form */ { /* evil, just whack the connection in this case */ @@ -2886,6 +2887,7 @@ gdm_connection_write (conn, "ERROR 100 Not authenticated\n"); g_free (cookie); } else if (strcmp (msg, GDM_SUP_FLEXI_XSERVER) == 0) { + gdm_debug("Trying to handle '%s' 1", GDM_SUP_FLEXI_XSERVER); /* Only allow locally authenticated connections */ if ( ! GDM_CONN_AUTHENTICATED(conn)) { gdm_info (_("%s request denied: " @@ -2904,6 +2906,7 @@ const gchar *command = NULL; GdmXserver *svr; + gdm_debug("Trying to handle '%s' 2", GDM_SUP_FLEXI_XSERVER); /* Only allow locally authenticated connections */ if ( ! GDM_CONN_AUTHENTICATED(conn)) { gdm_info (_("%s request denied: " @@ -2949,6 +2952,7 @@ gchar *dispname = NULL, *xauthfile = NULL, *cookie = NULL; uid_t uid; + gdm_debug("Trying to handle '%s'", GDM_SUP_FLEXI_XNEST); extract_dispname_uid_xauthfile_cookie (msg, &dispname, &uid, &xauthfile, &cookie); @@ -2987,6 +2991,8 @@ char *key; int msgLen=0; + gdm_debug("Trying to handle '%s' || '%s'",GDM_SUP_ATTACHED_SERVERS, + GDM_SUP_CONSOLE_SERVERS ); if (strncmp (msg, GDM_SUP_ATTACHED_SERVERS, strlen (GDM_SUP_ATTACHED_SERVERS)) == 0) msgLen = strlen (GDM_SUP_ATTACHED_SERVERS); @@ -3025,6 +3031,7 @@ GSList *li; const gchar *sep = " "; + gdm_debug("Trying to handle '%s'",GDM_SUP_ALL_SERVERS ); msg = g_string_new ("OK"); for (li = displays; li != NULL; li = li->next) { GdmDisplay *disp = li->data; @@ -3039,6 +3046,7 @@ } else if (strcmp (msg, GDM_SUP_GET_SERVER_LIST) == 0) { gchar *retval = gdm_get_xservers (); + gdm_debug("Trying to handle '%s'",GDM_SUP_GET_SERVER_LIST); if (retval != NULL) { gdm_connection_printf (conn, "OK %s\n", retval); g_free (retval); @@ -3052,6 +3060,7 @@ gchar **splitstr = g_strsplit (server, " ", 2); GdmXserver *svr = gdm_find_xserver ((gchar *)splitstr[0]); + gdm_debug("Trying to handle '%s'",GDM_SUP_GET_SERVER_DETAILS); if (svr != NULL) { if (g_strcasecmp (splitstr[1], "ID") == 0) gdm_connection_printf (conn, "OK %s\n", svr->id); @@ -3098,6 +3107,7 @@ GSList *li; const gchar *sep = " "; + gdm_debug("Trying to handle '%s'",GDM_SUP_GREETERPIDS); msg = g_string_new ("OK"); for (li = displays; li != NULL; li = li->next) { GdmDisplay *disp = li->data; @@ -3112,6 +3122,7 @@ g_string_free (msg, TRUE); } else if (strncmp (msg, GDM_SUP_UPDATE_CONFIG " ", strlen (GDM_SUP_UPDATE_CONFIG " ")) == 0) { + gdm_debug("Trying to handle '%s'",GDM_SUP_UPDATE_CONFIG); const gchar *key = &msg[strlen (GDM_SUP_UPDATE_CONFIG " ")]; @@ -3126,6 +3137,10 @@ gchar *retval = NULL; static gboolean done_prefetch = FALSE; + gdm_debug("Trying to handle '%s'; split[0] = '%s'; split[1] = '%s'", + GDM_SUP_GET_CONFIG, + splitstr[0] == NULL ? "" : splitstr[0], + splitstr[1] == NULL ? "" : splitstr[0]); /* * It is not meaningful to manage this in a per-display * fashion since the prefetch program is only run once the @@ -3135,22 +3150,25 @@ */ if (strcmp (splitstr[0], GDM_KEY_PRE_FETCH_PROGRAM) == 0) { if (done_prefetch) { + gdm_debug("returning: OK"); gdm_connection_printf (conn, "OK \n"); } else { + gdm_debug("ERROR 50 Unsupported key <%s>\n", splitstr[0]); gdm_connection_printf (conn, "ERROR 50 Unsupported key <%s>\n", splitstr[0]); done_prefetch = TRUE; } return; } - if (splitstr[0] != NULL) { /* * Note passing in the display is backwards compatible * since if it is NULL, it won't try to load the display * value at all. */ + gdm_debug("calling gdm_config_to_string('%s', '%s')", + splitstr[0], splitstr[1]); gdm_config_to_string (splitstr[0], splitstr[1], &retval); - + gdm_debug("returned '%s'", retval == NULL ? "" : retval); if (retval != NULL) { gdm_connection_printf (conn, "OK %s\n", retval); g_free (retval); @@ -3163,11 +3181,15 @@ splitstr[0]); } g_strfreev (splitstr); + } else { + gdm_debug("splitstr[0] == NULL : param = \"%s\"",parms); } } else if (strcmp (msg, GDM_SUP_GET_CONFIG_FILE) == 0) { + gdm_debug("Trying to handle '%s'",GDM_SUP_GET_CONFIG_FILE); gdm_connection_printf (conn, "OK %s\n", config_file); } else if (strcmp (msg, GDM_SUP_GET_CUSTOM_CONFIG_FILE) == 0) { gchar *ret; + gdm_debug("Trying to handle '%s'",GDM_SUP_GET_CUSTOM_CONFIG_FILE); ret = gdm_get_custom_config_file (); if (ret) @@ -3182,6 +3204,7 @@ const gchar *sep = " "; gboolean sysmenu; + gdm_debug("Trying to handle '%s'",GDM_SUP_QUERY_LOGOUT_ACTION); disp = gdm_connection_get_display (conn); sysmenu = gdm_get_value_bool_per_display (disp->name, GDM_KEY_SYSTEM_MENU); @@ -3233,6 +3256,7 @@ gboolean was_ok = FALSE; gboolean sysmenu; + gdm_debug("Trying to handle '%s'",GDM_SUP_SET_LOGOUT_ACTION); disp = gdm_connection_get_display (conn); sysmenu = gdm_get_value_bool_per_display (disp->name, GDM_KEY_SYSTEM_MENU); @@ -3286,6 +3310,7 @@ gboolean was_ok = FALSE; gboolean sysmenu; + gdm_debug("Trying to handle '%s'",GDM_SUP_SET_SAFE_LOGOUT_ACTION); disp = gdm_connection_get_display (conn); sysmenu = gdm_get_value_bool_per_display (disp->name, GDM_KEY_SYSTEM_MENU); @@ -3333,6 +3358,7 @@ } } else if (strcmp (msg, GDM_SUP_QUERY_VT) == 0) { /* Only allow locally authenticated connections */ + gdm_debug("Trying to handle '%s'",GDM_SUP_QUERY_VT); if ( ! GDM_CONN_AUTHENTICATED(conn)) { gdm_info (_("%s request denied: " "Not authenticated"), "QUERY_VT"); @@ -3351,6 +3377,7 @@ int vt; GSList *li; + gdm_debug("Trying to handle '%s'", GDM_SUP_SET_VT); if (sscanf (msg, GDM_SUP_SET_VT " %d", &vt) != 1 || vt < 0) { gdm_connection_write (conn, @@ -3384,6 +3411,7 @@ strlen (GDM_SUP_ADD_DYNAMIC_DISPLAY " ")) == 0) { gchar *key; + gdm_debug("Trying to handle '%s'", GDM_SUP_ADD_DYNAMIC_DISPLAY); key = g_strdup (&msg[strlen (GDM_SUP_ADD_DYNAMIC_DISPLAY " ")]); g_strstrip (key); handle_dynamic_server (conn, DYNAMIC_ADD, key); @@ -3393,6 +3421,7 @@ strlen (GDM_SUP_REMOVE_DYNAMIC_DISPLAY " ")) == 0) { gchar *key; + gdm_debug("Trying to handle '%s'",GDM_SUP_REMOVE_DYNAMIC_DISPLAY ); key = g_strdup (&msg[strlen (GDM_SUP_REMOVE_DYNAMIC_DISPLAY " ")]); g_strstrip (key); handle_dynamic_server (conn, DYNAMIC_REMOVE, key); @@ -3403,24 +3432,30 @@ gchar *key; + gdm_debug("Trying to handle '%s'", GDM_SUP_RELEASE_DYNAMIC_DISPLAYS); key = g_strdup (&msg[strlen (GDM_SUP_RELEASE_DYNAMIC_DISPLAYS " ")]); g_strstrip (key); handle_dynamic_server (conn, DYNAMIC_RELEASE, key); g_free (key); } else if (strcmp (msg, GDM_SUP_VERSION) == 0) { + gdm_debug("Trying to handle '%s'",GDM_SUP_VERSION ); gdm_connection_write (conn, "GDM " VERSION "\n"); } else if (strcmp (msg, GDM_SUP_SERVER_BUSY) == 0) { + gdm_debug("Trying to handle '%s'", GDM_SUP_SERVER_BUSY); if (gdm_connection_is_server_busy (unixconn)) gdm_connection_write (conn, "OK true\n"); else gdm_connection_write (conn, "OK false\n"); } else if (strcmp (msg, GDM_SUP_CLOSE) == 0) { + gdm_debug("Trying to handle '%s'", GDM_SUP_CLOSE); gdm_connection_close (conn); } else { + gdm_debug("Not handling unimplemented '%s'", msg); gdm_connection_write (conn, "ERROR 0 Not implemented\n"); gdm_connection_close (conn); } + gdm_debug("done handling user message."); } /* EOF */