summaryrefslogtreecommitdiff
path: root/source4/ntvfs/unixuid/vfs_unixuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/unixuid/vfs_unixuid.c')
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index 97c306f7c3..70ad6ee253 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -235,7 +235,10 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs,
struct unix_sec_ctx *newsec;
NTSTATUS status;
- if (req->session_info == NULL) {
+ /* If we are asked to set up, but have not had a successful
+ * session setup or tree connect, then these may not be filled
+ * in. ACCESS_DENIED is the right error code here */
+ if (req->session_info == NULL || priv == NULL) {
return NT_STATUS_ACCESS_DENIED;
}