spell fix

This commit is contained in:
DavidXanatos 2022-12-07 17:32:40 +01:00
parent ea6b1ac2d7
commit e9867019a5
105 changed files with 272 additions and 312 deletions

View File

@ -15,7 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added ### Added
- added run boxed command to the sandbox menu - added run boxed command to the sandbox menu
- DefaultBox can now be replaced with an otehr sandbox [#2445](https://github.com/sandboxie-plus/Sandboxie/issues/2445) - DefaultBox can now be replaced with an other sandbox [#2445](https://github.com/sandboxie-plus/Sandboxie/issues/2445)
### Fixed ### Fixed
- improved fix for [#2495](https://github.com/sandboxie-plus/Sandboxie/issues/2495) - improved fix for [#2495](https://github.com/sandboxie-plus/Sandboxie/issues/2495)

View File

@ -108,7 +108,7 @@ ALIGNED BOOL my_DuplicateHandle(
if ((! ok) && GetLastError() == ERROR_ACCESS_DENIED) { if ((! ok) && GetLastError() == ERROR_ACCESS_DENIED) {
// //
// the client process for the CryptSvc service is ocassionally // the client process for the CryptSvc service is occasionally
// running under LocalSystem (typically during MSI installations). // running under LocalSystem (typically during MSI installations).
// CryptSvc tries to duplicate an event handle and fails so // CryptSvc tries to duplicate an event handle and fails so
// we fake successful operation. // we fake successful operation.

View File

@ -400,7 +400,7 @@ int DoLingerLeader(void)
process_count += 128; process_count += 128;
ULONG* pids = HeapAlloc( ULONG* pids = HeapAlloc(
GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, sizeof(ULONG) * (process_count + 1)); // allocate oen more for the -1 marker GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, sizeof(ULONG) * (process_count + 1)); // allocate one more for the -1 marker
SbieApi_EnumProcessEx(NULL, FALSE, -1, pids, &process_count); // query pids SbieApi_EnumProcessEx(NULL, FALSE, -1, pids, &process_count); // query pids
pids[process_count] = -1; // set the end marker pids[process_count] = -1; // set the end marker
@ -451,7 +451,7 @@ int DoLingerLeader(void)
// (via forced mechanism or as a child of start.exe) // (via forced mechanism or as a child of start.exe)
// and then don't terminate it as a linger // and then don't terminate it as a linger
// //
// (note that sevice processes running as local system // (note that service processes running as local system
// are also children of start.exe, but in that case, // are also children of start.exe, but in that case,
// is_local_system_sid would be TRUE and we would not // is_local_system_sid would be TRUE and we would not
// reach this point.) // reach this point.)

View File

@ -246,7 +246,7 @@ void CBorderGuard::Refresh()
// //
// window rect is same as last recorded window rect // window rect is same as last recorded window rect
// but if we track title area for border then also // but if we track title area for border then also
// check the cursor is stil in the title area // check the cursor is still in the title area
// //
refresh = FALSE; refresh = FALSE;

View File

@ -233,7 +233,7 @@ BOOL CDeleteDialog::OnInitDialog()
pButton->ShowWindow(SW_HIDE); pButton->ShowWindow(SW_HIDE);
// //
// hide buttons accoording to dialog mode // hide buttons according to dialog mode
// //
pCtl = GetDlgItem(IDCLOSE); pCtl = GetDlgItem(IDCLOSE);

View File

@ -1248,7 +1248,7 @@ void CFileListCtrl::OnContextMenu(CWnd *pWnd, CPoint pt)
MyEnsureVisible(index); MyEnsureVisible(index);
// //
// proces selection and display context menu // process selection and display context menu
// //
CMenu *pMenu = m_pContextMenu->GetSubMenu(0); CMenu *pMenu = m_pContextMenu->GetSubMenu(0);

View File

@ -502,8 +502,8 @@ static BOOL CALLBACK FindBestChildProc(HWND hwnd, LPARAM lParam)
// ourselves, and find the one that best fits under the mouse - // ourselves, and find the one that best fits under the mouse -
// the smallest window that fits, in fact. // the smallest window that fits, in fact.
// //
// I've tested this on alot of different apps, and it seems // I've tested this on a lot of different apps, and it seems
// to work flawlessly - in fact, I havn't found a situation yet // to work flawlessly - in fact, I haven't found a situation yet
// that this method doesn't work on.....we'll see! // that this method doesn't work on.....we'll see!
// //
// Inputs: // Inputs:

View File

@ -24,7 +24,7 @@
#pragma once #pragma once
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Usefull macros // Useful macros
// //
#define KEYDOWN(Key) ((GetKeyState(Key)&0x8000)!=0) #define KEYDOWN(Key) ((GetKeyState(Key)&0x8000)!=0)
#define ON_WM_MOUSEOUT() \ #define ON_WM_MOUSEOUT() \

View File

@ -250,7 +250,7 @@ BOOL CMyApp::InitInstance()
CBoxes::GetInstance().RefreshProcesses(); CBoxes::GetInstance().RefreshProcesses();
// //
// setup autoplay cancelation // setup autoplay cancellation
// //
CAutoPlay::Install(); CAutoPlay::Install();

View File

@ -56,7 +56,7 @@ GetWnd() method, which
returns a pointer to the CWnd-obect of the window, that has been returns a pointer to the CWnd-obect of the window, that has been
created by the call to the Create() method. An implementation can created by the call to the Create() method. An implementation can
provide the CWnd-object by using it as a property or by deriving provide the CWnd-object by using it as a property or by deriving
from CWnd or a more specialiced class. This way has been choosen from CWnd or a more specialised class. This way has been chosen
instead of deriving CPropPageFrame from CWnd, to allow derived class instead of deriving CPropPageFrame from CWnd, to allow derived class
to derive from more specialized classes than CWnd to derive from more specialized classes than CWnd
(i.e. CStatic, etc.). From the WM_PAINT-handler of your derived class (i.e. CStatic, etc.). From the WM_PAINT-handler of your derived class
@ -211,7 +211,7 @@ protected:
passed to DrawMsg(). passed to DrawMsg().
This default implementation calls the CalcCaptionArea() method, This default implementation calls the CalcCaptionArea() method,
substracts the returned rectangle from the client area and returns subtracts the returned rectangle from the client area and returns
the result. the result.
*/ */
virtual CRect CalcMsgArea(); virtual CRect CalcMsgArea();
@ -275,7 +275,7 @@ protected:
// Implementation helpers // Implementation helpers
protected: protected:
/** /**
If the m_hWnd property of the CWnd-object returend by GetWnd() If the m_hWnd property of the CWnd-object returned by GetWnd()
specifies a valid window, this method will invalidate the specified specifies a valid window, this method will invalidate the specified
rectangle, to schedule it for repaint, otherwise the method will rectangle, to schedule it for repaint, otherwise the method will
return without doing anything. return without doing anything.

View File

@ -530,7 +530,7 @@ CString CTreePropSheet::SplitPageTreePath(CString &strRest)
else if (nSeperatorPos>0) else if (nSeperatorPos>0)
{ {
// if there is an odd number of backslashes infront of the // if there is an odd number of backslashes infront of the
// seperator, than do not interpret it as separator // separator, than do not interpret it as separator
int nBackslashCount = 0; int nBackslashCount = 0;
for (int nPos = nSeperatorPos-1; nPos >= 0 && strRest[nPos]==_T('\\'); --nPos, ++nBackslashCount); for (int nPos = nSeperatorPos-1; nPos >= 0 && strRest[nPos]==_T('\\'); --nPos, ++nBackslashCount);
if (nBackslashCount%2 == 0) if (nBackslashCount%2 == 0)
@ -933,7 +933,7 @@ BOOL CTreePropSheet::OnInitDialog()
width_for_checkbox_text = AlignButtonsToRight(); width_for_checkbox_text = AlignButtonsToRight();
} }
// finally create tht tree control // finally create the tree control
DWORD dwTreeStyle = WS_TABSTOP|WS_CHILD|WS_VISIBLE DWORD dwTreeStyle = WS_TABSTOP|WS_CHILD|WS_VISIBLE
| TVS_SHOWSELALWAYS|TVS_TRACKSELECT|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SINGLEEXPAND; | TVS_SHOWSELALWAYS|TVS_TRACKSELECT|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SINGLEEXPAND;
ULONG dwTreeExStyle = WS_EX_CLIENTEDGE|WS_EX_NOPARENTNOTIFY; ULONG dwTreeExStyle = WS_EX_CLIENTEDGE|WS_EX_NOPARENTNOTIFY;

View File

@ -74,7 +74,7 @@ Appearance
Directories Directories
\endverbatim \endverbatim
If you would like to use a double colon, which should not be If you would like to use a double colon, which should not be
interpreted as a path seperator, prefix it with a backslash ("\\::"). interpreted as a path separator, prefix it with a backslash ("\\::").
To disable tree view mode and use the standard tabbed mode, call To disable tree view mode and use the standard tabbed mode, call
the SetTreeViewMode() method. This also allows you, to enable page the SetTreeViewMode() method. This also allows you, to enable page
@ -169,7 +169,7 @@ public:
The default value is: The default value is:
\code \code
DT_CENTER|DT_VCENTER|DT_NOPREFIX|DT_SINGLELINE DT_CENTER|DT_VCENTER|DT_NOPREFIX|DT_SINGLELINE
\endcode \end code
@return @return
The previous format. The previous format.
@ -197,7 +197,7 @@ public:
Resource identifier for the bitmap, that contains the default Resource identifier for the bitmap, that contains the default
images. The resource should contain exactly to images. images. The resource should contain exactly to images.
@param cx @param cx
Width of a singe image in pixels. Width of a single image in pixels.
@param crMask @param crMask
Color that should be interpreted as transparent. Color that should be interpreted as transparent.
@ -338,13 +338,13 @@ protected:
int AlignButtonsToRight(); int AlignButtonsToRight();
/** /**
Moves all childs by the specified amount of pixels. Moves all child's by the specified amount of pixels.
@param nDx @param nDx
Pixels to move the childs in horizontal direction (can be Pixels to move the child's in horizontal direction (can be
negative). negative).
@param nDy @param nDy
Pixels to move the childs in vertical direction (can be Pixels to move the child's in vertical direction (can be
negative). negative).
*/ */
void MoveChildWindows(int nDx, int nDy); void MoveChildWindows(int nDx, int nDy);
@ -377,7 +377,7 @@ protected:
CString SplitPageTreePath(CString &strRest); CString SplitPageTreePath(CString &strRest);
/** /**
Tries to deactivate the current page, and hides it if successfull, Tries to deactivate the current page, and hides it if successful,
so that an empty page becomes visible. so that an empty page becomes visible.
@return @return

View File

@ -1136,8 +1136,8 @@ int Program_Start(void)
// //
// //
// note: this workaround does nto work the path is still blocked // note: this workaround does not work the path is still blocked
// and we still get problems, hence now the deriver has an excemption for start.exe // and we still get problems, hence now the derive has an exemption for start.exe
// //
//LoadLibrary(L"apphelp.dll"); //LoadLibrary(L"apphelp.dll");
@ -1284,7 +1284,7 @@ int Program_Start(void)
SetLastError(err); SetLastError(err);
Show_Error(errmsg); Show_Error(errmsg);
keep_alive = FALSE; // disable keep alive when the process cant be started in the first place keep_alive = FALSE; // disable keep alive when the process can't be started in the first place
return EXIT_FAILURE; return EXIT_FAILURE;
@ -1802,8 +1802,8 @@ int __stdcall WinMainCRTStartup(
rc = Program_Start(); rc = Program_Start();
// keep the process running unless it gracefully terminates // keep the process running unless it gracefully terminates
if (keep_alive && rc != EXIT_SUCCESS && retry++ < 5) { // after to many initialization failures abbort if (keep_alive && rc != EXIT_SUCCESS && retry++ < 5) { // after to many initialization failures abort
if (::GetTickCount() - start >= 5000) // if the process run for less than 5 seconts considder it a failure to initialize if (::GetTickCount() - start >= 5000) // if the process run for less than 5 seconds consider it a failure to initialize
retry = 0; // reset failure counter on success ful start retry = 0; // reset failure counter on success ful start
goto run_program; goto run_program;
} }

View File

@ -547,7 +547,7 @@ typedef NTSTATUS (*P_NtLoadKey3)(
IN ULONG LoadArgumentCount, IN ULONG LoadArgumentCount,
IN ACCESS_MASK DesiredAccess, IN ACCESS_MASK DesiredAccess,
IN HANDLE KeyHandle, IN HANDLE KeyHandle,
IN ULONG Unkown); IN ULONG Unknown);
typedef NTSTATUS (*P_NtLoadKeyEx)( typedef NTSTATUS (*P_NtLoadKeyEx)(
IN POBJECT_ATTRIBUTES TargetKey, IN POBJECT_ATTRIBUTES TargetKey,

View File

@ -305,7 +305,7 @@ _FX ULONG Pattern_Level(PATTERN *pat)
_FX USHORT Pattern_Wildcards(PATTERN *pat) _FX USHORT Pattern_Wildcards(PATTERN *pat)
{ {
if (pat->info.num_cons == 0) return 0; // empty patters dont have wildcards if (pat->info.num_cons == 0) return 0; // empty patterns don't have wildcards
return pat->info.num_cons - 1; // between every constant part there is a wildcard return pat->info.num_cons - 1; // between every constant part there is a wildcard
} }
@ -644,7 +644,7 @@ _FX int Pattern_MatchPathList(
ULONG cur_level = Pattern_Level(pat); ULONG cur_level = Pattern_Level(pat);
if (cur_level > level) if (cur_level > level)
goto next; // no point testing patters with a to weak level goto next; // no point testing patterns with a to weak level
BOOLEAN cur_exact = Pattern_Exact(pat); BOOLEAN cur_exact = Pattern_Exact(pat);
if (!cur_exact && exact) if (!cur_exact && exact)
@ -660,8 +660,8 @@ _FX int Pattern_MatchPathList(
wildc = cur_wildc; wildc = cur_wildc;
if (patsrc) *patsrc = Pattern_Source(pat); if (patsrc) *patsrc = Pattern_Source(pat);
// we need to test all entries to find the best match, so we dont break here // we need to test all entries to find the best match, so we don't break here
// unless we found an exact match, than there cant be a batter one // unless we found an exact match, than there can't be a batter one
if (exact) if (exact)
break; break;
} }

View File

@ -77,7 +77,7 @@ ULONG Pattern_Level(PATTERN *pat);
USHORT Pattern_Wildcards(PATTERN *pat); USHORT Pattern_Wildcards(PATTERN *pat);
// //
// Pattern_Exact: returns true if the patter has no wildcard at the end // Pattern_Exact: returns true if the pattern has no wildcard at the end
// //
BOOLEAN Pattern_Exact(PATTERN *pat); BOOLEAN Pattern_Exact(PATTERN *pat);

View File

@ -657,7 +657,7 @@ _FX ULONG AdvApi_GetEffectiveRightsFromAclW(
PACL pacl, void *pTrustee, PACCESS_MASK pAccessRights) PACL pacl, void *pTrustee, PACCESS_MASK pAccessRights)
{ {
// //
// some programs (e.g HP printer software intaller) use // some programs (e.g HP printer software installer) use
// GetEffectiveRightsFromAcl to confirm that an object (like a // GetEffectiveRightsFromAcl to confirm that an object (like a
// registry key) was created with appropriate rights, so fake // registry key) was created with appropriate rights, so fake
// a return value that always shows full access // a return value that always shows full access

View File

@ -466,7 +466,7 @@ _FX BOOLEAN EnableMsiDebugging(void)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// DisableEdgeBoost // DisableEdgeBoost
// //
// Disable esge startup boost // Disable edge startup boost
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@ -61,7 +61,7 @@ typedef struct _VECTOR_TABLE {
int maxEntries; int maxEntries;
} VECTOR_TABLE; } VECTOR_TABLE;
#define VTABLE_SIZE 0x4000 //16k enough for 2048 8 byte entrys #define VTABLE_SIZE 0x4000 //16k enough for 2048 8 byte entries
#endif _WIN64 #endif _WIN64
extern ULONG Dll_Windows; extern ULONG Dll_Windows;
@ -748,7 +748,7 @@ typedef struct _DETOUR_TRAMPOLINE
// 3 instructions to form immediate // 3 instructions to form immediate
// br or brl // br or brl
// //
// A theoretical maximum for rbCode is thefore 4*4*6 + 16 = 112 (another 16 for jmp to pbRemain). // A theoretical maximum for rbCode is therefore 4*4*6 + 16 = 112 (another 16 for jmp to pbRemain).
// //
// With literals, the maximum expansion is 5, including the literals: 4*4*5 + 16 = 96. // With literals, the maximum expansion is 5, including the literals: 4*4*5 + 16 = 96.
// //
@ -1047,7 +1047,7 @@ void* SbieDll_Hook_arm(
// //
// if that fails just start at the exact offset and try again // if that fails just start at the exact offset and try again
// without the hot patch area which we dont use anyways // without the hot patch area which we don't use anyways
// //
RegionBase = &func[0]; RegionBase = &func[0];

View File

@ -379,7 +379,7 @@ _FX void Dll_InitInjected(void)
// // instead of using a separate namespace // // instead of using a separate namespace
// // just replace all \ with _ and use it as a sufix rather then an actual path // // just replace all \ with _ and use it as a sufix rather then an actual path
// // similarly a its done for named pipes already // // similarly a its done for named pipes already
// // this approche can help to reduce teh footprint when running in portable mode // // this approach can help to reduce the footprint when running in portable mode
// // alternatively we could create volatile entries under AppContainerNamedObjects // // alternatively we could create volatile entries under AppContainerNamedObjects
// // // //
// //
@ -453,7 +453,7 @@ _FX void Dll_InitInjected(void)
if (ok) { if (ok) {
// //
// ipc must be initialized before anythign else to make delete v2 work // ipc must be initialized before anything else to make delete v2 work
// //
ok = Ipc_Init(); ok = Ipc_Init();
@ -783,7 +783,7 @@ _FX ULONG_PTR Dll_Ordinal1(
// //
// on ARM64 we hook LdrLoadDll instead, using the prototype for // on ARM64 we hook LdrLoadDll instead, using the prototype for
// RtlFindActCtx is fine though as arguments 1-8 are passed in registers // RtlFindActCtx is fine though as arguments 1-8 are passed in registers
// so if we set x4 or not does not mater in the least // so if we set x4 or not does not matter in the least
// //
#endif #endif
@ -862,7 +862,7 @@ _FX ULONG_PTR Dll_Ordinal1(
Dll_InitInjected(); // install required hooks Dll_InitInjected(); // install required hooks
// //
// notify RPCSS that a new proces was created in the current sandbox // notify RPCSS that a new process was created in the current sandbox
// //
if (Dll_ImageType != DLL_IMAGE_SANDBOXIE_RPCSS) { if (Dll_ImageType != DLL_IMAGE_SANDBOXIE_RPCSS) {
@ -903,7 +903,7 @@ _FX ULONG_PTR Dll_Ordinal1(
} }
// //
// explorer needs sandboxed COM show warnign and terminate when COM is not sandboxies // explorer needs sandboxed COM show warning and terminate when COM is not sandboxies
// //
if (Dll_ImageType == DLL_IMAGE_SHELL_EXPLORER && SbieDll_IsOpenCOM()) { if (Dll_ImageType == DLL_IMAGE_SHELL_EXPLORER && SbieDll_IsOpenCOM()) {

View File

@ -327,7 +327,7 @@ ALIGNED WCHAR *Dll_GetTlsNameBuffer(THREAD_DATA *data, ULONG which, ULONG size)
// //
// since we have more places where we may need a name buffer now // since we have more places where we may need a name buffer now
// instead of sticking to "which" and doing our best to not reuse a particualr buffer thats still needed // instead of sticking to "which" and doing our best to not reuse a particular buffer that's still needed
// we just increment a counter and take a new buffer reach time we request one // we just increment a counter and take a new buffer reach time we request one
// //
@ -374,7 +374,7 @@ ALIGNED WCHAR *Dll_GetTlsNameBuffer(THREAD_DATA *data, ULONG which, ULONG size)
// //
// debug checks: the name buffer is allocated at least 64 bytes // debug checks: the name buffer is allocated at least 64 bytes
// more than needed. fill these with 0xCC, andd check that later // more than needed. fill these with 0xCC, and check that later
// //
#ifdef DEBUG_MEMORY #ifdef DEBUG_MEMORY
@ -432,7 +432,7 @@ _FX void Dll_PopTlsNameBuffer(THREAD_DATA *data)
// //
// debug checks: the name buffer is allocated at least 64 bytes // debug checks: the name buffer is allocated at least 64 bytes
// more than needed. fill these with 0xCC, andd check that later // more than needed. fill these with 0xCC, and check that later
// //
#ifdef DEBUG_MEMORY #ifdef DEBUG_MEMORY

View File

@ -516,7 +516,7 @@ _FX ULONG SbieDll_MatchPath2(WCHAR path_code, const WCHAR *path, BOOLEAN bCheckO
if (Pattern_MatchPathListEx(path_lwr, path_len, normal_list, &level, &match_len, &exact, &wildc, NULL)) { //patsrc)) { if (Pattern_MatchPathListEx(path_lwr, path_len, normal_list, &level, &match_len, &exact, &wildc, NULL)) { //patsrc)) {
mp_flags = 0; mp_flags = 0;
// dont goto finish as open can overwrite this // don't goto finish as open can overwrite this
} }
// //

View File

@ -3130,7 +3130,7 @@ ReparseLoop:
// //
// firefox starting with version 106 opens plugin exe's with GENERIC_WRITE // firefox starting with version 106 opens plugin exe's with GENERIC_WRITE
// to mitigate this issue we strip this flag when we detect that it tries to // to mitigate this issue we strip this flag when we detect that it tries to
// do that with an exe that exists outside teh sandbox // do that with an exe that exists outside the sandbox
// //
if (Dll_ImageType == DLL_IMAGE_MOZILLA_FIREFOX && (DesiredAccess & GENERIC_WRITE)) { if (Dll_ImageType == DLL_IMAGE_MOZILLA_FIREFOX && (DesiredAccess & GENERIC_WRITE)) {
@ -4042,7 +4042,7 @@ _FX BOOLEAN File_CheckDeletedParent(WCHAR *CopyPath)
} }
// //
// If we have snapshots check thair status, if we have a entry in the most recent snapshot // If we have snapshots check their status, if we have a entry in the most recent snapshot
// than older delete markings are not relevant // than older delete markings are not relevant
// //
@ -5047,7 +5047,7 @@ _FX NTSTATUS File_NtQueryFullAttributesFileImpl(
File_CreateBoxedPath(OriginalPath ? OriginalPath : TruePath); File_CreateBoxedPath(OriginalPath ? OriginalPath : TruePath);
} }
else if (OriginalPath) { else if (OriginalPath) {
; // try TruePath which points by now to teh snapshot location ; // try TruePath which points by now to the snapshot location
} }
else { else {
@ -6324,8 +6324,8 @@ _FX LONG File_RenameOpenFile(
BOOLEAN replace_if_exists) BOOLEAN replace_if_exists)
{ {
// //
// in compartment mode we dont need driver assistance we can do things ourselvs // in compartment mode we don't need driver assistance we can do things ourselves
// this code is a port of the same routine in teh driver // this code is a port of the same routine in the driver
// //
NTSTATUS status; NTSTATUS status;
@ -6955,7 +6955,7 @@ after_rename:
else { else {
// //
// if it does nto exist check if it was a directory, it may be a boxed directroy // if it does not exist check if it was a directory, it may be a boxed directory
// which is a relocation target in which case we will need to update the relocation data // which is a relocation target in which case we will need to update the relocation data
// //

View File

@ -27,7 +27,7 @@
#define FILE_PATH_FILE_NAME L"FilePaths.dat" #define FILE_PATH_FILE_NAME L"FilePaths.dat"
// path flages, saved to file // path flags, saved to file
#define FILE_DELETED_FLAG 0x0001 #define FILE_DELETED_FLAG 0x0001
#define FILE_RELOCATION_FLAG 0x0002 #define FILE_RELOCATION_FLAG 0x0002
@ -564,7 +564,7 @@ _FX VOID File_RefreshPathTree()
if (WaitForSingleObject(File_BoxRootWatcher, 0) == WAIT_OBJECT_0) { if (WaitForSingleObject(File_BoxRootWatcher, 0) == WAIT_OBJECT_0) {
// //
// somethign changed, reload the path tree // something changed, reload the path tree
// //
File_LoadPathTree(); File_LoadPathTree();

View File

@ -44,7 +44,7 @@ typedef struct _FILE_MERGE_CACHE_FILE {
typedef struct _FILE_MERGE_FILE { typedef struct _FILE_MERGE_FILE {
HANDLE handle; HANDLE handle;
FILE_SNAPSHOT* shapshot; FILE_SNAPSHOT* snapshot;
FILE_ID_BOTH_DIR_INFORMATION *info; FILE_ID_BOTH_DIR_INFORMATION *info;
ULONG info_len; ULONG info_len;
WCHAR *name; WCHAR *name;
@ -774,10 +774,10 @@ _FX NTSTATUS File_OpenForMerge(
merge->files[merge->files_count].handle = NULL; merge->files[merge->files_count].handle = NULL;
TruePathDeleted = TRUE; TruePathDeleted = TRUE;
break; // dont look any further break; // don't look any further
} }
merge->files[merge->files_count].shapshot = Cur_Snapshot; merge->files[merge->files_count].snapshot = Cur_Snapshot;
// //
// copy file passed all checks; indicate it is ready for use // copy file passed all checks; indicate it is ready for use
@ -793,7 +793,7 @@ _FX NTSTATUS File_OpenForMerge(
// //
// check if we have a relocation and update CopyPath for the next snapshot accordingly // check if we have a relocation and update CopyPath for the next snapshot accordingly
// since we dont need opypath anyware anymore we can alter it // since we don't need opypath anyware anymore we can alter it
// //
if (File_Delete_v2) { if (File_Delete_v2) {
@ -837,7 +837,7 @@ _FX NTSTATUS File_OpenForMerge(
// and can let the system work directly on the true file // and can let the system work directly on the true file
// //
if ((TruePathFlags & FILE_CHILDREN_DELETED_FLAG) == 0) // we ned to do full merge if children ar marked deleted if ((TruePathFlags & FILE_CHILDREN_DELETED_FLAG) == 0) // we need to do full merge if children ar marked deleted
if (merge->files_count == 0) { if (merge->files_count == 0) {
status = STATUS_BAD_INITIAL_PC; status = STATUS_BAD_INITIAL_PC;
@ -915,7 +915,7 @@ _FX NTSTATUS File_OpenForMerge(
// //
// if rule specificity is enabled we may not have access to this true path // if rule specificity is enabled we may not have access to this true path
// but still have access to some sub paths, in this case instead of listing the // but still have access to some sub paths, in this case instead of listing the
// true directory we parse the rule list and construst a cached dummy directory // true directory we parse the rule list and construct a cached dummy directory
// //
if (use_rule_specificity && File_MergeDummy(TruePath, merge->true_ptr, &merge->file_mask) == STATUS_SUCCESS) { if (use_rule_specificity && File_MergeDummy(TruePath, merge->true_ptr, &merge->file_mask) == STATUS_SUCCESS) {
@ -1733,10 +1733,10 @@ _FX NTSTATUS File_GetMergedInformation(
*ptr = L'\0'; *ptr = L'\0';
// //
// chekc if the file is listed as deleted // check if the file is listed as deleted
// //
if (File_IsDeletedEx(TruePath2, CopyPath2, best->shapshot)) if (File_IsDeletedEx(TruePath2, CopyPath2, best->snapshot))
continue; continue;
} //else // is in copy path - nothing to do } //else // is in copy path - nothing to do
@ -2289,7 +2289,7 @@ _FX NTSTATUS File_NtCloseImpl(HANDLE FileHandle)
} }
// //
// preapre delete disposition if set // prepare delete disposition if set
// //
if (DeleteOnClose) { if (DeleteOnClose) {
@ -3242,7 +3242,7 @@ _FX NTSTATUS File_SetReparsePoint(
//TargetPath = Dll_Alloc((wcslen(CopyPath) + 4) * sizeof(WCHAR)); //TargetPath = Dll_Alloc((wcslen(CopyPath) + 4) * sizeof(WCHAR));
//wcscpy(TargetPath, CopyPath); //wcscpy(TargetPath, CopyPath);
WCHAR* OldPrintNameBuffer = PrintNameBuffer; // we dont need to change the display name WCHAR* OldPrintNameBuffer = PrintNameBuffer; // we don't need to change the display name
SubstituteNameLength = wcslen(CopyPath) * sizeof(WCHAR); SubstituteNameLength = wcslen(CopyPath) * sizeof(WCHAR);

View File

@ -79,9 +79,9 @@ static void File_InitSnapshots(void);
_FX WCHAR File_Scramble_Char(WCHAR wValue, int Key, BOOLEAN scram) _FX WCHAR File_Scramble_Char(WCHAR wValue, int Key, BOOLEAN scram)
{ {
// //
// This function allows to scramble file name charakters properly, // This function allows to scramble file name characters properly,
// i.e. no invalid cahacters can result fron this operation. // i.e. no invalid characters can result from this operation.
// It does not scramble invalid charakters like: " * / : < > ? \ | // It does not scramble invalid characters like: " * / : < > ? \ |
// And it does not scramble ~ // And it does not scramble ~
// The entropy of the scrambler is 25,5bit (i.e. 52 million values) // The entropy of the scrambler is 25,5bit (i.e. 52 million values)
// //
@ -275,7 +275,7 @@ _FX ULONG File_GetPathFlagsEx(const WCHAR *TruePath, const WCHAR *CopyPath, WCHA
EnterCriticalSection(File_PathRoot_CritSec); EnterCriticalSection(File_PathRoot_CritSec);
// //
// check true path relocation and deleteion for the active state // check true path relocation and deletion for the active state
// //
Flags = File_GetPathFlags_internal(&File_PathRoot, TruePath, &Relocation, TRUE); // this requires a name buffer Flags = File_GetPathFlags_internal(&File_PathRoot, TruePath, &Relocation, TRUE); // this requires a name buffer
@ -304,7 +304,7 @@ _FX ULONG File_GetPathFlagsEx(const WCHAR *TruePath, const WCHAR *CopyPath, WCHA
// //
// we need a few helper buffers here, to make it efficient we will exploit // we need a few helper buffers here, to make it efficient we will exploit
// an implementation artefact of the TlsNameBuffer mechanism, namely // an implementation artefact of the TlsNameBuffer mechanism, namely
// the property that after a pop the buffers remain valid untill the next push // the property that after a pop the buffers remain valid until the next push
// //
// so we can pop out of the current frame request a buffer of the required size // so we can pop out of the current frame request a buffer of the required size
// and still read from the buffer that was filled in the previosue frame // and still read from the buffer that was filled in the previosue frame
@ -369,7 +369,7 @@ _FX ULONG File_GetPathFlagsEx(const WCHAR *TruePath, const WCHAR *CopyPath, WCHA
if (File_Delete_v2) if (File_Delete_v2)
{ {
// //
// check true path relocation and deleteion for the current snapshot // check true path relocation and deletion for the current snapshot
// //
TmplRelocation = NULL; TmplRelocation = NULL;
@ -444,21 +444,21 @@ _FX ULONG File_IsDeletedEx(const WCHAR* TruePath, const WCHAR* CopyPath, FILE_SN
_FX void File_InitSnapshots(void) _FX void File_InitSnapshots(void)
{ {
WCHAR ShapshotsIni[MAX_PATH] = { 0 }; WCHAR SnapshotsIni[MAX_PATH] = { 0 };
wcscpy(ShapshotsIni, Dll_BoxFilePath); wcscpy(SnapshotsIni, Dll_BoxFilePath);
wcscat(ShapshotsIni, L"\\Snapshots.ini"); wcscat(SnapshotsIni, L"\\Snapshots.ini");
SbieDll_TranslateNtToDosPath(ShapshotsIni); SbieDll_TranslateNtToDosPath(SnapshotsIni);
WCHAR Shapshot[FILE_MAX_SNAPSHOT_ID] = { 0 }; WCHAR Snapshot[FILE_MAX_SNAPSHOT_ID] = { 0 };
GetPrivateProfileStringW(L"Current", L"Snapshot", L"", Shapshot, FILE_MAX_SNAPSHOT_ID, ShapshotsIni); GetPrivateProfileStringW(L"Current", L"Snapshot", L"", Snapshot, FILE_MAX_SNAPSHOT_ID, SnapshotsIni);
if (*Shapshot == 0) if (*Snapshot == 0)
return; // not using snapshots return; // not using snapshots
File_Snapshot = Dll_Alloc(sizeof(FILE_SNAPSHOT)); File_Snapshot = Dll_Alloc(sizeof(FILE_SNAPSHOT));
memzero(File_Snapshot, sizeof(FILE_SNAPSHOT)); memzero(File_Snapshot, sizeof(FILE_SNAPSHOT));
wcscpy(File_Snapshot->ID, Shapshot); wcscpy(File_Snapshot->ID, Snapshot);
File_Snapshot->IDlen = wcslen(Shapshot); File_Snapshot->IDlen = wcslen(Snapshot);
FILE_SNAPSHOT* Cur_Snapshot = File_Snapshot; FILE_SNAPSHOT* Cur_Snapshot = File_Snapshot;
File_Snapshot_Count = 1; File_Snapshot_Count = 1;
@ -466,8 +466,8 @@ _FX void File_InitSnapshots(void)
{ {
Cur_Snapshot->ScramKey = CRC32(Cur_Snapshot->ID, Cur_Snapshot->IDlen * sizeof(WCHAR)); Cur_Snapshot->ScramKey = CRC32(Cur_Snapshot->ID, Cur_Snapshot->IDlen * sizeof(WCHAR));
WCHAR ShapshotId[26] = L"Snapshot_"; WCHAR SnapshotId[26] = L"Snapshot_";
wcscat(ShapshotId, Shapshot); wcscat(SnapshotId, Snapshot);
if (File_Delete_v2) if (File_Delete_v2)
{ {
@ -480,19 +480,19 @@ _FX void File_InitSnapshots(void)
File_LoadPathTree_internal(&Cur_Snapshot->PathRoot, PathFile); File_LoadPathTree_internal(&Cur_Snapshot->PathRoot, PathFile);
} }
//WCHAR ShapshotName[34] = { 0 }; //WCHAR SnapshotName[34] = { 0 };
//GetPrivateProfileStringW(ShapshotId, L"Name", L"", ShapshotName, 34, ShapshotsIni); //GetPrivateProfileStringW(SnapshotId, L"Name", L"", SnapshotName, 34, SnapshotsIni);
//wcscpy(Cur_Snapshot->Name, ShapshotName); //wcscpy(Cur_Snapshot->Name, SnapshotName);
GetPrivateProfileStringW(ShapshotId, L"Parent", L"", Shapshot, 16, ShapshotsIni); GetPrivateProfileStringW(SnapshotId, L"Parent", L"", Snapshot, 16, SnapshotsIni);
if (*Shapshot == 0) if (*Snapshot == 0)
break; // no more snapshots break; // no more snapshots
Cur_Snapshot->Parent = Dll_Alloc(sizeof(FILE_SNAPSHOT)); Cur_Snapshot->Parent = Dll_Alloc(sizeof(FILE_SNAPSHOT));
memzero(Cur_Snapshot->Parent, sizeof(FILE_SNAPSHOT)); memzero(Cur_Snapshot->Parent, sizeof(FILE_SNAPSHOT));
wcscpy(Cur_Snapshot->Parent->ID, Shapshot); wcscpy(Cur_Snapshot->Parent->ID, Snapshot);
Cur_Snapshot->Parent->IDlen = wcslen(Shapshot); Cur_Snapshot->Parent->IDlen = wcslen(Snapshot);
Cur_Snapshot = Cur_Snapshot->Parent; Cur_Snapshot = Cur_Snapshot->Parent;
File_Snapshot_Count++; File_Snapshot_Count++;
} }

View File

@ -102,7 +102,7 @@ _FX VOID Handle_SetRelocationPath(HANDLE FileHandle, WCHAR* RelocationPath)
EnterCriticalSection(&Handle_StatusData_CritSec); EnterCriticalSection(&Handle_StatusData_CritSec);
HANDLE_STATE* state = map_get(&Handle_StatusData, FileHandle); HANDLE_STATE* state = map_get(&Handle_StatusData, FileHandle);
if (!state) { // this shoudl always be the case, as we only use Handle_SetRelocationPath when the handle is first created if (!state) { // this should always be the case, as we only use Handle_SetRelocationPath when the handle is first created
state = map_insert(&Handle_StatusData, FileHandle, NULL, sizeof(HANDLE_STATE)); state = map_insert(&Handle_StatusData, FileHandle, NULL, sizeof(HANDLE_STATE));
} else if (state->RelocationPath) Dll_Free(state->RelocationPath); // should not happen but in case } else if (state->RelocationPath) Dll_Free(state->RelocationPath); // should not happen but in case

View File

@ -559,7 +559,7 @@ _FX NTSTATUS Ipc_GetName(
//if (Dll_AlernateIpcNaming) { //if (Dll_AlernateIpcNaming) {
// //
// // // //
// // Since in this mode we don't call Ipc_CreateObjects we dont have a boxed namespace // // Since in this mode we don't call Ipc_CreateObjects we don't have a boxed namespace
// // and are using existing namespaces only with a name suffix // // and are using existing namespaces only with a name suffix
// // hence we can't use Global without system provileges, so we strip it // // hence we can't use Global without system provileges, so we strip it
// // // //

View File

@ -162,7 +162,7 @@ _FX BOOLEAN Ipc_StartServer(const WCHAR *TruePath, BOOLEAN Async)
if (service == _rpcss) { if (service == _rpcss) {
// //
// starting rpcss: go thrugh SbieSvc ProcessServer // starting rpcss: go through SbieSvc ProcessServer
// //
if (! Proc_ImpersonateSelf(TRUE)) if (! Proc_ImpersonateSelf(TRUE))

View File

@ -245,7 +245,7 @@ IEnumPStoreTypes *IEnumPStoreTypesImpl::CreateEnumSubtype(
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// IEnumPStoreTypesImpl Defeault Constructor // IEnumPStoreTypesImpl Default Constructor
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@ -266,7 +266,7 @@ static NTSTATUS Key_NtLoadKey2(
static NTSTATUS Key_NtLoadKey3( static NTSTATUS Key_NtLoadKey3(
OBJECT_ATTRIBUTES *TargetObjectAttributes, OBJECT_ATTRIBUTES *TargetObjectAttributes,
OBJECT_ATTRIBUTES *SourceObjectAttributes, ULONG Flags, OBJECT_ATTRIBUTES *SourceObjectAttributes, ULONG Flags,
PVOID LoadArguments, ULONG LoadArgumentCount, ACCESS_MASK DesiredAccess, HANDLE KeyHandle, ULONG Unkown); PVOID LoadArguments, ULONG LoadArgumentCount, ACCESS_MASK DesiredAccess, HANDLE KeyHandle, ULONG Unknown);
static NTSTATUS Key_NtLoadKeyEx( static NTSTATUS Key_NtLoadKeyEx(
OBJECT_ATTRIBUTES *TargetObjectAttributes, OBJECT_ATTRIBUTES *TargetObjectAttributes,
@ -1583,7 +1583,7 @@ _FX NTSTATUS Key_NtCreateKeyImpl(
TruePath = OldTruePath; TruePath = OldTruePath;
} }
// if key marked as deleted dont even try opening true path // if key marked as deleted don't even try opening true path
if (KEY_PATH_DELETED(TruePathFlags) && CreateOptions == tzuk) { if (KEY_PATH_DELETED(TruePathFlags) && CreateOptions == tzuk) {
status = STATUS_OBJECT_NAME_NOT_FOUND; status = STATUS_OBJECT_NAME_NOT_FOUND;
__leave; __leave;
@ -4455,7 +4455,7 @@ _FX NTSTATUS Key_NtRenameKey(
goto finish; goto finish;
// //
// rename the key ensuring we wil have a boxed copy // rename the key ensuring we will have a boxed copy
// try renaming if it fails with access denided try again with a new handle // try renaming if it fails with access denided try again with a new handle
// //
@ -4782,7 +4782,7 @@ _FX NTSTATUS Key_NtLoadKey2(
_FX NTSTATUS Key_NtLoadKey3( _FX NTSTATUS Key_NtLoadKey3(
OBJECT_ATTRIBUTES *TargetObjectAttributes, OBJECT_ATTRIBUTES *TargetObjectAttributes,
OBJECT_ATTRIBUTES *SourceObjectAttributes, ULONG Flags, OBJECT_ATTRIBUTES *SourceObjectAttributes, ULONG Flags,
PVOID LoadArguments, ULONG LoadArgumentCount, ACCESS_MASK DesiredAccess, HANDLE KeyHandle, ULONG Unkown) PVOID LoadArguments, ULONG LoadArgumentCount, ACCESS_MASK DesiredAccess, HANDLE KeyHandle, ULONG Unknown)
{ {
NTSTATUS status; NTSTATUS status;
WCHAR* WorkPath; WCHAR* WorkPath;
@ -4802,7 +4802,7 @@ _FX NTSTATUS Key_NtLoadKey3(
} }
status = __sys_NtLoadKey3(TargetObjectAttributes, SourceObjectAttributes, Flags, status = __sys_NtLoadKey3(TargetObjectAttributes, SourceObjectAttributes, Flags,
LoadArguments, LoadArgumentCount, DesiredAccess, KeyHandle, Unkown); LoadArguments, LoadArgumentCount, DesiredAccess, KeyHandle, Unknown);
if (status == STATUS_PRIVILEGE_NOT_HELD && !Dll_CompartmentMode) if (status == STATUS_PRIVILEGE_NOT_HELD && !Dll_CompartmentMode)
SbieApi_Log(2205, L"NtLoadKey3"); SbieApi_Log(2205, L"NtLoadKey3");
//status = Key_NtLoadKeyImpl(TargetObjectAttributes, WorkPath); //status = Key_NtLoadKeyImpl(TargetObjectAttributes, WorkPath);

View File

@ -29,7 +29,7 @@
// Keep in sync with the FILE_..._FLAG's in file_del.c // Keep in sync with the FILE_..._FLAG's in file_del.c
// //
// path flages, saved to file // path flags, saved to file
#define KEY_DELETED_FLAG 0x0001 #define KEY_DELETED_FLAG 0x0001
#define KEY_RELOCATION_FLAG 0x0002 #define KEY_RELOCATION_FLAG 0x0002
@ -75,7 +75,7 @@ static ULONG Key_IsDeleted_v2(const WCHAR* TruePath);
static ULONG Key_IsDeletedEx_v2(const WCHAR* TruePath, const WCHAR* ValueName, BOOLEAN IsValue); static ULONG Key_IsDeletedEx_v2(const WCHAR* TruePath, const WCHAR* ValueName, BOOLEAN IsValue);
// //
// we re use the _internal functions of the file implementation as thay all are generic enough // we re use the _internal functions of the file implementation as they all are generic enough
// //
VOID File_ClearPathBranche_internal(LIST* parent); VOID File_ClearPathBranche_internal(LIST* parent);
@ -168,7 +168,7 @@ _FX VOID Key_RefreshPathTree()
if (WaitForSingleObject(Key_BoxRootWatcher, 0) == WAIT_OBJECT_0) { if (WaitForSingleObject(Key_BoxRootWatcher, 0) == WAIT_OBJECT_0) {
// //
// somethign changed, reload the path tree // something changed, reload the path tree
// //
Key_LoadPathTree(); Key_LoadPathTree();
@ -224,7 +224,7 @@ _FX NTSTATUS Key_MarkDeletedEx_v2(const WCHAR* TruePath, const WCHAR* ValueName)
THREAD_DATA *TlsData = Dll_GetTlsData(NULL); THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
WCHAR* FullPath = Dll_GetTlsNameBuffer(TlsData, TMPL_NAME_BUFFER, WCHAR* FullPath = Dll_GetTlsNameBuffer(TlsData, TMPL_NAME_BUFFER,
(wcslen(TruePath) + (ValueName ? wcslen(ValueName) : 0) + 16) * sizeof(WCHAR)); // template buffer is not used for reg reputpose it here (wcslen(TruePath) + (ValueName ? wcslen(ValueName) : 0) + 16) * sizeof(WCHAR)); // template buffer is not used for reg repurpose it here
wcscpy(FullPath, TruePath); wcscpy(FullPath, TruePath);
if (ValueName) { if (ValueName) {
@ -277,7 +277,7 @@ _FX ULONG Key_IsDeletedEx_v2(const WCHAR* TruePath, const WCHAR* ValueName, BOOL
THREAD_DATA *TlsData = Dll_GetTlsData(NULL); THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
WCHAR* FullPath = Dll_GetTlsNameBuffer(TlsData, TMPL_NAME_BUFFER, WCHAR* FullPath = Dll_GetTlsNameBuffer(TlsData, TMPL_NAME_BUFFER,
(wcslen(TruePath) + (ValueName ? wcslen(ValueName) : 0) + 16) * sizeof(WCHAR)); // template buffer is not used for reg reputpose it here (wcslen(TruePath) + (ValueName ? wcslen(ValueName) : 0) + 16) * sizeof(WCHAR)); // template buffer is not used for reg repurpose it here
wcscpy(FullPath, TruePath); wcscpy(FullPath, TruePath);
if (ValueName) { if (ValueName) {

View File

@ -461,7 +461,7 @@ _FX NTSTATUS Key_OpenForMerge(
// //
// if rule specificity is enabled we may not have access to this true path // if rule specificity is enabled we may not have access to this true path
// but still have access to some sub paths, in this case instead of listing the // but still have access to some sub paths, in this case instead of listing the
// true directory we parse the rule list and construst a cached dummy directory // true directory we parse the rule list and construct a cached dummy directory
// //
if (use_rule_specificity) if (use_rule_specificity)

View File

@ -651,7 +651,7 @@ _FX ULONG SbieDll_InjectLow_InitSyscalls(BOOLEAN drv_init)
if (drv_init) if (drv_init)
{ {
// //
// Search the ntdll.dll for teh unexported syscall wrapper functions // Search the ntdll.dll for the unexported syscall wrapper functions
// //
void* HandleStubHijack = NULL; void* HandleStubHijack = NULL;
@ -659,7 +659,7 @@ _FX ULONG SbieDll_InjectLow_InitSyscalls(BOOLEAN drv_init)
if (aCode == NULL) { if (aCode == NULL) {
SbieApi_Log(2303, L"syscall, wrappers not found"); SbieApi_Log(2303, L"syscall, wrappers not found");
return STATUS_SUCCESS; // we will fail process cration for ec processes later return STATUS_SUCCESS; // we will fail process creation for ec processes later
} }
void* EcExitThunkPtr = SbieDll_GetEcExitThunkPtr(HandleStubHijack); void* EcExitThunkPtr = SbieDll_GetEcExitThunkPtr(HandleStubHijack);
@ -1219,7 +1219,7 @@ _FX BOOLEAN SbieDll_InjectLow_BuildTramp(
// //
// skip past several bytes in the code copied from the top of the // skip past several bytes in the code copied from the top of the
// LdrInitializeThunk fuction, where we will inject a jmp sequence. // LdrInitializeThunk function, where we will inject a jmp sequence.
// //
// a simple E9 relative JMP five byte instruction in most cases, // a simple E9 relative JMP five byte instruction in most cases,
// a slightly longer seven byte version in case there is a long // a slightly longer seven byte version in case there is a long

View File

@ -453,7 +453,7 @@ static SOCKET WSA_WSASocketW(
else { else {
// //
// dont ask again on success // don't ask again on success
// //
WSA_WFPisBlocking = FALSE; WSA_WFPisBlocking = FALSE;
@ -751,9 +751,9 @@ _FX int WSA_AcceptEx(
LPOVERLAPPED lpOverlapped) LPOVERLAPPED lpOverlapped)
{ {
// //
// this call can operate asynchroniusly, hence we can not simply filter here the incomming connection // this call can operate asynchroniusly, hence we can not simply filter here the incoming connection
// as we have a proepr WFP filter in the driver for now this usermode filtering implementation // as we have a proepr WFP filter in the driver for now this usermode filtering implementation
// will not filter incomming traffic at all, normally users ate beind NATs or other firewall so // will not filter incoming traffic at all, normally users ate behind NATs or other firewall so
// blocking only outgoing connections should be good enough // blocking only outgoing connections should be good enough
// //

View File

@ -401,7 +401,7 @@ _FX LONG SbieApi_LogMsgEx(
API_LOG_MESSAGE_ARGS *args = (API_LOG_MESSAGE_ARGS *)parms; API_LOG_MESSAGE_ARGS *args = (API_LOG_MESSAGE_ARGS *)parms;
// //
// the msg_data can contain multiple strings separated by L'\0' charakters // the msg_data can contain multiple strings separated by L'\0' characters
// //
msgtext.Buffer = (ULONG_PTR)msg_data; msgtext.Buffer = (ULONG_PTR)msg_data;

View File

@ -622,7 +622,7 @@ BOOLEAN Scm_HookRegisterServiceCtrlHandler(HMODULE module)
{ {
#ifndef _M_ARM64 #ifndef _M_ARM64
// $HookHack$ - Custom, not automated, Hook no longer applyes to later windows 10 builds // $HookHack$ - Custom, not automated, Hook no longer applies to later windows 10 builds
#ifdef _WIN64 #ifdef _WIN64
static const UCHAR PrologW[] = { static const UCHAR PrologW[] = {
0x45, 0x33, 0xC9, // xor r9d,r9d 0x45, 0x33, 0xC9, // xor r9d,r9d

View File

@ -1361,7 +1361,7 @@ _FX BOOL Scm_StartServiceCtrlDispatcherX(
// if the service never started, report error // if the service never started, report error
// //
Sbie_snwprintf(text, 130, L"StartServiceCtrlDispatcher; result: %s", Scm_Started ? L"sucess" : L"failure"); Sbie_snwprintf(text, 130, L"StartServiceCtrlDispatcher; result: %s", Scm_Started ? L"success" : L"failure");
SbieApi_MonitorPutMsg(MONITOR_SCM, text); SbieApi_MonitorPutMsg(MONITOR_SCM, text);
if (! Scm_Started) { if (! Scm_Started) {

View File

@ -205,7 +205,7 @@ _FX HANDLE Scm_CreateWaitableTimerW(
{ {
// //
// When MsiServer is not started as system (missing the admin groupe) this call fails // When MsiServer is not started as system (missing the admin group) this call fails
// //
lpTimerAttributes = NULL; lpTimerAttributes = NULL;

View File

@ -226,7 +226,7 @@ _FX void SysInfo_DiscardProcesses(SYSTEM_PROCESS_INFORMATION *buf)
WCHAR* hiddenProcesses = NULL; WCHAR* hiddenProcesses = NULL;
WCHAR* hiddenProcessesPtr = NULL; WCHAR* hiddenProcessesPtr = NULL;
ULONG hiddenProcessesLen = 100 * 110; // we can hide up to 100 processes, sould be enough ULONG hiddenProcessesLen = 100 * 110; // we can hide up to 100 processes, should be enough
WCHAR hiddenProcess[110]; WCHAR hiddenProcess[110];
for (ULONG index = 0; ; ++index) { for (ULONG index = 0; ; ++index) {

View File

@ -592,7 +592,7 @@ _FX void Taskbar_SetWindowAppUserModelId(HWND hwnd)
// //
// Note: without the right value we may end up with multiple window groups // Note: without the right value we may end up with multiple window groups
// so don't do anythign if we dont have Taskbar_SavedAppUserModelId // so don't do anything if we don't have Taskbar_SavedAppUserModelId
// see also disabled Taskbar_SetProcessAppUserModelId // see also disabled Taskbar_SetProcessAppUserModelId
//if (!Taskbar_SavedAppUserModelId) //if (!Taskbar_SavedAppUserModelId)
// return; // return;

View File

@ -233,7 +233,7 @@ extern const WCHAR *Ipc_SandboxieRpcSs;
_FX BOOLEAN Terminal_DontHook(void) _FX BOOLEAN Terminal_DontHook(void)
{ {
// //
// In in app mode we have a full token and this wil be successfull, hence no need for a hook // In in app mode we have a full token and this will be successful, hence no need for a hook
// //
if (Dll_CompartmentMode) if (Dll_CompartmentMode)

View File

@ -799,7 +799,7 @@ _FX NTSTATUS Conf_Merge_Templates(CONF_DATA *data, ULONG session_id)
#ifdef USE_CONF_MAP #ifdef USE_CONF_MAP
// //
// use a keyed itterator to quickly go through all Template=Xxx settings // use a keyed iterator to quickly go through all Template=Xxx settings
// //
map_iter_t iter2 = map_key_iter(&sandbox->settings_map, Conf_Template); map_iter_t iter2 = map_key_iter(&sandbox->settings_map, Conf_Template);
@ -1047,7 +1047,7 @@ _FX const WCHAR *Conf_Get_Helper(
if (section) { if (section) {
#ifdef USE_CONF_MAP #ifdef USE_CONF_MAP
// //
// use a keyed itterator to quickly go through all matching settings // use a keyed iterator to quickly go through all matching settings
// //
map_iter_t iter2 = map_key_iter(&section->settings_map, setting_name); map_iter_t iter2 = map_key_iter(&section->settings_map, setting_name);

View File

@ -705,7 +705,7 @@ _FX BOOLEAN Driver_FindMissingServices(void)
// //
// Retrive some unexported kernel functions which may be usefull // Retrieve some unexported kernel functions which may be useful
// //
#ifdef _M_ARM64 #ifdef _M_ARM64
@ -715,7 +715,7 @@ _FX BOOLEAN Driver_FindMissingServices(void)
// but out right lacks those functions entirely. // but out right lacks those functions entirely.
// So in order to work around this limitation we implement a own system service wrapper // So in order to work around this limitation we implement a own system service wrapper
// we invoke Sbie_CallZwServiceFunction_asm with all the arguments we need // we invoke Sbie_CallZwServiceFunction_asm with all the arguments we need
// and the service numebr as last 20th argument, it sets IP0/X16 and invokes KiServiceInternal // and the service number as last 20th argument, it sets IP0/X16 and invokes KiServiceInternal
// //
SYSCALL_ENTRY *entry = Syscall_GetByName("CreateToken"); SYSCALL_ENTRY *entry = Syscall_GetByName("CreateToken");

View File

@ -829,7 +829,7 @@ _FX BOOLEAN File_InitPaths(PROCESS *proc,
// //
// many 3rd party drivers are a great attack vector to gain execution in the kernel, // many 3rd party drivers are a great attack vector to gain execution in the kernel,
// so we clsoe all typical endpoints except a selected few. // so we close all typical endpoints except a selected few.
// //
ok = Process_AddPath(proc, closed_file_paths, NULL, FALSE, File_Device, TRUE); ok = Process_AddPath(proc, closed_file_paths, NULL, FALSE, File_Device, TRUE);

View File

@ -1190,7 +1190,7 @@ _FX BOOLEAN Process_NotifyProcess_Create(
#ifdef DRV_BREAKOUT #ifdef DRV_BREAKOUT
// //
// check if this process is set up as break out program, // check if this process is set up as break out program,
// it must't be located in a sandboxed for this to work. // it mustn't be located in a sandboxed for this to work.
// //
BOX* breakout_box = NULL; BOX* breakout_box = NULL;

View File

@ -915,7 +915,7 @@ _FX ULONG Process_MatchPathEx(
// //
// Rule priorities are implemented based on their specificity and match level with the process. // Rule priorities are implemented based on their specificity and match level with the process.
// The specificity describes how well a pattern matches a given path, // The specificity describes how well a pattern matches a given path,
// i.e. how many charakters of the path it matches, disregarding the last wild card. // i.e. how many characters of the path it matches, disregarding the last wild card.
// The process match level describes in which way a rule applies to a given process: // The process match level describes in which way a rule applies to a given process:
// 0 - exact match, eg. ...Path=program.exe,... // 0 - exact match, eg. ...Path=program.exe,...
// 1 - match by negation, eg. ...Path=!program.exe,... // 1 - match by negation, eg. ...Path=!program.exe,...
@ -966,7 +966,7 @@ _FX ULONG Process_MatchPathEx(
// // // //
// // Note: as of 5.60.1 all locations are locked down explicitly while the root mode remains normal // // Note: as of 5.60.1 all locations are locked down explicitly while the root mode remains normal
// // // //
// // To enable privacy enchanced mode add UsePrivacyMode=y // // To enable privacy enhanced mode add UsePrivacyMode=y
// // // //
// //
// mp_flags = TRUE_PATH_CLOSED_FLAG | COPY_PATH_OPEN_FLAG; // write path mode // mp_flags = TRUE_PATH_CLOSED_FLAG | COPY_PATH_OPEN_FLAG; // write path mode
@ -984,7 +984,7 @@ _FX ULONG Process_MatchPathEx(
// //
// write path list, behaved on the driver side like closed path list // write path list, behaved on the driver side like closed path list
// these paths allow read acces to true location and read/write access to copy location // these paths allow read access to true location and read/write access to copy location
// //
if (Pattern_MatchPathListEx(path_lwr, path_len, write_list, &level, &match_len, &exact, &wildc, patsrc)) { if (Pattern_MatchPathListEx(path_lwr, path_len, write_list, &level, &match_len, &exact, &wildc, patsrc)) {
@ -994,7 +994,7 @@ _FX ULONG Process_MatchPathEx(
// //
// read path list behaves in the kernel like the default normal behavioure // read path list behaves in the kernel like the default normal behavioure
// these paths allow read only acces to true path and copy locations // these paths allow read only access to true path and copy locations
// //
if (Pattern_MatchPathListEx(path_lwr, path_len, read_list, &level, &match_len, &exact, &wildc, patsrc)) { if (Pattern_MatchPathListEx(path_lwr, path_len, read_list, &level, &match_len, &exact, &wildc, patsrc)) {
@ -1009,7 +1009,7 @@ _FX ULONG Process_MatchPathEx(
if (Pattern_MatchPathListEx(path_lwr, path_len, normal_list, &level, &match_len, &exact, &wildc, patsrc)) { if (Pattern_MatchPathListEx(path_lwr, path_len, normal_list, &level, &match_len, &exact, &wildc, patsrc)) {
mp_flags = TRUE_PATH_READ_FLAG | COPY_PATH_OPEN_FLAG; mp_flags = TRUE_PATH_READ_FLAG | COPY_PATH_OPEN_FLAG;
// dont goto finish as open can overwrite this // don't goto finish as open can overwrite this
} }
// //

View File

@ -205,7 +205,7 @@ _FX BOOLEAN Syscall_Init_List(void)
List_Init(&Syscall_List); List_Init(&Syscall_List);
// //
// preapre the approve and disabled lists // prepare the approve and disabled lists
// //
LIST disabled_hooks; LIST disabled_hooks;

View File

@ -131,7 +131,7 @@ Sbie_SepFilterTokenHandler_asm PROC
Sbie_CallZwServiceFunction_asm PROC Sbie_CallZwServiceFunction_asm PROC
ldr x16,[sp,#0x58] ; preapre the sys call number ldr x16,[sp,#0x58] ; prepare the sys call number
ldr x9, =Driver_KiServiceInternal ldr x9, =Driver_KiServiceInternal
ldr x8, [x9] ldr x8, [x9]
br x8 ; jump to KiServiceInternal br x8 ; jump to KiServiceInternal

View File

@ -490,7 +490,7 @@ union _SCertInfo {
valid : 1, // certificate is active valid : 1, // certificate is active
expired : 1, // certificate is expired but may be active expired : 1, // certificate is expired but may be active
outdated : 1, // certificate is expired, not anymore valid for the current build outdated : 1, // certificate is expired, not anymore valid for the current build
business : 1, // certificate is siutable for business use business : 1, // certificate is suitable for business use
evaluation: 1, // evaluation certificate evaluation: 1, // evaluation certificate
reservd_1 : 3, reservd_1 : 3,
reservd_2 : 8, reservd_2 : 8,

View File

@ -339,7 +339,7 @@ LdrLoadGood
ldr x0, [x19, 0x60] ; [x19].InjectData.ModuleHandle ldr x0, [x19, 0x60] ; [x19].InjectData.ModuleHandle
mov x1, #0x00 ; FunctionName mov x1, #0x00 ; FunctionName
mov x2, #0x01 ; Oridinal mov x2, #0x01 ; Ordinal
add x3, x19, 0x68 ; [x19].InjectData.SbieDllOrdinal1 add x3, x19, 0x68 ; [x19].InjectData.SbieDllOrdinal1
mov x4, x19 ; [x19].InjectData mov x4, x19 ; [x19].InjectData

View File

@ -23,7 +23,7 @@
; SbieSrv.exe named Lowlevel. The code section is copied from this resource ; SbieSrv.exe named Lowlevel. The code section is copied from this resource
; and load directly in to memory and injected in to various targets. Thus the ; and load directly in to memory and injected in to various targets. Thus the
; code section of this dll is executed like shell code because of the manual ; code section of this dll is executed like shell code because of the manual
; load techinque used by SbieSrv.exe and needs to execute in various memory locations ; load technique used by SbieSrv.exe and needs to execute in various memory locations
; since it is the injected code. SbieSrv.exe will parse the PE Header of ; since it is the injected code. SbieSrv.exe will parse the PE Header of
; lowlevel.dll to locate the code section and copy it. To simplify the work ; lowlevel.dll to locate the code section and copy it. To simplify the work
; needed to locate key locations with in the object code generated ; needed to locate key locations with in the object code generated

View File

@ -223,7 +223,7 @@ _FX void PrepSyscalls(SBIELOW_DATA *data, void * SystemService)
// //
// Windows on arm64 uses a special syscall wrapper functions // Windows on arm64 uses a special syscall wrapper functions
// when runnign in arm64ec / x64 mode hence we need to // when running in arm64ec / x64 mode hence we need to
// point our SystemService's NtDeviceIoControlFile to // point our SystemService's NtDeviceIoControlFile to
// a replica of the #NtDeviceIoControlFile EC variant // a replica of the #NtDeviceIoControlFile EC variant
// //
@ -369,7 +369,7 @@ _FX void InitSyscalls(SBIELOW_DATA *data, void * SystemService)
#ifdef _M_ARM64 #ifdef _M_ARM64
// //
// On arm64 syscall wraper functions looks like this: // On arm64 syscall wrapper functions looks like this:
// svc #0xXXX // svc #0xXXX
// ret // ret
// DCD 0 // DCD 0
@ -519,7 +519,7 @@ _FX void InitSyscalls(SBIELOW_DATA *data, void * SystemService)
_FX NTSTATUS MyImageOptionsEx(PUNICODE_STRING SubKey, PCWSTR ValueName, _FX NTSTATUS MyImageOptionsEx(PUNICODE_STRING SubKey, PCWSTR ValueName,
ULONG Type, PVOID Buffer, ULONG BufferSize, PULONG ReturnedLength, BOOLEAN Wow64, SBIELOW_DATA* data) ULONG Type, PVOID Buffer, ULONG BufferSize, PULONG ReturnedLength, BOOLEAN Wow64, SBIELOW_DATA* data)
{ {
// Note: A normal string like L"LoadCHPEBinaries" would not resultin position independant code !!! // Note: A normal string like L"LoadCHPEBinaries" would not resultin position independent code !!!
wchar_t LoadCHPEBinaries[] = { 'L','o','a','d','C','H','P','E','B','i','n','a','r','i','e','s',0 }; wchar_t LoadCHPEBinaries[] = { 'L','o','a','d','C','H','P','E','B','i','n','a','r','i','e','s',0 };
PCWSTR ptr = ValueName; PCWSTR ptr = ValueName;
for (PCWSTR tmp = LoadCHPEBinaries; *ptr && *tmp && *ptr == *tmp; ptr++, tmp++); for (PCWSTR tmp = LoadCHPEBinaries; *ptr && *tmp && *ptr == *tmp; ptr++, tmp++);

View File

@ -177,12 +177,12 @@ _FX UCHAR *FindDllExport2(
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
_FX NTSTATUS MyGetProcedureAddress(HMODULE ModuleHandle, PANSI_STRING FunctionName, WORD Oridinal, PVOID*FunctionAddress, INJECT_DATA *inject) _FX NTSTATUS MyGetProcedureAddress(HMODULE ModuleHandle, PANSI_STRING FunctionName, WORD Ordinal, PVOID*FunctionAddress, INJECT_DATA *inject)
{ {
SBIELOW_DATA* data = (SBIELOW_DATA*)*(ULONG64*)inject; SBIELOW_DATA* data = (SBIELOW_DATA*)*(ULONG64*)inject;
typedef (*P_LdrGetProcedureAddress)(HMODULE, PANSI_STRING, WORD, PVOID*); typedef (*P_LdrGetProcedureAddress)(HMODULE, PANSI_STRING, WORD, PVOID*);
NTSTATUS status = ((P_LdrGetProcedureAddress)inject->LdrGetProcAddr)(ModuleHandle, FunctionName, Oridinal, FunctionAddress); NTSTATUS status = ((P_LdrGetProcedureAddress)inject->LdrGetProcAddr)(ModuleHandle, FunctionName, Ordinal, FunctionAddress);
// //
// in ARM64EC mode unwrap the FFS and return the native function // in ARM64EC mode unwrap the FFS and return the native function
@ -242,7 +242,7 @@ _FX void InitInject(SBIELOW_DATA *data, void *DetourCode)
if (data->flags.is_wow64) { if (data->flags.is_wow64) {
// //
// Instead of requiering the driver for this task, we can simplify it // Instead of requiring the driver for this task, we can simplify it
// and use NtQueryVirtualMemory to find the mapped image directly. // and use NtQueryVirtualMemory to find the mapped image directly.
// We do that in the injector, but we could also have done it here ourselves. // We do that in the injector, but we could also have done it here ourselves.
// //
@ -301,7 +301,7 @@ _FX void InitInject(SBIELOW_DATA *data, void *DetourCode)
// //
// on ARM64EC we hook the native code hence we need the custom MyGetProcedureAddress // on ARM64EC we hook the native code hence we need the custom MyGetProcedureAddress
// to obtain the address of the native orginal 1 from our SbieDll.dll // to obtain the address of the native original 1 from our SbieDll.dll
// instead of the FFS sequence as given by NtGetProcedureAddress // instead of the FFS sequence as given by NtGetProcedureAddress
// //
@ -321,7 +321,7 @@ _FX void InitInject(SBIELOW_DATA *data, void *DetourCode)
// //
// for ARM64EC we need native functions, FindDllExport can manage FFS's // for ARM64EC we need native functions, FindDllExport can manage FFS's
// howeever this does not work for syscalls, hence we use the native function directly // however this does not work for syscalls, hence we use the native function directly
// //
inject->NtRaiseHardError = data->NativeNtRaiseHardError; inject->NtRaiseHardError = data->NativeNtRaiseHardError;

View File

@ -312,7 +312,7 @@ void DriverAssist::MsgWorkerThread(void *MyMsg)
// we update the ini cache each time the driver reloads the ini file. // we update the ini cache each time the driver reloads the ini file.
// //
// In newer builds the driver tells us which process issued the reload // In newer builds the driver tells us which process issued the reload
// if we did it we dont need to purge the cached ini data // if we did it we don't need to purge the cached ini data
// //
if(data_len < sizeof(ULONG) || *(ULONG*)data_ptr != GetCurrentProcessId()) if(data_len < sizeof(ULONG) || *(ULONG*)data_ptr != GetCurrentProcessId())
@ -501,7 +501,7 @@ void DriverAssist::RestartHostInjectedSvcs()
// resulting in this function getting triggered way to often, // resulting in this function getting triggered way to often,
// hence we implement a small workaround. // hence we implement a small workaround.
// The first thread to hit this monitors how many // The first thread to hit this monitors how many
// calls go in and waits untill the last one, // calls go in and waits until the last one,
// then it starts the Job. // then it starts the Job.
// //
@ -538,7 +538,7 @@ typedef struct _FILE_FS_PERSISTENT_VOLUME_INFORMATION {
} FILE_FS_PERSISTENT_VOLUME_INFORMATION, *PFILE_FS_PERSISTENT_VOLUME_INFORMATION; } FILE_FS_PERSISTENT_VOLUME_INFORMATION, *PFILE_FS_PERSISTENT_VOLUME_INFORMATION;
// FltFsControlFile or ZwFsControlFile call # to query persistant volume info (if used in DDK) // FltFsControlFile or ZwFsControlFile call # to query persistent volume info (if used in DDK)
// CAN ALSO USE WITH: DeviceIOControl (which is what we will do) // CAN ALSO USE WITH: DeviceIOControl (which is what we will do)
#define FSCTL_QUERY_PERSISTENT_VOLUME_STATE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 143, METHOD_BUFFERED, FILE_ANY_ACCESS) // FILE_FS_PERSISTENT_VOLUME_INFORMATION #define FSCTL_QUERY_PERSISTENT_VOLUME_STATE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 143, METHOD_BUFFERED, FILE_ANY_ACCESS) // FILE_FS_PERSISTENT_VOLUME_INFORMATION

View File

@ -244,7 +244,7 @@ void DriverAssist::LogMessage_Multi(
if (u.info.Type != REG_SZ || u.info.DataLength >= sizeof(u)) if (u.info.Type != REG_SZ || u.info.DataLength >= sizeof(u))
return; return;
// go through a ',' or ';' separated list of messge ID's, return message id is not listed // go through a ',' or ';' separated list of message ID's, return message id is not listed
WCHAR *ptr = (WCHAR *)u.info.Data; WCHAR *ptr = (WCHAR *)u.info.Data;
while (*ptr) { while (*ptr) {
if (_wtoi(ptr) == (msgid & 0xFFFF)) if (_wtoi(ptr) == (msgid & 0xFFFF))

View File

@ -1085,7 +1085,7 @@ HANDLE GuiServer::GetJobObjectForAssign(const WCHAR *boxname)
} }
// //
// we want to allow sandboxed processes to use jobs of thair own // we want to allow sandboxed processes to use jobs of their own
// with windows 8 we can have nested, a boxed process may want to use BREAKAWAY // with windows 8 we can have nested, a boxed process may want to use BREAKAWAY
// hence we no longer prevent breaking away from our job, // hence we no longer prevent breaking away from our job,
// instead we re assign the job on each initialization, like it was done for the initial one // instead we re assign the job on each initialization, like it was done for the initial one

View File

@ -1025,7 +1025,7 @@ BOOL ProcessServer::RunSandboxedSetDacl(
// in Sandboxie version 5.57 instead of using the anonymous SID // in Sandboxie version 5.57 instead of using the anonymous SID
// we can use box specific custom SIDs, // we can use box specific custom SIDs,
// when comparing we skip the revision and the SubAuthorityCount // when comparing we skip the revision and the SubAuthorityCount
// also we conpare only teh domain portion of the SID as the rest // also we conpare only the domain portion of the SID as the rest
// will be different for each box // will be different for each box
// //
@ -1128,7 +1128,7 @@ BOOL ProcessServer::RunSandboxedStripPrivilege(HANDLE NewTokenHandle, LPCWSTR lp
BOOL ProcessServer::RunSandboxedStripPrivileges(HANDLE NewTokenHandle) BOOL ProcessServer::RunSandboxedStripPrivileges(HANDLE NewTokenHandle)
{ {
BOOLEAN ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_TCB_NAME); // security critical BOOLEAN ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_TCB_NAME); // security critical
if (ok) ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_CREATE_TOKEN_NAME); // usualyl not held, but in case if (ok) ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_CREATE_TOKEN_NAME); // usually not held, but in case
//if (ok) ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_ASSIGNPRIMARYTOKEN_NAME); //if (ok) ok = RunSandboxedStripPrivilege(NewTokenHandle, SE_ASSIGNPRIMARYTOKEN_NAME);
return ok; return ok;
} }

View File

@ -840,7 +840,7 @@ FunctionEnd
Function CheckUpdates Function CheckUpdates
StrCpy $0 "instal" StrCpy $0 "install"
StrCmp $InstallType "Install" DoCheck StrCmp $InstallType "Install" DoCheck
StrCpy $0 "upgrade" StrCpy $0 "upgrade"

View File

@ -50,14 +50,14 @@ int CArchive::Open()
{ {
if(!theArc.IsOperational()) if(!theArc.IsOperational())
{ {
LogError("Couldnt open interface"); LogError("Couldn't open interface");
return 0; // failed return 0; // failed
} }
if(m_Archive) if(m_Archive)
{ {
LogError("archive is already open"); LogError("archive is already open");
return 0; // failes return 0; // fails
} }
if(!m_pDevice && !QFile::exists(m_ArchivePath)) if(!m_pDevice && !QFile::exists(m_ArchivePath))
@ -116,24 +116,24 @@ int CArchive::Open()
{ {
m_Archive->In->GetProperty(i, j, &prop); m_Archive->In->GetProperty(i, j, &prop);
QVariant Propertie; QVariant Property;
switch (prop.vt) switch (prop.vt)
{ {
case VT_BSTR: Propertie = QString::fromStdWString(prop.bstrVal); break; case VT_BSTR: Property = QString::fromStdWString(prop.bstrVal); break;
case VT_UI1: Propertie = prop.bVal; break; case VT_UI1: Property = prop.bVal; break;
case VT_UI2: Propertie = prop.uiVal; break; case VT_UI2: Property = prop.uiVal; break;
case VT_UI4: Propertie = (qint32)prop.ulVal; break; case VT_UI4: Property = (qint32)prop.ulVal; break;
case VT_UI8: Propertie = (qint64)prop.uhVal.QuadPart; break; case VT_UI8: Property = (qint64)prop.uhVal.QuadPart; break;
case VT_BOOL: Propertie = VARIANT_BOOLToBool(prop.boolVal); break; case VT_BOOL: Property = VARIANT_BOOLToBool(prop.boolVal); break;
case VT_FILETIME: Propertie = *reinterpret_cast<qint64*>(&prop.filetime); break; // ToDo case VT_FILETIME: Property = *reinterpret_cast<qint64*>(&prop.filetime); break; // ToDo
default: default:
//TRACE(L"Unhandled archive property %S (%d)", QS2CS(GetPropertyName(j)), prop.vt); //TRACE(L"Unhandled archive property %S (%d)", QS2CS(GetPropertyName(j)), prop.vt);
case VT_EMPTY: case VT_EMPTY:
continue; continue;
} }
File.Properties.insert(GetPropertyName(j), Propertie); File.Properties.insert(GetPropertyName(j), Property);
//TRACE(L" >> File %S: %S=%S", QS2CS(File.Properties["Path"].toString()), QS2CS(GetPropertyName(j)), QS2CS(Propertie.toString())); //TRACE(L" >> File %S: %S=%S", QS2CS(File.Properties["Path"].toString()), QS2CS(GetPropertyName(j)), QS2CS(Property.toString()));
} }
m_Files.append(File); m_Files.append(File);
} }
@ -213,7 +213,7 @@ bool CArchive::Update(QMap<int, QIODevice*> *FileList, bool bDelete, int Level)
{ {
if(!theArc.IsOperational()) if(!theArc.IsOperational())
{ {
LogError("Couldnt open interface"); LogError("Couldn't open interface");
return false; return false;
} }
@ -307,11 +307,11 @@ bool CArchive::Update(QMap<int, QIODevice*> *FileList, bool bDelete, int Level)
CMyComPtr<IArchiveUpdateCallback2> callback(new CArchiveUpdater(this, Files)); CMyComPtr<IArchiveUpdateCallback2> callback(new CArchiveUpdater(this, Files));
if(OutArchive->UpdateItems(new CArchiveIO(m_pDevice ? m_pDevice : pFile, QIODevice::WriteOnly, m_pDevice == NULL), FileCount(), callback) != S_OK) if(OutArchive->UpdateItems(new CArchiveIO(m_pDevice ? m_pDevice : pFile, QIODevice::WriteOnly, m_pDevice == NULL), FileCount(), callback) != S_OK)
{ {
LogError("Error(s) while updateing Archive"); LogError("Error(s) while updating Archive");
return false; return false;
} }
Close(); // close even if it wasnt open to clear the file list Close(); // close even if it wasn't open to clear the file list
if(bUpdate) if(bUpdate)
{ {
if(!m_pDevice) if(!m_pDevice)
@ -449,7 +449,7 @@ SArcInfo GetArcInfo(const QString &FileName)
ArcInfo.FileName.remove(Pos, ArcInfo.FileName.length()-Pos); ArcInfo.FileName.remove(Pos, ArcInfo.FileName.length()-Pos);
} }
// RAR spetial case // RAR special case
if(ArcInfo.ArchiveExt.indexOf(QRegularExpression("(rar|rev|r[0-9]{2,})", QRegularExpression::CaseInsensitiveOption)) == 0) if(ArcInfo.ArchiveExt.indexOf(QRegularExpression("(rar|rev|r[0-9]{2,})", QRegularExpression::CaseInsensitiveOption)) == 0)
{ {
if(ArcInfo.ArchiveExt.compare("rar", Qt::CaseInsensitive) == 0 || ArcInfo.ArchiveExt.compare("rev", Qt::CaseInsensitive) == 0) // is this a new naming scheme if(ArcInfo.ArchiveExt.compare("rar", Qt::CaseInsensitive) == 0 || ArcInfo.ArchiveExt.compare("rev", Qt::CaseInsensitive) == 0) // is this a new naming scheme

View File

@ -74,17 +74,17 @@ STDMETHODIMP CArchiveExtractor::SetOperationResult (Int32 operationResult)
break; break;
case NArchive::NExtract::NOperationResult::kUnSupportedMethod: case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
//TRACE(L"... Error (Un Supported Method)"); //TRACE(L"... Error (Un Supported Method)");
m_pArchive->LogError(QString("File Extraction Failes (Un Supported Method): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString())); m_pArchive->LogError(QString("File Extraction Fails (Un Supported Method): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString()));
m_pArchive->FileProperty(m_Index, "Error", "Un Supported Method"); m_pArchive->FileProperty(m_Index, "Error", "Un Supported Method");
break; break;
case NArchive::NExtract::NOperationResult::kCRCError: case NArchive::NExtract::NOperationResult::kCRCError:
//TRACE(L"... Error (CRC)"); //TRACE(L"... Error (CRC)");
m_pArchive->LogError(QString("File Extraction Failes (CRC Error): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString())); m_pArchive->LogError(QString("File Extraction Fails (CRC Error): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString()));
m_pArchive->FileProperty(m_Index, "Error", "CRC Error"); m_pArchive->FileProperty(m_Index, "Error", "CRC Error");
break; break;
case NArchive::NExtract::NOperationResult::kDataError: case NArchive::NExtract::NOperationResult::kDataError:
//TRACE(L"... Error (Data)"); //TRACE(L"... Error (Data)");
m_pArchive->LogError(QString("File Extraction Failes (Data Error): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString())); m_pArchive->LogError(QString("File Extraction Fails (Data Error): %1").arg(m_pArchive->FileProperty(m_Index, "Path").toString()));
m_pArchive->FileProperty(m_Index, "Error", "Data Error"); m_pArchive->FileProperty(m_Index, "Error", "Data Error");
break; break;
default: Q_ASSERT(0); default: Q_ASSERT(0);

View File

@ -117,7 +117,7 @@ SPropertyNames::SPropertyNames()
Map.insert(kpidPhySize, "PhySize"); Map.insert(kpidPhySize, "PhySize");
Map.insert(kpidHeadersSize, "HeadersSize"); Map.insert(kpidHeadersSize, "HeadersSize");
Map.insert(kpidChecksum, "Checksum"); Map.insert(kpidChecksum, "Checksum");
Map.insert(kpidCharacts, "Characts"); Map.insert(kpidCharacts, "Characters");
Map.insert(kpidVa, "Va"); Map.insert(kpidVa, "Va");
Map.insert(kpidId, "Id"); Map.insert(kpidId, "Id");
Map.insert(kpidShortName, "ShortName"); Map.insert(kpidShortName, "ShortName");

View File

@ -62,7 +62,7 @@ HRESULT IsArchiveItemProp(IInArchive *archive, UInt32 index, PROPID propID, bool
QString GetPropertyName(PROPID PropID); QString GetPropertyName(PROPID PropID);
/* /*
DEFINE_GUID(CLSID_7z, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00); // 7z - 7-Zip Arcive DEFINE_GUID(CLSID_7z, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00); // 7z - 7-Zip Archive
DEFINE_GUID(CLSID_rar, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x03, 0x00, 0x00); // rar r00 - WinRar Archive DEFINE_GUID(CLSID_rar, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x03, 0x00, 0x00); // rar r00 - WinRar Archive
DEFINE_GUID(CLSID_cab, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0x00); // cab - Cabinet File DEFINE_GUID(CLSID_cab, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0x00); // cab - Cabinet File
DEFINE_GUID(CLSID_tar, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEE, 0x00, 0x00); // tar - Tar Archive DEFINE_GUID(CLSID_tar, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xEE, 0x00, 0x00); // tar - Tar Archive

View File

@ -40,11 +40,11 @@ public:
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize)
{ {
quint64 writen = m_pFile->write((const char*)data, size); quint64 written = m_pFile->write((const char*)data, size);
if(writen == -1) if(written == -1)
return E_FAIL; return E_FAIL;
if(processedSize) if(processedSize)
*processedSize = writen; *processedSize = written;
return S_OK; return S_OK;
} }

View File

@ -132,7 +132,7 @@ void C7zWorker::OnExtractAllFiles()
m_Lock.Release(); m_Lock.Release();
SArcInfo Info = GetArcInfo(m_ArchivePath); SArcInfo Info = GetArcInfo(m_ArchivePath);
if(Info.FormatIndex == 0) // not an arcive just a split file if(Info.FormatIndex == 0) // not an archive just a split file
{ {
if(!QDir().exists(m_WorkingPath)) if(!QDir().exists(m_WorkingPath))
QDir().mkpath(m_WorkingPath); QDir().mkpath(m_WorkingPath);

View File

@ -22,7 +22,7 @@ public:
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream); STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream);
STDMETHOD(SetOperationResult)(Int32 operationResult) {return S_OK;} STDMETHOD(SetOperationResult)(Int32 operationResult) {return S_OK;}
// depricated // deprecated
STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) {return S_FALSE;} STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) {return S_FALSE;}
STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) {return S_FALSE;} STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) {return S_FALSE;}

View File

@ -158,8 +158,8 @@ qint64 CSplitFile::writeData(const char *data, qint64 len)
if(m_Index == -1) if(m_Index == -1)
return -1; return -1;
quint64 writen = 0; quint64 written = 0;
while(len - writen) while(len - written)
{ {
if(m_Index >= m_FileParts.count()) if(m_Index >= m_FileParts.count())
{ {
@ -168,19 +168,19 @@ qint64 CSplitFile::writeData(const char *data, qint64 len)
m_FileParts.append(pFile); m_FileParts.append(pFile);
} }
quint64 uToGo = len - writen; quint64 uToGo = len - written;
quint64 uAvail = m_PartSize - m_FileParts[m_Index]->pos(); quint64 uAvail = m_PartSize - m_FileParts[m_Index]->pos();
if(uToGo > uAvail) if(uToGo > uAvail)
uToGo = uAvail; uToGo = uAvail;
quint64 Tmp = m_FileParts[m_Index]->write(data + writen, uToGo); quint64 Tmp = m_FileParts[m_Index]->write(data + written, uToGo);
if(Tmp == -1) if(Tmp == -1)
return -1; return -1;
writen += Tmp; written += Tmp;
m_Position += Tmp; m_Position += Tmp;
if(m_FileParts[m_Index]->pos() >= (qint64)m_PartSize) if(m_FileParts[m_Index]->pos() >= (qint64)m_PartSize)
m_Index++; m_Index++;
} }
return writen; return written;
} }

View File

@ -288,9 +288,9 @@ QString FormatUnit(quint64 Size, int Precision)
//QString FormatTime(quint64 Time, bool ms) //QString FormatTime(quint64 Time, bool ms)
//{ //{
// int miliseconds = 0; // int milliseconds = 0;
// if (ms) { // if (ms) {
// miliseconds = Time % 1000; // milliseconds = Time % 1000;
// Time /= 1000; // Time /= 1000;
// } // }
// int seconds = Time % 60; // int seconds = Time % 60;
@ -300,7 +300,7 @@ QString FormatUnit(quint64 Size, int Precision)
// int hours = Time % 24; // int hours = Time % 24;
// int days = Time / 24; // int days = Time / 24;
// if(ms && (minutes == 0) && (hours == 0) && (days == 0)) // if(ms && (minutes == 0) && (hours == 0) && (days == 0))
// return QString().sprintf("%02d.%04d", seconds, miliseconds); // return QString().sprintf("%02d.%04d", seconds, milliseconds);
// if((hours == 0) && (days == 0)) // if((hours == 0) && (days == 0))
// return QString().sprintf("%02d:%02d", minutes, seconds); // return QString().sprintf("%02d:%02d", minutes, seconds);
// if (days == 0) // if (days == 0)

View File

@ -9,7 +9,7 @@
bool IsDebuggerAttached() bool IsDebuggerAttached()
{ {
bool isDebuggerPresent = false; // Note: on linux change edit the value in debgger to indicate precense bool isDebuggerPresent = false; // Note: on linux change edit the value in debgger to indicate presence
#ifdef WIN32 #ifdef WIN32
if (IsDebuggerPresent()) if (IsDebuggerPresent())
return true; return true;
@ -200,7 +200,7 @@ static LONG __stdcall MyCrashHandlerExceptionFilter(EXCEPTION_POINTERS* pEx)
#ifdef _M_IX86 #ifdef _M_IX86
if (pEx->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW) if (pEx->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW)
{ {
// be sure that we have enought space... // be sure that we have enough space...
static char MyStack[1024*128]; static char MyStack[1024*128];
// it assumes that DS and SS are the same!!! (this is the case for Win32) // it assumes that DS and SS are the same!!! (this is the case for Win32)
// change the stack only if the selectors are the same (this is the case for Win32) // change the stack only if the selectors are the same (this is the case for Win32)

View File

@ -111,7 +111,7 @@ public:
} }
} }
// fill whats left of the line // fill what's left of the line
/*top *= 4; /*top *= 4;
if (top < m_Graph.bytesPerLine()) // fill rest white if (top < m_Graph.bytesPerLine()) // fill rest white
memset(dest + top, 0xFF, m_Graph.bytesPerLine() - top);*/ memset(dest + top, 0xFF, m_Graph.bytesPerLine() - top);*/

View File

@ -8,8 +8,8 @@
/********************************************************************************************** /**********************************************************************************************
* CThreadLock * CThreadLock
* This class allows to wait for events form a differet thread. * This class allows to wait for events form a differet thread.
* When Lock returns successfuly it is guaranted that the other thread have issued a release. * When Lock returns successfully it is guaranteed that the other thread have issued a release.
* This works undependant of the real order Lock and Release ware calles * This works undependant of the real order Lock and Release ware called
*/ */
class MISCHELPERS_EXPORT CThreadLock class MISCHELPERS_EXPORT CThreadLock

View File

@ -112,7 +112,7 @@ QStringList CPanelView::CopyHeader()
QAbstractItemModel* pModel = GetModel(); QAbstractItemModel* pModel = GetModel();
QTreeView * pView = GetView(); QTreeView * pView = GetView();
QStringList Headder; QStringList Header;
for (int i = 0; i < pModel->columnCount(); i++) for (int i = 0; i < pModel->columnCount(); i++)
{ {
if (/*!m_CopyAll &&*/ pView->isColumnHidden(i) && !m_ForcedColumns.contains(i)) if (/*!m_CopyAll &&*/ pView->isColumnHidden(i) && !m_ForcedColumns.contains(i))
@ -120,9 +120,9 @@ QStringList CPanelView::CopyHeader()
QString Cell = pModel->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString(); QString Cell = pModel->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString();
if (!m_SimpleFormat) if (!m_SimpleFormat)
Cell = "|" + Cell + "|"; Cell = "|" + Cell + "|";
Headder.append(Cell); Header.append(Cell);
} }
return Headder; return Header;
} }
QStringList CPanelView::CopyRow(const QModelIndex& ModelIndex, int Level) QStringList CPanelView::CopyRow(const QModelIndex& ModelIndex, int Level)
@ -176,11 +176,11 @@ void CPanelView::OnCopyPanel()
FormatAndCopy(DumpPanel()); FormatAndCopy(DumpPanel());
} }
void CPanelView::FormatAndCopy(QList<QStringList> Rows, bool Headder) void CPanelView::FormatAndCopy(QList<QStringList> Rows, bool Header)
{ {
int RowCount = Rows.length(); int RowCount = Rows.length();
if (Headder) if (Header)
{ {
Rows.prepend(QStringList()); Rows.prepend(QStringList());
Rows.prepend(CopyHeader()); Rows.prepend(CopyHeader());
@ -188,14 +188,14 @@ void CPanelView::FormatAndCopy(QList<QStringList> Rows, bool Headder)
} }
QStringList TextRows; QStringList TextRows;
if (m_SimpleFormat || !Headder) if (m_SimpleFormat || !Header)
{ {
foreach(const QStringList& Row, Rows) foreach(const QStringList& Row, Rows)
TextRows.append(Row.join(m_CellSeparator)); TextRows.append(Row.join(m_CellSeparator));
} }
else if(Rows.size() > (Headder ? 3 : 0)) else if(Rows.size() > (Header ? 3 : 0))
{ {
int Columns = Rows[Headder ? 3 : 0].count(); int Columns = Rows[Header ? 3 : 0].count();
QVector<int> ColumnWidths(Columns, 0); QVector<int> ColumnWidths(Columns, 0);
foreach(const QStringList& Row, Rows) foreach(const QStringList& Row, Rows)

View File

@ -48,7 +48,7 @@ protected slots:
protected: protected:
void UpdateCopyMenu(); void UpdateCopyMenu();
void AddCopyMenu(QMenu* pMenu, bool bAddSeparator = true); void AddCopyMenu(QMenu* pMenu, bool bAddSeparator = true);
void FormatAndCopy(QList<QStringList> Rows, bool Headder = true); void FormatAndCopy(QList<QStringList> Rows, bool Header = true);
QMenu* m_pMenu; QMenu* m_pMenu;

View File

@ -10,7 +10,7 @@ class MISCHELPERS_EXPORT CSortFilterProxyModel: public QSortFilterProxyModel
Q_OBJECT Q_OBJECT
public: public:
CSortFilterProxyModel(QObject* parrent = 0) : QSortFilterProxyModel(parrent) CSortFilterProxyModel(QObject* parent = 0) : QSortFilterProxyModel(parent)
{ {
m_bHighLight = false; m_bHighLight = false;
m_iColumn = 0; m_iColumn = 0;

View File

@ -49,7 +49,7 @@ CSplitTreeView::CSplitTreeView(QAbstractItemModel* pModel, QWidget *parent) : QW
// List // List
// Note: It would be convinient to use QTreeViewEx here but qt does not scale well when there are too many columns // Note: It would be convenient to use QTreeViewEx here but qt does not scale well when there are too many columns
// hence we will add and remove columns at the model level directly. // hence we will add and remove columns at the model level directly.
// This way we can get out operational CPU usage to be quite comparable with TaskInfo na other advanced task managers // This way we can get out operational CPU usage to be quite comparable with TaskInfo na other advanced task managers
// Plus there are to many columns to cram them into one simple context menu :-) // Plus there are to many columns to cram them into one simple context menu :-)

View File

@ -9,7 +9,7 @@ class MISCHELPERS_EXPORT COneColumnModel : public QIdentityProxyModel
{ {
Q_OBJECT Q_OBJECT
public: public:
COneColumnModel( QObject* parrent = 0) : QIdentityProxyModel(parrent) {} COneColumnModel( QObject* parent = 0) : QIdentityProxyModel(parent) {}
int columnCount(const QModelIndex &parent = QModelIndex()) const { return 1; } int columnCount(const QModelIndex &parent = QModelIndex()) const { return 1; }
}; };

View File

@ -214,7 +214,7 @@ void CTreeItemModel::Purge(STreeNode* pParent, const QModelIndex &parent, QHash<
pNode->Icon.clear(); pNode->Icon.clear();
} }
if(End != -1) // remove whats to be removed at once if(End != -1) // remove what's to be removed at once
{ {
Begin = i + 1; Begin = i + 1;

View File

@ -256,7 +256,7 @@ struct SQVariants{
Map.insert("Point" , 25); Map.insert("Point" , 25);
Map.insert("PointF" , 26); Map.insert("PointF" , 26);
Map.insert("RegExp" , 27);*/ Map.insert("RegExp" , 27);*/
Map.insert("Hash" , QVariant::Hash); // conainter type Map.insert("Hash" , QVariant::Hash); // container type
/*Map.insert("Font" , 64); /*Map.insert("Font" , 64);
Map.insert("Pixmap" , 65); Map.insert("Pixmap" , 65);

View File

@ -308,8 +308,8 @@ void CBoxBorder::TimerProc()
// //
// in windows 10 and 11 if this is truly fullscreen the taskbar does not appear when hidden // in windows 10 and 11 if this is truly fullscreen the taskbar does not appear when hidden
// if its 1 px less on any side it works normally, so we pick bottom as thets where the taskbar usualyl is // if its 1 px less on any side it works normally, so we pick bottom as that's where the taskbar usually is
// but with the taskbar to the side it woudl also work // but with the taskbar to the side it would also work
// //
if (rect.bottom == Monitor.rcWork.bottom) if (rect.bottom == Monitor.rcWork.bottom)

View File

@ -255,7 +255,7 @@ bool CBoxedProcess::InitProcessInfo()
#undef ProcessCommandLineInformation #undef ProcessCommandLineInformation
} }
if (m_CommandLine.isEmpty()) // fall back to teh win 7 method - requirers PROCESS_VM_READ if (m_CommandLine.isEmpty()) // fall back to the win 7 method - requirers PROCESS_VM_READ
{ {
m_CommandLine = CBoxedProcess__GetPebString(ProcessHandle, PhpoCommandLine); m_CommandLine = CBoxedProcess__GetPebString(ProcessHandle, PhpoCommandLine);
} }
@ -330,7 +330,7 @@ bool CBoxedProcess::IsSuspended() const
{ {
bool isSuspended = true; bool isSuspended = true;
// todo: do that globaly once per sec for all boxed processes // todo: do that globally once per sec for all boxed processes
// Note: If the specified process is a 64-bit process and the caller is a 32-bit process, this function fails and the last error code is ERROR_PARTIAL_COPY (299). // Note: If the specified process is a 64-bit process and the caller is a 32-bit process, this function fails and the last error code is ERROR_PARTIAL_COPY (299).
HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);

View File

@ -268,7 +268,7 @@ SB_STATUS CSbieIni::RenameSection( const QString& NewName, bool deleteOld) // No
} }
// if the name is the same we first delete than write, // if the name is the same we first delete than write,
// else we first write and than delete, fro safety reasons // else we first write and than delete, for safety reasons
if (deleteOld && SameName) if (deleteOld && SameName)
goto do_delete; goto do_delete;

View File

@ -117,7 +117,7 @@
mmw.show(); mmw.show();
return app.exec(); return app.exec();
} }
\endcode \end code
Once this QtSingleApplication instance is destroyed (normally when Once this QtSingleApplication instance is destroyed (normally when
the process exits or crashes), when the user next attempts to run the the process exits or crashes), when the user next attempts to run the

View File

@ -93,7 +93,7 @@ void CBoxMonitor::run()
void CBoxMonitor::UpdateBox(const QString& Path) void CBoxMonitor::UpdateBox(const QString& Path)
{ {
// Note: this private functin runs in the main thread // Note: this private function runs in the main thread
m_Mutex.lock(); m_Mutex.lock();
SBox Box = m_Boxes.value(Path); SBox Box = m_Boxes.value(Path);

View File

@ -78,8 +78,8 @@ static BOOL CALLBACK FindBestChildProc(HWND hwnd, LPARAM lParam)
// ourselves, and find the one that best fits under the mouse - // ourselves, and find the one that best fits under the mouse -
// the smallest window that fits, in fact. // the smallest window that fits, in fact.
// //
// I've tested this on alot of different apps, and it seems // I've tested this on a lot of different apps, and it seems
// to work flawlessly - in fact, I havn't found a situation yet // to work flawlessly - in fact, I haven't found a situation yet
// that this method doesn't work on.....we'll see! // that this method doesn't work on.....we'll see!
// //
// Inputs: // Inputs:

View File

@ -1494,7 +1494,7 @@ SB_STATUS CSandMan::DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, boo
{ {
SB_PROGRESS Status; SB_PROGRESS Status;
if (Mode != eForDelete && !DeleteShapshots && pBox->HasSnapshots()) { // in auto delete mdoe always return to last snapshot if (Mode != eForDelete && !DeleteShapshots && pBox->HasSnapshots()) { // in auto delete mode always return to last snapshot
QString Current; QString Current;
QString Default = pBox->GetDefaultSnapshot(&Current); QString Default = pBox->GetDefaultSnapshot(&Current);
Status = pBox->SelectSnapshot(Mode == eAuto ? Current : Default); Status = pBox->SelectSnapshot(Mode == eAuto ? Current : Default);
@ -1997,11 +1997,11 @@ void CSandMan::OnLogSbieMessage(quint32 MsgCode, const QStringList& MsgData, qui
OnLogMessage(Message); OnLogMessage(Message);
if ((MsgCode & 0xFFFF) == 6004) // certificat error if ((MsgCode & 0xFFFF) == 6004) // certificate error
return; // dont pop that one up return; // don't pop that one up
if ((MsgCode & 0xFFFF) == 2111) // process open denided if ((MsgCode & 0xFFFF) == 2111) // process open denided
return; // dont pop that one up return; // don't pop that one up
if(MsgCode != 0 && theConf->GetBool("Options/ShowNotifications", true) && !IsDisableMessages()) if(MsgCode != 0 && theConf->GetBool("Options/ShowNotifications", true) && !IsDisableMessages())
m_pPopUpWindow->AddLogMessage(Message, MsgCode, MsgData, ProcessId); m_pPopUpWindow->AddLogMessage(Message, MsgCode, MsgData, ProcessId);

View File

@ -29,7 +29,7 @@ bool CSandMan::OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteShapshots, bool
if (!pBoxEx) return false; if (!pBoxEx) return false;
if (pBoxEx->m_pRecoveryWnd != NULL) { if (pBoxEx->m_pRecoveryWnd != NULL) {
pBoxEx->m_pRecoveryWnd->close(); pBoxEx->m_pRecoveryWnd->close();
// todo: resuse window? // todo: reuse window?
} }
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox, false, this); CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox, false, this);

View File

@ -410,7 +410,7 @@ void CSandMan::OnSysTray(QSystemTrayIcon::ActivationReason Reason)
bool bAdded = false; bool bAdded = false;
if (m_pTrayBoxes->topLevelItemCount() == 0) if (m_pTrayBoxes->topLevelItemCount() == 0)
bAdded = true; // triger size refresh bAdded = true; // trigger size refresh
QMap<QString, QTreeWidgetItem*> OldBoxes; QMap<QString, QTreeWidgetItem*> OldBoxes;
for (int i = 0; i < m_pTrayBoxes->topLevelItemCount(); ++i) for (int i = 0; i < m_pTrayBoxes->topLevelItemCount(); ++i)

View File

@ -267,7 +267,7 @@ void CFileView::OnFileMenu(const QPoint&)
QString LinkName = LinkPath.mid(LinkPath.lastIndexOf("\\") + 1); QString LinkName = LinkPath.mid(LinkPath.lastIndexOf("\\") + 1);
QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\"); QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\");
//Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shorcut in"), Path).replace("/", "\\"); //Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shortcut in"), Path).replace("/", "\\");
//if (Path.isEmpty()) //if (Path.isEmpty())
// return; // return;

View File

@ -843,7 +843,7 @@ void CSbieView::OnGroupAction(QAction* Action)
{ {
QString Group = m_pSbieModel->GetID(ModelIndex).toString(); QString Group = m_pSbieModel->GetID(ModelIndex).toString();
QStringList Items = m_Groups.take(Group); // remove groupe QStringList Items = m_Groups.take(Group); // remove group
// remove from parents // remove from parents
for (auto I = m_Groups.begin(); I != m_Groups.end(); ++I) { for (auto I = m_Groups.begin(); I != m_Groups.end(); ++I) {
@ -899,7 +899,7 @@ void CSbieView::OnGroupAction(QAction* Action)
} }
} }
} }
else // move to groupe else // move to group
{ {
QString Group = Action->data().toString(); QString Group = Action->data().toString();
@ -1391,7 +1391,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList<CSandBoxPtr>& SandB
} }
QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\"); QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\");
//Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shorcut in"), Path).replace("/", "\\"); //Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shortcut in"), Path).replace("/", "\\");
//if (Path.isEmpty()) //if (Path.isEmpty())
// return; // return;
@ -1461,7 +1461,7 @@ void CSbieView::OnProcessAction(QAction* Action, const QList<CBoxedProcessPtr>&
QString LinkPath = pProcess->GetFileName(); QString LinkPath = pProcess->GetFileName();
QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\"); QString Path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).replace("/", "\\");
//Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shorcut in"), Path).replace("/", "\\"); //Path = QFileDialog::getExistingDirectory(this, tr("Select Directory to create Shortcut in"), Path).replace("/", "\\");
//if (Path.isEmpty()) //if (Path.isEmpty())
// return; // return;

View File

@ -10,7 +10,7 @@
//class CTraceFilterProxyModel : public CSortFilterProxyModel //class CTraceFilterProxyModel : public CSortFilterProxyModel
//{ //{
//public: //public:
// CTraceFilterProxyModel(QObject* parrent = 0) : CSortFilterProxyModel(parrent) // CTraceFilterProxyModel(QObject* parent = 0) : CSortFilterProxyModel(parent)
// { // {
// m_FilterPid = 0; // m_FilterPid = 0;
// m_FilterTid = 0; // m_FilterTid = 0;

View File

@ -40,7 +40,7 @@ CNewBoxWindow::CNewBoxWindow(QWidget *parent)
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eHardened), tr("Security Hardened Sandbox"), (int)CSandBoxPlus::eHardened); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eHardened), tr("Security Hardened Sandbox"), (int)CSandBoxPlus::eHardened);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefaultPlus), tr("Sandbox with Data Protection"), (int)CSandBoxPlus::eDefaultPlus); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefaultPlus), tr("Sandbox with Data Protection"), (int)CSandBoxPlus::eDefaultPlus);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefault), tr("Standard Isolation Sandbox (Default)"), (int)CSandBoxPlus::eDefault); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefault), tr("Standard Isolation Sandbox (Default)"), (int)CSandBoxPlus::eDefault);
//ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eInsecure), tr("UNSECURE Configuration (please change)"), (int)CSandBoxPlus::eInsecure); //ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eInsecure), tr("INSECURE Configuration (please change)"), (int)CSandBoxPlus::eInsecure);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBoxPlus), tr("Application Compartment with Data Protection"), (int)CSandBoxPlus::eAppBoxPlus); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBoxPlus), tr("Application Compartment with Data Protection"), (int)CSandBoxPlus::eAppBoxPlus);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBox), tr("Application Compartment (NO Isolation)"), (int)CSandBoxPlus::eAppBox); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBox), tr("Application Compartment (NO Isolation)"), (int)CSandBoxPlus::eAppBox);

View File

@ -391,7 +391,7 @@ void COptionsWindow::AddAccessEntry(EAccessType Type, EAccessMode Mode, QString
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// File and Registry entries auto append a '*' wildcard // File and Registry entries auto append a '*' wildcard
// when thay don't contain any. // when they don't contain any.
// Prepanding '|' disables this behavioure // Prepanding '|' disables this behavioure
// //

View File

@ -56,7 +56,7 @@ void COptionsWindow::CreateGeneral()
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eHardened), tr("Security Hardened Sandbox"), (int)CSandBoxPlus::eHardened); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eHardened), tr("Security Hardened Sandbox"), (int)CSandBoxPlus::eHardened);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefaultPlus), tr("Sandbox with Data Protection"), (int)CSandBoxPlus::eDefaultPlus); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefaultPlus), tr("Sandbox with Data Protection"), (int)CSandBoxPlus::eDefaultPlus);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefault), tr("Standard Isolation Sandbox (Default)"), (int)CSandBoxPlus::eDefault); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eDefault), tr("Standard Isolation Sandbox (Default)"), (int)CSandBoxPlus::eDefault);
//ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eInsecure), tr("UNSECURE Configuration (please change)"), (int)CSandBoxPlus::eInsecure); //ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eInsecure), tr("INSECURE Configuration (please change)"), (int)CSandBoxPlus::eInsecure);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBoxPlus), tr("Application Compartment with Data Protection"), (int)CSandBoxPlus::eAppBoxPlus); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBoxPlus), tr("Application Compartment with Data Protection"), (int)CSandBoxPlus::eAppBoxPlus);
ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBox), tr("Application Compartment (NO Isolation)"), (int)CSandBoxPlus::eAppBox); ui.cmbBoxType->addItem(theGUI->GetBoxIcon(CSandBoxPlus::eAppBox), tr("Application Compartment (NO Isolation)"), (int)CSandBoxPlus::eAppBox);

View File

@ -123,7 +123,7 @@ void COptionsWindow::SaveGroups()
QTreeWidgetItem* pItem = ui.treeGroups->topLevelItem(i); QTreeWidgetItem* pItem = ui.treeGroups->topLevelItem(i);
QString GroupName = pItem->data(0, Qt::UserRole).toString(); QString GroupName = pItem->data(0, Qt::UserRole).toString();
if (GroupName.isEmpty()) if (GroupName.isEmpty())
continue; // this is a template entry, dont save continue; // this is a template entry, don't save
QStringList Programs; QStringList Programs;
for (int j = 0; j < pItem->childCount(); j++) for (int j = 0; j < pItem->childCount(); j++)
Programs.append(pItem->child(j)->data(0, Qt::UserRole).toString()); Programs.append(pItem->child(j)->data(0, Qt::UserRole).toString());
@ -265,12 +265,12 @@ void COptionsWindow::OnDelProg()
OnOptChanged(); OnOptChanged();
} }
void COptionsWindow::CopyGroupToList(const QString& Groupe, QTreeWidget* pTree, bool disabled) void COptionsWindow::CopyGroupToList(const QString& Group, QTreeWidget* pTree, bool disabled)
{ {
for (int i = 0; i < ui.treeGroups->topLevelItemCount(); i++) for (int i = 0; i < ui.treeGroups->topLevelItemCount(); i++)
{ {
QTreeWidgetItem* pItem = ui.treeGroups->topLevelItem(i); QTreeWidgetItem* pItem = ui.treeGroups->topLevelItem(i);
if (pItem->data(0, Qt::UserRole).toString().compare(Groupe, Qt::CaseInsensitive) == 0) if (pItem->data(0, Qt::UserRole).toString().compare(Group, Qt::CaseInsensitive) == 0)
{ {
for (int j = 0; j < pItem->childCount(); j++) for (int j = 0; j < pItem->childCount(); j++)
{ {

View File

@ -44,7 +44,7 @@ void COptionsWindow::CreateNetwork()
void COptionsWindow::LoadINetAccess() void COptionsWindow::LoadINetAccess()
{ {
m_IsEnabledWFP = m_pBox->GetAPI()->GetGlobalSettings()->GetBool("NetworkEnableWFP", false); m_IsEnabledWFP = m_pBox->GetAPI()->GetGlobalSettings()->GetBool("NetworkEnableWFP", false);
// check if we are blockign globaly and if so adapt the behavioure accordingly // check if we are blockign globally and if so adapt the behavioure accordingly
m_WFPisBlocking = !m_pBox->GetAPI()->GetGlobalSettings()->GetBool("AllowNetworkAccess", true); m_WFPisBlocking = !m_pBox->GetAPI()->GetGlobalSettings()->GetBool("AllowNetworkAccess", true);
ui.lblNoWfp->setVisible(!m_IsEnabledWFP); // warn user that this is only user mode ui.lblNoWfp->setVisible(!m_IsEnabledWFP); // warn user that this is only user mode
@ -918,7 +918,7 @@ void COptionsWindow::OnTestNetFwRule()
// //
// rule merging // rule merging
// if the rule is for the same prog and has teh same action // if the rule is for the same prog and has the same action
// merge all rules with ip only together // merge all rules with ip only together
// merge all rules with ports only together // merge all rules with ports only together
// //

View File

@ -124,7 +124,7 @@ void COptionsWindow::ShowTemplates()
continue; continue;
if (I.key().isEmpty()) if (I.key().isEmpty())
continue; // dont show templates without a category (these are usually deprecated templates) continue; // don't show templates without a category (these are usually deprecated templates)
QString Name = I.value().first.mid(9); QString Name = I.value().first.mid(9);

View File

@ -380,7 +380,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
CreateGeneral(); CreateGeneral();
// Groupes // Groups
connect(ui.btnAddGroup, SIGNAL(clicked(bool)), this, SLOT(OnAddGroup())); connect(ui.btnAddGroup, SIGNAL(clicked(bool)), this, SLOT(OnAddGroup()));
connect(ui.btnAddProg, SIGNAL(clicked(bool)), this, SLOT(OnAddProg())); connect(ui.btnAddProg, SIGNAL(clicked(bool)), this, SLOT(OnAddProg()));
connect(ui.btnDelProg, SIGNAL(clicked(bool)), this, SLOT(OnDelProg())); connect(ui.btnDelProg, SIGNAL(clicked(bool)), this, SLOT(OnDelProg()));
@ -1151,7 +1151,7 @@ void COptionsWindow::SaveIniSection()
void COptionsWindow::TriggerPathReload() void COptionsWindow::TriggerPathReload()
{ {
// //
// this message makes all boxes reload thair path presets // this message makes all boxes reload their path presets
// //
DWORD bsm_app = BSM_APPLICATIONS; DWORD bsm_app = BSM_APPLICATIONS;

View File

@ -308,7 +308,7 @@ protected:
bool DelProgramFromGroup(const QString& Program, const QString& Group); bool DelProgramFromGroup(const QString& Program, const QString& Group);
QTreeWidgetItem* FindGroupByName(const QString& Group, bool bAdd = false); QTreeWidgetItem* FindGroupByName(const QString& Group, bool bAdd = false);
void CopyGroupToList(const QString& Groupe, QTreeWidget* pTree, bool disabled = false); void CopyGroupToList(const QString& Group, QTreeWidget* pTree, bool disabled = false);
QTreeWidgetItem* GetAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path); QTreeWidgetItem* GetAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path);
void SetAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path); void SetAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path);
void DelAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path); void DelAccessEntry(EAccessType Type, const QString& Program, EAccessMode Mode, const QString& Path);

View File

@ -49,7 +49,7 @@ void FixTriStateBoxPallete(QWidget* pWidget)
if (QApplication::style()->objectName() == "windows") { if (QApplication::style()->objectName() == "windows") {
// //
// the built in "windows" theme of Qt does not properly renderd PartiallyChecked // the built in "windows" theme of Qt does not properly rendered PartiallyChecked
// checkboxes, to remedi this issue we connect to the stateChanged slot // checkboxes, to remedi this issue we connect to the stateChanged slot
// and change the pattern to improve the rendering. // and change the pattern to improve the rendering.
// //

View File

@ -174,7 +174,7 @@ union SCertInfo {
valid : 1, // certificate is active valid : 1, // certificate is active
expired : 1, // certificate is expired but may be active expired : 1, // certificate is expired but may be active
outdated : 1, // certificate is expired, not anymore valid for the current build outdated : 1, // certificate is expired, not anymore valid for the current build
business : 1, // certificate is siutable for business use business : 1, // certificate is suitable for business use
evaluation: 1, // evaluation certificate evaluation: 1, // evaluation certificate
reservd_1 : 3, reservd_1 : 3,
reservd_2 : 8, reservd_2 : 8,
@ -182,7 +182,7 @@ union SCertInfo {
reservd_4 : 8; reservd_4 : 8;
qint32 qint32
expirers_in_sec : 30, expirers_in_sec : 30,
unused_1 : 1, // skim a couple high bits to use as flags flag, 0x3fffffff -> is 34 years count down isenough unused_1 : 1, // skim a couple high bits to use as flags flag, 0x3fffffff -> is 34 years count down is enough
about_to_expire : 1; about_to_expire : 1;
}; };
}; };

Some files were not shown because too many files have changed in this diff Show More