symlink-hack for smbfs under linux
Alexander Oelzant
aoe at mars.tuwien.ac.at
Fri Apr 21 21:29:30 GMT 2000
I've programmed a quick-and-dirty version of symlinks for smbfs. This
hack uses the system attribute and otherwise works much like the
ncpfs-hack, that is to say, I write the magic cookie at the beginning of
the file.
Of course the server has to map the system attribute, which samba notably
doesn't do by default. smb.conf entries of "map system = yes" and "create
mask = 750" (or higher) are therefore necessary.
Currently I also write a NUL-byte at the end of the symlink; from the other
implementations I assume this would not be necessary, but for the moment
I'm glad I got rid of the oopses (memcpy vs memcpy_fromfs in smb_proc_write
gave me a real pain in 2.0.33 and yes, everything else does need the
memcpy_fromfs so I had to create a similar smb_proc_write_mem and make it
use memcpy. I still don't get it) and happy to forget everything about it at
least until after easter.
As the patch is rather large (> 10k), I'd rather not include it here;
versions for 2.0.33 and 2.3.99 are available at
http://prawda.oeh.net/~aoe/mystuff/smb.symlinks.2.0.33.v0.2.patch
http://prawda.oeh.net/~aoe/mystuff/smb.symlinks.2.3.99.v0.2.patch
or
http://mars.tuwien.ac.at/~aoe/smb.symlinks.2.0.33.v0.2.patch
http://mars.tuwien.ac.at/~aoe/smb.symlinks.2.3.99.v0.2.patch
Alexander
--
Alexander Oelzant alexander at oelzant.priv.at
Durchlaufstr. 7/4/5 aoe at bluebox.eu.org
A-1200 Wien aoe at mars.tuwien.ac.at
More information about the samba
mailing list