~ubuntu-branches/ubuntu/quantal/lightdm/quantal

« back to all changes in this revision

Viewing changes to tests/src/test-session.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-04-05 17:26:50 UTC
  • mfrom: (1.1.27)
  • Revision ID: package-import@ubuntu.com-20120405172650-sy4str1re63aok62
Tags: 1.2.0-0ubuntu1
* New upstream release.
  - Backup .xsession-errors on login (LP: #951597)
  - Handle failures in pam_setcred
  - Open log files in append mode (LP: #951597)
  - Add extra checks in liblightdm so that it doesn't send invalid messages
    to the daemon (LP: #969023)
  - Fix gdmflexiserver not being added to the path (broken since 1.1.4)
    (LP: #953554)
  - Fix PAM conversations after authentication from locking up sessions
    (LP: #956848)
  - Fix PAM informational messages locking up autologin
  - Change XDMCP manage timeout from 10ms to 126s (maximum specified in the
    XDMCP specification)
  - Fix greeter-show-guest example (LP: #972711)

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
 
117
117
    r = g_strdup_printf ("SESSION %s WRITE-STDOUT TEXT=", getenv ("DISPLAY"));
118
118
    if (g_str_has_prefix (request, r))
119
 
        g_print ("%s\n", request + strlen (r));
 
119
        g_print ("%s", request + strlen (r));
120
120
    g_free (r);
121
121
 
122
122
    r = g_strdup_printf ("SESSION %s WRITE-STDERR TEXT=", getenv ("DISPLAY"));
123
123
    if (g_str_has_prefix (request, r))
124
 
        g_printerr ("%s\n", request + strlen (r));
 
124
        g_printerr ("%s", request + strlen (r));
125
125
    g_free (r);
126
126
 
127
 
    r = g_strdup_printf ("SESSION %s READ-XSESSION-ERRORS", getenv ("DISPLAY"));
128
 
    if (strcmp (request, r) == 0)
 
127
    r = g_strdup_printf ("SESSION %s READ FILE=", getenv ("DISPLAY"));
 
128
    if (g_str_has_prefix (request, r))
129
129
    {
 
130
        const gchar *name = request + strlen (r);
130
131
        gchar *contents;
131
132
        GError *error = NULL;
132
133
 
133
 
        if (g_file_get_contents (".xsession-errors", &contents, NULL, &error))
134
 
            status_notify ("SESSION %s READ-XSESSION-ERRORS TEXT=%s", getenv ("DISPLAY"), contents);
 
134
        if (g_file_get_contents (name, &contents, NULL, &error))
 
135
            status_notify ("SESSION %s READ FILE=%s TEXT=%s", getenv ("DISPLAY"), name, contents);
135
136
        else
136
 
            status_notify ("SESSION %s READ-XSESSION-ERRORS ERROR=%s", getenv ("DISPLAY"), error->message);
 
137
            status_notify ("SESSION %s READ FILE=%s ERROR=%s", getenv ("DISPLAY"), name, error->message);
137
138
        g_clear_error (&error);
138
139
    }
139
140
    g_free (r);