[Samba] Preventing characters in filenames...
John H Terpstra
jht at samba.org
Tue Jun 22 19:39:01 MDT 2010
On 06/22/2010 05:03 PM, Rod wrote:
> Is there a way of preventing certain characters being used in filenames as saved
> by Samba? Basically I wish to prevent prevent files from being saved with the
> characters ( ) * & in the name. Is this possible in Samba?
>
> Thanks, qt4.
Yes, this is possible - you would need to write a VFS module that
filters filenames and that substitutes appropriate alternate characters
(or just deletes the offending character).
It is not possible without writing a VFS module though. Such a module
does not exist today.
Samba does not write filenames, it simply passes them through to the
operating system from the CIFS client. The VFS layer allows
interception of system calls. The module would need to intercept the
create() system call, procecss the filename, and then pass the filtered
name through to the system function call.
The bigger question is how this might be implemented. How do you propose
to handle the undesirable characters in a manner that is portable across
system locales that use multi-byte names.
- John T.
More information about the samba
mailing list