diff options
author | Tim Prouty <tprouty@samba.org> | 2009-07-02 09:27:44 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-07-06 15:38:36 -0700 |
commit | 258952aa85f2a68e2d2362522f6114c6a439f1e3 (patch) | |
tree | 696d8f4425cb6d82c95c0923ba1b0405d39a1f5e /source3/modules/vfs_default.c | |
parent | 133e915a81510f543f6458f377857d4f1b680970 (diff) | |
download | samba-258952aa85f2a68e2d2362522f6114c6a439f1e3.tar.gz samba-258952aa85f2a68e2d2362522f6114c6a439f1e3.tar.bz2 samba-258952aa85f2a68e2d2362522f6114c6a439f1e3.zip |
s3: Plumb smb_filename through SMB_VFS_UNLINK
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r-- | source3/modules/vfs_default.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 9a55456b0c..c95c68fe0f 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -524,13 +524,12 @@ static int vfswrap_rename(vfs_handle_struct *handle, const struct smb_filename *smb_fname_src, const struct smb_filename *smb_fname_dst) { - int result; + int result = -1; START_PROFILE(syscall_rename); if (smb_fname_src->stream_name || smb_fname_dst->stream_name) { errno = ENOENT; - result = -1; goto out; } @@ -651,12 +650,20 @@ static uint64_t vfswrap_get_alloc_size(vfs_handle_struct *handle, return result; } -static int vfswrap_unlink(vfs_handle_struct *handle, const char *path) +static int vfswrap_unlink(vfs_handle_struct *handle, + const struct smb_filename *smb_fname) { - int result; + int result = -1; START_PROFILE(syscall_unlink); - result = unlink(path); + + if (smb_fname->stream_name) { + errno = ENOENT; + goto out; + } + result = unlink(smb_fname->base_name); + + out: END_PROFILE(syscall_unlink); return result; } |