From: Jeremy Allison Date: Wed, 4 Mar 2009 22:48:33 +0000 (-0800) Subject: Fix crashes when running RAW-ACLs against system with tdb ACL modules X-Git-Url: http://git.samba.org/samba.git/?p=jra%2Fsamba%2F.git;a=commitdiff_plain;h=f85aa66ca22f29734bdacaa559737990fbe28d8a Fix crashes when running RAW-ACLs against system with tdb ACL modules (caused by the POSIX pathname fixes). Jeremy. --- diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 73dbca4809b..a77f6d60f40 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -195,7 +195,7 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx, if (fsp && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (fsp->posix_open) { + if (fsp && fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn, name, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn, name, &sbuf); @@ -513,7 +513,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, if (fsp && !fsp->is_directory && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (fsp->posix_open) { + if (fsp && fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn,fname, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn,fname, &sbuf); diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 039e469426b..49e48998790 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -381,7 +381,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, if (fsp && !fsp->is_directory && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (fsp->posix_open) { + if (fsp && fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn,fname, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn,fname, &sbuf);