tftpd: call setgroups() before initgroups()
commit416046e2ad67508869ce472d8b8b0dd5578db0d7
authorH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:49:21 +0000 (29 17:49 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:49:21 +0000 (29 17:49 -0700)
tree244792704416d5574c3b897d78c3e1ab0afcc1cc
parentb9f2335e88dcb3939015843c7143f1533c755a46
tftpd: call setgroups() before initgroups()

Unconditionally call setgroups() before calling
initgroups(). That way if initgroups() fails for some reason (e.g. it
is unable to access /etc/groups or the equivalent) then at least the
group list will be empty.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
tftpd/tftpd.c