version 2.3.0

improved installer
improved log monitor
improved error messages
added support for devices plugged in after OverSight has started
This commit is contained in:
Patrick Wardle 2024-01-12 16:29:46 -10:00
parent eea43a5af2
commit 120d3f1bfd
12 changed files with 131 additions and 59 deletions

View File

@ -23,6 +23,7 @@
CD2F800D24455333009C3D77 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2F800B24455333009C3D77 /* AboutWindowController.m */; };
CD2F801724468A8C009C3D77 /* patrons.txt in Resources */ = {isa = PBXBuildFile; fileRef = CD2F801624468A8C009C3D77 /* patrons.txt */; };
CD6836682391DB6F00CF19C1 /* security.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD6836672391DB6F00CF19C1 /* security.plist */; };
CD7E47D42B5227B600B63153 /* OverSight Installer.app in Resources */ = {isa = PBXBuildFile; fileRef = CD7E47D32B5227B600B63153 /* OverSight Installer.app */; };
CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */; };
CD8FD5D623BAE2D200EFE0FB /* PrefsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD8FD5D423BAE2D200EFE0FB /* PrefsWindowController.m */; };
CD8FD5F623C05AD900EFE0FB /* RuleRow.m in Sources */ = {isa = PBXBuildFile; fileRef = CD8FD5F023C05AD800EFE0FB /* RuleRow.m */; };
@ -33,7 +34,6 @@
CDC60991263CBD36006D1332 /* AVMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60990263CBD36006D1332 /* AVMonitor.m */; };
CDC60994263CBEE7006D1332 /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60993263CBEE7006D1332 /* Client.m */; };
CDCBF0DE26499DFF001D9F9A /* Event.m in Sources */ = {isa = PBXBuildFile; fileRef = CDCBF0DD26499DFF001D9F9A /* Event.m */; };
CDE4C11A2B0EAA7A001521CE /* OverSight Installer.app in Resources */ = {isa = PBXBuildFile; fileRef = CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@ -77,6 +77,7 @@
CD2F800B24455333009C3D77 /* AboutWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutWindowController.m; sourceTree = "<group>"; };
CD2F801624468A8C009C3D77 /* patrons.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = patrons.txt; path = ../Shared/patrons.txt; sourceTree = "<group>"; };
CD6836672391DB6F00CF19C1 /* security.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = security.plist; sourceTree = "<group>"; };
CD7E47D32B5227B600B63153 /* OverSight Installer.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = "OverSight Installer.app"; sourceTree = "<group>"; };
CD8FD5D223BAE2D100EFE0FB /* PrefsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefsWindowController.h; sourceTree = "<group>"; };
CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Preferences.xib; sourceTree = "<group>"; };
CD8FD5D423BAE2D200EFE0FB /* PrefsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrefsWindowController.m; sourceTree = "<group>"; };
@ -95,7 +96,6 @@
CDC60993263CBEE7006D1332 /* Client.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; };
CDCBF0DC26499DFF001D9F9A /* Event.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; };
CDCBF0DD26499DFF001D9F9A /* Event.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Event.m; sourceTree = "<group>"; };
CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = "OverSight Installer.app"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -214,7 +214,7 @@
CDE09AF12919829000561CFF /* Uninstaller */ = {
isa = PBXGroup;
children = (
CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */,
CD7E47D32B5227B600B63153 /* OverSight Installer.app */,
);
path = Uninstaller;
sourceTree = "<group>";
@ -292,7 +292,7 @@
buildActionMask = 2147483647;
files = (
CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */,
CDE4C11A2B0EAA7A001521CE /* OverSight Installer.app in Resources */,
CD7E47D42B5227B600B63153 /* OverSight Installer.app in Resources */,
CD6836682391DB6F00CF19C1 /* security.plist in Resources */,
CD2F800C24455333009C3D77 /* AboutWindow.xib in Resources */,
7D16D6951F64E43300DB3161 /* UpdateWindow.xib in Resources */,
@ -465,10 +465,10 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO;
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
INFOPLIST_FILE = Application/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OverSight;
@ -476,7 +476,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks";
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight";
PRODUCT_NAME = OverSight;
@ -491,10 +491,10 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO;
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
INFOPLIST_FILE = Application/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OverSight;
@ -502,7 +502,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks";
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight";
PRODUCT_NAME = OverSight;

View File

@ -77,14 +77,14 @@ dispatch_source_t dispatchSource = nil;
}
//dbg msg
os_log_debug(logHandle, "validated %@", app);
os_log_debug(logHandle, "validated %{public}@", app);
//exec script
result = [self execScript:validatedApp arguments:args];
if(noErr != result)
{
//err msg
os_log_error(logHandle, "ERROR: failed to execute config script %@ (%d)", CONF_SCRIPT, result);
os_log_error(logHandle, "ERROR: failed to execute config script %{public}@ (%d)", CONF_SCRIPT, result);
//bail
goto bail;
@ -99,7 +99,7 @@ bail:
if(YES != [[NSFileManager defaultManager] removeItemAtPath:validatedApp error:nil])
{
//err msg
os_log_error(logHandle, "ERROR: failed to remove validated app %@", validatedApp);
os_log_error(logHandle, "ERROR: failed to remove validated app %{public}@", validatedApp);
//set err
result = -1;
@ -225,7 +225,7 @@ bail:
appCopy = [NSTemporaryDirectory() stringByAppendingPathComponent:app.lastPathComponent];
//dbg msg
os_log_debug(logHandle, "validating %@", appCopy);
os_log_debug(logHandle, "validating %{public}@", appCopy);
//delete if old copy is there
if(YES == [defaultManager fileExistsAtPath:appCopy])
@ -234,7 +234,7 @@ bail:
if(YES != [defaultManager removeItemAtPath:appCopy error:&error])
{
//err msg
os_log_error(logHandle, "ERROR: failed to delete %@ (error: %@)", appCopy, error.description);
os_log_error(logHandle, "ERROR: failed to delete %{public}@ (error: %{public}@)", appCopy, error.description);
}
}
@ -242,7 +242,7 @@ bail:
if(YES != [defaultManager copyItemAtPath:app toPath:appCopy error:&error])
{
//err msg
os_log_error(logHandle, "ERROR: failed to copy %{public}@ to %{public}@ (error: %@)", app, appCopy, error.description);
os_log_error(logHandle, "ERROR: failed to copy %{public}@ to %{public}@ (error: %{public}@)", app, appCopy, error.description);
//bail
goto bail;
@ -252,7 +252,7 @@ bail:
if(YES != setFileOwner(appCopy, @0, @0, YES))
{
//err msg
os_log_error(logHandle, "ERROR: failed to set %@ to be owned by root", appCopy);
os_log_error(logHandle, "ERROR: failed to set %{public}@ to be owned by root", appCopy);
//bail
goto bail;
@ -263,7 +263,7 @@ bail:
if(noErr != verifyApp(appCopy, SIGNING_AUTH))
{
//err msg
os_log_error(logHandle, "ERROR: failed to validate %@", appCopy);
os_log_error(logHandle, "ERROR: failed to validate %{public}@", appCopy);
//bail
goto bail;
@ -306,7 +306,7 @@ bail:
if(nil == appBundle)
{
//err msg
os_log_error(logHandle, "ERROR: failed to load app bundle for %@", validatedApp);
os_log_error(logHandle, "ERROR: failed to load app bundle for %{public}@", validatedApp);
//bail
goto bail;
@ -317,7 +317,7 @@ bail:
if(nil == script)
{
//err msg
os_log_error(logHandle, "ERROR: failed to find config script %@", CONF_SCRIPT);
os_log_error(logHandle, "ERROR: failed to find config script %{public}@", CONF_SCRIPT);
//bail
goto bail;

View File

@ -79,6 +79,9 @@ bail:
//result
BOOL result = NO;
//code signing requirement
NSString* requirement = nil;
//init listener
listener = [[NSXPCListener alloc] initWithMachServiceName:CONFIG_HELPER_ID];
if(nil == self.listener)
@ -90,6 +93,21 @@ bail:
goto bail;
}
//macOS 13+
// set code signing requirement for clients via 'setConnectionCodeSigningRequirement'
if(@available(macOS 13.0, *)) {
//init requirement
// OS Installer v2.0+
requirement = [NSString stringWithFormat:@"anchor apple generic and identifier \"%@\" and certificate leaf [subject.CN] = \"%@\" and info [CFBundleShortVersionString] >= \"2.0.0\"", INSTALLER_ID, SIGNING_AUTH];
//set requirement
[self.listener setConnectionCodeSigningRequirement:requirement];
//dbg msg
os_log_debug(logHandle, "set XPC requirement %{public}@", requirement);
}
//dbg msg
os_log_debug(logHandle, "created mach service %@", CONFIG_HELPER_ID);
@ -234,7 +252,7 @@ bail:
[newConnection resume];
//dbg msg
os_log_debug(logHandle, "allowed XPC connection: %@", newConnection);
os_log_debug(logHandle, "allowed XPC connection: %{public}@", newConnection);
//happy
shouldAccept = YES;

View File

@ -329,7 +329,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#Note: To build uninstaller for app (menu)\n# 0. Delete this script and Installer.app from App's on-disk folder \n# 1. Build Installer\n# 2. Copy into App \"Uninstaller\" folder (& proj if needed)\n# 3. Re-add script, and then build (archive) for deployment\n\n#archive\n# copy in main application \nif [[ $BUILT_PRODUCTS_DIR = *\"ArchiveIntermediates\"* ]]; then\n cp -R -f \"$PROJECT_TEMP_ROOT/UninstalledProducts/macosx/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n \n#normal build\n# delete and copy in main application \nelse\n\nrm -rf \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources/OverSight.app\"\ncp -R -f \"$BUILT_PRODUCTS_DIR/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n\nfi\n\n";
shellScript = "#Note: To build uninstaller for app (menu)\n# 0. Delete this script and Installer.app from App's on-disk folder \n# 1. Build Installer\n# 2. Copy into App \"Uninstaller\" folder (& proj if needed)\n# 3. Re-add script, and then build (archive) for deployment\n\n#archive\n# copy in main application \nif [[ $BUILT_PRODUCTS_DIR = *\"ArchiveIntermediates\"* ]]; then\n cp -R -f \"$PROJECT_TEMP_ROOT/UninstalledProducts/macosx/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n \n#normal build\n# delete and copy in main application \nelse\n\nrm -rf \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources/OverSight.app\"\ncp -R -f \"$BUILT_PRODUCTS_DIR/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@ -380,14 +380,14 @@
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Helper/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = (
@ -415,14 +415,14 @@
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Helper/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = (
@ -451,10 +451,10 @@
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Source/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@ -463,7 +463,7 @@
);
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer";
PRODUCT_NAME = "OverSight Installer";
@ -480,10 +480,10 @@
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.2;
CURRENT_PROJECT_VERSION = 2.3.0;
DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_SEARCH_PATHS = "";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Source/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@ -492,7 +492,7 @@
);
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer";
PRODUCT_NAME = "OverSight Installer";

View File

@ -17,6 +17,9 @@
/* PROPERTIES */
//error
@property(nonatomic)NSInteger errorCode;
//helper installed & connected
@property(nonatomic) BOOL gotHelp;

View File

@ -27,6 +27,7 @@ extern os_log_t logHandle;
@synthesize gotHelp;
@synthesize xpcComms;
@synthesize errorCode;
//invokes appropriate action
// either install || uninstall logic
@ -550,10 +551,42 @@ bail:
if(YES != [NSFileManager.defaultManager removeItemAtPath:application error:&error])
{
//err msg
os_log_error(logHandle, "ERROR: failed to remove %{public}@ (error: %@)", application, error);
os_log_error(logHandle, "ERROR: failed to remove %{public}@ (error: %{public}@)", application, error);
//bail
goto bail;
//access denied?
// uninstall app via priv'd XPC
if(error.code == NSFileWriteNoPermissionError)
{
//err msg
os_log_debug(logHandle, "access denied, so will try to remove app via priv'd XPC");
//init XPC comms?
if(nil == xpcComms)
{
//get help
if(YES != [self initHelper])
{
//err msg
os_log_error(logHandle, "ERROR: failed to init helper tool");
//bail
goto bail;
}
}
//uninstall
if(YES != [xpcComms uninstall:@""])
{
//bail
goto bail;
}
}
//bail on all other errors
else
{
//bail
goto bail;
}
}
//dbg msg

View File

@ -29,6 +29,9 @@
//status msg
@property (weak, nonatomic) IBOutlet NSTextField *statusMsg;
//debug msg
@property (weak, nonatomic) IBOutlet NSTextField *debugMsg;
//more info button
@property (weak, nonatomic) IBOutlet NSButton *moreInfoButton;
@ -44,7 +47,7 @@
@property (weak, nonatomic) IBOutlet NSButton *gotoDNDView;
//do not disturb view
@property (strong) IBOutlet NSView *doNotDisturbView;
@property (strong, nonatomic) IBOutlet NSView *doNotDisturbView;
//support us
@property (weak, nonatomic) IBOutlet NSButton *gotoSupportView;

View File

@ -501,6 +501,9 @@ extern os_log_t logHandle;
//set result msg
resultMsg = [NSMutableString stringWithFormat:@"⚠️ Error: %@ failed", action];
//set debug msg
self.debugMsg.stringValue = @"For more info, from the terminal run:\r\nlog show --predicate=\"subsystem='com.objective-see.oversight'\"";
//show 'get more info' button
self.moreInfoButton.hidden = NO;
}

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="ConfigureWindowController">
<connections>
<outlet property="activityIndicator" destination="b1w-5W-ayX" id="P5e-PO-Ozi"/>
<outlet property="debugMsg" destination="6hZ-Dy-QUD" id="bc3-Yf-gmg"/>
<outlet property="doNotDisturbView" destination="6y2-pv-Ibd" id="iO4-Zv-dm4"/>
<outlet property="gotoDNDView" destination="8I9-ag-g5s" id="zy3-3J-OSA"/>
<outlet property="gotoSupportView" destination="2V7-Bx-gVi" id="2hL-gj-ztg"/>
@ -26,22 +27,22 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<rect key="contentRect" x="196" y="240" width="523" height="237"/>
<rect key="contentRect" x="196" y="240" width="523" height="244"/>
<rect key="screenRect" x="0.0" y="0.0" width="3440" height="1415"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="523" height="237"/>
<rect key="frame" x="0.0" y="0.0" width="523" height="244"/>
<autoresizingMask key="autoresizingMask"/>
<userGuides>
<userLayoutGuide location="213" affinity="minY"/>
<userLayoutGuide location="168" affinity="minX"/>
<userLayoutGuide location="45" affinity="minX"/>
</userGuides>
<subviews>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="b1w-5W-ayX">
<rect key="frame" x="169" y="43" width="32" height="32"/>
<rect key="frame" x="169" y="50" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
</progressIndicator>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XrB-7g-xya">
<rect key="frame" x="162" y="92" width="115" height="32"/>
<rect key="frame" x="162" y="99" width="115" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Uninstall" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="G7H-Q1-04P">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -52,7 +53,7 @@
</connections>
</button>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" preferredMaxLayoutWidth="293" translatesAutoresizingMaskIntoConstraints="NO" id="SpB-Xc-WlB">
<rect key="frame" x="166" y="21" width="339" height="47"/>
<rect key="frame" x="166" y="50" width="339" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" truncatesLastVisibleLine="YES" enabled="NO" sendsActionOnEndEditing="YES" alignment="left" id="Rib-WU-Syl">
<font key="font" size="13" name="Menlo-Regular"/>
@ -61,7 +62,7 @@
</textFieldCell>
</textField>
<button tag="1" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="553-2y-kvm">
<rect key="frame" x="345" y="92" width="115" height="32"/>
<rect key="frame" x="345" y="99" width="115" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Install" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="1hy-8F-qxt">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -72,12 +73,12 @@
</connections>
</button>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="K52-9g-sjn">
<rect key="frame" x="170" y="149" width="286" height="56"/>
<rect key="frame" x="170" y="156" width="286" height="56"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="OverSight" id="WRg-I2-vkK"/>
</imageView>
<button hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QWu-qZ-Za2">
<rect key="frame" x="431" y="43" width="25" height="25"/>
<rect key="frame" x="431" y="52" width="25" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="help" bezelStyle="helpButton" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="v1Z-aX-Wlm">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -88,16 +89,25 @@
</connections>
</button>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fgM-lv-GeJ">
<rect key="frame" x="33" y="77" width="84" height="84"/>
<rect key="frame" x="33" y="84" width="84" height="84"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Icon" id="bCU-0f-ff8"/>
</imageView>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" preferredMaxLayoutWidth="293" translatesAutoresizingMaskIntoConstraints="NO" id="6hZ-Dy-QUD">
<rect key="frame" x="43" y="13" width="462" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" truncatesLastVisibleLine="YES" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" id="LqP-vl-c6J">
<font key="font" size="12" name="Menlo-Regular"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="216.5" y="-225.5"/>
<point key="canvasLocation" x="216.5" y="-222"/>
</window>
<customView id="DoQ-oR-CLI" userLabel="Notifications">
<rect key="frame" x="0.0" y="0.0" width="812" height="500"/>
@ -255,7 +265,7 @@
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" alphaValue="0.59999999999999998" id="MWL-4T-Xv3">
<rect key="frame" x="306" y="152" width="203" height="29"/>
<rect key="frame" x="306" y="122" width="203" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Mahalo to the &quot;Friends Objective-See&quot;" id="OYn-6J-Cfb">
<font key="font" size="15" name="AvenirNextCondensed-Regular"/>

View File

@ -33,7 +33,9 @@ echo "uninstalling"
rm -rf "/Applications/OverSight.app"
#remove preferences, etc.
rm -rf "${2}"
if [ -n "$2" ]; then
rm -rf "$2"
fi
killall "OverSight" 2> /dev/null
killall "com.objective-see.OverSight.helper" 2> /dev/null

View File

@ -33,7 +33,7 @@ extern os_log_t logHandle;
//get app's version
// extracted from Info.plist
NSString* getAppVersion()
NSString* getAppVersion(void)
{
//read and return 'CFBundleVersion' from bundle
return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
@ -114,7 +114,7 @@ NSString* getBinaryName(NSString* path)
//get path to (main) app of a login item
// login item is in app bundle, so parse up to get main app
NSString* getMainAppPath()
NSString* getMainAppPath(void)
{
//path components
NSArray *pathComponents = nil;
@ -408,7 +408,7 @@ bail:
}
//get name of logged in user
uid_t getConsoleUserID()
uid_t getConsoleUserID(void)
{
//uid
uid_t userID = 0;
@ -528,7 +528,7 @@ BOOL setFileOwner(NSString* path, NSNumber* groupID, NSNumber* ownerID, BOOL rec
}
//dbg msg
os_log_debug(logHandle, "set ownership for %@ (%@)", path, fileOwner);
os_log_debug(logHandle, "set ownership for %{public}@ (%{public}@)", path, fileOwner);
//do it recursively
if(YES == recursive)
@ -552,7 +552,7 @@ BOOL setFileOwner(NSString* path, NSNumber* groupID, NSNumber* ownerID, BOOL rec
if(YES != [[NSFileManager defaultManager] setAttributes:fileOwner ofItemAtPath:fullPath error:NULL])
{
//err msg
os_log_error(logHandle, "ERROR: failed to set ownership for %@ (%@)", fullPath, fileOwner);
os_log_error(logHandle, "ERROR: failed to set ownership for %{public}@ (%{public}@)", fullPath, fileOwner);
//bail
goto bail;

View File

@ -1,5 +1,5 @@
Patrons (2^6+):
Jan Koum, Nick, Shain Singh, Christian Blümlein, Rocky Zadok, Cane Juice, M S
Jan Koum, Matt Mullenweg, Christian Blümlein, Shain Singh, Andreas Fink, Nuno, Rabi Rob Thomas, Mikhail
Friends of Objective-See:
Kandji, Jamf, Mosyle, CleanMyMac X, Kolide, Palo Alto Networks, SmugMug, Guardian Mobile Firewall, iVerify, Halo Privacy, The Mitten Mac