[slime-devel] clisp patch: use loopback interface only

Hoehle, Joerg-Cyril Joerg-Cyril.Hoehle at t-systems.com
Fri Apr 20 12:21:20 UTC 2007


here's a little patch to update the CLISP functionality. PROBLEMS says:
"The listen socket is bound on the loopback interface in all Lisps that
support this."  Alas, the CLISP code was not updated when that
capability was added.

My patch is against slime-2.0. It's both included and appended in cases
MS-Outlook munges it.

	Jorg Hohle.

2006-12-07  Joerg Hoehle <hoehle at users.sourceforge.net>

	* swank-clisp (create-socket): restrict to given (loopback) host
	interface for better security, when clisp >= 2.39

cd ~/.slime/slime-2.0/
diff -c /home/hoehle/.slime/slime-2.0/swank-clisp.lisp\~
*** /home/hoehle/.slime/slime-2.0/swank-clisp.lisp~	2006-03-22
17:40:01.000000000 +0100
--- /home/hoehle/.slime/slime-2.0/swank-clisp.lisp	2006-12-07
15:13:35.000000000 +0100
*** 108,115 ****
  ;;; TCP Server
  (defimplementation create-socket (host port)
!   (declare (ignore host))
!   (socket:socket-server port))
  (defimplementation local-port (socket)
    (socket:socket-server-port socket))
--- 108,117 ----
  ;;; TCP Server
  (defimplementation create-socket (host port)
!   (if ;;(member :interface (ext:arglist #'socket:socket-server))
!       (string>= (lisp-implementation-version) "2.39") ; bogus in
!     (socket:socket-server port :interface host) ; available since
!     (socket:socket-server port)))
  (defimplementation local-port (socket)
    (socket:socket-server-port socket))

Diff finished at Fri Apr 20 13:57:42
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-clisp-interface.patch
Type: application/octet-stream
Size: 1185 bytes
Desc: slime-clisp-interface.patch
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20070420/9d97e0c7/attachment.obj>

More information about the slime-devel mailing list