Merge lp:~mterry/lightdm/empty-autologin into lp:lightdm

Proposed by Michael Terry
Status: Merged
Merge reported by: Robert Ancell
Merged at revision: not available
Proposed branch: lp:~mterry/lightdm/empty-autologin
Merge into: lp:lightdm
Diff against target: 29 lines (+7/-1)
2 files modified
src/display.c (+1/-1)
src/seat.c (+6/-0)
To merge this branch: bzr merge lp:~mterry/lightdm/empty-autologin
Reviewer Review Type Date Requested Status
LightDM Development Team Pending
Review via email: mp+71390@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I think it just needs to be checked when reading from configuration, so I committed a simpler patch that does just this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/display.c'
2--- src/display.c 2011-08-08 08:35:15 +0000
3+++ src/display.c 2011-08-12 15:59:22 +0000
4@@ -195,7 +195,7 @@
5 {
6 g_return_if_fail (display != NULL);
7 g_free (display->priv->autologin_user);
8- display->priv->autologin_user = g_strdup (username);
9+ display->priv->autologin_user = (username && *username != '\0') ? g_strdup (username) : NULL;
10 display->priv->autologin_guest = is_guest;
11 display->priv->autologin_timeout = timeout;
12 }
13
14=== modified file 'src/seat.c'
15--- src/seat.c 2011-08-08 07:16:25 +0000
16+++ src/seat.c 2011-08-12 15:59:22 +0000
17@@ -388,6 +388,12 @@
18 seat->priv->autologin_username = config_get_string (config_get_instance (), seat->priv->config_section, "autologin-user");
19 if (!seat->priv->autologin_username)
20 seat->priv->autologin_username = config_get_string (config_get_instance (), "SeatDefaults", "autologin-user");
21+ if (seat->priv->autologin_username && *seat->priv->autologin_username == '\0')
22+ {
23+ g_free (seat->priv->autologin_username);
24+ seat->priv->autologin_username = NULL;
25+ }
26+
27 if (seat->priv->config_section && config_has_key (config_get_instance (), seat->priv->config_section, "autologin-user-timeout"))
28 seat->priv->autologin_timeout = config_get_integer (config_get_instance (), seat->priv->config_section, "autologin-user-timeout");
29 else

Subscribers

People subscribed via source and target branches