Option -V and correct shell added.
This commit is contained in:
parent
d5e10f209c
commit
42434fb932
17
at-3.1.14-opt_V.patch
Normal file
17
at-3.1.14-opt_V.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff -up at-3.1.14/at.c.opt at-3.1.14/at.c
|
||||||
|
--- at-3.1.14/at.c.opt 2013-09-26 16:54:29.920476315 +0200
|
||||||
|
+++ at-3.1.14/at.c 2013-09-26 16:55:06.301562646 +0200
|
||||||
|
@@ -842,10 +842,9 @@ main(int argc, char **argv)
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (disp_version) {
|
||||||
|
- fprintf(stderr, "at version " VERSION "\n"
|
||||||
|
- "Please report bugs to the Debian bug tracking system (http://bugs.debian.org/)\n"
|
||||||
|
- "or contact the maintainers (at@packages.debian.org).\n");
|
||||||
|
- exit(EXIT_SUCCESS);
|
||||||
|
+ fprintf(stderr, "at version " VERSION "\n");
|
||||||
|
+ if (argc == 2)
|
||||||
|
+ exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* select our program
|
56
at-3.1.14-shell.patch
Normal file
56
at-3.1.14-shell.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
diff -up at-3.1.14/at.c.shell at-3.1.14/at.c
|
||||||
|
--- at-3.1.14/at.c.shell 2013-09-26 16:57:18.126861201 +0200
|
||||||
|
+++ at-3.1.14/at.c 2013-09-26 16:59:24.069127357 +0200
|
||||||
|
@@ -62,11 +62,8 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
-#ifdef TM_IN_SYS_TIME
|
||||||
|
#include <sys/time.h>
|
||||||
|
-#else
|
||||||
|
#include <time.h>
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
@@ -240,6 +237,12 @@ writefile(time_t runtimer, char queue)
|
||||||
|
int kill_errno;
|
||||||
|
int rc;
|
||||||
|
int mailsize = 128;
|
||||||
|
+ struct timeval tv;
|
||||||
|
+ struct timezone tz;
|
||||||
|
+ long int i;
|
||||||
|
+
|
||||||
|
+ gettimeofday(&tv, &tz);
|
||||||
|
+ srandom(getpid()+tv.tv_usec);
|
||||||
|
|
||||||
|
/* Install the signal handler for SIGINT; terminate after removing the
|
||||||
|
* spool file if necessary
|
||||||
|
@@ -450,6 +453,9 @@ writefile(time_t runtimer, char queue)
|
||||||
|
fprintf(fp, " || {\n\t echo 'Execution directory "
|
||||||
|
"inaccessible' >&2\n\t exit 1\n}\n");
|
||||||
|
|
||||||
|
+ i = random();
|
||||||
|
+ fprintf(fp, "${SHELL:-/bin/sh} << \'marcinDELIMITER%08lx\'\n", i);
|
||||||
|
+
|
||||||
|
istty = isatty(fileno(stdin));
|
||||||
|
if (istty) {
|
||||||
|
fprintf(stderr, "at> ");
|
||||||
|
@@ -465,7 +471,7 @@ writefile(time_t runtimer, char queue)
|
||||||
|
if (istty) {
|
||||||
|
fprintf(stderr, "<EOT>\n");
|
||||||
|
}
|
||||||
|
- fprintf(fp, "\n");
|
||||||
|
+ fprintf(fp, "marcinDELIMITER%08lx\n", i);
|
||||||
|
if (ferror(fp))
|
||||||
|
panic("Output error");
|
||||||
|
|
||||||
|
@@ -915,7 +921,7 @@ main(int argc, char **argv)
|
||||||
|
It also alows a warning diagnostic to be printed. Because of the
|
||||||
|
possible variance, we always output the diagnostic. */
|
||||||
|
|
||||||
|
- fprintf(stderr, "warning: commands will be executed using /bin/sh\n");
|
||||||
|
+ /* fprintf(stderr, "warning: commands will be executed using /bin/sh\n"); */
|
||||||
|
|
||||||
|
writefile(timer, queue);
|
||||||
|
break;
|
10
at.spec
10
at.spec
@ -20,11 +20,9 @@ Source5: atd.systemd
|
|||||||
Patch1: at-3.1.14-makefile.patch
|
Patch1: at-3.1.14-makefile.patch
|
||||||
Patch2: at-3.1.14-pam.patch
|
Patch2: at-3.1.14-pam.patch
|
||||||
Patch3: at-3.1.14-selinux.patch
|
Patch3: at-3.1.14-selinux.patch
|
||||||
#Patch2: at-3.1.12-opt_V.patch
|
Patch4: at-3.1.14-opt_V.patch
|
||||||
#Patch3: at-3.1.12-shell.patch
|
Patch5: at-3.1.14-shell.patch
|
||||||
#Patch4: at-3.1.13-nitpicks.patch
|
#Patch4: at-3.1.13-nitpicks.patch
|
||||||
#Patch5: at-3.1.13-pam.patch
|
|
||||||
#Patch6: at-3.1.13-selinux.patch
|
|
||||||
#Patch7: at-3.1.12-nowrap.patch
|
#Patch7: at-3.1.12-nowrap.patch
|
||||||
#Patch8: at-3.1.12-fix_no_export.patch
|
#Patch8: at-3.1.12-fix_no_export.patch
|
||||||
#Patch9: at-3.1.13-mailwithhostname.patch
|
#Patch9: at-3.1.13-mailwithhostname.patch
|
||||||
@ -75,8 +73,8 @@ cp %{SOURCE1} .
|
|||||||
%patch1 -p1 -b .make
|
%patch1 -p1 -b .make
|
||||||
%patch2 -p1 -b .pam
|
%patch2 -p1 -b .pam
|
||||||
%patch3 -p1 -b .selinux
|
%patch3 -p1 -b .selinux
|
||||||
#%%patch2 -p1 -b .opt_V
|
%patch4 -p1 -b .opt_V
|
||||||
#%%patch3 -p1 -b .shell
|
%patch5 -p1 -b .shell
|
||||||
#%%patch4 -p1 -b .nit
|
#%%patch4 -p1 -b .nit
|
||||||
#%%patch7 -p1 -b .nowrap
|
#%%patch7 -p1 -b .nowrap
|
||||||
#%%patch8 -p1 -b .export
|
#%%patch8 -p1 -b .export
|
||||||
|
Loading…
Reference in New Issue
Block a user