Open gexqin opened 8 years ago
The code line
if 'SUDO_UID' in os.environ.keys():
should be changed to
if 'SUDO_UID' in os.environ.keys() or os.geteuid() == 0:
In fact you may be able to get to get rid of SUDO_UID - and test for both sudo and root with just os.geteuid() == 0 - I don't know. I don't use sudo. But I would presume sudo is just setting the euid to be root in a manner similar to su.
Hi your script very good. I test it and I find security issues. Since no pin code so I can use LightBlue app connect to ibeacon and when I connect it the script crash until I run script again.