From owner-freebsd-ports Tue May 25 12: 0: 6 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 0ACF615B01 for ; Tue, 25 May 1999 12:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA25470; Tue, 25 May 1999 12:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 3547015A11; Tue, 25 May 1999 11:53:47 -0700 (PDT) Message-Id: <19990525185347.3547015A11@hub.freebsd.org> Date: Tue, 25 May 1999 11:53:47 -0700 (PDT) From: eischen@vigrid.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: ports/11887: Allow xmcd to read ~/.Xauthority Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 11887 >Category: ports >Synopsis: Allow xmcd to read ~/.Xauthority >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue May 25 12:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Daniel Eischen >Release: 3.2-stable >Organization: >Environment: FreeBSD klr1.clc.gdeb.com 3.2-STABLE FreeBSD 3.2-STABLE #0: Mon May 24 11:31:27 EDT 1999 (i386) >Description: When using xauth-style authentication, xmcd cannot read a users ~/.Xauthority. This problem was reported by Thomas Gellekum (tg@ihf.rwth-aachen.de). >How-To-Repeat: Use xauth-style authentication. >Fix: Thomas Gellekum (tg@ihf.rwth-aachen.de) provided a new patch file for xmcd. A diff to the xmcd port follows. diff -crN /usr/ports/audio/xmcd/patches/patch-af ./patches/patch-af *** /usr/ports/audio/xmcd/patches/patch-af Wed Dec 31 19:00:00 1969 --- ./patches/patch-af Tue May 25 12:36:53 1999 *************** *** 0 **** --- 1,40 ---- + --- xmcd_d/main.c.orig Sat Apr 24 03:41:00 1999 + +++ xmcd_d/main.c Sun May 23 11:55:01 1999 + @@ -151,6 +151,8 @@ + { + int i; + Display *display; + + uid_t euid, ruid; + + gid_t egid, rgid; + + /* Error message stream */ + errfp = stderr; + @@ -201,6 +203,16 @@ + } + } + + + /* get real IDs */ + + ruid = getuid(); + + rgid = getgid(); + + /* save effective IDs */ + + euid = geteuid(); + + egid = getegid(); + + /* give up root until we have a connection to the X server */ + + (void)seteuid(ruid); + + (void)setegid(rgid); + + + /* Initialize X toolkit */ + widgets.toplevel = XtVaAppInitialize( + &app_context, + @@ -210,6 +222,10 @@ + NULL, + NULL + ); + + + + /* Ok, back to root */ + + (void)seteuid(euid); + + (void)setegid(egid); + + /* Get application options */ + XtVaGetApplicationResources( + >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message