Fix crashes when running RAW-ACLs against system with tdb ACL modules
authorJeremy Allison <jra@samba.org>
Wed, 4 Mar 2009 22:47:44 +0000 (14:47 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 4 Mar 2009 22:47:44 +0000 (14:47 -0800)
(caused by the POSIX pathname fixes).
Jeremy.

source/modules/vfs_acl_tdb.c
source/modules/vfs_acl_xattr.c

index 49a316a1824c891ee0735d2f3e8590cfc636a342..829ac48418a3ae84d18d08919d6dc1750cbbab71 100644 (file)
@@ -191,7 +191,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);
@@ -508,7 +508,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);
index b12422fe8360af6151c5c4697e5e10e8685fe0e8..958991b3fcac97988e0e0b9fab3b0bec167a43a2 100644 (file)
@@ -384,7 +384,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);