execute_command2 is strange. It should not conditionally run stuff out of /tmp. Running stuff out of /etc is a bit odd too, but is at least safe. I would expect it to run out of /usr/lib, with configuration details in /etc instead.
If I understand correctly, this daemon just reads hardware states and sets hardware state? After opening the required files, could it drop privileges?
execute_command2 is strange. It should not conditionally run stuff out of /tmp. Running stuff out of /etc is a bit odd too, but is at least safe. I would expect it to run out of /usr/lib, with configuration details in /etc instead.
If I understand correctly, this daemon just reads hardware states and sets hardware state? After opening the required files, could it drop privileges?