rpms/at/devel at-3.1.10-different_shell.patch,NONE,1.1

Marcela Mašláňová mmaslano at fedoraproject.org
Thu Feb 26 13:46:29 UTC 2009


Author: mmaslano

Update of /cvs/pkgs/rpms/at/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6098

Added Files:
	at-3.1.10-different_shell.patch 
Log Message:
Forgot patch.


at-3.1.10-different_shell.patch:

--- NEW FILE at-3.1.10-different_shell.patch ---
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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
-#ifdef TM_IN_SYS_TIME
-#include <sys/time.h>
-#else
 #include <time.h>
-#endif
+#include <sys/time.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -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) {




More information about the scm-commits mailing list