438 |
// Return requested data |
// Return requested data |
439 |
switch (info_class) |
switch (info_class) |
440 |
{ |
{ |
441 |
case 4: /* FileBasicInformation */ |
case FileBasicInformation: |
442 |
seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high, |
seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high, |
443 |
&ft_low); |
&ft_low); |
444 |
out_uint32_le(out, ft_low); //create_access_time |
out_uint32_le(out, ft_low); //create_access_time |
459 |
out_uint32_le(out, file_attributes); |
out_uint32_le(out, file_attributes); |
460 |
break; |
break; |
461 |
|
|
462 |
case 5: /* FileStandardInformation */ |
case FileStandardInformation: |
463 |
|
|
464 |
out_uint32_le(out, filestat.st_size); //Allocation size |
out_uint32_le(out, filestat.st_size); //Allocation size |
465 |
out_uint32_le(out, 0); |
out_uint32_le(out, 0); |
470 |
out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0); //Directory |
out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0); //Directory |
471 |
break; |
break; |
472 |
|
|
473 |
case 35: /* FileObjectIdInformation */ |
case FileObjectIdInformation: |
474 |
|
|
475 |
out_uint32_le(out, file_attributes); /* File Attributes */ |
out_uint32_le(out, file_attributes); /* File Attributes */ |
476 |
out_uint32_le(out, 0); /* Reparse Tag */ |
out_uint32_le(out, 0); /* Reparse Tag */ |
501 |
|
|
502 |
switch (info_class) |
switch (info_class) |
503 |
{ |
{ |
504 |
case 4: /* FileBasicInformation */ |
case FileBasicInformation: |
505 |
write_time = change_time = access_time = 0; |
write_time = change_time = access_time = 0; |
506 |
|
|
507 |
in_uint8s(in, 4); /* Handle of root dir? */ |
in_uint8s(in, 4); /* Handle of root dir? */ |
581 |
|
|
582 |
break; |
break; |
583 |
|
|
584 |
case 10: /* FileRenameInformation */ |
case FileRenameInformation: |
585 |
|
|
586 |
in_uint8s(in, 4); /* Handle of root dir? */ |
in_uint8s(in, 4); /* Handle of root dir? */ |
587 |
in_uint8s(in, 0x1a); /* unknown */ |
in_uint8s(in, 0x1a); /* unknown */ |
607 |
} |
} |
608 |
break; |
break; |
609 |
|
|
610 |
case 13: /* FileDispositionInformation */ |
case FileDispositionInformation: |
611 |
|
|
612 |
//unimpl("IRP Set File Information class: FileDispositionInformation\n"); |
//unimpl("IRP Set File Information class: FileDispositionInformation\n"); |
613 |
|
|
623 |
|
|
624 |
break; |
break; |
625 |
|
|
626 |
case 19: /* FileAllocationInformation */ |
case FileAllocationInformation: |
627 |
|
|
628 |
unimpl("IRP Set File Information class: FileAllocationInformation\n"); |
unimpl("IRP Set File Information class: FileAllocationInformation\n"); |
629 |
break; |
break; |
630 |
|
|
631 |
case 20: /* FileEndOfFileInformation */ |
case FileEndOfFileInformation: |
632 |
in_uint8s(in, 28); /* unknown */ |
in_uint8s(in, 28); /* unknown */ |
633 |
in_uint32_le(in, length); /* file size */ |
in_uint32_le(in, length); /* file size */ |
634 |
|
|
736 |
|
|
737 |
switch (info_class) |
switch (info_class) |
738 |
{ |
{ |
739 |
case 1: /* FileFsVolumeInformation */ |
case FileFsVolumeInformation: |
740 |
|
|
741 |
out_uint32_le(out, 0); /* volume creation time low */ |
out_uint32_le(out, 0); /* volume creation time low */ |
742 |
out_uint32_le(out, 0); /* volume creation time high */ |
out_uint32_le(out, 0); /* volume creation time high */ |
748 |
rdp_out_unistr(out, fsinfo->label, 2 * strlen(fsinfo->label) - 2); |
rdp_out_unistr(out, fsinfo->label, 2 * strlen(fsinfo->label) - 2); |
749 |
break; |
break; |
750 |
|
|
751 |
case 3: /* FileFsSizeInformation */ |
case FileFsSizeInformation: |
752 |
|
|
753 |
out_uint32_le(out, stat_fs.f_blocks); /* Total allocation units low */ |
out_uint32_le(out, stat_fs.f_blocks); /* Total allocation units low */ |
754 |
out_uint32_le(out, 0); /* Total allocation high units */ |
out_uint32_le(out, 0); /* Total allocation high units */ |
758 |
out_uint32_le(out, 0x200); /* Bytes per sector */ |
out_uint32_le(out, 0x200); /* Bytes per sector */ |
759 |
break; |
break; |
760 |
|
|
761 |
case 5: /* FileFsAttributeInformation */ |
case FileFsAttributeInformation: |
762 |
|
|
763 |
out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED); /* fs attributes */ |
out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED); /* fs attributes */ |
764 |
out_uint32_le(out, F_NAMELEN(stat_fs)); /* max length of filename */ |
out_uint32_le(out, F_NAMELEN(stat_fs)); /* max length of filename */ |
767 |
rdp_out_unistr(out, fsinfo->type, 2 * strlen(fsinfo->type) - 2); |
rdp_out_unistr(out, fsinfo->type, 2 * strlen(fsinfo->type) - 2); |
768 |
break; |
break; |
769 |
|
|
770 |
case 2: /* FileFsLabelInformation */ |
case FileFsLabelInformation: |
771 |
case 4: /* FileFsDeviceInformation */ |
case FileFsDeviceInformation: |
772 |
case 6: /* FileFsControlInformation */ |
case FileFsControlInformation: |
773 |
case 7: /* FileFsFullSizeInformation */ |
case FileFsFullSizeInformation: |
774 |
case 8: /* FileFsObjectIdInformation */ |
case FileFsObjectIdInformation: |
775 |
case 9: /* FileFsMaximumInformation */ |
case FileFsMaximumInformation: |
776 |
|
|
777 |
default: |
default: |
778 |
|
|
779 |
unimpl("IRP Query Volume Information class: 0x%x\n", info_class); |
unimpl("IRP Query Volume Information class: 0x%x\n", info_class); |