How about moving the original strstr() tests inside of the if(geteuid() == 0) { ... } block? That will result in the binary path restrictions being in place when the launcher is installed as a setuid root binary. Those restrictions will not be in place during test runs.
How about moving the original strstr() tests inside of the if(geteuid() == 0) { ... } block? That will result in the binary path restrictions being in place when the launcher is installed as a setuid root binary. Those restrictions will not be in place during test runs.