~ubuntu-branches/ubuntu/raring/gdm/raring

« back to all changes in this revision

Viewing changes to debian/patches/42_no_ecryptfs_autologin.patch

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-07-06 12:10:10 UTC
  • Revision ID: package-import@ubuntu.com-20120706121010-sykspak4b1qiwit5
Tags: 3.0.4-0ubuntu16
* debian/patches/42_no_ecryptfs_autologin.patch:
  - don't try to get infos on null usernames (lp: #805154)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: Don't autologin if using ecryptfs - if you do then the home directory is empty as you need the password entered via PAM to decrypt it.  This is not a perfect solution as the home directory may not be mounted yet.
2
2
Author: Robert Ancell <robert.ancell@canonical.com>
3
3
Bug: http://launchpad.net/bugs/284443
4
 
 
5
 
Index: gdm-3.0.0/daemon/gdm-simple-slave.c
 
4
Index: gdm-3.0.4/daemon/gdm-simple-slave.c
6
5
===================================================================
7
 
--- gdm-3.0.0.orig/daemon/gdm-simple-slave.c    2011-06-07 12:25:54.047631144 +0200
8
 
+++ gdm-3.0.0/daemon/gdm-simple-slave.c 2011-06-07 12:26:15.497631154 +0200
9
 
@@ -629,6 +629,38 @@
 
6
--- gdm-3.0.4.orig/daemon/gdm-simple-slave.c    2012-07-06 12:07:26.021078442 +0200
 
7
+++ gdm-3.0.4/daemon/gdm-simple-slave.c 2012-07-06 12:07:26.093078445 +0200
 
8
@@ -629,6 +629,41 @@
10
9
         slave->priv->username = g_strdup (username);
11
10
 }
12
11
 
18
17
+        struct passwd *info;
19
18
+        int r;
20
19
+
 
20
+        if (username == NULL) 
 
21
+                return FALSE;
 
22
+
21
23
+        info = getpwnam (username);
22
24
+        if (!info)
23
25
+                return FALSE;
45
47
 static void
46
48
 on_session_conversation_started (GdmSession     *session,
47
49
                                  GdmSimpleSlave *slave)
48
 
@@ -661,7 +693,8 @@
 
50
@@ -661,7 +696,8 @@
49
51
 
50
52
         enabled = FALSE;
51
53
         gdm_slave_get_timed_login_details (GDM_SLAVE (slave), &enabled, &username, &delay);
55
57
                 return;
56
58
         }
57
59
 
58
 
@@ -1385,6 +1418,8 @@
 
60
@@ -1388,6 +1424,8 @@
59
61
         if (res) {
60
62
                 gboolean enabled;
61
63
                 int      delay;
64
66
 
65
67
                 /* FIXME: handle wait-for-go */
66
68
 
67
 
@@ -1393,7 +1428,8 @@
 
69
@@ -1396,7 +1434,8 @@
68
70
                 delay = 0;
69
71
                 enabled = FALSE;
70
72
                 gdm_slave_get_timed_login_details (GDM_SLAVE (slave), &enabled, NULL, &delay);
74
76
                         start_greeter (slave);
75
77
                         create_new_session (slave);
76
78
                 } else {
77
 
@@ -1401,6 +1437,7 @@
 
79
@@ -1404,6 +1443,7 @@
78
80
                         gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/Init", GDM_USERNAME);
79
81
                         reset_session (slave);
80
82
                 }