[clfswm-cvs] r389 - in clfswm: contrib/server doc src

Philippe Brochard pbrochard at common-lisp.net
Sun Nov 14 21:56:11 UTC 2010


Author: pbrochard
Date: Sun Nov 14 16:56:11 2010
New Revision: 389

Log:
contrib/server.lisp: minor tweaking

Modified:
   clfswm/contrib/server/server.lisp
   clfswm/doc/dot-clfswmrc
   clfswm/src/clfswm.lisp

Modified: clfswm/contrib/server/server.lisp
==============================================================================
--- clfswm/contrib/server/server.lisp	(original)
+++ clfswm/contrib/server/server.lisp	Sun Nov 14 16:56:11 2010
@@ -2,7 +2,9 @@
 ;;; CLFSWM - FullScreen Window Manager
 ;;;
 ;;; --------------------------------------------------------------------------
-;;; Documentation: Utility
+;;; Documentation: Client/server connection.
+;;; The connection is crypted and you can only connect to the server with the
+;;; same clfswm binary.
 ;;; --------------------------------------------------------------------------
 ;;;
 ;;; (C) 2005 Philippe Brochard <hocwp at free.fr>
@@ -23,11 +25,11 @@
 ;;;
 ;;; --------------------------------------------------------------------------
 ;;; Server protocole:
-;;;  Server -> Client:  orig_key=a generated key crypted with *key*
-;;;  Client          :  build its new_key with orig_key+*key*
-;;;  Client -> Server:  new_key+(md5 new_key) crypted with new_key
-;;;  Server -> Client:  check if the keys match and then authenticate the client.
-;;;
+;;;  Server ->  Client:  orig_key=a generated key crypted with *key*
+;;;  Client           :  build its new_key with orig_key+*key*
+;;;  Client ->  Server:  new_key+(md5 new_key) crypted with new_key
+;;;  Server ->  Client:  check if the keys match and then authenticate the client.
+;;;  Server <-> Client:  All connections are crypted with new_key
 ;;; --------------------------------------------------------------------------
 
 
@@ -248,7 +250,7 @@
 (format t "done.
 
 You can now start a clfswm server with the command (start-server &optional port).
-Only [~{~A~^, ~}] ~A allowed to login on the server.
+Only [~{~A~^, ~}] ~A allowed to login on the server. The connection is crypted.
 You can start the client with the '--client' command line option.~%"
 	*server-allowed-host*
 	(if (or (null *server-allowed-host*) (= (length *server-allowed-host*) 1))
@@ -260,5 +262,8 @@
       (clfswm-client:start-client (remove "--client" args :test #'string-equal))
       (uquit))))
 
+(defun is-started-as-client-p ()
+  (member "--client" (get-command-line-words) :test #'string-equal))
+
 (add-hook *main-entrance-hook* 'server-parse-cmdline)
 

Modified: clfswm/doc/dot-clfswmrc
==============================================================================
--- clfswm/doc/dot-clfswmrc	(original)
+++ clfswm/doc/dot-clfswmrc	Sun Nov 14 16:56:11 2010
@@ -21,8 +21,6 @@
 ;; (setf *have-to-compress-notify* t)
 
 
-
-
 ;;; Color configuration example
 ;;;
 ;;; See in package.lisp or config.lisp for all variables
@@ -48,6 +46,13 @@
 ;;(load-contrib "reboot-halt.lisp")
 
 
+;;;; Client/server connection - the connection is crypted and you can only
+;;;; connect to the server with the same clfswm binary.
+;;(load-contrib "server/server.lisp")
+;;(unless (is-started-as-client-p)
+;;  (start-server))
+
+
 
 ;;; Binding example: Undefine Control-F1 and define  Control-F5 as a
 ;;; new binding in main mode

Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp	(original)
+++ clfswm/src/clfswm.lisp	Sun Nov 14 16:56:11 2010
@@ -217,7 +217,7 @@
     (if conf
 	(handler-case (load conf)
 	  (error (c)
-	    (format t "~2%*** Error loading configurtion file: ~A ***~&~A~%" conf c)
+	    (format t "~2%*** Error loading configuration file: ~A ***~&~A~%" conf c)
 	    (values nil (format nil "~s" c) conf))
 	  (:no-error (&rest args)
 	    (declare (ignore args))




More information about the clfswm-cvs mailing list