From a674a56a97c78a44bf43f1c175d106fbe70c7485 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Feb 2011 15:07:48 -0800 Subject: Add fdopendir to the VFS. We will use this to reuse a directory fd already open by NtCreateX. Autobuild-User: Jeremy Allison Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104 --- source3/modules/vfs_full_audit.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (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 10422fca79..a81f3b5870 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -87,6 +87,7 @@ typedef enum _vfs_op_type { /* Directory operations */ SMB_VFS_OP_OPENDIR, + SMB_VFS_OP_FDOPENDIR, SMB_VFS_OP_READDIR, SMB_VFS_OP_SEEKDIR, SMB_VFS_OP_TELLDIR, @@ -229,6 +230,7 @@ static struct { { SMB_VFS_OP_STATVFS, "statvfs" }, { SMB_VFS_OP_FS_CAPABILITIES, "fs_capabilities" }, { SMB_VFS_OP_OPENDIR, "opendir" }, + { SMB_VFS_OP_FDOPENDIR, "fdopendir" }, { SMB_VFS_OP_READDIR, "readdir" }, { SMB_VFS_OP_SEEKDIR, "seekdir" }, { SMB_VFS_OP_TELLDIR, "telldir" }, @@ -735,6 +737,19 @@ static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle, return result; } +static SMB_STRUCT_DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle, + files_struct *fsp, const char *mask, uint32 attr) +{ + SMB_STRUCT_DIR *result; + + result = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr); + + do_log(SMB_VFS_OP_FDOPENDIR, (result != NULL), handle, "%s", + fsp_str_do_log(fsp)); + + return result; +} + static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf) { @@ -2201,6 +2216,7 @@ static struct vfs_fn_pointers vfs_full_audit_fns = { .statvfs = smb_full_audit_statvfs, .fs_capabilities = smb_full_audit_fs_capabilities, .opendir = smb_full_audit_opendir, + .fdopendir = smb_full_audit_fdopendir, .readdir = smb_full_audit_readdir, .seekdir = smb_full_audit_seekdir, .telldir = smb_full_audit_telldir, -- cgit