Want to map symbolic links as Windows Shortcuts

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Mon Apr 23 19:56:48 GMT 2001


Hi Paul,
Windows recognizes that a 'file' is a shortcut by it's extension.  In fact
to demonstrate this, pull up a samba share via windows explorer, and cut and
paste one of your shortcuts from the windows desktop to the Samba share -
you will see that its name is "whatever the shortcutname is".lnk
And when you refresh your samba share, that shortcut you cut and pasted
,will show up  still as a shortcut.  If you RENAME the file on the VOS side
to remove the .lnk prefix, windows will no longer recognize it as a
shortcut.
Symbolic links in Unix, and Shortcuts in windows are very different animals.
A symbolic link in unix is in reality just another file, containing the
path/filename of the file that the link is for; for instance a symbolic link
to a file named "writeit.txt" , if you used ll to look at the symbolic link,
would have  a length of 11 (same number of characters as the name
"writeit.txt".  The fact that it is a link is kept in the det entry for the
file in unix.
I don't THINK you would want Windows to treat UNIX symbolic links as if they
were 'shortcuts.  If you WERE able to, Windows would probably throw up,
because it would expect to get a LOT more information from that 'shortcut'
than is actually there; evidence the properties that you can access by
'rightclicking' on a REAL windows shortcut file....

Just my 2 cents worth,
Don

-----Original Message-----
From: Green, Paul [mailto:Paul.Green at stratus.com]
Sent: Monday, April 23, 2001 12:46 PM
To: Samba Technical (E-mail)
Subject: Want to map symbolic links as Windows Shortcuts


I am responsible for the port of Samba 2.0.7 to the Stratus VOS
fault-tolerant operating system. The port has gone well and we are in beta
test now.  Thanks to everyone for creating and maintaining such a
high-quality product.

I have noticed that Windows is able to list a directory and accurately
portray which entries are shortcuts, but that when Windows lists a VOS
directory using Samba, all of the VOS symbolic links are listed as real
files or real directories.  I have assumed that Unix folks must not be big
users of symbolic links...but VOS users do use them fairly often.

I poked around in the source code, but the message formats that Samba uses
to communicate with the client aren't exactly transparent. Short of
capturing and decoding some packets (ugh), I don't see how to mark the reply
so that Windows knows the object is a shortcut.  

Is there a way to map symbolic links to Windows shortcuts and I just don't
see it?   Does anyone at least know the necessary Windows message format so
I can code up a trial solution?

Many thanks,
PG
--
S T R A T U S    C O M P U T E R
111 Powdermill Road
Maynard, MA 01754-3409 U.S.A.

Paul Green
Senior Technical Consultant
TEL +1 (978) 461-7557
FAX +1 (978) 461-3610





More information about the samba-technical mailing list