Closed ejrsimr closed 1 year ago
I missed this PR. I don't think that this will work. Since the command is not executed via a shell or system
like command that accepts shell, but through the execve
system call.
I had a prototype that works with in-memory files, however was hesitant to push that, since writing shell script in memory and executing them without writing to disk is kind of a common technique that malware often uses.
I think you are right that my solution was suboptimal and other solutions except perhaps for the in-memory one are not very resilient or cross-platform (e.g. setting the execute bit)
Currently easypredict.sh will only run if the file system defaults to giving execute permissions to new files.
The simplest solution is to just run teh script as a parameter to /bin/sh. The script is already dependent on /bin/sh existing via "#!/bin/sh" and so this doesn't create a new dependency.