Proposal: filename map

kgcurrie at earthling.net kgcurrie at earthling.net
Fri Jun 12 02:43:05 GMT 1998


Hello,

After using samba for about a year now on my home network, and for a couple months now on my work network, I feel that I'm familiar enough with most of
the tricks with the % variables to know there isn't a clean way to solve my problem, which is this:

I use samba at home to share a lot of DOS programs.  Most of the ones I have problems with are games, emulators, etc, but this option would be nice for
other stuff too.  These programs want their config files in their directory and to be a certain name.  This is a problem when you have a very heterogeneous computer enviornment as far as hardware is concerned.  I would like to be able to have the config files available to the programs (transparently) on a per machine basis.

What would be ideal is an option like the one for remapping usernamed, but for files.  One that would interpret the samba variables. So that I could
define some like:

/home/samba/games/doom/doom.cfg = \ 
   /home/samba/%m/doom.cfg

Now, I understand there could be some speed concerns related to this.  Any wise person would only have a handful of mappings in this file.  Because of
the speed concerns, this is probably an option that would have its code left in or out at compile time.

I have looked at the samba source a little bit, enough for it to confuse the hell out of me.  I have never done any unix programming before, but I do
have DOS experience.  I would be willing to try and code this, but I would need help.  I'm hoping that it might be as simple as when a file open call
is made to samba, I can simply call a function that will translate the filename string before any system calls are made.  This is something I know I can program.  So, to the developers, does this sound possible?

Also, if this sounds like a useful option to anyone else out there, please let me know.

Thanks,
Kevin Currie






More information about the samba mailing list