~ubuntu-branches/debian/stretch/lightdm/stretch

« back to all changes in this revision

Viewing changes to .pc/04_dont-add-pkglibexecdir-path.patch/src/session-child.c

  • Committer: Package Import Robot
  • Author(s): Yves-Alexis Perez
  • Date: 2013-10-31 09:31:16 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20131031093116-zpr143y5f7iq2zog
Tags: 1.8.3-1
* New upstream release.
* debian/rules:
  - enable all hardening flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
    gchar *authentication_result_string;
214
214
    gchar *service;
215
215
    gchar *username;
216
 
    gchar *class;
217
216
    gchar *tty;
218
217
    gchar *remote_host_name;
219
218
    gchar *xdisplay;
284
283
    username = read_string ();
285
284
    read_data (&do_authenticate, sizeof (do_authenticate));
286
285
    read_data (&is_interactive, sizeof (is_interactive));
287
 
    class = read_string ();
 
286
    read_string (); /* Used to be class, now we just use the environment variable */
288
287
    tty = read_string ();
289
288
    remote_host_name = read_string ();
290
289
    xdisplay = read_string ();
483
482
        g_variant_builder_init (&ck_parameters, G_VARIANT_TYPE ("(a(sv))"));
484
483
        g_variant_builder_open (&ck_parameters, G_VARIANT_TYPE ("a(sv)"));
485
484
        g_variant_builder_add (&ck_parameters, "(sv)", "unix-user", g_variant_new_int32 (user_get_uid (user)));
486
 
        if (g_strcmp0 (class, XDG_SESSION_CLASS_GREETER) == 0)
 
485
        if (g_strcmp0 (pam_getenv (pam_handle, "XDG_SESSION_CLASS"), "greeter") == 0)
487
486
            g_variant_builder_add (&ck_parameters, "(sv)", "session-type", g_variant_new_string ("LoginWindow"));
488
487
        if (xdisplay)
489
488
        {
604
603
    if (child_pid > 0)
605
604
    {
606
605
        /* Log to utmp */
607
 
        if (g_strcmp0 (class, XDG_SESSION_CLASS_GREETER) != 0)
 
606
        if (g_strcmp0 (pam_getenv (pam_handle, "XDG_SESSION_CLASS"), "greeter") != 0)
608
607
        {
609
608
            struct utmpx ut;
610
609
            struct timeval tv;
635
634
        child_pid = 0;
636
635
 
637
636
        /* Log to utmp */
638
 
        if (g_strcmp0 (class, XDG_SESSION_CLASS_GREETER) != 0)
 
637
        if (g_strcmp0 (pam_getenv (pam_handle, "XDG_SESSION_CLASS"), "greeter") != 0)
639
638
        {
640
639
            struct utmpx ut;
641
640
            struct timeval tv;