From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111747: * doc-view.el (doc-view-odf->pdf-converter-soffice): Use separate Date: Tue, 12 Feb 2013 09:21:02 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360707956 13308 80.91.229.3 (12 Feb 2013 22:25:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2013 22:25:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 12 23:26:16 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U5OIo-0000bF-2q for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2013 23:26:14 +0100 Original-Received: from localhost ([::1]:52888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5OIU-0001wN-KP for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2013 17:25:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5OIR-0001w6-VT for emacs-devel@gnu.org; Tue, 12 Feb 2013 17:25:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5GjI-0002xQ-Ae for emacs-devel@gnu.org; Tue, 12 Feb 2013 09:21:09 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5GjI-0002wm-1k; Tue, 12 Feb 2013 09:21:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCoht/2dsb2JhbABEvw4Xc4IfAQUnLyMQCw4mBwsUGA0kiCSxH5AOkQoDiGGcGYFegxWBSCQ X-IPAS-Result: Av4EABK/CFFMCoht/2dsb2JhbABEvw4Xc4IfAQUnLyMQCw4mBwsUGA0kiCSxH5AOkQoDiGGcGYFegxWBSCQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="1064857" Original-Received: from 76-10-136-109.dsl.teksavvy.com (HELO pastel.home) ([76.10.136.109]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Feb 2013 09:21:02 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9FF2459267; Tue, 12 Feb 2013 09:21:02 -0500 (EST) In-Reply-To: (Tassilo Horn's message of "Tue, 12 Feb 2013 11:52:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156990 Archived-At: > + ;; A workaround is to start soffice with a > + ;; separate UserInstallation directory. > + (concat "-env:UserInstallation=file://" > + (expand-file-name (format "libreoffice-docview%d" (user-uid)) > + temporary-file-directory)) I'm pretty sure there's some kind of race condition here that lets an attacker on the same machine make you write files you didn't intend. Also what if you have two doc-view buffers showing different ODF documents? Will one soffice process cause the other to return immediately as well? I think we should either use make-temp-file to create the UserInstallation directory, or just reuse the directory in which we'll place the png files. Stefan