Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 1999 11:53:47 -0700 (PDT)
From:      eischen@vigrid.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   ports/11887: Allow xmcd to read ~/.Xauthority
Message-ID:  <19990525185347.3547015A11@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990525185347.3547015A11>