diff options
Diffstat (limited to 'source4/smb_server/smb_server.c')
-rw-r--r-- | source4/smb_server/smb_server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 84209d8670..aceae08ad8 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -480,6 +480,14 @@ static void switch_message(int type, struct request_context *req) return; } + /* see if the vuid is valid */ + if ((flags & AS_USER) && !req->user_ctx->vuser) { + if (!(flags & AS_GUEST)) { + req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRbaduid)); + return; + } + } + /* does this protocol need to be run as the connected user? */ #if HACK_REWRITE if ((flags & AS_USER) && !change_to_user(req->conn,session_tag)) { |