Hello!

I have compiled samba v2.2.9 without ACL support and when I test skel vfs
module I have encountered internal errors (SIGSEGV in child processes).

Consider the file source/samba/vfs.c:
struct vfs_ops default_vfs_ops = {
...
        /* POSIX ACL operations. */
#if defined(HAVE_NO_ACLS)
        NULL,
        NULL,
#else
        vfswrap_chmod_acl,
        vfswrap_fchmod_acl,
#endif
...
};

As we may see if we have not ACL support, chmod_acl and fchmod_acl structure
members became NULL. But skel VFS module lacks of check for it.

So, I suggest the following patch:
-----------------------------------------------------------------------------
diff -ur samba-2.2.9/examples/VFS/skel.c samba/examples/VFS/skel.c
--- samba-2.2.9/examples/VFS/skel.c     2004-05-08 05:07:43.000000000 +0400
+++ samba/examples/VFS/skel.c   2004-06-23 04:25:17.000000000 +0400
@@ -237,11 +237,15 @@
 
 static BOOL skel_chmod_acl(struct connection_struct *conn, const char *name, mode_t 
mode)
 {
+       if (!default_vfs_ops.chmod_acl)
+               return 0;
        return default_vfs_ops.chmod_acl(conn, name, mode);
 }
 
 static BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
 {
+       if (!default_vfs_ops.fchmod_acl)
+               return 0;
        return default_vfs_ops.fchmod_acl(fsp, fd, mode);
 }
 
-----------------------------------------------------------------------------
Thanks.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to