summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_extd_audit.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-06-16 12:01:13 -0700
committerTim Prouty <tprouty@samba.org>2009-06-17 20:11:53 -0700
commit4e3656b8d1d0bf8c0c4ade01332e7384ea890810 (patch)
treeefcb240c8b0dbdd791e01dfe62a50f4cfdca47e5 /source3/modules/vfs_extd_audit.c
parent5cfac1a1bd59712d7a771d3631e869c5d078a0f3 (diff)
downloadsamba-4e3656b8d1d0bf8c0c4ade01332e7384ea890810.tar.gz
s3: Change SMB_VFS_OPEN to take an smb_filename struct
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.
Diffstat (limited to 'source3/modules/vfs_extd_audit.c')
-rw-r--r--source3/modules/vfs_extd_audit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index b59a780f52e..763f1545d75 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -36,7 +36,7 @@ static void audit_disconnect(vfs_handle_struct *handle);
static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr);
static int audit_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode);
static int audit_rmdir(vfs_handle_struct *handle, const char *path);
-static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode);
+static int audit_open(vfs_handle_struct *handle, struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode);
static int audit_close(vfs_handle_struct *handle, files_struct *fsp);
static int audit_rename(vfs_handle_struct *handle, const char *oldname, const char *newname);
static int audit_unlink(vfs_handle_struct *handle, const char *path);
@@ -216,21 +216,23 @@ static int audit_rmdir(vfs_handle_struct *handle, const char *path)
return result;
}
-static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode)
+static int audit_open(vfs_handle_struct *handle,
+ struct smb_filename *smb_fname, files_struct *fsp,
+ int flags, mode_t mode)
{
int result;
- result = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
+ result = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
if (lp_syslog() > 0) {
syslog(audit_syslog_priority(handle), "open %s (fd %d) %s%s%s\n",
- fname, result,
+ smb_fname_str_dbg(smb_fname), result,
((flags & O_WRONLY) || (flags & O_RDWR)) ? "for writing " : "",
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
}
DEBUG(2, ("vfs_extd_audit: open %s %s %s\n",
- fname,
+ smb_fname_str_dbg(smb_fname),
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));