X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=28380ac33677788acd1ffc2b4058ba08a9661e53;hb=96b920e6b7bf70560eb95c911202afbeaab2b965;hp=d34f9d9168a7bcf997413c890695d7a022c9d072;hpb=11c8a760c2d354b2f4637bdb297efb253bfaa519;p=collectd.git diff --git a/src/exec.c b/src/exec.c index d34f9d91..28380ac3 100644 --- a/src/exec.c +++ b/src/exec.c @@ -369,7 +369,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, struct passwd *sp_ptr; struct passwd sp; - char nambuf[2048]; + char nambuf[4096]; if (pl->pid != 0) return (-1); @@ -382,7 +382,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, status = getpwnam_r(pl->user, &sp, nambuf, sizeof(nambuf), &sp_ptr); if (status != 0) { ERROR("exec plugin: Failed to get user information for user ``%s'': %s", - pl->user, sstrerror(errno, errbuf, sizeof(errbuf))); + pl->user, sstrerror(status, errbuf, sizeof(errbuf))); goto failed; } @@ -410,7 +410,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, if (0 != status) { ERROR("exec plugin: Failed to get group information " "for group ``%s'': %s", - pl->group, sstrerror(errno, errbuf, sizeof(errbuf))); + pl->group, sstrerror(status, errbuf, sizeof(errbuf))); goto failed; } if (NULL == gr_ptr) {