3.0.25pre2-SVN-build-21871 and panic in vfs_full_audit.c

Jeremy Allison jra at samba.org
Mon Mar 19 16:57:54 GMT 2007


On Mon, Mar 19, 2007 at 05:33:36PM +0100, Thomas Bork wrote:
> Volker Lendecke wrote:
> 
> >On Sun, Mar 18, 2007 at 09:30:06PM +0100, Thomas Bork wrote:
> >>Maybe this is the problem:
> >>In vfs.h:
> >>
> >>[...]
> >>		struct vfs_handle_struct *readlink;
> >>		struct vfs_handle_struct *link;
> >>		struct vfs_handle_struct *mknod;
> >>		struct vfs_handle_struct *realpath;
> >>		struct vfs_handle_struct *notify_watch;
> >>		struct vfs_handle_struct *chflags;
> >>
> >>In vfs_full_audit.c:
> >>
> >>/* The following array *must* be in the same order as defined in vfs.h */
> >>[...]
> >>	{ SMB_VFS_OP_READLINK,	"readlink" },
> >>	{ SMB_VFS_OP_LINK,	"link" },
> >>	{ SMB_VFS_OP_MKNOD,	"mknod" },
> >>	{ SMB_VFS_OP_REALPATH,	"realpath" },
> >>	{ SMB_VFS_OP_CHFLAGS,	"chflags" },
> >>
> >>
> >>This is *not* the same order. In vfs.h there is 'notify_watch' between 
> >>realpath and chflags. This is not in vfs_full_audit.c...
> >
> >Weird that it works for me. Need to investigate.
> 
> Can you eliminate this problem before 3.0.25pre2 comes out tomorrow?
> The problem also exists in SAMBA_3_0.

How about this patch :

Jeremy.
-------------- next part --------------
Index: modules/vfs_full_audit.c
===================================================================
--- modules/vfs_full_audit.c	(revision 21873)
+++ modules/vfs_full_audit.c	(working copy)
@@ -174,6 +174,13 @@
 		       const char *pathname, mode_t mode, SMB_DEV_T dev);
 static char *smb_full_audit_realpath(vfs_handle_struct *handle,
 			    const char *path, char *resolved_path);
+static NTSTATUS smb_full_audit_notify_watch(struct vfs_handle_struct *handle,
+			struct sys_notify_context *ctx,
+			struct notify_entry *e,
+			void (*callback)(struct sys_notify_context *ctx,
+					void *private_data,
+					struct notify_event *ev),
+			void *private_data, void *handle_p);
 static int smb_full_audit_chflags(vfs_handle_struct *handle,
 			    const char *path, uint flags);
 static size_t smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
@@ -399,6 +406,8 @@
 	 SMB_VFS_LAYER_LOGGER},
 	{SMB_VFS_OP(smb_full_audit_realpath),	SMB_VFS_OP_REALPATH,
 	 SMB_VFS_LAYER_LOGGER},
+	{SMB_VFS_OP(smb_full_audit_notify_watch),SMB_VFS_OP_NOTIFY_WATCH,
+	 SMB_VFS_LAYER_LOGGER},
 	{SMB_VFS_OP(smb_full_audit_chflags),	SMB_VFS_OP_CHFLAGS,
 	 SMB_VFS_LAYER_LOGGER},
 
@@ -1410,6 +1419,23 @@
 	return result;
 }
 
+static NTSTATUS smb_full_audit_notify_watch(struct vfs_handle_struct *handle,
+			struct sys_notify_context *ctx,
+			struct notify_entry *e,
+			void (*callback)(struct sys_notify_context *ctx,
+					void *private_data,
+					struct notify_event *ev),
+			void *private_data, void *handle_p)
+{
+	NTSTATUS result;
+
+	result = SMB_VFS_NEXT_NOTIFY_WATCH(handle, ctx, e, callback, private_data, handle_p);
+
+	do_log(SMB_VFS_OP_NOTIFY_WATCH, NT_STATUS_IS_OK(result), handle, "");
+
+	return result;
+}
+
 static int smb_full_audit_chflags(vfs_handle_struct *handle,
 			    const char *path, uint flags)
 {


More information about the samba-technical mailing list