Feature/cc 324.2

DEMO for 2nd fix:
```
# plu@plu-9: id -a huey
uid=1003(huey) gid=1003(foo) groups=1003(foo)
# plu@plu-9: gcc -DUNIT_TEST_CAUTH -o cauth cauth.c -lpam
# plu@plu-9: sudo ./cauth sudo huey huey foo
authenticate() returned 0
# plu@plu-9: sudo ./cauth sudo huey huey fff
authenticate() returned 4
```