aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-05-08 21:48:34 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-05-08 21:48:34 -0400
commit35eb1786544da8c4b94df9cd1be4cafc41c4d523 (patch)
treecb79db9ae83598210b6ba9122d62cdc6860cfe75
parent22b1f0a5eada61410bf9fd7cb68e2a4d1c25666d (diff)
downloadstasis-35eb1786544da8c4b94df9cd1be4cafc41c4d523.tar.gz
Yet-another-workaround
* More temp directory noexec flag protection. Ugly.
-rw-r--r--src/omc_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/omc_main.c b/src/omc_main.c
index 6607d8e..90460ee 100644
--- a/src/omc_main.c
+++ b/src/omc_main.c
@@ -97,7 +97,7 @@ static void usage(char *progname) {
-static void check_system_requirements() {
+static void check_system_requirements(struct Delivery *ctx) {
const char *tools_required[] = {
"rsync",
NULL,
@@ -111,6 +111,10 @@ static void check_system_requirements() {
}
}
+ if (!globals.tmpdir && !ctx->storage.tmpdir) {
+ delivery_init_tmpdir(ctx);
+ }
+
struct DockerCapabilities dcap;
if (!docker_capable(&dcap)) {
msg(OMC_MSG_L2 | OMC_MSG_WARN, "Docker is broken\n");
@@ -221,7 +225,6 @@ int main(int argc, char *argv[]) {
printf(BANNER, VERSION, AUTHOR);
- check_system_requirements();
msg(OMC_MSG_L1, "Setup\n");
// Expose variables for use with the template engine
@@ -320,6 +323,7 @@ int main(int argc, char *argv[]) {
msg(OMC_MSG_ERROR | OMC_MSG_L2, "Failed to initialize delivery context\n");
exit(1);
}
+ check_system_requirements(&ctx);
msg(OMC_MSG_L2, "Configuring JFrog CLI\n");
if (delivery_init_artifactory(&ctx)) {