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

source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c

index 73dbca4809b00f25e714f2448f5203e75b99b2a4..a77f6d60f40a0b4f5a5bad63266a5352956d32a9 100644 (file)
@@ -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);
index 039e469426bdc5801248f1dbf66d403cfe7caabd..49e48998790872fa146188f36476c252fa3140ce 100644 (file)
@@ -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);