Date: Mon, 31 Dec 2001 00:01:03 -0500 (EST) From: Joe Marcus Clarke <marcus@marcuscom.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/33372: Fix gdm so that correct group is set for users' sessions Message-ID: <200112310501.fBV513659625@shumai.marcuscom.com>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112310501.fBV513659625>