Comment 28 for bug 286529

Revision history for this message
Savvas Radevic (medigeek) wrote :

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