diff options
author | Aravind Srinivasan <aravind.srinivasan@isilon.com> | 2009-08-26 14:56:09 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-08-28 16:38:57 -0700 |
commit | e046b382f24f507a19bfb020b145ea2ec8acafcb (patch) | |
tree | 867511a82c4772ee8f325c48ed1ec3f0b5e5d093 /source3/modules/vfs_default.c | |
parent | 77e2403f1314a28722f0fb21f6682320b2e9935d (diff) | |
download | samba-e046b382f24f507a19bfb020b145ea2ec8acafcb.tar.gz samba-e046b382f24f507a19bfb020b145ea2ec8acafcb.tar.bz2 samba-e046b382f24f507a19bfb020b145ea2ec8acafcb.zip |
s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAME
This vop is designed to work in tandem with SMB_VFS_READDIR to allow
vfs modules to make modifications to arbitrary filenames before
they're consumed by callers. Subsequently the core directory
enumeration code in smbd is now changed to free the memory that may be
allocated in a module. This vop enables the new version of catia in
the following patch.
Signed-off-by: Tim Prouty <tprouty@samba.org>
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r-- | source3/modules/vfs_default.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index b70868eb9f..e78ddf242c 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -651,6 +651,16 @@ static int vfswrap_lstat(vfs_handle_struct *handle, return result; } +static NTSTATUS vfswrap_translate_name(vfs_handle_struct *handle, + char **mapped_name) +{ + /* Default behavior is a NOOP */ + + if (*mapped_name != NULL) + return NT_STATUS_OK; + + return NT_STATUS_INVALID_PARAMETER; +} /******************************************************************** Given a stat buffer return the allocated size on disk, taking into account sparse files. @@ -1725,6 +1735,7 @@ static struct vfs_fn_pointers vfs_default_fns = { .brl_cancel_windows = vfswrap_brl_cancel_windows, .strict_lock = vfswrap_strict_lock, .strict_unlock = vfswrap_strict_unlock, + .translate_name = vfswrap_translate_name, /* NT ACL operations. */ |