Bug in sgrp tag handler
Brought to you by:
jengelh
In function rc_volume_cond_sgrp, the code tries to check for the name associated with the primary gid of the user. If there is no such name, the function returns 0 and doesn't go on to check any secondary groups. This means that if your users are not all placed in named groups, the <sgrp> never matches anything at all.</sgrp>
This bug is NOT present in the code handling the "simple" sgrp test (<volume sgrp="...).
I'm attaching a patch which, I think, corrects matters.