Elektrobit / flake-pilot

Registration/Control utility for applications launched through a runtime-engine, e.g containers
MIT License
9 stars 5 forks source link

Fixed sci command quoting in resume mode #115

Closed schaefi closed 1 year ago

schaefi commented 1 year ago

In resume mode sci calls commands through a vsock using socat EXEC. This commit makes sure that the quoting of the command string doesn't get lost and becomes effective at socket connection time. This Fixes #113

schaefi commented 1 year ago

@m-kat tested with

mybash -c \"ls -l\"
mybash -c '\"ls -l\"'

I'm sure we find a call string which doesn't work ;) but this patch here at least improves the situation.

As you can see I deleted the use of shell_words in the resume mode because it is contra productive to the EXEC feature of socat which we are using in this context. The quoting must survive until we reach the actual execution point. So far this worked for me