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_full_audit.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'source3/modules/vfs_full_audit.c') diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 5558b2f9b5..e47609d0a9 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -151,11 +151,11 @@ static int smb_full_audit_rename(vfs_handle_struct *handle, const char *oldname, const char *newname); static int smb_full_audit_fsync(vfs_handle_struct *handle, files_struct *fsp); static int smb_full_audit_stat(vfs_handle_struct *handle, - const char *fname, SMB_STRUCT_STAT *sbuf); + struct smb_filename *smb_fname); static int smb_full_audit_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf); static int smb_full_audit_lstat(vfs_handle_struct *handle, - const char *path, SMB_STRUCT_STAT *sbuf); + struct smb_filename *smb_fname); static int smb_full_audit_get_alloc_size(vfs_handle_struct *handle, files_struct *fsp, const SMB_STRUCT_STAT *sbuf); static int smb_full_audit_unlink(vfs_handle_struct *handle, @@ -1361,13 +1361,14 @@ static int smb_full_audit_fsync(vfs_handle_struct *handle, files_struct *fsp) } static int smb_full_audit_stat(vfs_handle_struct *handle, - const char *fname, SMB_STRUCT_STAT *sbuf) + struct smb_filename *smb_fname) { int result; - result = SMB_VFS_NEXT_STAT(handle, fname, sbuf); + result = SMB_VFS_NEXT_STAT(handle, smb_fname); - do_log(SMB_VFS_OP_STAT, (result >= 0), handle, "%s", fname); + do_log(SMB_VFS_OP_STAT, (result >= 0), handle, "%s", + smb_fname_str_dbg(smb_fname)); return result; } @@ -1385,13 +1386,14 @@ static int smb_full_audit_fstat(vfs_handle_struct *handle, files_struct *fsp, } static int smb_full_audit_lstat(vfs_handle_struct *handle, - const char *path, SMB_STRUCT_STAT *sbuf) + struct smb_filename *smb_fname) { int result; - result = SMB_VFS_NEXT_LSTAT(handle, path, sbuf); + result = SMB_VFS_NEXT_LSTAT(handle, smb_fname); - do_log(SMB_VFS_OP_LSTAT, (result >= 0), handle, "%s", path); + do_log(SMB_VFS_OP_LSTAT, (result >= 0), handle, "%s", + smb_fname_str_dbg(smb_fname)); return result; } -- cgit