diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-09-22 14:14:19 -0700 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-10-02 12:44:58 +0200 |
commit | ba0eba9e09805b7b0cbaffd66797419e381b1022 (patch) | |
tree | 72efcc193f6a123ab4fa58eb0ed3c148e0c2748d /source4/ntvfs/unixuid | |
parent | 642dd95d817521f75f193a1e594b4dacf04d7b26 (diff) | |
download | samba-ba0eba9e09805b7b0cbaffd66797419e381b1022.tar.gz samba-ba0eba9e09805b7b0cbaffd66797419e381b1022.tar.bz2 samba-ba0eba9e09805b7b0cbaffd66797419e381b1022.zip |
s4:ntvfs Don't attempt to follow NULL in unixuid_setup_security()
This segfault occoured in cases where we rejected (or never attempted)
the tree connect, so had an invalid private pointer for the logoff
codepath.
Andrew Bartlett
Diffstat (limited to 'source4/ntvfs/unixuid')
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 5 |
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; } |