From 1c2a4f3ada7f7dbf4c847ba285f770f8a31a07d9 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Tue, 1 Dec 2020 18:47:07 -0600 Subject: [PATCH 1/3] clisp save-image fix. From Pierre Neidhardt. Previously, we checked to see whether the image was a standalone image or not, but the value we passed to clisp's `ext:saveinitmem` was true in all cases, so the images were always being marked as executable, whether or not that was the right thing. --- uiop/image.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uiop/image.lisp b/uiop/image.lisp index 576764a5..afa2b7c0 100644 --- a/uiop/image.lisp +++ b/uiop/image.lisp @@ -366,7 +366,7 @@ or COMPRESSION on SBCL, and APPLICATION-TYPE on SBCL/Windows." :quiet t :start-package *package* :keep-global-handlers nil - :executable (if executable 0 t) ;--- requires clisp 2.48 or later, still catches --clisp-x + :executable (if executable t nil) ;--- requires clisp 2.48 or later, still catches --clisp-x (when executable (list ;; :parse-options nil ;--- requires a non-standard patch to clisp. -- GitLab From 09c5b4b3ebb68495c0f6ef50c36855be2cd8c299 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Sun, 9 May 2021 08:56:15 -0500 Subject: [PATCH 2/3] Revert "clisp save-image fix." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Faré explained why this is wrong. This reverts commit f232f94414b27e6497611973debbb97a21665082.e --- uiop/image.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uiop/image.lisp b/uiop/image.lisp index afa2b7c0..576764a5 100644 --- a/uiop/image.lisp +++ b/uiop/image.lisp @@ -366,7 +366,7 @@ or COMPRESSION on SBCL, and APPLICATION-TYPE on SBCL/Windows." :quiet t :start-package *package* :keep-global-handlers nil - :executable (if executable t nil) ;--- requires clisp 2.48 or later, still catches --clisp-x + :executable (if executable 0 t) ;--- requires clisp 2.48 or later, still catches --clisp-x (when executable (list ;; :parse-options nil ;--- requires a non-standard patch to clisp. -- GitLab From 683059fd654c7b0fad749d41d7a1005d26f677e1 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Sun, 9 May 2021 09:04:08 -0500 Subject: [PATCH 3/3] Add explanation for clisp dump-image. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Put in an explanation of the oddball `executable` argument to clisp (thanks to Faré). --- uiop/image.lisp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uiop/image.lisp b/uiop/image.lisp index 576764a5..f3842a92 100644 --- a/uiop/image.lisp +++ b/uiop/image.lisp @@ -366,6 +366,10 @@ or COMPRESSION on SBCL, and APPLICATION-TYPE on SBCL/Windows." :quiet t :start-package *package* :keep-global-handlers nil + ;; Faré explains the odd executable value (slightly paraphrased): + ;; 0 is very different from t in clisp and there for a good reason: + ;; 0 turns the executable into one that has its own command-line handling, so hackers can't + ;; use the underlying -i or -x to turn your would-be restricted binary into an unrestricted evaluator. :executable (if executable 0 t) ;--- requires clisp 2.48 or later, still catches --clisp-x (when executable (list -- GitLab