From: <uni...@sh...> - 2004-10-21 23:29:33
|
Alan Cox wrote: >On Iau, 2004-10-21 at 16:49, Thomas Hellstr=C3=B6m wrote: > =20 > >>architecture-independent library should be able to determine whether th= e >>connection is local or not. Any hints on how to do best do this without >>using drm? >> =20 >> > >Try DRM first and see if it fails. > >There really isn't much else you can do - "local" connections to X >include ssh forwarding and proxies 8( > > =20 > The problem is (hypothetical) if I try DRM on a remote machine with the=20 same architecture it won't fail until the server tries to authenticate the=20 connection using drmauthmagic(). Even then, it might not fail, but instead authenticate a=20 totally unrelated local connection on the server machine. (I'm not sure how well=20 drmauthmagic really checks the magic number and the related connection.) One solution could be to create a shared memory page and put in a random=20 "magic" number in the first few bytes, and see if the server is able to=20 read and report back the same number. That would take care also of the=20 ssh and proxy cases. /Thomas |