diff options
author | tron <tron@pkgsrc.org> | 1999-11-11 10:47:25 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 1999-11-11 10:47:25 +0000 |
commit | ca0c3d7660e1ad0acd748db1b2889aa5fb1c540b (patch) | |
tree | 47bb153479f640ec78e9c4b5996e1bcf100f1c0f /x11/gdm/patches/patch-af | |
parent | b25539e6a222be31e8c6fb8808f636da9a877357 (diff) | |
download | pkgsrc-ca0c3d7660e1ad0acd748db1b2889aa5fb1c540b.tar.gz |
Patch session setup so that the we get an environment which looks mostly
like what we get from XDM or KDM and use setlogin().
A complete rewrite of the session setup will be requested via a bug report
to the GNOME maintainers.
Diffstat (limited to 'x11/gdm/patches/patch-af')
-rw-r--r-- | x11/gdm/patches/patch-af | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/x11/gdm/patches/patch-af b/x11/gdm/patches/patch-af index 840093a3fc9..3b644d1ceca 100644 --- a/x11/gdm/patches/patch-af +++ b/x11/gdm/patches/patch-af @@ -1,8 +1,40 @@ -$NetBSD: patch-af,v 1.1.1.1 1999/11/10 23:15:28 tron Exp $ +$NetBSD: patch-af,v 1.2 1999/11/11 10:47:26 tron Exp $ --- daemon/slave.c.orig Thu Sep 30 00:56:35 1999 -+++ daemon/slave.c Wed Nov 10 01:18:48 1999 -@@ -423,7 +423,7 @@ ++++ daemon/slave.c Thu Nov 11 11:41:17 1999 +@@ -259,6 +259,7 @@ + gchar *session, *language, *usrsess, *usrlang; + gboolean savesess = FALSE, savelang = FALSE, usrcfgok = FALSE, authok = FALSE; + gint i; ++ extern char **environ; + + pwent = getpwnam (login); + +@@ -331,11 +332,11 @@ + setenv ("DISPLAY", d->name, TRUE); + setenv ("LOGNAME", login, TRUE); + setenv ("USER", login, TRUE); +- setenv ("USERNAME", login, TRUE); + setenv ("HOME", pwent->pw_dir, TRUE); + setenv ("GDMSESSION", session, TRUE); + setenv ("SHELL", pwent->pw_shell, TRUE); +- putenv ("MAIL"); ++ unsetenv ("GROUP"); ++ unsetenv ("MAIL"); + + /* Special PATH for root */ + if(pwent->pw_uid == 0) +@@ -385,6 +386,9 @@ + if (setgid (pwent->pw_gid) < 0) + gdm_remanage (_("gdm_slave_session_start: Could not setgid %d. Aborting."), pwent->pw_gid); + ++ if (setlogin (login) < 0) ++ gdm_remanage (_("gdm_slave_session_start: Could not set login name %s. Aborting."), login); ++ + if (initgroups (login, pwent->pw_gid) < 0) + gdm_remanage (_("gdm_slave_session_start: initgroups() failed for %s. Aborting."), login); + +@@ -423,7 +427,7 @@ /* Restore sigmask inherited from init */ sigprocmask (SIG_SETMASK, &sysmask, NULL); |