| Summary: | 1.6.0-1 lightdm-gtk-greeter segfaults if session last used is uninstalled (and has a silly cache location) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jack Perdue <ss> | ||||
| Component: | lightdm-gtk | Assignee: | Rex Dieter <rdieter> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 19 | CC: | cwickert, dan.mashal, gregor, rdieter, rmilasan, ss | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | lightdm-gtk-1.6.1-2.fc20 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-10-18 19:30:43 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Jack Perdue
2013-08-30 01:27:15 UTC
Of course, you can replace both the "reboot"s in the steps to reproduce by entering the following in a TTY session: telinit 3 telinit 5 which may or may not be faster depending upon how fast you type. Created attachment 809239 [details]
lightdm-gtk-greeter-fix-segfault-when-last_session-is-invalid.patch
Here is the fix for the last_session segfault issue.
I've tested this in normal circumstances, and it works as expected. Please test if possible. Looks good here. I rebuilt the RPM with included patch, telinit 3, yum install newrpm, telinit5, all is happy. I then telinit 3, yum install oldrpm, telinit 5 and it goes back to segfault loopy land. So that solves the segfault issue. The issue of being a stupid place to store a state file remains, but that can be dealt with later I guess (I'd think that /var/cache/lightdm/lightdm-gtk/state would be a preferable location if only because it isn't in a .hidden folder in the log directory but one thing at a time). Thanks Robert. Hopefully this can go to testing (or wherever it goes next). Jack, in openSUSE the state file is in: /var/lib/lightdm/.cache/lightdm-gtk-greeter/state, so I guess this can be tuned. I'm happy that the patch works. This also works well in openSUSE, just to make it clear :) ah, lightd.conf lies! it claims the default location is: #cache-directory=/var/cache/lightdm looks like we can fix at least 2 problems at once here. :) Oh geesh, so we run lightdm as lightdm user with passwd entry: lightdm:x:992:990::/var/log/lightdm:/sbin/nologin and these items use g_get_user_cache_dir calls, guess where those go? :-/ In particular,
/* If not running as root write output to directories we control */
if (getuid () != 0)
{
g_free (default_log_dir);
default_log_dir = g_build_filename (g_get_user_cache_dir (), "lightdm", "log", NULL);
g_free (default_run_dir);
default_run_dir = g_build_filename (g_get_user_cache_dir (), "lightdm", "run", NULL);
g_free (default_cache_dir);
default_cache_dir = g_build_filename (g_get_user_cache_dir (), "lightdm", "cache", NULL);
}
ick, ick, ick. Robert, do you know how opensuse handles this? set a better lightdm homedir, or set these explicitly in lightdm.conf (or other)?
Yep, it's based on /etc/passwd: suse-machine:~ # cat /etc/passwd|grep light lightdm:x:490:490:LightDM daemon:/var/lib/lightdm:/bin/false :) Well I guess one bug turned into two bugs. But does it work if cache-directory is set in lightdm.conf ? Meaning does it take the conf? Hrm, I thought it would, but explicitly adding to lightdm.conf: log-directory=/var/log/lightdm run-directory=/var/run/lightdm cache-directory=/var/cache/lightdm but the stuff under /var/log/lightdm/ still seems to get created and used. :( Sorry for my rambling, but ultimately it looks like that previous stuff is not used by lightdm-gtk-greeter :
state_dir = g_build_filename (g_get_user_cache_dir (), "lightdm-gtk-greeter", NULL);
g_mkdir_with_parents (state_dir, 0775);
state_filename = g_build_filename (state_dir, "state", NULL);
g_free (state_dir);
No idea why they chose to hard-code the use of g_get_user_cache_dir instead of grok'ing lightdm cache-directory key, but there you have it.
I'll change the default lightdm user home to be /var/lib/lightdm (instead of /var/log/lightdm), to be at least a little more sane (this will only affect new installs)
lightdm-gtk-1.6.1-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/lightdm-gtk-1.6.1-2.fc20 lightdm-gtk-1.6.1-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/lightdm-gtk-1.6.1-2.fc19 Package lightdm-gtk-1.6.1-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing lightdm-gtk-1.6.1-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-18585/lightdm-gtk-1.6.1-2.fc20 then log in and leave karma (feedback). lightdm-gtk-1.6.1-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. lightdm-gtk-1.6.1-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |