Err... actually I don't think there's a need to check username == 'root', since root has user id 0.
I think this should do fine:
from os import remove, mkdir, geteuid, getenv
def isnormal(username): #FIXME: Hide active user - bug #286529 if (getenv('SUDO_USER') and username == getenv('SUDO_USER')): return False
Err... actually I don't think there's a need to check username == 'root', since root has user id 0.
I think this should do fine:
from os import remove, mkdir, geteuid, getenv
def isnormal(username): 'SUDO_USER' ) and username == getenv( 'SUDO_USER' )):
#FIXME: Hide active user - bug #286529
if (getenv(
return False