def METHOD_NAME(self, enforcing, type):
    path = selinux.selinux_path() + "config"
    backup_path = path + ".bck"
    fd = open(path)
    lines = fd.readlines()
    fd.close()
    fd = open(backup_path, "w")
    for l in lines:
        if l.startswith("SELINUX="):
            fd.write("SELINUX=%s\n" % enforcing)
            continue
        if l.startswith("SELINUXTYPE="):
            fd.write("SELINUXTYPE=%s\n" % type)
            continue
        fd.write(l)
    fd.close()
    os.rename(backup_path, path)