Need help finding clues to a fault involving a call to system()
Here's the current order of actions
1. I recompile and launch gasp
2. gasp generates a shell string for use in system() so that it can launch itself under root user mode (sudo/pkexec)
3. gasp prints the string then immediately calls system() with the string it printed, here's the generated string with paths a hacker could use edited to just ~
Code:
pkexec /~/gasp.elf --inrootmode -D PWD="/~" -D HOME="/~" -D DISPLAY=":0" -D XDG_CURRENT_DESKTOP="X-Cinnamon" -D GDMSESSION="cinnamon"
I tried clearing errno before the call then checking if it was set after to catch the error but no dice, I also try returning the value it returns to main() but also no dice, also before either of those codes get returned the 1st instance of gasp just seems to quit with this message:
Quote:
make: *** [makefile:127: run] Error 1
Any ideas on how I could identify what actually happened so I can search for the source of the problem