aboutsummaryrefslogtreecommitdiff
path: root/src/connection
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-09-15 16:49:57 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-10-23 10:51:30 -0700
commitb4eb20904aa8f4ea7ec0ef58eac7889b4b864277 (patch)
treefac6aa9cd815c3ae69829c41a921871cdfc4654a /src/connection
parent9f283262438bb0656870648f5a2f7bedae4d1030 (diff)
downloadconsfigurator-b4eb20904aa8f4ea7ec0ef58eac7889b4b864277.tar.gz
:SETUID: ensure that the data directory actually exists
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r--src/connection/setuid.lisp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection/setuid.lisp b/src/connection/setuid.lisp
index 2bc3baa..ef00967 100644
--- a/src/connection/setuid.lisp
+++ b/src/connection/setuid.lisp
@@ -52,7 +52,8 @@
(user (connection-connattr connection :remote-user)))
(run-program (list "chown" "-R"
(format nil "~A:~A" uid gid)
- (unix-namestring (slot-value connection 'datadir))))
+ (unix-namestring (ensure-directories-exist
+ (slot-value connection 'datadir)))))
(posix-login-environment
user (connection-connattr connection :remote-home))
;; We are privileged, so this sets the real, effective and saved IDs.