Subject: NetBSD-specific patch in x11/gdm
To: None <mjl@netbsd.org>
From: Julien Letessier <julien.letessier@sun.com>
List: tech-pkg
Date: 09/05/2002 14:40:49
Hi folks,
It turns out that Solaris doesn't have a 'setlogin' function. I grepped in all headers in
my system and I couldn't find it...
Perhaps the following patch should include an #idef __NetBSD__ or something?
Cheers,
--
Julien T. Letessier
Sun Labs Europe, Meylan, France
julien.letessier@sun.com
from x11/gdm/patches:
$NetBSD: patch-af,v 1.6 2001/03/28 22:32:03 wennmach Exp $
--- daemon/slave.c.orig Mon Mar 5 01:29:54 2001
+++ daemon/slave.c Tue Mar 20 02:59:34 2001
@@ -457,11 +457,11 @@
gdm_setenv ("DISPLAY", d->name);
gdm_setenv ("LOGNAME", login);
gdm_setenv ("USER", login);
- gdm_setenv ("USERNAME", login);
gdm_setenv ("HOME", pwent->pw_dir);
gdm_setenv ("GDMSESSION", session);
gdm_setenv ("SHELL", pwent->pw_shell);
gdm_unsetenv ("MAIL"); /* Unset $MAIL for broken shells */
+ gdm_unsetenv ("GROUP");
/* Special PATH for root */
if (pwent->pw_uid == 0)
@@ -518,6 +518,10 @@
gdm_slave_exit (DISPLAY_REMANAGE,
_("gdm_slave_session_start: Could not setgid %d. Aborting."),
pwent->pw_gid);
+ if (setlogin (login) < 0)
+ gdm_slave_exit (DISPLAY_REMANAGE,
+ _("gdm_slave_session_start: Could not set login name %s.
Aborting."), login);
+
if (initgroups (login, pwent->pw_gid) < 0)
gdm_slave_exit (DISPLAY_REMANAGE,
_("gdm_slave_session_start: initgroups() failed for %s.
Aborting."), login);