From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: master 3d38d1d: Add sqlite3 support to Emacs Date: Mon, 13 Dec 2021 22:35:26 +0000 Message-ID: <86o85ki15d.fsf@gmail.com> References: <20211211035614.15517.53830@vcs0.savannah.gnu.org> <20211211035616.984DD20A0A@vcs0.savannah.gnu.org> <87ee6j4ty4.fsf@yahoo.com> <8735mz4o70.fsf@yahoo.com> <83k0gbr0dm.fsf@gnu.org> <87y24r33bn.fsf@yahoo.com> <87ilvu1ldh.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) To: emacs-devel@gnu.org Cancel-Lock: sha1:VdTVYXQsfMKzs86K+QPJ8h/HKvE= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 13 23:37:34 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mwtws-00060K-Iv for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Dec 2021 23:37:34 +0100 Original-Received: from localhost ([::1]:53606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwtwr-00083V-HJ for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Dec 2021 17:37:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwtv4-00063Y-Dz for emacs-devel@gnu.org; Mon, 13 Dec 2021 17:35:44 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:43904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwtv2-00017v-JA for emacs-devel@gnu.org; Mon, 13 Dec 2021 17:35:42 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mwtuy-0003L5-OD for emacs-devel@gnu.org; Mon, 13 Dec 2021 23:35:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281868 Archived-At: On Sun 12 Dec 2021, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > No, I'm proposing to modify the free plug-ins to define this symbol, and > > then to make Emacs to check for it before telling SQLite to load the > > plugin. It would work the same, and it'd also be much easier than > > modifying SQLite and having to maintain the modified version, and so on > > and so forth. > > I don't think that is legally adequate. I have an idea for a solution > to that problem, but I need to check it with a lawyer first. > > For the mean time, Emacs _should not_ offer any interface to load > sqlite3 extensions. > > But eliminating that is _not_ enough to solve the problem, because > sqlite3 offers another way to load one! It defines an SQL function, > load_extension, to load an extension. Whatever testing that Emacs > would try to do on an extension before loading it, load_extension > would bypass it. > > Is there a way we can undefine that SQL function? The equivalent of > fmakunbound in Lisp? Perhaps disabling the SQL extension API would be sufficient ? The documentation notes that sqlite3_db_config can be used to enable only the C sqlite3_load_extension API without also enabling the SQL extension loading API: https://www.sqlite.org/c3ref/enable_load_extension.html The security warning on that page recommends using sqlite3_db_config, and NOT using sqlite3_enable_load_extension. AndyM