Add priv.c: reworked version of priv dropping code