From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sJEQIY9tpGMVTwAAbAwnHQ (envelope-from ) for ; Thu, 22 Dec 2022 15:45:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yG8VIY9tpGNPSAEA9RJhRA (envelope-from ) for ; Thu, 22 Dec 2022 15:45:35 +0100 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 2361328A54 for ; Thu, 22 Dec 2022 15:45:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8MoV-0007bT-2y; Thu, 22 Dec 2022 09:44:51 -0500 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 1p8MoN-0007V6-Bz for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 09:44:47 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8MoL-0001Pf-58 for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 09:44:42 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1p8MoJ-00096Y-82 for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 15:44:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: org-persist files in /tmp Date: Thu, 22 Dec 2022 21:41:04 +0700 Message-ID: References: <87len0uc7y.fsf@ucl.ac.uk> <87tu1ovlsn.fsf@localhost> <287345.1671683459@archlinux> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-1.148, 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-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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671720335; a=rsa-sha256; cv=none; b=XK/4UoTpgD0fdip+02UV8P0svjBQTew7QY/7ptMP+YhcCGfG8BHPWd75/ksuDxiXtyYKq2 Awu29IEgdFGh/hW2VQMUU48c5gE7nI2nIoNJaxxLrB1MN+Vtxk5YUPJt9RbfEWHWSpzCaG 7WUsO+OiLbi+ssTns5vAJ43ttCLlpI/OxxhMJ19QJRQcuazx9xGXfcRaqzUFV4XXKKm9JS xxSCjO0DIMj/qzDlytoX15Vt9QlQIS5nFKRwhh22JbCak4a9uyfNRdqbnY6/sCKV8eTy3J oAcx0XFFMDB09l7YOrMEEDGlKtbFdakCLBjxOb/X0+kGkPlBwVSS4Z6FhnJsEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671720335; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aFk/sdkIZ4+aBFN+2QSJi2x7hjh6ot9Lp/Csw/J6KbA=; b=sCXIplROsg9co0jKC5PESDmGcuxiNgq4MQmz8BwWxZ0SAgC1fFKGoHhvXpL1JdDzjjNNWi CnGRB9QmbN8uqSQIuY+YDwUha+5/1xGrkvXp+59WYlfxJRsXqthmX96ItnQ+XhbrqYuUM5 9HaH566dxXrAOPtnDYt1ibu3u4OXt933Px3UC2iH56kGXhz1zzmGSoyzR7nPCh9LlCj+rJ ZX+cXazeStqF5UX0WFpFi8hE+ms7GTHLOP11hKa59x+e3MNOLtpj3uQLZloZcGTyoY67RD e6wcwqUe+oDGDbStZ7xj+mlu6yaYk59ClC7kW4lGwYMB0D0+kxS7dEzelnS1CA== X-Spam-Score: -1.20 X-Migadu-Queue-Id: 2361328A54 Authentication-Results: aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.20 X-TUID: 5skvNcGgsp4K On 22/12/2022 19:34, Ruijie Yu wrote: > One possible approach to this is to have all org-persist related > temporary directories into an overall "$TMPDIR/org-persist" directory. Predictable name in a "world" writable directory generally is not a good idea. Multiple users may try to run Org on the same machine. There are some kernel parameters to prevent certain type of attacks, however I am unsure concerning their default values in various Linux distributions and what will happen if one user creates a symlink to somewhere the under home directory of another one. So unfortunately a directory reusable by different emacs sessions should be avoided. Ihor, I do not like that after your latest changes temporary directory became world readable. Another point is that creating temporary files and directories must be an atomic operation. In between of removing and recreating it an attacker might manage to create a file with the same name.