[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

last (?) question on X-server



    Date: Thu, 19 Sep 1991 18:13 EDT
    From: drstrip@cs.sandia.gov (David R. Strip)

    So I got the server loaded, I added x-window-system to the namespace,
    (undocumented), I created the rgb.text file (also undocumented), now
    when I try something simple like xclock from a client host, I get 
    connection refused. I can't seem to find docs on where the 
    authorized host list lives. I though I remembered that it was somehow
    related to the net mask, implying that if ftp worked from a host (for
    example), then X would also. Well, ftp works from the client host I
    was running xclock on. The server host name was correct on the client.

    So, once again I turn to you for help. What am I missing this time.
    Hope this is it. Hate to keep bugging everyone. 
    Strip

You're not missing anything, Symbolics completely screwed up on this
one.

In Genera 8.0 the X server used the SECURE-SUBNETS list in the namespace
to authorize clients.  The Genera 8.1 X server uses the authorized host
list, just like most other X servers.  The default is to allow access
only from the local host.  Unfortunately, Symbolics forgot to include a
user interface to updating this list!

Here's the code I wrote.  It implements the "Enable X Client Host" and
"Disable X Client Host" commands in a Lisp Listener, and "Enable Client
Host" and "Disable Client Hosts" in the X Server activity.

;;; -*- Mode: LISP; Syntax: Common-lisp; Package: USER; Base: 10 -*-

;;; *********************** CHANGE LOG *******************
;;; 
;;; 4/20/90 17:44:55 Barmar:  Created.
;;; 
;;; 6/16/91 19:12:10 Barmar:  Deleted advice on x-server:|AddHost| and x-server:|RemoveHost|.
;;; 
;;; 6/16/91 20:12:37 Barmar:  Added com-enable-x-client-host and
;;; com-disable-x-client-host.
;;; 
#| *************** END OF CHANGE LOG ***************|#

;;; Lispm equivalents to the Unix xhost command.  Currently only operates on the
;;; local host (accesses the underlying representation, rather than using the X
;;; protocol).

(cp:define-command (com-enable-x-client-host
		     :command-table "User"
		     :provide-output-destination-keyword nil) 
    ((host 'net:host))
   (setf (gethash host (x-server-lisp::x-server-authorized-hosts
			 x-server-lisp::*x-server-data*))
	 t))

(cp:install-command 'x-server-lisp::x-server-program 'com-enable-x-client-host "Enable Client Host") 

(cp:define-command (com-disable-x-client-host
		     :command-table "User"
		     :provide-output-destination-keyword nil) 
    ((hostname 'net:host))
   (remhash hostname (x-server-lisp::x-server-authorized-hosts
		       x-server-lisp::*x-server-data*)))

(cp:install-command 'x-server-lisp::x-server-program 'com-disable-x-client-host "Disable Client Host")

;;; You may or may not want the following.  It causes all authorized
;;; hosts to be considered "very authorized", which allows them to
;;; update the authorized host list (e.g. using "xhost").  Normally,
;;; only the local host is very authorized.

(advise x-server-lisp::x-server-client-very-authorized
	:around all-hosts-very-authorized nil
  t)