X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;fp=src%2Fexec.c;h=80515d93d3ec4861d3cd69de7260bbd4e60ba8d3;hb=5ff74d56067ac64db801df5184eb8b97f4b2b645;hp=f10b816b2c9dd7d19bc6d2b35f6815f1727f2a5d;hpb=5ba78cae2b937f5ce50113be3b6f9e96a26dc062;p=collectd.git diff --git a/src/exec.c b/src/exec.c index f10b816b..80515d93 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) {