Skip to content

Commit

Permalink
Add a ${workdir}/vmod_cache subdirectory for caching compiled
Browse files Browse the repository at this point in the history
VMODs.  Otherwise jail_unix doesn't allow you to use VMODs.
  • Loading branch information
bsdphk committed Jan 7, 2017
1 parent 1041a3d commit dd5d189
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bin/varnishd/mgt/mgt_child.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ mgt_launch_child(struct cli *cli)

child_state = CH_STARTING;

if (VJ_make_vcldir("vmod_cache")) {
VCLI_Out(cli, "Could not create vmod cache dir");
VCLI_SetResult(cli, CLIS_UNKNOWN);
return;
}

/* Open pipe for mgr->child CLI */
AZ(pipe(cp));
heritage.cli_in = cp[0];
Expand Down
2 changes: 1 addition & 1 deletion lib/libvcc/vcc_vmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ vcc_ParseImport(struct vcc *tl)
AN(vmd);
AN(vmd->file_id);
VSB_printf(ifp->ini, "\t \"%s\",\n", vmd->file_id);
VSB_printf(ifp->ini, "\t \"./_vmod_%.*s.%s\"\n",
VSB_printf(ifp->ini, "\t \"./vmod_cache/_vmod_%.*s.%s\"\n",
PF(mod), vmd->file_id);
VSB_printf(ifp->ini, "\t ))\n");
VSB_printf(ifp->ini, "\t\treturn(1);");
Expand Down

0 comments on commit dd5d189

Please sign in to comment.