r11744: make sure the session is completed authenticated!!!
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Nov 2005 17:14:16 +0000 (17:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:20 +0000 (13:46 -0500)
metze
(This used to be commit 0383218a00a8e744b70a3fa5056467a43fbe3a42)

source4/smb_server/reply.c
source4/smb_server/smb_server.c

index 4526d6f7f3e11519c5f198b9ca89ce947192cba1..75c5772bf7600007914e12adf3be7a8708487a72 100644 (file)
@@ -2174,7 +2174,7 @@ void reply_ulogoffX(struct smbsrv_request *req)
        struct smbsrv_tcon *tcon;
        NTSTATUS status;
 
-       if (!req->session) {
+       if (!req->session || !req->session->finished_sesssetup) {
                req_reply_error(req, NT_STATUS_DOS(ERRSRV, ERRbaduid));
                return;
        }
index 340674b8df44c4f0fe14d9a126a4001522287360..7e1e8a8f4ebe74ef981d732913d95897294ff4b5 100644 (file)
@@ -504,7 +504,7 @@ static void switch_message(int type, struct smbsrv_request *req)
        }
 
        /* see if the vuid is valid */
-       if ((flags & AS_USER) && !req->session) {
+       if ((flags & AS_USER) && (!req->session || !req->session->finished_sesssetup)) {
                /* amazingly, the error code depends on the command */
                switch (type) {
                        case SMBntcreateX: