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