branch: externals/detached commit 096dd65846b7e51cb45f4003e5562e699c691f0a Author: Niklas Eklund <niklas.ekl...@posteo.net> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Change default value for session/db directory Using temporary-file-directory to store sessions has had the neat property that on reboot the old sessions will be automatically wiped. And users have the possibility to configure this location themselves. However there are security concerns of using the temporary-file-directory if other users have access to the same computer. So instead we change to user-emacs-directory and make sure that sessions as well as the database is written to a sub folder named detached. --- CHANGELOG.org | 3 ++- detached.el | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 3668760b83..28781ba478 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -4,8 +4,9 @@ * Development -* Version 0.8.1 (2022-09-07) +* Version 0.8.1 (2022-09-08) +- Adjust default location for sessions, from a directory under =temporary-file-directory= to =user-emacs-directory=. This change is for security reasons in case the user shares the computer with other users. By default sessions will not be removed on reboots, the user can use =M-x detached-delete-sessions= to clear old sessions manually. - Fix bug when initializing =detached-session-directory=, this worked incorrectly when users initialized =detached= while being on a remote host. - Add an =initial-mode= property to a session. This enables sessions that were created using =create= mode instead of =create-and-attach= to inherit this property when a session is being rerun. diff --git a/detached.el b/detached.el index d2a6542996..c03ed3621a 100644 --- a/detached.el +++ b/detached.el @@ -5,7 +5,7 @@ ;; Author: Niklas Eklund <niklas.ekl...@posteo.net> ;; Maintainer: detached.el Development <~niklaseklund/detached...@lists.sr.ht> ;; URL: https://sr.ht/~niklaseklund/detached.el/ -;; Version: 0.8.0 +;; Version: 0.8.1 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: convenience processes @@ -59,12 +59,12 @@ ;;;;; Customizable -(defcustom detached-session-directory (expand-file-name "detached" temporary-file-directory) +(defcustom detached-session-directory (expand-file-name "detached" user-emacs-directory) "The directory to store sessions." :type 'string :group 'detached) -(defcustom detached-db-directory user-emacs-directory +(defcustom detached-db-directory (expand-file-name "detached" user-emacs-directory) "The directory to store the `detached' database." :type 'string :group 'detached)