rpms/gdm/F-9 gdm-2.22.0-fix-pam-mkhomedir.patch, NONE, 1.1 gdm.spec, 1.386, 1.387
Ray Strode (rstrode)
fedora-extras-commits at redhat.com
Mon May 12 17:53:06 UTC 2008
Author: rstrode
Update of /cvs/pkgs/rpms/gdm/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32066
Modified Files:
gdm.spec
Added Files:
gdm-2.22.0-fix-pam-mkhomedir.patch
Log Message:
- Don't require process to be running euid root when reading
~/.dmrc (bug 445613)
gdm-2.22.0-fix-pam-mkhomedir.patch:
--- NEW FILE gdm-2.22.0-fix-pam-mkhomedir.patch ---
--- gdm-2.22.0/daemon/gdm-session-worker.c (revision 6228)
+++ gdm-2.22.0/daemon/gdm-session-worker.c (working copy)
@@ -501,8 +501,8 @@ gdm_session_worker_get_username (GdmSess
}
static void
-attempt_to_load_user_settings_as_root (GdmSessionWorker *worker,
- const char *username)
+attempt_to_load_user_settings (GdmSessionWorker *worker,
+ const char *username)
{
struct passwd *passwd_entry;
uid_t old_uid;
@@ -511,9 +511,6 @@ attempt_to_load_user_settings_as_root (G
old_uid = geteuid ();
old_gid = getegid ();
- g_assert (old_uid == 0);
- g_assert (old_gid == 0);
-
passwd_entry = getpwnam (username);
/* User input isn't a valid username
@@ -522,19 +519,18 @@ attempt_to_load_user_settings_as_root (G
return;
}
+ /* We may get called late in the pam conversation after
+ * the user has already been authenticated. This could
+ * happen if for instance, the user's home directory isn't
+ * available until late in the pam conversation so user
+ * settings couldn't get loaded until late in the conversation.
+ * If we get called late the seteuid/setgid calls here will fail,
+ * but that's okay, because we'll already be the uid/gid we want
+ * to be.
+ */
setegid (passwd_entry->pw_gid);
seteuid (passwd_entry->pw_uid);
- /* FIXME: if this call fails, we should probably do some
- * heuristics to try to figure out if .dmrc doesn't
- * exist at all or just isn't readable yet. If it doesn't
- * exist at all (and won't exist by the end of the pam
- * conversation) then we should send some sort of
- * "NoSavedSettings" message to the slave so that it can
- * tell the greeter to use specific default settings
- * instead of the place holder "Last Session" "Last
- * Language" items in the combo boxes in the panel
- */
gdm_session_settings_load (worker->priv->user_settings,
passwd_entry->pw_dir,
NULL);
@@ -566,7 +562,7 @@ gdm_session_worker_update_username (GdmS
*/
if (username != NULL &&
!gdm_session_settings_is_loaded (worker->priv->user_settings)) {
- attempt_to_load_user_settings_as_root (worker, username);
+ attempt_to_load_user_settings (worker, username);
}
if ((worker->priv->username == username) ||
@@ -1915,8 +1911,8 @@ do_setup (GdmSessionWorker *worker)
* We'll try now, and if it doesn't work out, try later.
*/
if (worker->priv->username != NULL) {
- attempt_to_load_user_settings_as_root (worker,
- worker->priv->username);
+ attempt_to_load_user_settings (worker,
+ worker->priv->username);
}
error = NULL;
Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/F-9/gdm.spec,v
retrieving revision 1.386
retrieving revision 1.387
diff -u -r1.386 -r1.387
--- gdm.spec 10 May 2008 04:06:26 -0000 1.386
+++ gdm.spec 12 May 2008 17:52:27 -0000 1.387
@@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.22.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -81,6 +81,8 @@
Patch3: zh.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=445631
Patch4: gdm-2.22.0-fix-language-selector.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=445613
+Patch5: gdm-2.22.0-fix-pam-mkhomedir.patch
Patch99: gdm-2.21.8-fedora-logo.patch
%package user-switch-applet
@@ -104,6 +106,7 @@
%patch2 -p1 -b .silence-debugging
%patch3 -p1 -b .chinese-time
%patch4 -p1 -b .fix-language-selector
+%patch5 -p1 -b .fix-pam-mkhomedir
%patch99 -p1 -b .fedora-logo
%build
@@ -301,6 +304,10 @@
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
%changelog
+* Mon May 12 2008 Ray Strode <rstrode at redhat.com> - 1:2.22.0-5
+- Don't require process to be running euid root when reading
+ ~/.dmrc (bug 445613)
+
* Sat May 10 2008 Ray Strode <rstrode at redhat.com> - 1:2.22.0-4
- Patch from Matthias to fix language selector (bug 445631)
More information about the fedora-extras-commits
mailing list