From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61984 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Viewing HTML-mails with external browsers - proposed code Date: Tue, 14 Feb 2006 20:50:54 +0900 Organization: Emacsen advocacy group Message-ID: References: <874q56xeh4@ularx.de> <878xt8wi4l@ularx.de> <87hd73nuc0.fsf@ularx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139917925 7034 80.91.229.2 (14 Feb 2006 11:52:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2006 11:52:05 +0000 (UTC) Original-X-From: ding-owner+m10511@lists.math.uh.edu Tue Feb 14 12:52:04 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8yih-0007MX-R9 for ding-account@gmane.org; Tue, 14 Feb 2006 12:51:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F8yie-0002Bb-00; Tue, 14 Feb 2006 05:51:44 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F8yi8-0002BW-00 for ding@lists.math.uh.edu; Tue, 14 Feb 2006 05:51:12 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F8yi7-0001qB-7d for ding@lists.math.uh.edu; Tue, 14 Feb 2006 05:51:12 -0600 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F8yi6-0003kw-00 for ; Tue, 14 Feb 2006 12:51:10 +0100 Original-Received: from [205.234.185.198] (port=38877 helo=mail.jpl.org) by washington.hostforweb.net with esmtpa (Exim 4.52) id 1F8ylI-0006uW-4B for ding@gnus.org; Tue, 14 Feb 2006 05:54:28 -0600 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:EusmL/E8aR1ezf7NSmK4x6ede+4= X-Hashcash: 1:20:060214:ding@gnus.org::svz9T4JJyOcTMKzh:00005WOM X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.8 (-) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61984 Archived-At: >>>>> In Katsumi Yamaoka wrote: > I'll add the Emacs 22 version of make-temp-file. I've added it to the trunk and made it work with XEmacs as well. However, it is a bit unsafe with XEmacs. It is thought that a sly attacker can make a temp file (which can be read by him) of the same name just before a user makes it. Therefore, XEmacs users had better set a secure temp directory which only you can access. #v+ `temp-directory' is a built-in function (temp-directory) Documentation: Return the pathname to the directory to use for temporary files. On MS Windows, this is obtained from the TEMP or TMP environment variables, defaulting to / if they are both undefined. On Unix it is obtained from TMPDIR, with /tmp as the default. #v- The former one was rather unsafe if a user doesn't use a secure temp directory, though. In addition, the way that `mm-display-external' used (i.e., `rename-file' after `mm-make-temp-file') was also a bit unsafe for the same reason. The function can be modified so that it may work also with Emacs 20, but it will be a bit unsafe as well as XEmacs. P.S. APEL provides a pretty good version of `make-temp-file'. If you load `poe' before `mm-util', `mm-make-temp-file' will be an alias to it. I think the one defined in mm-util.el is sufficient, though.