macos: Implement delegate method to silence secure-restore message

Fix process injection vulnerability on macOS.

See https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/.
This commit is contained in:
Arjan Molenaar
2023-11-30 17:46:35 +01:00
parent 459a13e837
commit f7e9fd076d

View File

@ -68,6 +68,7 @@ G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_A
- (id)initWithImpl:(GtkApplicationImplQuartz*)impl;
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender;
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames;
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app;
@end
@implementation GtkApplicationQuartzDelegate
@ -123,6 +124,11 @@ G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_A
[theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
}
-(BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app
{
return YES;
}
@end
/* these exist only for accel handling */