mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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 ae5761ccc6
)
This commit is contained in:
parent
cc87cb7770
commit
eb46589432
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user