A program that at runtime checks if it's running as root, rather than checking for the actual permissions that it requires. I don't think I've seen such bad practise any time before, to be honest.
I don't really see why the program would require to run as root. Root privileges are way too powerful. All that's needed appears to be access to some USB devices. So the proper solution is to ship udev rules for those vid/pid combinations, rather than forcing people to run code with way too high privileges.
A program that at runtime checks if it's running as root, rather than checking for the actual permissions that it requires. I don't think I've seen such bad practise any time before, to be honest.
I don't really see why the program would require to run as root. Root privileges are way too powerful. All that's needed appears to be access to some USB devices. So the proper solution is to ship udev rules for those vid/pid combinations, rather than forcing people to run code with way too high privileges.