🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #650

Re: Unsafe tmp files

#650
From: Kevin Rodgers
Date: Thu, 02 Sep 2004 15:18
32 lines
2453 bytes
Michael Welle wrote:
 > Kevin Rodgers <ihs_4664@yahoo.com> writes:
 >>`vm-mime-use-image-strips' defaults to t.  Does the problem occur if
 >>you set it to nil?
 >
 > Ah, that seems to be much better. There is only a tmp file with
 > restricted permissions. I have looked at the code yesterday and find
 > the place with the stripping. But my knowledge about list is very
 > vague. Is the handling of png images so different from the handling of
 > other image types?

No, none of vm-mime-display-internal-image-xemacs-xxxx,
vm-mime-display-internal-image-fsfemacs-21-xxxx, or
vm-make-image-strips reference "png".  VM passes a new empty temp
output file (presumably with the correct permissions) to the
ImageMagick convert program, which I suspect is re-creating the file
(with the incorrect default permissions).  But I don't understand why
VM isn't deleting the temp files: they're registered by the
vm-mime-display-internal-image-*-xxxx functions in
vm-message-garbage-alist; perhaps delete-file is failing but it goes
unnoticed since vm-garbage-collect-message wraps it in condition-case,
or perhaps the asyncronous way that the ImageMagick convert program is
called has something to do with it.

Since both vm-mime-display-internal-image-*-xxxx functions call
vm-make-image-strips with t as the ASYNC arg, I think the only place
where the strip temp files can reliably have their permissions reset
is the process filter (if vm-mime-display-image-strips-incrementally
is set) and/or the process sentinel.

-- 
Kevin Rodgers
Technical Details
Message-ID: <413739D4.7000005@yahoo.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!not-for-mail
References: <87n00bk4y9.fsf@buerbach048.buerbach.wohnheim.uni-siegen.de> <413607BA.8030706@yahoo.com> <87fz61jhbp.fsf@buerbach048.buerbach.wohnheim.uni-siegen.de>

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,95611224594b1d12
X-Google-Attributes: gidf6829,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: Kevin Rodgers <ihs_4664@yahoo.com>
Newsgroups: gnu.emacs.vm.bug
Subject: Re: Unsafe tmp files
Date: Thu, 02 Sep 2004 09:18:44 -0600
Lines: 33
Message-ID: <413739D4.7000005@yahoo.com>
References: <87n00bk4y9.fsf@buerbach048.buerbach.wohnheim.uni-siegen.de> <413607BA.8030706@yahoo.com> <87fz61jhbp.fsf@buerbach048.buerbach.wohnheim.uni-siegen.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de U3bwvIgiBJn0/IdW2XcU9QaJ7YMmyEAQljBlwL5oJTetSVIPs=
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2
X-Accept-Language: en-us