Skip to content

Commit

Permalink
tweak(ecryptfs): make passphrase file customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 8, 2023
1 parent 7540b43 commit f35fa77
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions elisp/ecryptfs.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
;;; Commentary:

;; This allows me to mount my private directory encrypted using ecryptfs-utils.
;; It is a port of "ecryptfs-mount-private" shell command. It uses extracts the
;; It is a port of "ecryptfs-mount-private" shell command. It extracts the
;; encryption key from a GPG encrypted file containting the ecryptfs password.
;; The decryption of the password is performed using Emacs' `epg'.

Expand All @@ -29,6 +29,9 @@
:group 'minemacs-ecryptfs
:type 'directory)

(defcustom ecryptfs-passphrase-file (concat ecryptfs-root-dir "my-pass.gpg")
"GPG encrypted file containing eCryptfs password.")

(defvar ecryptfs-buffer-name " *emacs-ecryptfs*")
(defvar ecryptfs-process-name "emacs-ecryptfs")
(defvar ecryptfs--mount-private-cmd "/sbin/mount.ecryptfs_private")
Expand All @@ -44,8 +47,9 @@
(string-trim-right
(epg-decrypt-file
(epg-make-context)
(expand-file-name (concat ecryptfs-root-dir "my-pass.gpg"))
nil)))
(expand-file-name ecryptfs-passphrase-file)
nil)
"[\n\r]+"))

(defun ecryptfs--encrypt-filenames-p ()
(/= 1 (with-temp-buffer
Expand Down

0 comments on commit f35fa77

Please sign in to comment.