1 diff -u -ruN logrotate-3.7.1-cur/logrotate.c logrotate-3.7.1/logrotate.c
2 --- logrotate-3.7.1-cur/logrotate.c 2005-05-25 18:20:41.000000000 -0400
3 +++ logrotate-3.7.1/logrotate.c 2005-05-25 18:21:10.000000000 -0400
7 static int runScript(char * logfn, char * script) {
14 message(MESS_DEBUG, "running script with arg %s: \"%s\"\n",
20 - snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp");
22 - if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) {
23 - message(MESS_DEBUG, "error creating %s: %s\n", filespec,
32 - if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
33 - write(fd, script, strlen(script)) != strlen(script)) {
34 - message(MESS_DEBUG, "error writing %s\n", filespec);
43 - execlp(filespec, filespec, logfn, NULL);
44 + execl("/bin/sh", "sh", "-c", script, NULL);