unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* server-start under Windows - revisited
@ 2002-11-09  2:39 Ben Key
  2002-11-09 13:10 ` Jason Rumney
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ben Key @ 2002-11-09  2:39 UTC (permalink / raw)


I want to thank everyone who responded to my earlier message "server-start
under Windows."  The feedback was valuable.

I just want to review what needs to be done to accomplish my ultimate goal
of getting emacsclient to work under Windows.

1.  Modify server-start in server.el to detect if AF_LOCAL sockets are
available using the line

  (featurep 'make-network-process '(:family  local))

(Thanks go to to Kim F. Storm for this information.)

2. If AF_LOCAL sockets are not available, I need to then attempt to set the
server process using tcp sockets.  This I am not certain how to do.  Are TCP
sockets the same as INet?  Can I do this with the following?
	    (setq server-process
		  (make-network-process
		   :name "server" :server t :noquery t
		   :service server-socket-name
		   :sentinel 'server-sentinel :filter 'server-process-filter
		   ;; We must receive file names without being decoded.
		   ;; Those are decoded by server-process-filter according
		   ;; to file-name-coding-system.
		   :coding 'raw-text))

3. Modify Emacsclient.c so that it supports TCP sockets under Windows.


Does this sound about right?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: server-start under Windows - revisited
  2002-11-09  2:39 server-start under Windows - revisited Ben Key
@ 2002-11-09 13:10 ` Jason Rumney
  2002-11-09 20:20 ` Stefan Monnier
  2002-11-10 18:07 ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Rumney @ 2002-11-09 13:10 UTC (permalink / raw)
  Cc: Emacs-Devel (E-mail)

"Ben Key" <Bkey1@tampabay.rr.com> writes:

> 2. If AF_LOCAL sockets are not available, I need to then attempt to set the
> server process using tcp sockets.  This I am not certain how to do.  Are TCP
> sockets the same as INet?  Can I do this with the following?
> 	    (setq server-process
> 		  (make-network-process
> 		   :name "server" :server t :noquery t
> 		   :service server-socket-name
> 		   :sentinel 'server-sentinel :filter 'server-process-filter
> 		   ;; We must receive file names without being decoded.
> 		   ;; Those are decoded by server-process-filter according
> 		   ;; to file-name-coding-system.
> 		   :coding 'raw-text))


I would also add :host "127.0.0.1" to the above, to avoid opening the
server socket to the world. Other than that, the above looks OK, but
I am not familiar with that code, so my opinion might not mean much.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: server-start under Windows - revisited
  2002-11-09  2:39 server-start under Windows - revisited Ben Key
  2002-11-09 13:10 ` Jason Rumney
@ 2002-11-09 20:20 ` Stefan Monnier
  2002-11-10 18:07 ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2002-11-09 20:20 UTC (permalink / raw)
  Cc: Emacs-Devel (E-mail)

> 1.  Modify server-start in server.el to detect if AF_LOCAL sockets are
> available using the line
> 
>   (featurep 'make-network-process '(:family  local))
> 
> (Thanks go to to Kim F. Storm for this information.)
> 
> 2. If AF_LOCAL sockets are not available, I need to then attempt to set the
> server process using tcp sockets.  This I am not certain how to do.  Are TCP
> sockets the same as INet?  Can I do this with the following?
> 	    (setq server-process
> 		  (make-network-process
> 		   :name "server" :server t :noquery t
> 		   :service server-socket-name
> 		   :sentinel 'server-sentinel :filter 'server-process-filter
> 		   ;; We must receive file names without being decoded.
> 		   ;; Those are decoded by server-process-filter according
> 		   ;; to file-name-coding-system.
> 		   :coding 'raw-text))

I don't know whether it would work, but if it does, it still isn't
good enough because it opens up an enormous security hole: anybody
can connect to your machine on the given socket and ask your Emacs
to do just about anything.
Maybe it's OK if you only open a socket on the address `localhost'.

> 3. Modify Emacsclient.c so that it supports TCP sockets under Windows.

Another approach would be to try and get emacsclient.c and Emacs
to support unix-domain sockets (or something similar) under w32.


	Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: server-start under Windows - revisited
  2002-11-09  2:39 server-start under Windows - revisited Ben Key
  2002-11-09 13:10 ` Jason Rumney
  2002-11-09 20:20 ` Stefan Monnier
@ 2002-11-10 18:07 ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2002-11-10 18:07 UTC (permalink / raw)
  Cc: emacs-devel

    2. If AF_LOCAL sockets are not available, I need to then attempt to set the
    server process using tcp sockets.  This I am not certain how to do.  Are TCP
    sockets the same as INet?

Someone pointed out the danger of using Internet sockets: people on
other machines can send commands to your Emacs.  You would have to do
a lot of work to implement security to prevent that.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-10 18:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-09  2:39 server-start under Windows - revisited Ben Key
2002-11-09 13:10 ` Jason Rumney
2002-11-09 20:20 ` Stefan Monnier
2002-11-10 18:07 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).