diff -up at-3.1.10/at.c.fix at-3.1.10/at.c --- at-3.1.10/at.c.fix 2009-02-26 14:31:55.000000000 +0100 +++ at-3.1.10/at.c 2009-02-26 14:37:49.000000000 +0100 @@ -61,12 +61,8 @@ #include #include #include - -#ifdef TM_IN_SYS_TIME -#include -#else #include -#endif +#include #ifdef HAVE_UNISTD_H #include @@ -244,6 +240,12 @@ writefile(time_t runtimer, char queue) int kill_errno; int rc; int mailsize = 128; + struct timeval tv; + struct timezone tz; + int i; + + gettimeofday(&tv, &tz); + srandom(getpid()+tv.tv_usec); /* Install the signal handler for SIGINT; terminate after removing the * spool file if necessary @@ -455,7 +457,8 @@ writefile(time_t runtimer, char queue) fprintf(fp, " || {\n\t echo 'Execution directory " "inaccessible' >&2\n\t exit 1\n}\n"); - fprintf(fp, "${SHELL:-/bin/sh} << `(dd if=/dev/urandom count=200 bs=1 2>/dev/null|LC_ALL=C tr -d -c '[:alnum:]')`\n\n"); + i = random(); + fprintf(fp, "${SHELL:-/bin/sh} << marcinDELIMITER%x\nmarcinDELIMITER%x\n", i,i); istty = isatty(fileno(stdin)); if (istty) {