path.c: simplify adjust_shared_perm()