summaryrefslogtreecommitdiff
path: root/gnu/installer/newt
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2022-01-15 14:50:10 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-02-02 16:46:44 +0100
commit112ef30b84744872b3a7617d9e54b3df5db95560 (patch)
tree3f097eb44042246716e683c3877e8a0f2d38ecc0 /gnu/installer/newt
parent41eb0f01fcf05902be9972cc993fdb332edb928c (diff)
installer: Turn passwords into opaque records.
* gnu/installer/user.scm (<secret>, secret?, make-secret, secret-content): Add opaque <secret> record that boxes its contents, with a custom printer that doesn't display anything. * gnu/installer/newt/user.scm (run-user-add-page, run-user-page): Box it. * gnu/installer/final.scm (create-user-database): Unbox it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r--gnu/installer/newt/user.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/installer/newt/user.scm b/gnu/installer/newt/user.scm
index 97141cfe64..7c1cc2249d 100644
--- a/gnu/installer/newt/user.scm
+++ b/gnu/installer/newt/user.scm
@@ -143,7 +143,7 @@ REAL-NAME, and HOME-DIRECTORY as the initial values in the form."
(name name)
(real-name real-name)
(home-directory home-directory)
- (password password))
+ (password (make-secret password)))
(run-user-add-page #:name name
#:real-name real-name
#:home-directory
@@ -266,7 +266,7 @@ administrator (\"root\").")
(map (lambda (name real-name home password)
(user (name name) (real-name real-name)
(home-directory home)
- (password password)))
+ (password (make-secret password))))
names real-names homes passwords))))))
(lambda ()
(destroy-form-and-pop form))))))
@@ -274,5 +274,5 @@ administrator (\"root\").")
;; Add a "root" user simply to convey the root password.
(cons (user (name "root")
(home-directory "/root")
- (password (run-root-password-page)))
+ (password (make-secret (run-root-password-page))))
(run '())))