util: Split out helper method for getting admin group IDs

This introduces one small functional change: if any of the groups in
`EXTRA_ADMIN_GROUPS` can’t be resolved using `getgrnam()`, an error will
now be thrown. Previously, it would be ignored.

Other than that, this introduces no functional changes and is just
intended as a code cleanup.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
1 job for master in 1 minute and 9 seconds
Status Job ID Name Coverage
  Test
passed #2549343
build-fedora

00:01:09