diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:26:20 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:26:20 -0700 |
commit | 82e3b9b2b5528a02a901e1b698bb8b35496eada1 (patch) | |
tree | cc2cc5f9ddab48333679c4058a2e8ab79556672b /src/data.lisp | |
parent | 1eb52e08aa5608d3434bc6530abf43f4d2f632d3 (diff) | |
download | consfigurator-82e3b9b2b5528a02a901e1b698bb8b35496eada1.tar.gz |
add MAKE-PASSPHRASE and use it to protect more sudo passwords
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r-- | src/data.lisp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/data.lisp b/src/data.lisp index 627a2b3..f63cd5b 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -357,11 +357,15 @@ of the current connection, where each entry is of the form (defclass passphrase () ((passphrase :initarg :passphrase :reader passphrase))) +(defun make-passphrase (passphrase) + "Make an object which is unprintable by default to contain a passphrase." + (make-instance 'passphrase :passphrase passphrase)) + (defun get-data-protected-string (iden1 iden2) "Like GET-DATA-STRING, but wrap the content in an object which is unprintable by default. Intended for code which fetches passwords and wants to lessen the chance of those passwords showing up in the clear in the Lisp debugger." - (make-instance 'passphrase :passphrase (get-data-string iden1 iden2))) + (make-passphrase (get-data-string iden1 iden2))) (defvar *allow-printing-passphrases* nil) |