VFS name cleaning module

Gael Mauleon gmauleon at free.fr
Tue Nov 29 22:51:35 GMT 2005


I work in an heterogenous environment, with mac/windows and linux...
and names (files and directory ones) are a real pain for a healthy file 

As many must know Macs in particular can create names with spaces before and
after a name ("   like this   ") or with forbidden character ("23*/?") 
and so on.

Despite my search, I didn't find any easy/convenient solution for my 
environment, so as
I know a bit about programming, I was wondering if I can make something 
for this....

I looked at the vfs modules in place and thought it might be a solution...

The idea is to create a module, let's say vfs_restrictname that will 
hook before
any creation function only (mkdir, move, rename, etc...) and mangle 
names in the most
restrictive way so all the samba names (files and directory) are created 
to be manipulate
by all OS...

In my case it will mangle the windows way...

After a copy/paste of the audit module it seems possible, but I was 
wondering as I'm not familiar
with samba programming, if it was a good idea ? And if anyone have 
suggestions about this ?
For exemple I saw some hook for directory create/move, for files I only 
saw an open but there is
a mode in parameter so it must be possible to  know if it's a 
creation...any docs around or tips ?


More information about the samba-technical mailing list