From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8GwJK/JiAWbzagEAqHPOHw:P1 (envelope-from ) for ; Mon, 25 Mar 2024 12:41:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8GwJK/JiAWbzagEAqHPOHw (envelope-from ) for ; Mon, 25 Mar 2024 12:41:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gcX1/kbe"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711366898; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mXZIXYK13DpzH2gT8Hdu+MO8MklrpRz7TlN6DMHTprI=; b=u3gseUfaVp0KrFASw/kLzcB61HDjIu+ZlWxbGFAKbS5dt40J7hnIJs2ghHcxLr9+SkvyXa Txgt5mjhOWWEwd5kL0DXi3q1gH2QtJMZqISjYkB/9FTOUUMx85wWv4mOeBmo6jUmi3sexD 7jEfExyC87mTD+rNgJfgLNq8DjhK72dwCNi91VoZFRrxtjocAiiyoGxBEJHLQvn0YFlV8h RABSRL6TxSXLDk//wfUdUbThaQlINB9FUzny4QKsK16M4ub1Wv6Zf2BSYjhOoi5NPUt6cD LErI+VwpmqJCmLaDX5OF6Uwy14Qhu3k/NlMIh0YoRJxhqC5vVlo8AQR/1KjmPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gcX1/kbe"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711366898; a=rsa-sha256; cv=none; b=f8/Izt78Olrycb3mdmEPDtb+aiHWTs8zBECmvGrnyjmpzDM7kb5m9QnlYNUvwDWg4XiMvL 3BkqNA6MQrz+2epZlsDR00rcC4qL8ijqdmRpFp1X1Ysp0Ik9PeHSs52MqqQ1gjqvXSQuwd 0kiDSYOfxJwhJjhE73o4XewIgmsgbNQbhqYkkhURzRA1c6sQSBsCh+NOgNvPCXbLJ4Sztp GQe9yM/cqJeCkWCF2pa0L11U/i30PH894Mp7vBnuZFRNfLNSEGmEf5joYPD1PWqAPLjdmc VK7b3AaCNNzz0hNVZHZoKH3oz4HzF0MnS7q5N9TI23GKyjdGkpuFbKr/nmdkFw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B2845A107 for ; Mon, 25 Mar 2024 12:41:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1roigr-0004iw-Bu; Mon, 25 Mar 2024 07:40:33 -0400 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 1roigo-0004iX-EB for emacs-orgmode@gnu.org; Mon, 25 Mar 2024 07:40:30 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1roigm-0002i9-8P for emacs-orgmode@gnu.org; Mon, 25 Mar 2024 07:40:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AF3EA240027 for ; Mon, 25 Mar 2024 12:40:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711366824; bh=uNQ/E3zFlunyKoILG7qSirSeyO3YdtbgF/Mk7D5Emac=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=gcX1/kbe0KUTmoETTxZcGyaFWhrfJ1dQ+q1Bi+xw1/kaKwCx/Dh9+Xdw9DsGStm2Z wShMpVHYEd9grQYDVm2LgIzvjYP58vKypk7yaVFRNcYDUoovKjjWcUWD3iwOwudaaz qBnAQLbJtzE+2i+by2+rEaoIXw0rcQM7Lavr9tQjcK5hVH8JGZ4eohebEpXOEAo3Uc M+B/ePOov8l8yzaaHmBd/Yl3m/UKLnwAXWVGU3Lln915qQbgxFISGe8+Ac9yi33V3a 0wC3qaiznU7GLqBPZYZUnVtNIpuaGRGa2F2vli/JOuBvFQLIhSb1cNTYnSARGvWrei nSChZQr3IQC8g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V39wR72yBz9rxG; Mon, 25 Mar 2024 12:40:23 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] LaTeX preview should use a subdirectory in /tmp In-Reply-To: References: Date: Mon, 25 Mar 2024 11:40:31 +0000 Message-ID: <87r0fyo7yo.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 8B2845A107 X-Spam-Score: -9.53 X-Migadu-Spam-Score: -9.53 X-Migadu-Scanner: mx11.migadu.com X-TUID: DtIrcmOS8tpU --=-=-= Content-Type: text/plain Max Nikulin writes: > This feature should not write temporary files to /tmp directly, some > subdirectory should be created for this purpose. The idea is to mitigate > consequences if a user opens a file from a compromised or a malicious > source and gets /tmp flooded with a crowd of files. It is easier to > delete single directory than to spent time trying to figure out what > files are necessary for other applications and what ones are generated > by LaTeX code. See the attached tentative patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-create-formula-image-Keep-temporary-LaTeX-files-.patch >From df4d827d98063ee665d71906f358ca08ad4d0023 Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Mon, 25 Mar 2024 14:38:42 +0300 Subject: [PATCH] org-create-formula-image: Keep temporary LaTeX files in subfir of /tmp * lisp/org.el (org-create-formula-image): When compiling formula images, keep temporary LaTeX logs in a subdirectory of `temporary-file-directory' instead of littering the top-level /tmp. Reported-by: Max Nikulin Link: https://orgmode.org/list/utrkah$4s0$1@ciao.gmane.io --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index f0f85822f..0793b72d6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16361,7 +16361,7 @@ (defun org-create-formula-image org-format-latex-header 'snippet))) (latex-compiler (plist-get processing-info :latex-compiler)) - (tmpdir temporary-file-directory) + (tmpdir (concat temporary-file-directory "orgtex/")) (texfilebase (make-temp-name (expand-file-name "orgtex" tmpdir))) (texfile (concat texfilebase ".tex")) -- 2.44.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--