[Samba] Skel VFS module crashes smbd when we have no ACL support in
samba v2.2.9.
Igor Yu. Zhbanov
bsg at uniyar.ac.ru
Wed Jun 23 12:31:24 GMT 2004
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.
More information about the samba
mailing list