1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[misc] update ChangeLog for 4.3 BETA

* Also minor code cleanups and improvements.
This commit is contained in:
Pete Batard 2023-10-12 19:46:10 +01:00
parent 1630e912d4
commit 8edb487ac9
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 38 additions and 25 deletions

View file

@ -1,3 +1,13 @@
o Version 4.3 (2023.10.??)
Add support for Rock Ridge symlink preservation when NTFS is used
Add an exception to enforce NTFS for Linux Mint's LMDE
Add an expert feature to restrict a Windows installation to S Mode
Fix persistence support for Debian 12 when booted in BIOS mode
Fix a regression that prevented the opening of .vhd images
Update UEFI:NTFS to report a more explicit error on bootmgr security issues
Improve the search for conflicting processes by running it in a background thread
Improve support for Slax Linux
o Version 4.2 (2023.07.26)
Add detection and warning for UEFI revoked bootloaders (including ones revoked through SkuSiPolicy.p7b)
Add ZIP64 support, to extract .zip images that are larger than 4 GB

View file

@ -975,6 +975,10 @@ retry:
* be convenient for our usage (since we might be looking for processes preventing
* us to open said target in exclusive mode).
*
* At least on Windows 11, this no longer seems to work as querying a logical or
* physical volume seems to return almost ALL the processes that are running,
* including the ones that are not actually accessing the handle.
*
* \param HandleName The name of the handle to look for.
*
* \return TRUE if processes were found, FALSE otherwise.
@ -992,7 +996,7 @@ BOOL SearchProcessAlt(char* HandleName)
goto out;
// Note that the access rights being used with CreateFile() might matter...
searchHandle = CreateFileA(HandleName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
searchHandle = CreateFileA(HandleName, FILE_READ_ATTRIBUTES | SYNCHRONIZE, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
status = PhQueryProcessesUsingVolumeOrFile(searchHandle, &info);

View file

@ -45,6 +45,7 @@
#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)
#define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xC0000039L)
#define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L)
#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL)
#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009AL)
#define STATUS_NOT_SUPPORTED ((NTSTATUS)0xC00000BBL)

View file

@ -827,7 +827,7 @@ out:
if (pf##proc == NULL) {uprintf("Unable to locate %s() in '%s.dll': %s", \
#proc, #name, WindowsErrorString()); goto out;} } while(0)
#define PF_INIT_OR_SET_STATUS(proc, name) do {PF_INIT(proc, name); \
if ((pf##proc == NULL) && (NT_SUCCESS(status))) status = STATUS_NOT_IMPLEMENTED; } while(0)
if ((pf##proc == NULL) && (NT_SUCCESS(status))) status = STATUS_PROCEDURE_NOT_FOUND; } while(0)
#if defined(_MSC_VER)
#define TRY_AND_HANDLE(exception, TRY_CODE, EXCEPTION_CODE) __try TRY_CODE \
__except (GetExceptionCode() == exception ? EXCEPTION_EXECUTE_HANDLER : \

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 4.3.2088"
CAPTION "Rufus 4.3.2089"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,3,2088,0
PRODUCTVERSION 4,3,2088,0
FILEVERSION 4,3,2089,0
PRODUCTVERSION 4,3,2089,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.3.2088"
VALUE "FileVersion", "4.3.2089"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.3.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.3.2088"
VALUE "ProductVersion", "4.3.2089"
END
END
BLOCK "VarFileInfo"

View file

@ -534,7 +534,7 @@ void StrArrayCreate(StrArray* arr, uint32_t initial_size)
arr->Max = initial_size; arr->Index = 0;
arr->String = (char**)calloc(arr->Max, sizeof(char*));
if (arr->String == NULL)
uprintf("Could not allocate string array\n");
uprintf("Could not allocate string array");
}
int32_t StrArrayAdd(StrArray* arr, const char* str, BOOL duplicate)
@ -548,13 +548,13 @@ int32_t StrArrayAdd(StrArray* arr, const char* str, BOOL duplicate)
arr->String = (char**)realloc(arr->String, arr->Max*sizeof(char*));
if (arr->String == NULL) {
free(old_table);
uprintf("Could not reallocate string array\n");
uprintf("Could not reallocate string array");
return -1;
}
}
arr->String[arr->Index] = (duplicate)?safe_strdup(str):(char*)str;
if (arr->String[arr->Index] == NULL) {
uprintf("Could not store string in array\n");
uprintf("Could not store string in array");
return -1;
}
return arr->Index++;
@ -577,7 +577,7 @@ void StrArrayClear(StrArray* arr)
uint32_t i;
if ((arr == NULL) || (arr->String == NULL))
return;
for (i=0; i<arr->Index; i++) {
for (i = 0; i < arr->Index; i++) {
safe_free(arr->String[i]);
}
arr->Index = 0;
@ -601,13 +601,13 @@ static PSID GetSID(void) {
char* psid_string = NULL;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) {
uprintf("OpenProcessToken failed: %s\n", WindowsErrorString());
uprintf("OpenProcessToken failed: %s", WindowsErrorString());
return NULL;
}
if (!GetTokenInformation(token, TokenUser, tu, 0, &len)) {
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
uprintf("GetTokenInformation (pre) failed: %s\n", WindowsErrorString());
uprintf("GetTokenInformation (pre) failed: %s", WindowsErrorString());
return NULL;
}
tu = (TOKEN_USER*)calloc(1, len);
@ -623,11 +623,11 @@ static PSID GetSID(void) {
* The workaround? Convert to string then back to PSID
*/
if (!ConvertSidToStringSidA(tu->User.Sid, &psid_string)) {
uprintf("Unable to convert SID to string: %s\n", WindowsErrorString());
uprintf("Unable to convert SID to string: %s", WindowsErrorString());
ret = NULL;
} else {
if (!ConvertStringSidToSidA(psid_string, &ret)) {
uprintf("Unable to convert string back to SID: %s\n", WindowsErrorString());
uprintf("Unable to convert string back to SID: %s", WindowsErrorString());
ret = NULL;
}
// MUST use LocalFree()
@ -635,7 +635,7 @@ static PSID GetSID(void) {
}
} else {
ret = NULL;
uprintf("GetTokenInformation (real) failed: %s\n", WindowsErrorString());
uprintf("GetTokenInformation (real) failed: %s", WindowsErrorString());
}
free(tu);
return ret;
@ -662,7 +662,7 @@ BOOL FileIO(enum file_io_type io_type, char* path, char** buffer, DWORD* size)
s_attr.lpSecurityDescriptor = &s_desc;
sa = &s_attr;
} else {
uprintf("Could not set security descriptor: %s\n", WindowsErrorString());
uprintf("Could not set security descriptor: %s", WindowsErrorString());
}
switch (io_type) {
@ -696,7 +696,7 @@ BOOL FileIO(enum file_io_type io_type, char* path, char** buffer, DWORD* size)
*size = GetFileSize(handle, NULL);
*buffer = (char*)malloc(*size);
if (*buffer == NULL) {
uprintf("Could not allocate buffer for reading file\n");
uprintf("Could not allocate buffer for reading file");
goto out;
}
r = ReadFile(handle, *buffer, *size, size, NULL);
@ -742,12 +742,12 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
res = FindResourceA(module, name, type);
if (res == NULL) {
uprintf("Could not locate resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not locate resource '%s': %s", desc, WindowsErrorString());
goto out;
}
res_handle = LoadResource(module, res);
if (res_handle == NULL) {
uprintf("Could not load resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not load resource '%s': %s", desc, WindowsErrorString());
goto out;
}
res_len = SizeofResource(module, res);
@ -757,12 +757,12 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
*len = res_len;
p = (unsigned char*)calloc(*len, 1);
if (p == NULL) {
uprintf("Could not allocate resource '%s'\n", desc);
uprintf("Could not allocate resource '%s'", desc);
goto out;
}
memcpy(p, LockResource(res_handle), min(res_len, *len));
if (res_len > *len)
uprintf("WARNING: Resource '%s' was truncated by %d bytes!\n", desc, res_len - *len);
uprintf("WARNING: Resource '%s' was truncated by %d bytes!", desc, res_len - *len);
} else {
p = (unsigned char*)LockResource(res_handle);
}

View file

@ -83,7 +83,6 @@ void uprintf(const char *format, ...)
*p++ = '\n';
*p = '\0';
// Yay, Windows 10 *FINALLY* added actual Unicode support for OutputDebugStringW()!
wbuf = utf8_to_wchar(buf);
// Send output to Windows debug facility
OutputDebugStringW(wbuf);
@ -92,7 +91,6 @@ void uprintf(const char *format, ...)
Edit_SetSel(hLog, MAX_LOG_SIZE, MAX_LOG_SIZE);
Edit_ReplaceSel(hLog, wbuf);
// Make sure the message scrolls into view
// (Or see code commented in LogProc:WM_SHOWWINDOW for a less forceful scroll)
Edit_Scroll(hLog, Edit_GetLineCount(hLog), 0);
}
free(wbuf);
@ -608,7 +606,7 @@ DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds)
}
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL)
#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007FB7
#define NtCurrentPeb() (NtCurrentTeb()->ProcessEnvironmentBlock)
#define RtlGetProcessHeap() (NtCurrentPeb()->Reserved4[1]) // NtCurrentPeb()->ProcessHeap, mangled due to deficiencies in winternl.h