svn commit: samba r20048 - in branches/SAMBA_3_0/source: include
modules
vlendec at samba.org
vlendec at samba.org
Wed Dec 6 10:21:20 GMT 2006
Author: vlendec
Date: 2006-12-06 10:21:20 +0000 (Wed, 06 Dec 2006)
New Revision: 20048
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20048
Log:
Fix vfs_full_audit after Jims kernel_flock addition
Modified:
branches/SAMBA_3_0/source/include/vfs_macros.h
branches/SAMBA_3_0/source/modules/vfs_full_audit.c
Changeset:
Modified: branches/SAMBA_3_0/source/include/vfs_macros.h
===================================================================
--- branches/SAMBA_3_0/source/include/vfs_macros.h 2006-12-06 09:25:26 UTC (rev 20047)
+++ branches/SAMBA_3_0/source/include/vfs_macros.h 2006-12-06 10:21:20 UTC (rev 20048)
@@ -297,7 +297,7 @@
#define SMB_VFS_NEXT_UTIME(handle, path, times) ((handle)->vfs_next.ops.utime((handle)->vfs_next.handles.utime, (path), (times)))
#define SMB_VFS_NEXT_FTRUNCATE(handle, fsp, fd, offset) ((handle)->vfs_next.ops.ftruncate((handle)->vfs_next.handles.ftruncate, (fsp), (fd), (offset)))
#define SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type) ((handle)->vfs_next.ops.lock((handle)->vfs_next.handles.lock, (fsp), (fd) ,(op), (offset), (count), (type)))
-#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, fd, share_mode)((handle)->vfs_next.ops.lock((handle)->vfs_next.handles.kernel_flock, (fsp), (fd), (share_mode)))
+#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, fd, share_mode)((handle)->vfs_next.ops.kernel_flock((handle)->vfs_next.handles.kernel_flock, (fsp), (fd), (share_mode)))
#define SMB_VFS_NEXT_GETLOCK(handle, fsp, fd, poffset, pcount, ptype, ppid) ((handle)->vfs_next.ops.getlock((handle)->vfs_next.handles.getlock, (fsp), (fd), (poffset), (pcount), (ptype), (ppid)))
#define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) ((handle)->vfs_next.ops.symlink((handle)->vfs_next.handles.symlink, (oldpath), (newpath)))
#define SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz) ((handle)->vfs_next.ops.readlink((handle)->vfs_next.handles.readlink, (path), (buf), (bufsiz)))
Modified: branches/SAMBA_3_0/source/modules/vfs_full_audit.c
===================================================================
--- branches/SAMBA_3_0/source/modules/vfs_full_audit.c 2006-12-06 09:25:26 UTC (rev 20047)
+++ branches/SAMBA_3_0/source/modules/vfs_full_audit.c 2006-12-06 10:21:20 UTC (rev 20048)
@@ -155,6 +155,9 @@
int fd, SMB_OFF_T len);
static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,
int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
+static int smb_full_audit_kernel_flock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int fd,
+ uint32 share_mode);
static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
static int smb_full_audit_symlink(vfs_handle_struct *handle,
@@ -374,6 +377,8 @@
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_lock), SMB_VFS_OP_LOCK,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_kernel_flock), SMB_VFS_OP_KERNEL_FLOCK,
+ SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_getlock), SMB_VFS_OP_GETLOCK,
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_symlink), SMB_VFS_OP_SYMLINK,
@@ -541,6 +546,7 @@
{ SMB_VFS_OP_UTIME, "utime" },
{ SMB_VFS_OP_FTRUNCATE, "ftruncate" },
{ SMB_VFS_OP_LOCK, "lock" },
+ { SMB_VFS_OP_KERNEL_FLOCK, "kernel_flock" },
{ SMB_VFS_OP_GETLOCK, "getlock" },
{ SMB_VFS_OP_SYMLINK, "symlink" },
{ SMB_VFS_OP_READLINK, "readlink" },
@@ -1292,6 +1298,20 @@
return result;
}
+static int smb_full_audit_kernel_flock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int fd,
+ uint32 share_mode)
+{
+ int result;
+
+ result = SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, fd, share_mode);
+
+ do_log(SMB_VFS_OP_KERNEL_FLOCK, (result >= 0), handle, "%s",
+ fsp->fsp_name);
+
+ return result;
+}
+
static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd,
SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
{
More information about the samba-cvs
mailing list