This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to enable magic cookies on W2K cygwin X11?


David wrote:

> I wanted to make my cygwin xfree86 server as secure as possible, and I
> have the perception that the following would help.
> 
> 1. Stop the tcp listener

That means unix sockets must work correctly. If they do you can use the
-nolisten tcp and :0.0 display

> 2. Enable the authentication cookies 
> 
> However I trawled the man pages about the cookies, and found the X
> startup scripts in SuSE Linux (which has cookies) to be complex enough
> that it would be a small project to convert them to cygwin.

AUTHFILE=`mktemp /tmp/auth.XXXXXX`
COOKIE=`dd if=/dev/random count=1 | md5sum | cut -f1 -d\ `
xauth -f $AUTHFILE add :0.0 MIT-MAGIC-COOKIE-1 $COOKIE
XWin -auth $AUTHFILE
rm $AUTHFILE

maybe 
XWin -cookie `dd if=/dev/random count=1 | md5sum | cut -f1 -d\ `

will work too.

Both methods are not tested but may help as a starting point. I even
don't know if /dev/random exists in cygwin. If not, /dev/windows should
be fine too.

bye
    ago
NP: Blutengel - Wonderland
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]