From 9858013fc8e6909fd88e9d4409a57b7e13396db6 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 23 Jun 2000 07:13:08 +0000 Subject: [PATCH] (post-mail-send-it): Make sure file has proper permissions from birth. --- lisp/mail/mailpost.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index 0d053da6024..f7548a94c05 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/mail/mailpost.el @@ -28,7 +28,7 @@ site-init." (let ((errbuf (if mail-interactive (generate-new-buffer " post-mail errors") 0)) - (temfile (make-temp-file ",rpost")) + temfile (tembuf (generate-new-buffer " post-mail temp")) (case-fold-search nil) delimline @@ -74,8 +74,12 @@ site-init." (save-excursion (set-buffer errbuf) (erase-buffer)))) - (set-file-modes temfile 384) - (write-file temfile) + (let ((m (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes 384) + (setq temfile (make-temp-file ",rpost"))) + (set-default-file-modes m))) (apply 'call-process (append (list (if (boundp 'post-mail-program) post-mail-program -- 2.39.2