Igor Yu. Zhbanov
2004-Jun-23 12:32 UTC
[Samba] Skel VFS module crashes smbd when we have no ACL support in samba v2.2.9.
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.
Jeremy Allison
2004-Jun-23 18:08 UTC
[Samba] Skel VFS module crashes smbd when we have no ACL support in samba v2.2.9.
On Wed, Jun 23, 2004 at 04:31:24PM +0400, Igor Yu. Zhbanov wrote:> 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).Thanks for the report but this is already fixed in the Samba 3.0.x code tree. Cheers, Jeremy.