Mailing List Archive

[master] b7398dbf3 Reset the dir mode to 750 after mkdtemp(3) returns.
commit b7398dbf360f4ee5a2350dd76a5c0db1db716617
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Mon May 25 09:09:00 2020 +0000

Reset the dir mode to 750 after mkdtemp(3) returns.

Mkdtemp(3) creates the directory with mode 0700, and since it
already exists, we do not change the mode subsequently, which
causes jailed with uid=vcache to keel over.

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index e2fa37ba4..cd63ed93b 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -750,6 +750,7 @@ main(int argc, char * const *argv)
AN(p);
VSB_destroy(&vsb);
AN(mkdtemp(p));
+ AZ(chmod(p, 0750));
n_arg = p;
}
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit