Ensure we never enter VFS_CREATE without having initialized
authorJeremy Allison <jra@samba.org>
Thu, 26 Mar 2009 04:48:37 +0000 (21:48 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 26 Mar 2009 04:48:37 +0000 (21:48 -0700)
sbuf as invalid (if not already read via stat()). Still trying
to find the build farm RAW-STREAM errors and it's happening
in a openX call....
Jeremy.

source3/smbd/nttrans.c
source3/smbd/reply.c
source3/smbd/trans2.c

index 628fc1bd32bc0da07b6ddf036909603e29c4ecf6..7e75eea6b4da93f4ae5faf238955e1c0f1ce17d6 100644 (file)
@@ -441,6 +441,8 @@ void reply_ntcreate_and_X(struct smb_request *req)
 
        START_PROFILE(SMBntcreateX);
 
+       SET_STAT_INVALID(sbuf);
+
        if (req->wct < 24) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                return;
@@ -865,6 +867,8 @@ static void call_nt_transact_create(connection_struct *conn,
        uint8_t oplock_granted;
        TALLOC_CTX *ctx = talloc_tos();
 
+       SET_STAT_INVALID(sbuf);
+
        DEBUG(5,("call_nt_transact_create\n"));
 
        /*
index 6f19a58178bafe4eefe4a898b13c89c46e974c6a..16eb4a7fd7cbd27acdc80a868aaf181bec6594fc 100644 (file)
@@ -1606,6 +1606,8 @@ void reply_open(struct smb_request *req)
 
        START_PROFILE(SMBopen);
 
+       SET_STAT_INVALID(sbuf);
+
        if (req->wct < 2) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                END_PROFILE(SMBopen);
@@ -1741,6 +1743,8 @@ void reply_open_and_X(struct smb_request *req)
                return;
        }
 
+       SET_STAT_INVALID(sbuf);
+
        open_flags = SVAL(req->vwv+2, 0);
        deny_mode = SVAL(req->vwv+3, 0);
        smb_attr = SVAL(req->vwv+5, 0);
@@ -1945,6 +1949,7 @@ void reply_mknew(struct smb_request *req)
 
        START_PROFILE(SMBcreate);
        ZERO_STRUCT(ft);
+       SET_STAT_INVALID(sbuf);
 
         if (req->wct < 3) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -2123,6 +2128,7 @@ void reply_ctemp(struct smb_request *req)
                return;
        }
 
+       SET_STAT_INVALID(sbuf);
        SMB_VFS_STAT(conn,fname,&sbuf);
 
        /* We should fail if file does not exist. */
index df01a398934967ad9989ef9002c0abe20dc01b90..04b1145e5854c6ef4b9b00454a0c41e4a6d394e2 100644 (file)
@@ -895,6 +895,8 @@ static void call_trans2open(connection_struct *conn,
        uint32 create_options = 0;
        TALLOC_CTX *ctx = talloc_tos();
 
+       SET_STAT_INVALID(sbuf);
+
        /*
         * Ensure we have enough parameters to perform the operation.
         */