From: ueno Date: Thu, 11 Nov 1999 06:01:10 +0000 (+0000) Subject: * pgg-pgp.el, pgg-pgp5.el (verify-region): Set default umask to 077. X-Git-Tag: emiko-1_13_7~16 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7f51d3d53f3a3daa9e0d126da333079a10d8f282;p=elisp%2Fsemi.git * pgg-pgp.el, pgg-pgp5.el (verify-region): Set default umask to 077. --- diff --git a/pgg-pgp.el b/pgg-pgp.el index 28e48cb..feadb9b 100644 --- a/pgg-pgp.el +++ b/pgg-pgp.el @@ -203,8 +203,14 @@ start end &optional signature) (let* ((basename (expand-file-name "pgg" temporary-file-directory)) (orig-file (make-temp-name basename)) - (args '("+verbose=1" "+batchmode" "+language=us"))) - (write-region-as-binary start end orig-file) + (args '("+verbose=1" "+batchmode" "+language=us")) + (orig-mode (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes 448) + (write-region-as-binary start end orig-file) + ) + (set-default-file-modes orig-mode)) (when (stringp signature) (copy-file signature (setq signature (concat orig-file ".asc"))) (setq args (append args (list signature orig-file))) diff --git a/pgg-pgp5.el b/pgg-pgp5.el index 8598e0e..9614b4e 100644 --- a/pgg-pgp5.el +++ b/pgg-pgp5.el @@ -215,8 +215,14 @@ start end &optional signature) (let* ((basename (expand-file-name "pgg" temporary-file-directory)) (orig-file (make-temp-name basename)) - (args '("+verbose=1" "+batchmode=1" "+language=us"))) - (write-region-as-binary start end orig-file) + (args '("+verbose=1" "+batchmode=1" "+language=us")) + (orig-mode (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes 448) + (write-region-as-binary start end orig-file) + ) + (set-default-file-modes orig-mode)) (when (stringp signature) (copy-file signature (setq signature (concat orig-file ".asc"))) (setq args (append args (list signature)))