Skip to content

Commit 78e16e3

Browse files
committed
fix gids_count
1 parent 381b435 commit 78e16e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dcp/dcp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ int main(int argc, char** argv)
404404
/* setgroups before set gid or uid */
405405
if (egid > 0 || euid > 0) {
406406
/* record the original groups */
407-
if (getgroups(MAX_GIDS, &gids) < 0) {
407+
gids_count = getgroups(MAX_GIDS, &gids);
408+
if (gids_count < 0) {
408409
MFU_LOG(MFU_LOG_ERR, "Could not getgroups: %s", strerror(errno));
409410
mfu_finalize();
410411
MPI_Finalize();

0 commit comments

Comments
 (0)