Normalize privs and flags to uppercase so comparisons against allowed names will work