From owner-freebsd-ports Sun Dec 30 21:10:10 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 635A037B443 for ; Sun, 30 Dec 2001 21:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBV5A1f06893; Sun, 30 Dec 2001 21:10:01 -0800 (PST) (envelope-from gnats) Received: from shumai.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46]) by hub.freebsd.org (Postfix) with ESMTP id DAAC637B443 for ; Sun, 30 Dec 2001 21:01:04 -0800 (PST) Received: (from marcus@localhost) by shumai.marcuscom.com (8.11.6/8.11.6) id fBV513659625; Mon, 31 Dec 2001 00:01:03 -0500 (EST) (envelope-from marcus) Message-Id: <200112310501.fBV513659625@shumai.marcuscom.com> Date: Mon, 31 Dec 2001 00:01:03 -0500 (EST) From: Joe Marcus Clarke Reply-To: Joe Marcus Clarke To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/33372: Fix gdm so that correct group is set for users' sessions Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33372 >Category: ports >Synopsis: Fix gdm so that correct group is set for users' sessions >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 30 21:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Joe Marcus Clarke >Release: FreeBSD 4.5-PRERELEASE i386 >Organization: MarcusCom, Inc. >Environment: System: FreeBSD shumai.marcuscom.com 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Sun Dec 30 15:32:39 EST 2001 marcus@shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386 >Description: As of gdm 2.2.5.3, users' sessions were being setgid to the gdm group. This prevented ssh from working correctly among other things. >How-To-Repeat: Install gdm-2.2.5.3, login, and try to run ssh from a gnome-terminal. You will get the error: setgid 20: operation not permitted >Fix: Apply this patch: * FILES ADDED: files/patch-daemon::slave.c --- daemon/slave.c.orig Sun Dec 30 23:57:30 2001 +++ daemon/slave.c Sun Dec 30 23:57:21 2001 @@ -1860,7 +1860,13 @@ setpgid (0, 0); umask (022); - + + /* setup the user's correct group */ + if (setgid (pwent->pw_gid) < 0) + gdm_child_exit (DISPLAY_REMANAGE, _("gdm_slave_session_start: Could not setgid %d. Aborting."), pwent->pw_gid); + if (initgroups (login, pwent->pw_gid) < 0) + gdm_child_exit (DISPLAY_REMANAGE, _("gdm_slave_session_start: initgroups() failed for %s. Aborting."), login); + /* setup the verify env vars */ if ( ! gdm_verify_setup_env (d)) gdm_child_exit (DISPLAY_REMANAGE, >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message