summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-23 21:11:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:51 -0500
commiteb465894322c78688480827b55e084210a6228a6 (patch)
tree07b9603e3a16710e8d94414ffdbcc6ee0739c36f
parentcc87cb7770198aa2aeac8253ff57fef8fe01f27d (diff)
downloadsamba-eb465894322c78688480827b55e084210a6228a6.tar.gz
samba-eb465894322c78688480827b55e084210a6228a6.tar.bz2
samba-eb465894322c78688480827b55e084210a6228a6.zip
r21952: Fix critical (!) error found by IBM checker.
Missing break statements meant that no info levels would ever be returned correctly from POSIX open/mkdir. Jeremy. (This used to be commit ae5761ccc66b35b66ca4fa90aef02d8be1564737)
-rw-r--r--source3/smbd/trans2.c50
1 files changed, 28 insertions, 22 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 14dfbe0bbf..007ad50b10 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5329,17 +5329,20 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
SIVAL(pdata,4,info); /* Was directory created. */
switch (info_level_return) {
- case SMB_QUERY_FILE_UNIX_BASIC:
- SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_BASIC);
- SSVAL(pdata,10,0); /* Padding. */
- store_file_unix_basic(conn, pdata + 12, fsp, psbuf);
- case SMB_QUERY_FILE_UNIX_INFO2:
- SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_INFO2);
- SSVAL(pdata,10,0); /* Padding. */
- store_file_unix_basic_info2(conn, pdata + 12, fsp, psbuf);
- default:
- SSVAL(pdata,8,SMB_NO_INFO_LEVEL_RETURNED);
- SSVAL(pdata,10,0); /* Padding. */
+ case SMB_QUERY_FILE_UNIX_BASIC:
+ SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_BASIC);
+ SSVAL(pdata,10,0); /* Padding. */
+ store_file_unix_basic(conn, pdata + 12, fsp, psbuf);
+ break;
+ case SMB_QUERY_FILE_UNIX_INFO2:
+ SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_INFO2);
+ SSVAL(pdata,10,0); /* Padding. */
+ store_file_unix_basic_info2(conn, pdata + 12, fsp, psbuf);
+ break;
+ default:
+ SSVAL(pdata,8,SMB_NO_INFO_LEVEL_RETURNED);
+ SSVAL(pdata,10,0); /* Padding. */
+ break;
}
return status;
@@ -5513,17 +5516,20 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
SIVAL(pdata,4,info); /* Was file created etc. */
switch (info_level_return) {
- case SMB_QUERY_FILE_UNIX_BASIC:
- SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_BASIC);
- SSVAL(pdata,10,0); /* padding. */
- store_file_unix_basic(conn, pdata + 12, fsp, psbuf);
- case SMB_QUERY_FILE_UNIX_INFO2:
- SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_INFO2);
- SSVAL(pdata,10,0); /* padding. */
- store_file_unix_basic_info2(conn, pdata + 12, fsp, psbuf);
- default:
- SSVAL(pdata,8,SMB_NO_INFO_LEVEL_RETURNED);
- SSVAL(pdata,10,0); /* padding. */
+ case SMB_QUERY_FILE_UNIX_BASIC:
+ SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_BASIC);
+ SSVAL(pdata,10,0); /* padding. */
+ store_file_unix_basic(conn, pdata + 12, fsp, psbuf);
+ break;
+ case SMB_QUERY_FILE_UNIX_INFO2:
+ SSVAL(pdata,8,SMB_QUERY_FILE_UNIX_INFO2);
+ SSVAL(pdata,10,0); /* padding. */
+ store_file_unix_basic_info2(conn, pdata + 12, fsp, psbuf);
+ break;
+ default:
+ SSVAL(pdata,8,SMB_NO_INFO_LEVEL_RETURNED);
+ SSVAL(pdata,10,0); /* padding. */
+ break;
}
return NT_STATUS_OK;
}