Given a test program, /test-args, with the following content:
When I use chroot_vm.c to call /test-args with the arguments 1 2 3 4 5 6, I get back 1 2 3 4 5 6 respectively.
However, when I use chroot_vm.c to call /test-args with the arguments -- 1 2 3 4 5 6, I get back no arguments.
It seems that libkrun is stripping out arguments entirely if they contain --. I ran into this when I was trying to get tini to cooperate and realized that it wasn't seeing any parameters if the args contained a --.
Note that this doesn't happen if I don't use krun_set_exec at all and instead pivot to using /.krun_config.json to set my command, which works fine.
Given a test program,
/test-args, with the following content:When I use
chroot_vm.cto call/test-argswith the arguments1 2 3 4 5 6, I get back1 2 3 4 5 6respectively.However, when I use
chroot_vm.cto call/test-argswith the arguments-- 1 2 3 4 5 6, I get back no arguments.It seems that libkrun is stripping out arguments entirely if they contain
--. I ran into this when I was trying to get tini to cooperate and realized that it wasn't seeing any parameters if the args contained a--.Note that this doesn't happen if I don't use
krun_set_execat all and instead pivot to using/.krun_config.jsonto set my command, which works fine.