diff options
author | Andreas Schneider <asn@samba.org> | 2018-12-13 12:30:15 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-28 10:29:25 +0100 |
commit | 6b0963f68e4958c14f53b0d037141ee77fe5991b (patch) | |
tree | 975a2f82b05b265e36d9851790139eb858525464 /source4 | |
parent | 0bcbec40bbab1d7bb8fcc94a7321f3dba17b18db (diff) | |
download | samba-6b0963f68e4958c14f53b0d037141ee77fe5991b.tar.gz |
s4:torture: Complete C99 initializers for levels in raw qfileinfo test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/raw/qfileinfo.c | 331 |
1 files changed, 246 insertions, 85 deletions
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index dd529250969..1d2928192d2 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -38,100 +38,261 @@ static struct { NTSTATUS fnum_status, fname_status; union smb_fileinfo fnum_finfo, fname_finfo; } levels[] = { - { .name = "GETATTR", - .level = RAW_FILEINFO_GETATTR, - .only_paths = 1, - .only_handles = 0, - .expected_ipc_access_denied = 1}, - { .name ="GETATTRE", - .level = RAW_FILEINFO_GETATTRE, - .only_paths = 0, - .only_handles = 1 }, - { .name ="STANDARD", - .level = RAW_FILEINFO_STANDARD, }, - { .name ="EA_SIZE", - .level = RAW_FILEINFO_EA_SIZE }, - { .name ="ALL_EAS", - .level = RAW_FILEINFO_ALL_EAS, - .expected_ipc_fnum_status = NT_STATUS_ACCESS_DENIED, + { + .name = "GETATTR", + .level = RAW_FILEINFO_GETATTR, + .only_paths = 1, + .only_handles = 0, + .expected_ipc_access_denied = 1, }, - { .name ="IS_NAME_VALID", - .level = RAW_FILEINFO_IS_NAME_VALID, - .only_paths = 1, - .only_handles = 0 }, - { .name ="BASIC_INFO", - .level = RAW_FILEINFO_BASIC_INFO }, - { .name ="STANDARD_INFO", - .level = RAW_FILEINFO_STANDARD_INFO }, - { .name ="EA_INFO", - .level = RAW_FILEINFO_EA_INFO }, - { .name ="NAME_INFO", - .level = RAW_FILEINFO_NAME_INFO }, - { .name ="ALL_INFO", - .level = RAW_FILEINFO_ALL_INFO }, - { .name ="ALT_NAME_INFO", - .level = RAW_FILEINFO_ALT_NAME_INFO, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="GETATTRE", + .level = RAW_FILEINFO_GETATTRE, + .only_paths = 0, + .only_handles = 1, }, - { .name ="STREAM_INFO", - .level = RAW_FILEINFO_STREAM_INFO, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="STANDARD", + .level = RAW_FILEINFO_STANDARD, }, - { .name ="COMPRESSION_INFO", - .level = RAW_FILEINFO_COMPRESSION_INFO, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="EA_SIZE", + .level = RAW_FILEINFO_EA_SIZE, }, - { .name ="UNIX_BASIC_INFO", - .level = RAW_FILEINFO_UNIX_BASIC, - .only_paths = 0, - .only_handles = 0, - .capability_mask = CAP_UNIX}, - { .name ="UNIX_LINK_INFO", - .level = RAW_FILEINFO_UNIX_LINK, - .only_paths = 0, - .only_handles = 0, - .capability_mask = CAP_UNIX}, - { .name ="BASIC_INFORMATION", - .level = RAW_FILEINFO_BASIC_INFORMATION }, - { .name ="STANDARD_INFORMATION", - .level = RAW_FILEINFO_STANDARD_INFORMATION }, - { .name ="INTERNAL_INFORMATION", - .level = RAW_FILEINFO_INTERNAL_INFORMATION }, - { .name ="EA_INFORMATION", - .level = RAW_FILEINFO_EA_INFORMATION }, - { .name = "ACCESS_INFORMATION", - .level = RAW_FILEINFO_ACCESS_INFORMATION }, - { .name = "NAME_INFORMATION", - .level = RAW_FILEINFO_NAME_INFORMATION }, - { .name ="POSITION_INFORMATION", - .level = RAW_FILEINFO_POSITION_INFORMATION }, - { .name ="MODE_INFORMATION", - .level = RAW_FILEINFO_MODE_INFORMATION }, - { .name ="ALIGNMENT_INFORMATION", - .level = RAW_FILEINFO_ALIGNMENT_INFORMATION }, - { .name ="ALL_INFORMATION", - .level = RAW_FILEINFO_ALL_INFORMATION }, - { .name ="ALT_NAME_INFORMATION", - .level = RAW_FILEINFO_ALT_NAME_INFORMATION, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="ALL_EAS", + .level = RAW_FILEINFO_ALL_EAS, + .expected_ipc_fnum_status = NT_STATUS_ACCESS_DENIED, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, }, - { .name ="STREAM_INFORMATION", - .level = RAW_FILEINFO_STREAM_INFORMATION, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="IS_NAME_VALID", + .level = RAW_FILEINFO_IS_NAME_VALID, + .only_paths = 1, + .only_handles = 0, }, - { .name = "COMPRESSION_INFORMATION", - .level = RAW_FILEINFO_COMPRESSION_INFORMATION, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="BASIC_INFO", + .level = RAW_FILEINFO_BASIC_INFO, }, - { .name ="NETWORK_OPEN_INFORMATION", - .level = RAW_FILEINFO_NETWORK_OPEN_INFORMATION, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="STANDARD_INFO", + .level = RAW_FILEINFO_STANDARD_INFO, }, - { .name = "ATTRIBUTE_TAG_INFORMATION", - .level = RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION, - .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER + { + .name ="EA_INFO", + .level = RAW_FILEINFO_EA_INFO, }, - { NULL } + { + .name ="NAME_INFO", + .level = RAW_FILEINFO_NAME_INFO, + }, + { + .name ="ALL_INFO", + .level = RAW_FILEINFO_ALL_INFO, + }, + { + .name ="ALT_NAME_INFO", + .level = RAW_FILEINFO_ALT_NAME_INFO, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name ="STREAM_INFO", + .level = RAW_FILEINFO_STREAM_INFO, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name ="COMPRESSION_INFO", + .level = RAW_FILEINFO_COMPRESSION_INFO, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name ="UNIX_BASIC_INFO", + .level = RAW_FILEINFO_UNIX_BASIC, + .only_paths = 0, + .only_handles = 0, + .capability_mask = CAP_UNIX, + }, + { + .name ="UNIX_LINK_INFO", + .level = RAW_FILEINFO_UNIX_LINK, + .only_paths = 0, + .only_handles = 0, + .capability_mask = CAP_UNIX, + }, + { + .name ="BASIC_INFORMATION", + .level = RAW_FILEINFO_BASIC_INFORMATION, + }, + { + .name ="STANDARD_INFORMATION", + .level = RAW_FILEINFO_STANDARD_INFORMATION, + }, + { + .name ="INTERNAL_INFORMATION", + .level = RAW_FILEINFO_INTERNAL_INFORMATION, + }, + { + .name ="EA_INFORMATION", + .level = RAW_FILEINFO_EA_INFORMATION, + }, + { + .name = "ACCESS_INFORMATION", + .level = RAW_FILEINFO_ACCESS_INFORMATION, + }, + { + .name = "NAME_INFORMATION", + .level = RAW_FILEINFO_NAME_INFORMATION, + }, + { + .name ="POSITION_INFORMATION", + .level = RAW_FILEINFO_POSITION_INFORMATION, + }, + { + .name ="MODE_INFORMATION", + .level = RAW_FILEINFO_MODE_INFORMATION, + }, + { + .name ="ALIGNMENT_INFORMATION", + .level = RAW_FILEINFO_ALIGNMENT_INFORMATION, + }, + { + .name ="ALL_INFORMATION", + .level = RAW_FILEINFO_ALL_INFORMATION, + }, + { + .name ="ALT_NAME_INFORMATION", + .level = RAW_FILEINFO_ALT_NAME_INFORMATION, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name ="STREAM_INFORMATION", + .level = RAW_FILEINFO_STREAM_INFORMATION, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name = "COMPRESSION_INFORMATION", + .level = RAW_FILEINFO_COMPRESSION_INFORMATION, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name ="NETWORK_OPEN_INFORMATION", + .level = RAW_FILEINFO_NETWORK_OPEN_INFORMATION, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { + .name = "ATTRIBUTE_TAG_INFORMATION", + .level = RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION, + .expected_ipc_fnum_status = NT_STATUS_INVALID_PARAMETER, + .fnum_status = NT_STATUS_SUCCESS, + .fname_status = NT_STATUS_SUCCESS, + .fnum_finfo = { + .generic = { + .level = 0, + }, + }, + .fname_finfo = { + .generic = { + .level = 0, + }, + }, + }, + { .name = NULL, }, }; /* |