Commit Graph

2106 Commits

Author SHA1 Message Date
Pete Batard 98725a0d5f
[misc] fix improper processing of net related errors
* With thanks to @Wack0
* Also silence a Coverity warning
2023-09-08 16:58:41 +01:00
Pete Batard 94ecf74c5f
[misc] use FORMAT_MESSAGE_FROM_HMODULE where possible and drop our custom message tables 2023-09-04 11:41:35 +01:00
Pete Batard d5bf53054b
[misc] improve retrieval of core directories
* This *might* help with the issue reported in #2296.
2023-08-28 11:08:03 +01:00
Pete Batard 866aa22a8b
[iso] fix Debian 12 Live not using persistence in BIOS mode
* The Isolinux/Syslinux append line has been moved to /isolinux/live.cfg
  so make sure we patch that file when persistence is enabled.
2023-08-27 23:03:43 +01:00
Pete Batard 9c6b1ad977
[vhd] fix Rufus being unable to open .vhd images
* Due to a typo in vhd.c where the second safe_stricmp() should be against ".vhd" and not ".vhdx" again.
* Also enable the ignore boot marker bypass for VHD/VHDX/FFU and don't misreport those images as
  "compressed disk images".
* Closes #2309.
2023-08-20 13:12:38 +01:00
Pete Batard 5b6574d6f6
[misc] add S Mode detection to Windows version reporting
* With thanks to @Wack0
2023-08-18 17:38:12 +01:00
Pete Batard c5ad16fdeb
[wue] add an expert feature to restrict a Windows installation to S Mode
* This is placed behind an expert wall (Ctrl-Alt-E) on account that:
  - If you happen to boot a Windows To Go drive in S Mode on a computer, it may set any
    existing Windows installation there to S Mode as well, *even if their disk is offline!*
  - It can be *exceedingly* tricky to get out of S Mode, as the SkuPolicyRequired registry
    trick alone may not be enough (i.e. You can have very much a Windows install in S Mode
    *without* SkuPolicyRequired being set anywhere).
* Also set version to rufus-next and fix a ChangeLog typo.
2023-08-15 11:15:16 +01:00
Pete Batard 5084317dd7
Rufus 4.2 (Build 2074)
* Also update UEFI:NTFS's NTFS driver to v1.7
2023-07-26 12:54:49 +01:00
AJIOB b81b440a20
[uefi] fix search for bootloaders in FAT images that have an 'EFI' volume label
* Per https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#Directory_entry it
  is possible to have a FAT directory entry with a 'EFI' volume label alongside with
  a 'EFI' subdirectory.
* If that happens, then the current Syslinux libfat_searchdir() code may treat the
  'EFI' volume label as an empty subdirectory and say that there are no bootloaders,
  even if the 'EFI\Boot\Boot###.efi' binaries really do exist.
* Fix this by filtering out entries with the 'volume label' attribute (0x08).
* For good measure, also filter out entries with the 'device' attribute (0x40), as
  it is technically possible to create a 'EFI' device leading to the same issue.
* Closes #2288.
* Closes #2289.
2023-07-24 23:55:47 +01:00
Pete Batard 64e85ed09a
[uefi] don't revoke Windows 11 or post Windows 10 20H1 boot media yet
* As opposed to what we originally asserted, Microsoft did enact a blanket revocation
  in SkuSiPolicy.p7b for all post 1703 up to 2305 Windows UEFI bootloaders.
* As a result, unconditionally copying SkuSiPolicy.p7b will result in media as recent
  as Windows 11 22H2 (v1) being flagged as revoked, which we don't want to enforce as
  long as Microsoft themselves haven't entered the enforcing phase of their Black
  Lotus mitigation (currently planned for early 2024).
* Because of this, while we add some revocation detection for post 1703 bootloaders,
  we set it to only go as far as 20H1 for now, which means that all post 20H1 Windows
  10 media and all Windows 11 media will not yet be flagged by Rufus as revoked and
  will still boot in a Secure Boot environment due to lack of an SkuSiPolicy.p7b.
* Ultimately, per #2244 we may look for a BOOTMGRSECURITYVERSIONNUMBER resource to
  blanket revoke all post 1703 - pre 2305 Windows UEFI bootloaders.
* Also remove the now unused comdlg32 library from the linker.
2023-07-15 23:20:59 +02:00
Pete Batard 3329304e67
[grub] update DB for GRUB 2.12~rc1
* Also fix some Coverity warnings in stdlg.c.
2023-07-13 10:11:52 +02:00
Pete Batard 65b84ea99d
[loc] update French translation 2023-07-10 12:40:55 +02:00
Pete Batard 5191c68337
[ui] keep user preferred image type when saving drive to VHD
* Also fix a Coverity warning and use a better description for SELECT image types.
2023-07-10 11:34:50 +02:00
Pete Batard 5bbcba8534
[vhd] add write support for .vhdx and .ffu images
* Also move VHD mounting function calls from iso.c to vhd.c and remove unused VHD footer elements.
2023-07-06 19:47:26 +01:00
Pete Batard f411d526d6
[misc] attempt to fix DLL address resolver for ARM64
* SymLoadModuleEx() on the DLL fails (with ERROR_SUCCESS, sic) on ARM64, so we have to resort
  to loading the DLL in memory and look for the "RSDS" section to access the GUID and Age.
* Except that, once you sort that, you end up with SymEnumSymbols() producing two separate
  addresses for each symbol, on account that the Windows 11 ARM64 DLLs are actually an
  unholy union of X64 and ARM64 *in the same binary*, under an abomination that Microsoft
  calls ARM64X (See https://learn.microsoft.com/en-us/windows/arm/arm64x-pe for details).
* And, of course, Microsoft did not provide any means during PDB enumeration to tell which
  address is for which arch. Especially, the bloody pSymInfo->TypeIndex, that they could
  easily have used for this, is utterly pointless as it remains set to 0...
* This means that, even after all this effort, we're still nowhere close to have a solution
  that can make DLL address resolution work on Windows 11 ARM64.
2023-07-05 22:25:25 +01:00
Pete Batard 0363bfe503
[misc] add an address resolver for internal DLL function calls
* Not sure if we'll use this to hook into FfuCaptureImage()/FfuApplyImage()/FfuMountImage()
  directly. But at least, if we ever need it, it's there...
2023-07-05 18:36:58 +01:00
Pete Batard ef345bf106
[uefi] fix UEFI bootloader extraction when case doesn't match
* With ISO-9660 being case sensitive, we could end up in situations where trying to extract
  '/efi/boot/bootx64.efi' for revocation validation would fail if the file on the image was
  stored as '/EFI/boot/bootx64.efi' (e.g. Debian 12).
* Fox this by storing the exact UEFI bootloader path we detected during ISO scan, and using
  this path for file extraction.
* Also add a Cancel choice to the revocation dialog and harmonize whitespaces.
2023-07-04 18:05:30 +01:00
ИEØ_ΙΙØZ bb66dfc492
[loc] update Traditional Chinese translation
* Closes #2274.
2023-07-04 13:29:27 +01:00
Pete Batard 10dbfdd7e1
[core] make sure the main partition size is aligned to the cluster size
* Having NTFS partitions properly aligned to the cluster size can drastically
  improve the speed of capturing a disk to an FFU image, as, when the size
  is aligned, the FFU capture uses the actual NTFS allocation map to only read
  and capture the clusters that are actually in use, whereas, if no aligned,
  FFU capture falls back to a sector by sector copy that is both much slower
  and also includes unwanted leftover garbage.
* Also only enable FFU when we detect FFUProvider.dll as a system library.
2023-07-04 13:26:04 +01:00
Pete Batard 0b1c68635a
[vhd] add experimental save to Full Flash Update (FFU) image support
* Full Flash Update (FFU) image support was added to dism with Windows 10 1709
  and is an alternate way to save a virtual hard disk for restoration.
* While more modern than VHD/VHDX, FFU creation only works for drives with file
  systems that Windows natively recognizes (FAT, NTFS) and that look like Windows
  installation media, so you can forget about FFU'ing a Linux disk.
* The other *intentional* drawback that Microsoft added is that they don't want
  anybody but themselves being able to create and restore FFU images, so, even
  as they have nice FfuApplyImage()/FfuCaptureImage() calls in FfuProvider.dll
  they have decided not to make these public.
* This means that, since we don't have time to spend on figuring and direct
  hooking internal DLL calls for x86_32, x86_64, ARM and ARM64 (and worrying
  that Microsoft may ever so slightly change their DLL between revs to break
  our hooks), we just call on dism.exe behind the scenes to create the FFU.
2023-07-03 23:57:04 +01:00
Pete Batard f9370e002e
[iso] fix a crash when parsing Windows ISOs with MinGW x86_32
* MinGW32's delay loading functionality is not yet up to par with MSVC's and especially, for
  some libraries (wininet, virtdisk) attempting to delay load them simply crashes the runtime.
* This results in the MinGW32 version of the app crashing when selecting a Windows ISO, as we
  will then try to mount the ISO using virtdisk to poke the build version. Note that this crash
  does not happen with the MinGW64 version or with MSVC.
* Closes #2272.
* Also fix a Coverity warning in SaveImageThread() and improve the VHD saving code.
2023-07-02 13:15:51 +01:00
Pete Batard d4c9f2dfa1
[vhd] enable saving device to compressed VHDX
* Now that we don't have to deal with Windows 7, we can use CreateVirtualDisk() to
  automatically dump a physical disk to VHD/VHDX, so do just that
* Also move the relevant VHD/ISO imaging call to the appropriate source.
2023-07-01 20:43:26 +01:00
Pete Batard 1476e9cd8b
[uefi] fix path of SKUSiPolicy.p7b for WOW
* 32-bit x86 running on 64-bit x86 Windows needs to get SKUSiPolicy.p7b from sysnative.
* Also fix automatic extension switching in file dialog and a small MinGW warning in Bled.
2023-07-01 20:22:10 +01:00
Pete Batard c47ee4c435
[cmp] update Bled to latest
* Adds the provision of default buffer size in bled_init()
2023-06-30 13:05:42 +01:00
Pete Batard c717c7789b
[cmp] further ZIP64 and overall Bled improvements
* The ZIP64 extra record may not be the first one, so add processing for all extra zip records.
* Also add extra sanity checks to try to appease Coverity and properly detect short writes.
2023-06-29 21:15:35 +01:00
Pete Batard f233191d54
[cmp] update Bled to latest
* This adds ZIP64 support, which is required to extract zip archives that are larger than 4GB.
* Closes #2264
* Also fix a MinGW warning in pki.c and improve the UEFI revocation messages.
2023-06-28 17:40:11 +01:00
Pete Batard 52a5551749
[uefi] improve revoked UEFI bootloader reporting
* Remove duplicates from Microsoft's SKUSiPolicy.p7b
* Also display the number of revoked from embedded
* Also use Microsoft's official capitalization for SKUSiPolicy.p7b's target path
2023-06-22 11:18:49 +01:00
Pete Batard 16570f8662
[uefi] warn about revoked UEFI bootloaders when creating Windows To Go drives
* Also move the warning after the WUE dialog.
* Also work around another possible access violation in process.c.
2023-06-19 10:38:30 +02:00
Pete Batard c59e9209eb
[uefi] factorize SkuSiPolicy.p7b copying code and apply it for Windows To Go
* Also don't forget to credit the original authors of the PowerShell gist we derived our code from!
2023-06-19 00:04:08 +02:00
Pete Batard 7eb9a6f16b
[misc] fix some benign Coverity warnings 2023-06-18 19:09:15 +02:00
Pete Batard be5b590cfb
[uefi] add parsing and copying of the system's SkuSiPolicy.p7b
* Instead of embedding the content of the most recent revoked bootloader hashes in db.h
  we now parse the system's SkuSiPolicy.p7b to do so. This has the drawback of not alerting
  users running Rufus on systems where SkuSiPolicy.p7b is not up to date, but I believe the
  trade-off is worth it.
* We now also copy the system's SkuSiPolicy.p7b to the created media when possible (for
  Windows 10 or later), so that Microsoft's WDAC UEFI revocations can apply during boot.
2023-06-18 19:07:45 +02:00
Pete Batard 43764268de
[uefi] add detection and warning for revoked bootloaders
* Considering that alerting users to potential security breaches that may be
  exploited by boot media should also be performed by application that create
  them, we add detection for all the currently known revoked UEFI bootloaders,
  be it the ones from the official UEFI DBX as well as the ones from Windows'
  SkuSiPolicy.p7b, and warn the user when one such bootloader is detected on
  their source media.
* Note that, to actually be revoked, the bootloaders flagged through SkuSiPolicy
  require the copying of the .p7b to the boot media, which we are currently
  not enacting but will perform in a subsequent commit.
* Also fix a Coverity warning in hash.c.
2023-06-16 20:36:50 +02:00
Pete Batard c4b1b23832
[hash] add PE256 hash functions
* Mostly copied from U-Boot's https://github.com/u-boot/u-boot/blob/master/lib/efi_loader/efi_image_loader.c
2023-06-13 17:57:34 +02:00
Pete Batard 090bfb9770
[misc] rename checksum.c to hash.c 2023-06-11 16:18:26 +01:00
Pete Batard 3e81b38c2d
[misc] try to support folks who use a symlink for their temp dir
* Microsoft's WIM mounting APIs can't use symlinked directories and
  some folks want to use a symlinked temp dir...
* Closes #2084
2023-06-05 14:08:25 +01:00
Pete Batard 71e99add76
[iso] increase ISO → ESP limit for Debian 12
* Debian 12 ARM64 netinst ISOs have doubled in size to be larger than 512 MB,
  so we need to increase MAX_ISO_TO_ESP_SIZE as a result.
* Also add extra NULL checks in process.c as some people seem to run into
  NULL deref issues.
* Also set version to rufus-next and update some URLs/text files.
2023-06-05 13:29:18 +01:00
Pete Batard beb847511b
Rufus 4.1 (Build 2045)
* Also revert GRUB 2 core.img to vanilla 2.06, with the hope that GRUB will
  *ACTUALLY* bother to release in 2023 and we will be able to update to
  GRUB 2.12 (or whatever non-sequential version they decide to go with) to
  say a most welcome goodbye to this whole 2.06 incompatibility crap!
2023-05-31 18:24:46 +01:00
Pete Batard 30ccf24ca4
[wue] add TCGSecurityActivationDisabled when BitLocker is disabled
* Closes #2253
2023-05-30 14:42:07 +01:00
Pete Batard 109df708b4
[misc] add an exception for 23A9:EF18 UFDs
* Closes #2247
2023-05-29 18:04:42 +01:00
Pete Batard 4d89e83b5d
[ui] change the log icon to something more explicit
* Hopefully a notepad/logbook icon will be more intuitive.
* Also tweak the new message for diskcopy.dll download and add French translation.
2023-05-27 16:18:22 +01:00
Pete Batard 600b8fc787
[efi] update UEFI:NTFS's NTFS drivers to latest
* Plus small updates to .gitignore and README and update rufus-next to 4.1.
2023-05-26 12:17:52 +01:00
Pete Batard 3afa139d7a
[dos] reinstate MS-DOS boot disk creation for Windows 10 and later platforms
* The BlackLotus malware shows that it is possible to download individual
  executables and DLLs straight from Microsoft's symbol servers, so we use
  that capability to download the missing Windows 8.1 'diskcopy.dll', that
  contains the flat floppy disk image with MS-DOS files we need. See:
  https://randomascii.wordpress.com/2013/03/09/symbols-the-microsoft-way/
* Also reorder entries in the "Boot selection" dropdown.
* Also use CreateFileWithTimeout() in GetLogicalName().
2023-05-24 17:55:25 +01:00
Pete Batard 3a0f7d3813
[iso] attempt to fix the clusterfuck of GRUB 2.06 incompatible versions
* As was *ENTIRELY PREDICTIBLE*, the lack of timely releases from the GRUB
  project has resulted in distro maintainers (Ubuntu, Fedora, etc.) taking
  matters in their own hand and applying patches on top of their 2.06 version.
  However, these patches result in 2.06 bootloaders that are incompatible
  with 2.06 modules that don't have the same patches applied. Especially this
  now results in the infamous "452: out of range pointer" error message when
  using patched modules with unpatched bootloader or unpatched modules with
  patched bootloaders.
* Making this issue worse, we also have distro maintainers who won't add a
  suffix to their GRUB version, AS ONE SHOULD DO WHEN ONE APPLIES TONS OF
  PATCHES ON TOP OF A PROJECT'S SOURCE, and MISreport their non 2.06 GRUB as
  "2.06", and, because we can't detect what patches are needed from modules
  themselves (unlike what is the case for grub_debug_is_enabled), we have no
  way of telling incompatible GRUB 2.06 binaries from one another.
* As a result, we have no choice but to append a sanitized version of the ISO
  label to the GRUB version, as a means to differentiate between incompatible
  versions, and tweak our existing bootloader download mechanism to *ATTEMPT*
  to download a compatible 'core.img' from our server... where we will have
  to waste a lot of time adding new binaries and symlinks to try to make all
  these GRUB "2.06" based images work, and will probably miss quite few with
  the end results that users who are just trying to install Linux will be left
  stranded.
* Again, I have to point out how the end result of regular users wanting to
  try Linux and being unable to do so is the *DIRECT* result of the GRUB project
  maintainers having sat on a 2-year influx of CONTINUOUS patches, and thinking
  that "Release Early, Release Often" is only a gimmick, and not something that
  should apply to their project, even as they have been warned before, by yours
  truly, that *NOT* releasing on a timely basis is causing actual grievances...
  That's because, had the GRUB maintainers released on a timely basis (at least
  once a year) Fedora and Ubuntu would be using vanilla GRUB 2.07 with the memory
  patches, and we wouldn't be trying to mix that with old GRUB 2.06 binaries.
* For more on this, see #2233, noting that we will need to apply a compatibility
  breaking change during the 4.1 release, to revert the patches we applied to
  the default 2.06 'core.img' in pbatard/rufus-web@320b800592.
2023-05-16 14:05:28 +01:00
Pete Batard 23d89d9764
[misc] apply a timeout when querying drives for letters/type
* Some Windows Store reports suggest that the existing call might freeze
  on CreateFile() leading some users to kill the app. So switch to using
  a CreateFile() call that times out instead of waiting forever...
2023-05-03 16:26:54 +01:00
Pete Batard 0df68b6af9
[misc] further Windows 7 specifics removals
* Also remove some unused code in stdlg.c
* Note that virtdisk appears to be a vulnerable library, so we go
  through delay loading yet again...
2023-04-28 17:46:05 +01:00
Pete Batard 0bda98f0ed
[misc] update DB for newer GRUB core.img's
* See pbatard/rufus-web@320b800592
* Also fix © sign not displaying properly in executable details page
2023-04-28 17:34:06 +01:00
Pete Batard 0e14725de8
Rufus 4.0 (Build 2035)
* Also make sure we only upload the x86_64 MinGW binary to VirusTotal
  since the x86_32 will conflict with the MSVC one.
2023-04-26 00:00:03 +01:00
Pete Batard 18645c9e70
update internal GRUB2 bootloader for Ubuntu 23.04
* Yet another example in the long list of how not releasing your project IN A
  TIMELY MANNER is creating HUGE PROBLEMS downstream... Looking at you GRUB!!!
* Closes #2233
2023-04-25 18:18:26 +01:00
Pete Batard e44cd90639
[loc] bring all remaining translations to latest
* Poedit Pro was used to machine-translate, and thus I make no guarantee
  of translation accuracy.
2023-04-25 13:51:49 +01:00
Abdulmajeed Almarzoqi 08ba77b0ea
[loc] update Arabic translation 2023-04-25 13:10:49 +01:00
Pete Batard 1e51385bed
[misc] revert to using the OS arch rather than app arch for the update download
* This means that someone running Rufus x64 or ARM64 should be
  proposed Rufus ARM64 rather than Rufus x64 as an upgrade.
* Also switch the BETA channel from x86 to x64.
* Also remove the _chdirU(app_dir) when using -i in commandline.
2023-04-24 20:50:53 +01:00
Pete Batard a354178239
[cmd] fix the use of relative paths with option -i
* Closes #2232
2023-04-23 13:06:32 +01:00
Pete Batard 3177e70e25
[misc] fix CodeQL warnings 2023-04-22 16:36:27 +01:00
Pete Batard d18260bec3
[misc] update version to 4.0
* With the removal of Windows 7 support, wrong platform archs in the check for updates
  (that has now been fixed) and switch to an x86_64 default MinGW binary, we have enough
  breaking changes to warrant a version bump for the major. So just do that.
* Also fix a couple Coverity warnings and update a URL.
2023-04-22 15:46:03 +01:00
Pete Batard 41ebb9d9ca
[iso] fix persistence support for Ubuntu 23.04
* Closes #2231
2023-04-22 12:46:45 +01:00
Pete Batard fffd4d1160
[misc] harden usage of uprintf()
* Passing a non-formatting buffer as first parameter of uprintf() can lead
  to an exception if this buffer happens to contain a '%' character, so
  usage of uprintf() with string buffers that may contain '%' should be
  sanitized.
* Also drop the _uprintf/_uprintfs aliases as they are no longer required.
2023-04-20 17:43:24 +01:00
Pete Batard 1a3a155e8c
[dev] fix description of UAS devices
* Having Windows append "SCSI Disk Device" screws up the scoring regarding
  disks that are actually describing themselves as SCSI, so replace that
  with "UAS Device", as it should be.
* Closes #2221.
* Also fix a MinGW warning.
2023-04-19 13:38:19 +01:00
Pete Batard a6451c6fc7
[misc] further Windows version and arch detection improvements
* Now also populate the underlying Windows arch in the version struct
* Also fix MinGW warnings
2023-04-18 17:32:47 +01:00
Sivert Løkkesveen 4dd40bba2f
[loc] update Norwegian translation to latest 2023-04-17 13:47:57 +01:00
Minh Nguyễn Quang 41e0ed8933
[loc] update Vietnamese translation to latest 2023-04-17 13:41:23 +01:00
Pete Batard e5f90282ed
[misc] improve Windows version detection
* Also use actual Windows major.minor when checking for updates
2023-04-17 13:33:05 +01:00
Pete Batard 6280e8020a
[net] fix incorrect architectures when querying for updates 2023-04-16 19:47:54 +01:00
Pete Batard f27dda1164
[efi] update UEFI:NTFS's NTFS drivers to latest
* Closes #2210
2023-04-15 15:57:21 +01:00
五月雨 e3e02f3a3c
[loc] update Japanese translation to latest 2023-04-06 18:41:13 +02:00
Mike Handberg Hovedskov cb6455fd42
[loc] update Danish translation to latest 2023-04-05 14:08:18 +02:00
Pete Batard ad809e866c
[loc] fix formatting typos from various languages
* Also update a comment URL in format.c
2023-04-05 14:00:09 +02:00
Pete Batard e86523e024
[enum] minor improvements to drive size handling
* Also fix a typo when trying to detect x86 running on ARM
2023-04-04 10:28:01 +02:00
Pete Batard af8f68c305
[msvc] enable Structured Exception Handling (SEH) in process.c
* We are seeing reports of access violation exceptions being generated
  when looking for processes, with the App Store version.
* Since this is not critical code, add an SEH handler to ignore those.
2023-04-01 15:50:59 +02:00
Mattayawerakiat Suttirak 59efc53da7
[loc] update Thai translation to latest 2023-04-01 15:44:25 +02:00
Pete Batard 9285313f28
[iso] fix a possible buffer overflow in GetGrubVersion()
* Also increase the size for "probably a flash drive if under" from 32 GB to 128 GB.
2023-04-01 14:39:25 +02:00
Ahmed Rasnaama ee6c907415
[loc] update Arabic translation to latest 2023-03-28 17:37:14 +02:00
Pete Batard 018718b2c8
[misc] disable Windows 7 support
* Also set rufus-next to 3.23 and fix a date typo in ChangeLog.txt
2023-03-27 21:45:55 +02:00
Pete Batard d478e3179b
Rufus 3.22 (Build 2009) 2023-03-25 13:44:19 +00:00
Pete Batard 76ec89032c
[loc] update MSG_199 and MSG_294 for remaining languages
* Also fix double space typos.
2023-03-24 17:16:44 +00:00
Kaloyan Nikolov 426ceed4e1
[loc] update Bulgarian translation to latest 2023-03-23 15:54:10 +00:00
Pete Batard e524e81e99
[iso] improve Rock Ridge CE handling 2023-03-23 14:47:53 +00:00
Pete Batard 365449fcce
[iso] revert processing of menu.lst
* Usage scenario is too limited and the cost of doing so is simply too high.
* This reverts the relevant changes from 737db33f9c.
2023-03-22 16:52:39 +00:00
Fedorovici Constantin-Robert c697604f16
[loc] update Romanian translation to latest 2023-03-20 12:59:44 +00:00
Pete Batard 737db33f9c
[iso] enable menu.lst patching
* Closes #2183
* Also improve safe_strdup() and "update" Grub4DOS to latest
  (NB: grldr.mbr has not changed in the last few years)
2023-03-18 14:20:39 +00:00
Marcos Mello 4a0940ad23
[loc] update Brazilian Portuguese translation to latest
* Closes #2202
* Closes #2116
2023-03-17 14:33:02 +00:00
Yanottama Oktabrian e14fcd8649
[loc] update Indonesian translation to latest 2023-03-17 14:16:19 +00:00
Jakub Mierzejewski 3c7434ee99
[loc] update Polish translation to latest 2023-03-16 00:46:27 +00:00
Marco A. Ramirez Madrid ff4923112e
[loc] update Spanish translation to latest 2023-03-15 23:16:49 +00:00
Pete Batard 247dbe2f7b
[ui] preserve user-specified label on error/cancel or drive insertion
* Also produce warnings in the log if we detect Windows write-protection policies.
2023-03-14 20:31:51 +00:00
Erfan Al 892996aafd
[loc] update Persian translation to latest 2023-03-13 17:31:02 +00:00
Костянтин Сергійович ca84a4f6c5
[loc] update Ukrainian translation to latest 2023-03-12 14:11:22 +00:00
Csizmadia Gábor f9168e8bbb
[loc] update Hungarian translation to latest 2023-03-12 13:57:10 +00:00
Дмитрий Ерохин 50b3d0b634
[loc] update Russian translation to latest 2023-03-10 17:25:22 +00:00
VenusGirl de29bc5129
[loc] update Korean translation to latest
* Closes #2186
2023-03-10 13:50:44 +00:00
cupofocha d989a7d148
[loc] update Traditional Chinese translation to latest 2023-03-09 10:06:12 +00:00
Pete Batard 65542b9179
[misc] fix 2 Coverity warnings
* Yay, for once Coverity actually found an actual issue!
2023-03-09 09:55:17 +00:00
Pete Batard 21ac145a4b
[vhd] add force unmount of stale .wim images
* Required because some users appear to force kill Rufus while we're doing WUE patching of boot.wim,
  and Windows prevents a .wim with the same path and index from being mounted twice, even if the
  original .wim has become stale or deleted. Oh, and of course the WIM APIs don't have a force-mount
  flag that would take care of this whole situation.
* Basically, this forces us to parse HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WIMMount\Mounted Images
  and check each instance for a .wim/index match, so that we can access to the existing mount path
  so that we can actually unmout the image (because, in typical Microsoft fashion, WIMUnmountImage
  requires both the mount path and the source image to be provided).
* Closes #2199.
* Also improve the existing VHD code to use a struct where possible.
2023-03-08 20:00:37 +00:00
Pete Batard ed80d696f4
[core] minor drive.c improvements
* Double the timeout when searching for conflicting processes on error
  and improve the disk extent/drive number error messages.
2023-03-08 13:03:25 +00:00
Christos Alvanos 8449accb55
[loc] update Greek translation to latest 2023-03-04 18:32:14 +00:00
Riku Brander da746d83dd
[loc] update Finnish translation to latest 2023-03-04 18:18:12 +00:00
Pete Batard d78a556e4e
[loc] report if an external loc file is used, in the UI log
* Also avoid using LPTSTR in lieu of LPWSTR (even if they do resolve to the exact
  same thing) and force the use of app_dir when looking for a local .loc file.
* Closes #2193
2023-03-04 16:21:25 +00:00
Pete Batard cb561e7176
[iso] fix libcio processing of Rock Ridge CE fields
* Boy do you not want to use chars in struct iso_su_ce_s as
  from_733() will sign extend the bytes and you will end up
  with an offset like 0xffffffc4 instead of 0x000000c4...
* Addresses the leftover from 6c44dccc10.
* Also some headers clean up and pick up latest libcdio changes.
2023-02-28 18:27:21 +00:00
Pete Batard 6c44dccc10
[iso] duplicate Rock Ridge symbolic links for Debian non-free firmware ISOs
* Note that, because of an unrelated libcdio bug where it does not properly
  detect Rock Ridge symbolic links, some files may still not be instantiated.
* Also remove unneeded checks for ISO9660/UDF function cleanup and remove
  a workaround for an issue that has since been fixed in libcdio.
2023-02-27 17:43:39 +00:00
Martin Kubánik 218cf22fed
[loc] update Slovak translation to latest 2023-02-26 22:19:28 +00:00
Aldis Tutins 83b9de015e
[loc] update Latvian translation to latest 2023-02-26 22:15:07 +00:00
Pete Batard aed34ca635
[misc] report if running x86 emulation on ARM
* Also fix a static analysis warning.
2023-02-26 22:10:22 +00:00
Pete Batard 4e8375c73c
[loc] misc. small updates and corrections
* Closes #2184
2023-02-24 13:23:08 +00:00
Itiel 284528d79c
[loc] update Hebrew translation to latest 2023-02-24 13:16:32 +00:00
Mehmetali Kuran c9889ad502
[loc] update Turkish translation to latest 2023-02-23 13:36:37 +00:00
Dinis Medeiros 2e782bfa0b
[loc] update Portuguese Standard translation to latest 2023-02-23 13:23:30 +00:00
Pete Batard b969b7ec42
[iso] add yet another exception for Red Hat derivatives
* Fedora 37 netinst requires special handling and I don't have all day.
* Closes #2179.
* Also fix a small typo in Italian translations. Closes #2180.
2023-02-21 19:57:27 +00:00
Wang JiaWei 77b6c4d531
[loc] update Simplified Chinese translation to latest 2023-02-20 13:43:30 +00:00
Thilo Langbein 160ff5ebb0
[loc] update German translation to latest 2023-02-18 17:26:10 +00:00
Pete Batard 12bab09a9f
[wue] display user-selected WUE options in the log
* Also fix a Coverity warning
2023-02-17 22:42:45 +00:00
Marcello Gianola 506274687b
[loc] small additional update to the Italian translation 2023-02-17 17:35:24 +00:00
HRxiaohu d39f82a9e7
[loc] update Chinese (Simplified) translation
* Closes #2110
2023-02-17 17:30:46 +00:00
Miloš Ljubičić 61a2743fc5
[loc] update Serbian translation to latest 2023-02-17 17:23:02 +00:00
Marcello Gianola 65f0a6e266
[loc] update Italian translation to latest
* Closes #2091
2023-02-17 17:13:34 +00:00
Thomas De Rocker 5c75bda39e
[loc] update Dutch translation to latest 2023-02-17 17:05:08 +00:00
Pete Batard 18f1013259
[github] do not run CodeQL for non-code updates 2023-02-17 12:56:10 +00:00
Sopor Spr 5f5bfdf3bf
[loc] update Swedish translation to latest 2023-02-17 12:52:45 +00:00
Richard Kahl b7baacc3cd
[loc] update Czech translation to latest 2023-02-17 12:33:47 +00:00
Pete Batard 3df8651225
[appstore] update gen_listing.ps1 for relative paths
* https://learn.microsoft.com/en-us/windows/apps/publish/publish-your-app/import-and-export-store-listings?pivots=store-installer-msix#update-listing-info
  and Microsoft support indicate that you need to include the listing folder name and use slashes.
* Import folder still chokes on non en-us languages though :(
* Also fix a typo in the French translation.
2023-02-16 01:14:47 +00:00
Pete Batard b163b3dfe2
[core] fix default listing of large SanDisk SSD devices
* Closes #2164
* Also add breakdown of score computation when device enumeration debug is active
* Also fix a minor Code Analysis warning in msapi_utf8.h
2023-02-13 13:34:17 +00:00
Pete Batard 3281f6b97e
[loc] set up Windows Store listing translations (part 2)
* Add PowerShell script to generate listing.csv
* Also update relevant messages along with French translation
2023-02-08 17:11:51 +00:00
Pete Batard fac433a0fe
[loc] set up Windows Store listing translations (part 1)
* MSG_900+ will be used for Windows Store translation, so add them
  and makes sure these get filtered out from embedded.loc.
* Also make sure we don't get a "Translated by:" in the English version
  when compiled with VS2022.
* Also add Store screenshots and update listing.csv so that we can
  autogenerate and upload a complete translation update to the store.
2023-02-03 17:03:06 +00:00
Pete Batard 43c6290143
[misc] generate PDBs for Visual Studio builds
* Even if this makes the resulting executable slightly larger, this should help
  with troubleshooting, especially for the Windows Store releases.
* Also drop the "since 2019" from the Downloads badge, since once you reach 100M
  the start date for the counter becomes a bit meaningless...
2023-01-30 19:21:08 +00:00
Pete Batard 6ebe13eb31
[fido] deactivate Fido for Windows 7
* Also add an extra Fido translation string and improve/fix Fido testing.
* Also add an exception for HP iLO SD-CARD devices (Closes #2136).
2023-01-27 17:23:08 +00:00
Pete Batard 1dc9fab917
[misc] add a cheat mode to preserve the log between sessions
* This new cheatmode (<Ctrl>-<P>) is mostly designed to help with development.
2023-01-13 21:49:57 +00:00
Pete Batard 6eabcb4c9d
[internal] add pull_request_template.md and update issue_template.md
* Also remove .github/ directory from source archives.
2023-01-13 21:45:50 +00:00
Pete Batard 1ce1f47a8b
[wue] add option to Disable BitLocker automatic device encryption
* See https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-bitlocker#disable-bitlocker-automatic-device-encryption
* Closes #2121
2023-01-10 20:43:07 +00:00
Pete Batard 3fbc465d31
[core] fix Large FAT32 not being used in ISO → ESP mode
* Not using our own FAT32 formatting may result in access errors due to
  Microsoft's hare-brain handling of ESP access.
* Also update upcoming translations and copyright year.
2023-01-09 23:19:01 +00:00
Pete Batard ac7b171eca
[misc] fix badges
* See https://github.com/badges/shields/issues/8671
2022-12-16 00:39:10 +00:00
Pete Batard 8d04e5f1f4
[misc] update GitHub Actions scripts
* Closes #2113
* Also fix a broken URL
* PS: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
  is *WOEFULLY* incomplete, in that it doesn't tell you that:
  1. The new method of setting output is *NO LONGER* shell agnostic (i.e *REGRESSION*)
  2. You need to use bash for the new $GITHUB_OUTPUT to work
2022-12-15 19:53:56 +00:00
Rose fab095c043
[misc] prefer strtol/strtoull over atol/atoll
* This means we don't need to worry about conversion issues regarding signedess. In addition,
  the behavior will no longer be undefined if for some reason the conversion cannot happen.
* Closes #2104.
2022-12-08 11:21:39 +00:00
dependabot[bot] 2bc1428975
[misc] bump dessant/lock-threads from 3 to 4
* Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 3 to 4.
  - [Release notes](https://github.com/dessant/lock-threads/releases)
  - [Changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md)
  - [Commits](https://github.com/dessant/lock-threads/compare/v3...v4)
* Closes #2102
* Also bump Rufus version to Rufus next
2022-12-08 11:18:47 +00:00
Jeffrey Walton 36f4716afd
[checksum] enable x86 acceleration if the CPU supports it
* Newer Intel and AMD CPUs have SSE extensions for SHA-1 and SHA-256 acceleration.
* Add new cpu.c/cpu.h sources to detect the extensions, and use them in checksum.c
  if available.
* Acceleration code is taken from https://github.com/noloader/SHA-Intrinsics.
2022-12-08 11:15:48 +00:00
Pete Batard ddcbe8ed81
v3.21 (Build 1949) 2022-11-28 16:41:27 +00:00
Pete Batard c2fe08080a
[core] add provision for Windows 7 sunsetting
* Update the relevant loc messages.
* Also add a -z commandline option to force the Windows version (but without letting
  this option work as an override, if running on an unsupported platform).
* Also fix typos and broken URLs.
2022-11-22 13:35:50 +00:00
Pete Batard 419522c803
[efi] update UEFI:NTFS's NTFS and exFAT drivers to latest
* Now uses read-only NTFS drivers v1.4 from https://github.com/pbatard/ntfs-3g.
* Like previous ones, aa64, ia32 and x64 versions are Secure Boot signed (but not arm).
* Fixes the recent potential vulnerabilities found in https://github.com/tuxera/ntfs-3g.
* Also update exFAT drivers to v1.9 from https://github.com/pbatard/efifs.
2022-11-17 10:42:56 +00:00
Pete Batard 9727fd4342
[core] improve/fix file system selection according to current ISO
* Closes #2074.
* Also harmonize whitespaces.
2022-11-16 16:55:41 +00:00
Pete Batard a6769e4fb2
[core] don't process DBT_DEVNODES_CHANGED when scanning an image
* Since 8814944c35 we may mount an ISO for the lookup of the Windows version,
  which produces DBT_DEVNODES_CHANGED messages being issued when the virtual DVD is being created or removed
* This in turn leads to unwanted device refreshes.
* This patch makes sure we ignore DBT_DEVNODES_CHANGED while scanning.
* Also improve comments in iso.c.
2022-11-16 16:50:53 +00:00
Pete Batard 165127d221
[iso] fix GRUB boot for newer Arch and derivatives
* Arch recently added a "search --no-floppy --set=root --label <LABEL>" into their
  grub.cfg, which we didn't have provision for patching, which means that, as soon
  as the user changed the label or used an Arch derivative with a label that isn't
  compliant with FAT (e.g. Athena Linux), search, and therefore boot would fail.
* Also alter the code so that we modify for more than one token if needed.
* Closes #2086
2022-11-13 20:57:26 +00:00
Pete Batard 4cfe1c9947
[iso] fix UEFI:NTFS not being installed for ISOs that have a >4GB file, when MBR is selected
* GPT was fine but MBR led to the creation of EFI bootable images using NTFS as the file
  system, but without the UEFI:NTFS partition (e.g. UwUntu-22.10-desktop-amd64.iso).
2022-11-07 17:45:42 +00:00
Pete Batard 3cd6d18ef8
[ui] fix 'Image option'/'Persistent partition size' title not toggling when switching ISOs 2022-11-07 17:42:54 +00:00
Pete Batard c19ef1125d
[wue] allow the provision of an arbitrary local account username
* This is required because, even though it's easy to change a local account name
  post install, doing so does not change the directory name in C:\Users\
2022-10-18 13:58:38 +01:00
Pete Batard cee21b1981
[wue] prevent 'Administrator' and 'Guest' from being set as username
* These are reserved usernames that are created by default, so we should not use them.
* Also fix missing format specifier in ApplyWindowsCustomization() and make sure we
  print wim_index for both mount and unmount.
* Closes #2067 (with thanks to marcosfrm)
2022-10-15 12:24:43 +01:00
Pete Batard 76ff620714
[ui] fix tab order not working on WUE dialog
* Also add minor improvements and update Bled to latest
2022-10-07 17:43:46 +01:00
Pete Batard fcae51a446
[grub] force server download for nonstandard GRUB (Fedora 37, openSUSE Live, GeckoLinux)
* This reverts most of 3528ca773d in order to download 'core.img' from our server instead of patching it.
* Also solve the issue of downloading a custom 'core.img' for Fedora 37, that introduced
  a new 'grub_debug_is_enabled' symbol without altering their GRUB version string.
* This is accomplished by doing what the distro maintainers should have done on their
  own, by appending a custom suffix to the GRUB version string.
2022-10-06 23:39:32 +01:00
Pete Batard 8814944c35
[wue] improve Windows version reporting from ISO/.wim
* Pick the version and build number directly from the install[.wim|.esd] XML index.
  This forces us to mount the ISO during scan, but it's the only way to get an accurate Build number...
* Also drop linking to version.dll (along with the whole version.dll delay-loading shenanigans).
2022-10-04 11:58:30 +01:00
Pete Batard 4d6c8b72d8
[loc] improve fatal error handling on application launch
* Remove last ditch effort on systems that are clearly broken for localization
  and always report an explicit error to the user.
* Also update GitHub Actions actions/checkout (Closes #2036).
2022-09-19 10:37:23 +02:00
Pete Batard 07d1fdcc2f
[cmp] update Bled to latest
* Also try to fix the fallthrough Coverity warning in format_ext.c
2022-09-14 23:37:46 +02:00
Pete Batard 2cf183e9f1
[misc] fix Y2K38 related Coverity warnings 2022-09-14 10:58:18 +02:00
Pete Batard d9e8b8caeb
[iso] fix incorrect detection of GRUB with nonstandard prefixes
* Existing code was trying to detect if GRUB patching was needed for GRUB bootloaders
  even if they were using standard prefixes, and as a result dropped GRUB support for
  any versions that wasn't 2.04 or 2.06, since we don't have a patch for those.
* This patch restores the expected behaviour to ensure that we don't disable GRUB if
  a standard prefix is being used, regardless of the version being reported.
* Note that this issue only affected BIOS GRUB boot. UEFI GRUB boot was unaffected.
* Also set rufus-next to 3.21.
2022-09-07 18:10:30 +01:00
Pete Batard 861d1473ac
[misc] add a notice about hidden VHDs limiting the drives Rufus can list
* See #2029
2022-08-28 15:24:57 +01:00