From e129384d7c1df664e447186673dd107e190e2894 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Mon, 22 Jun 2009 15:26:56 -0700 Subject: s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed. --- source3/modules/vfs_recycle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/modules/vfs_recycle.c') diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index f1791aa6b1..f42fab72f7 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -214,7 +214,7 @@ static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname { SMB_STRUCT_STAT st; - if (SMB_VFS_NEXT_STAT(handle, dname, &st) == 0) { + if (vfs_stat_smb_fname(handle->conn, dname, &st) == 0) { if (S_ISDIR(st.st_ex_mode)) { return True; } @@ -227,7 +227,7 @@ static bool recycle_file_exist(vfs_handle_struct *handle, const char *fname) { SMB_STRUCT_STAT st; - if (SMB_VFS_NEXT_STAT(handle, fname, &st) == 0) { + if (vfs_stat_smb_fname(handle->conn, fname, &st) == 0) { if (S_ISREG(st.st_ex_mode)) { return True; } @@ -246,7 +246,7 @@ static SMB_OFF_T recycle_get_file_size(vfs_handle_struct *handle, const char *fn { SMB_STRUCT_STAT st; - if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { + if (vfs_stat_smb_fname(handle->conn, fname, &st) != 0) { DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno))); return (SMB_OFF_T)0; } @@ -396,7 +396,7 @@ static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, ZERO_STRUCT(ft); - if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { + if (vfs_stat_smb_fname(handle->conn, fname, &st) != 0) { DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno))); return; -- cgit