From a5b339c799b39d5147c6d31f94cc0b2ea9c865db Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Oct 2005 17:33:17 +0000 Subject: r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab. Jeremy. (This used to be commit af8545806770a7530eecc184bdd230ca14999884) --- source3/modules/vfs_full_audit.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/modules') diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 99d5244482..d9d898dc0e 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -85,6 +85,10 @@ static int smb_full_audit_set_quota(struct vfs_handle_struct *handle, static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels); +static int smb_full_audit_statvfs(struct vfs_handle_struct *handle, + struct connection_struct *conn, + const char *path, + struct vfs_statvfs_struct *statbuf); static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr); @@ -317,6 +321,8 @@ static vfs_op_tuple audit_op_tuples[] = { SMB_VFS_LAYER_LOGGER}, {SMB_VFS_OP(smb_full_audit_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA, SMB_VFS_LAYER_LOGGER}, + {SMB_VFS_OP(smb_full_audit_statvfs), SMB_VFS_OP_STATVFS, + SMB_VFS_LAYER_LOGGER}, /* Directory operations */ @@ -518,6 +524,7 @@ static struct { { SMB_VFS_OP_GET_QUOTA, "get_quota" }, { SMB_VFS_OP_SET_QUOTA, "set_quota" }, { SMB_VFS_OP_GET_SHADOW_COPY_DATA, "get_shadow_copy_data" }, + { SMB_VFS_OP_STATVFS, "statvfs" }, { SMB_VFS_OP_OPENDIR, "opendir" }, { SMB_VFS_OP_READDIR, "readdir" }, { SMB_VFS_OP_SEEKDIR, "seekdir" }, @@ -864,6 +871,20 @@ static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle, return result; } +static int smb_full_audit_statvfs(struct vfs_handle_struct *handle, + struct connection_struct *conn, + const char *path, + struct vfs_statvfs_struct *statbuf) +{ + int result; + + result = SMB_VFS_NEXT_STATVFS(handle, conn, path, statbuf); + + do_log(SMB_VFS_OP_STATVFS, (result >= 0), handle, ""); + + return result; +} + static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr) { -- cgit