1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

* package.el (package-import-keyring): Create gnupg directory private.

See bug#17625#155.
This commit is contained in:
Glenn Morris 2014-10-01 19:39:50 -04:00
parent 2ff7916ad5
commit c8ea4b9f3d
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-10-01 Glenn Morris <rgm@gnu.org>
* emacs-lisp/package.el (package-import-keyring):
Create gnupg directory private. (Bug#17625#155)
2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-shell-completion-get-completions):

View File

@ -1298,7 +1298,13 @@ similar to an entry in `package-alist'. Save the cached copy to
(setq file (expand-file-name file))
(let ((context (epg-make-context 'OpenPGP))
(homedir (expand-file-name "gnupg" package-user-dir)))
(make-directory homedir t)
;; FIXME Use `with-file-modes' when merged to trunk.
(let ((umask (default-file-modes)))
(unwind-protect
(progn
(set-default-file-modes 448)
(make-directory homedir t))
(set-default-file-modes umask)))
(epg-context-set-home-directory context homedir)
(message "Importing %s..." (file-name-nondirectory file))
(epg-import-keys-from-file context file)