From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66245: [PATCH] ; Silence macOS 14 warning Date: Wed, 27 Sep 2023 21:00:45 +0200 Message-ID: Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29479"; mail-complaints-to="usenet@ciao.gmane.io" To: 66245@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 27 21:02:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qlZnb-0007TR-4M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Sep 2023 21:02:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlZnD-00060V-4y; Wed, 27 Sep 2023 15:01:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlZnB-000600-Ke for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 15:01:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlZnB-0003L8-Ce for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 15:01:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlZnO-0002ni-N4 for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 15:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Sep 2023 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169584127410705 (code B ref -1); Wed, 27 Sep 2023 19:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2023 19:01:14 +0000 Original-Received: from localhost ([127.0.0.1]:52525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlZmc-0002mb-G7 for submit@debbugs.gnu.org; Wed, 27 Sep 2023 15:01:14 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:55100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlZmZ-0002mM-Mi for submit@debbugs.gnu.org; Wed, 27 Sep 2023 15:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlZmF-0005hd-HW for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 15:00:51 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlZmD-00038o-DH for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 15:00:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1695841247; bh=pqS3n+Z9yxirEJBCAZHApXPjozeVGj9SkSmOH4ew0Iw=; h=From:To:Subject:Date:From; b=wbGDUpQYT9kY2tcHp55NBp0jNxNumb6ybhgahpgGg/BEfjuqxqd2MBABqmvcviN8k NOPrywJ2N0+ceEE2G1rg21/+qe1+lODVgdCHJZFky46FnDdTs/tzwv556F2VxLnvSv nagl8Psbi9GrHf3RebNkghD98CWsJJCGKftK+jEFynXLDmQGGCDk89i3eP3mbHD2pB GQzYrim4/okZQH8YH5oPqqOensuygASll9MeRnmTELJ2V5Hd2nKWOilaVFWmen4jl7 twwhsNUezDwf2OVaBVlWXGCmwszaEdW/qKKSsF3VBedTwShvxxf/ydfTfAgUfspKms kK9l5r8dyb6Og== X-Hashcash: 1:20:230927:bug-gnu-emacs@gnu.org::7MXLGGYY6y2K7tkU:04jF Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271427 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi, After updating to macOS 14 (and rebuilding Emacs), I see the following warning whenever I start Emacs: WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. This patch does exactly what the warning suggests, and it silences the warning. TBH I'm not entirely sure I understand the implications of implementing `applicationSupportsSecureRestorableState`. IIUC it makes Emacs opt-in to the "secure state restoration" mechanism in contrast to a former (supposedly less secure) mechanism, but AFAICT Emacs doesn't opt-in to state restoration in the NS port in the first place... --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Silence-macOS-14-warning.patch >From 10a9205535c20ff951c61fb84a32b9ab6511fc67 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 27 Sep 2023 20:46:26 +0200 Subject: [PATCH] ; Silence macOS 14 warning * src/nsterm.m: Implement 'applicationSupportsSecureRestorableState' to silence warning on macOS 14. --- src/nsterm.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index 4e0dfa58c63..e46b71a499b 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6110,6 +6110,11 @@ - (void)antialiasThresholdDidChange:(NSNotification *)notification */ +- (BOOL) applicationSupportsSecureRestorableState:(NSApplication *)app +{ + return YES; +} + - (void) terminate: (id)sender { struct input_event ie; -- 2.42.0 --=-=-=--