summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-12-06 10:21:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:22 -0500
commit66cd8c30781a6856d2fe1516b281f8e176aa6304 (patch)
treeb67da2f060fafdb27ab7bd8206c7b51ebe2f5969 /source3/modules
parent91adcd0bae35d178ae8803605a705911de7d093d (diff)
downloadsamba-66cd8c30781a6856d2fe1516b281f8e176aa6304.tar.gz
samba-66cd8c30781a6856d2fe1516b281f8e176aa6304.tar.bz2
samba-66cd8c30781a6856d2fe1516b281f8e176aa6304.zip
r20048: Fix vfs_full_audit after Jims kernel_flock addition
(This used to be commit 4fe19e741fcb384f0cec59d3ec742d5bd173d41f)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_full_audit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index fd15c5c358..beda82c00e 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -155,6 +155,9 @@ static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp
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 @@ static vfs_op_tuple audit_op_tuples[] = {
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 @@ static struct {
{ 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 @@ static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, in
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)
{