Update to new upstream release

This commit is contained in:
Ondřej Pohořelský 2021-05-20 17:05:51 +02:00
parent c6984163ba
commit e046bce812
8 changed files with 103 additions and 119 deletions

4
.gitignore vendored
View File

@ -9,3 +9,7 @@ at_3.1.12.orig.tar.gz
/at_3.1.20.orig.tar.gz /at_3.1.20.orig.tar.gz
/at_3.1.23.orig.tar.gz /at_3.1.23.orig.tar.gz
/at_3.1.23.orig.tar.gz.asc /at_3.1.23.orig.tar.gz.asc
/at_3.2.1.orig.tar.gz
/at_3.2.1.orig.tar.gz.asc
/at_3.2.2.orig.tar.gz
/at_3.2.2.orig.tar.gz.asc

View File

@ -1,24 +0,0 @@
diff -up at-3.1.18/parsetime.y.dst at-3.1.18/parsetime.y
--- at-3.1.18/parsetime.y.dst 2015-12-06 16:45:10.000000000 +0100
+++ at-3.1.18/parsetime.y 2015-07-01 13:53:14.088881926 +0200
@@ -476,8 +476,8 @@ parsetime(time_t currtime, int argc, cha
exectm = *localtime(&currtime);
currtime -= exectm.tm_sec;
exectm.tm_sec = 0;
- exectm.tm_isdst = -1;
memcpy(&currtm,&exectm,sizeof(currtm));
+ exectm.tm_isdst = -1;
time_only = 0;
yearspec = 0;
@@ -503,8 +503,8 @@ parsetime(time_t currtime, int argc, cha
return 0;
if (isgmt) {
exectime -= timezone;
- if (currtm.tm_isdst && !exectm.tm_isdst)
- exectime -= 3600;
+ if (exectm.tm_isdst)
+ exectime += 3600;
}
if (exectime < currtime)
panic("refusing to create job destined in the past");

View File

@ -1,6 +1,6 @@
diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c diff -ur b/atd.c a/atd.c
--- at-3.1.20/atd.c.lock-locks 2016-07-01 10:41:50.640867692 +0200 --- b/atd.c 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/atd.c 2016-07-01 10:42:32.345844967 +0200 +++ a/atd.c 2021-05-21 13:00:45.135020670 +0200
@@ -74,6 +74,9 @@ @@ -74,6 +74,9 @@
#include <syslog.h> #include <syslog.h>
#endif #endif
@ -11,7 +11,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
/* Local headers */ /* Local headers */
#include "privs.h" #include "privs.h"
@@ -288,7 +291,7 @@ run_file(const char *filename, uid_t uid @@ -275,7 +278,7 @@
* mail to the user. * mail to the user.
*/ */
pid_t pid; pid_t pid;
@ -20,7 +20,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
char jobbuf[9]; char jobbuf[9];
char *mailname = NULL; char *mailname = NULL;
int mailsize = 128; int mailsize = 128;
@@ -410,6 +413,10 @@ run_file(const char *filename, uid_t uid @@ -390,6 +393,10 @@
fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
@ -31,7 +31,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
/* /*
* If the spool directory is mounted via NFS `atd' isn't able to * If the spool directory is mounted via NFS `atd' isn't able to
* read from the job file and will bump out here. The file is * read from the job file and will bump out here. The file is
@@ -553,10 +560,7 @@ run_file(const char *filename, uid_t uid @@ -520,10 +527,7 @@
PRIV_END PRIV_END
} }
/* We're the parent. Let's wait. /* We're the parent. Let's wait.
@ -43,7 +43,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
non-blocking waitpid. So this blocking one will eventually non-blocking waitpid. So this blocking one will eventually
return with an ECHILD error. return with an ECHILD error.
*/ */
@@ -573,14 +577,14 @@ run_file(const char *filename, uid_t uid @@ -548,14 +552,14 @@
/* some sendmail implementations are confused if stdout, stderr are /* some sendmail implementations are confused if stdout, stderr are
* not available, so let them point to /dev/null * not available, so let them point to /dev/null
*/ */
@ -63,7 +63,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
if (unlink(filename) == -1) if (unlink(filename) == -1)
syslog(LOG_WARNING, "Warning: removing output file for job %li failed: %s", syslog(LOG_WARNING, "Warning: removing output file for job %li failed: %s",
@@ -588,7 +592,12 @@ run_file(const char *filename, uid_t uid @@ -563,7 +567,12 @@
/* The job is now finished. We can delete its input file. /* The job is now finished. We can delete its input file.
*/ */
@ -77,15 +77,15 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c
unlink(newname); unlink(newname);
free(newname); free(newname);
@@ -723,16 +732,18 @@ run_loop() @@ -673,16 +682,18 @@
/* Skip lock files */ /* Skip lock files */
if (queue == '=') { if (queue == '=') {
- /* FIXME: calhariz */ - /* FIXME: calhariz */
- /* I think the following code is broken, but commenting - /* I think the following code is broken, but commenting it
- may haven unknow side effects. Make a release and see - may cause unknow side effects. Make a release and see
- in the wild how it works. For more information see: - in the wild how it works. For more information see:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818508/* - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818508 */
- -
- /* if ((buf.st_nlink == 1) && (run_time + CHECK_INTERVAL <= now)) { */ - /* if ((buf.st_nlink == 1) && (run_time + CHECK_INTERVAL <= now)) { */
- /* /\* Remove stale lockfile FIXME: lock the lockfile, if you fail, it's still in use. *\/ */ - /* /\* Remove stale lockfile FIXME: lock the lockfile, if you fail, it's still in use. *\/ */

View File

@ -1,7 +1,7 @@
diff -up at-3.1.18/Makefile.in.make at-3.1.18/Makefile.in diff -ur b/Makefile.in a/Makefile.in
--- at-3.1.18/Makefile.in.make 2015-12-06 16:45:10.000000000 +0100 --- b/Makefile.in 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.18/Makefile.in 2016-03-23 12:38:15.652898579 +0100 +++ a/Makefile.in 2021-05-20 17:44:24.477236293 +0200
@@ -68,13 +68,13 @@ LIST = Filelist Filelist.asc @@ -71,13 +71,13 @@
all: at atd atd.service atrun all: at atd atd.service atrun
at: $(ATOBJECTS) at: $(ATOBJECTS)
@ -17,7 +17,7 @@ diff -up at-3.1.18/Makefile.in.make at-3.1.18/Makefile.in
y.tab.c y.tab.h: parsetime.y y.tab.c y.tab.h: parsetime.y
$(YACC) -d parsetime.y $(YACC) -d parsetime.y
@@ -89,38 +89,41 @@ atrun: atrun.in @@ -92,40 +92,41 @@
configure configure
.c.o: .c.o:
@ -28,6 +28,7 @@ diff -up at-3.1.18/Makefile.in.make at-3.1.18/Makefile.in
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir) - $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir)
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir) - $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir)
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir) - $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir)
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdatadir)
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir) - $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir)
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir) - $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir)
- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) - $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR)
@ -52,6 +53,7 @@ diff -up at-3.1.18/Makefile.in.make at-3.1.18/Makefile.in
$(LN_S) -f at $(IROOT)$(bindir)/atq $(LN_S) -f at $(IROOT)$(bindir)/atq
$(LN_S) -f at $(IROOT)$(bindir)/atrm $(LN_S) -f at $(IROOT)$(bindir)/atrm
- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir) - $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir)
- $(INSTALL) -g root -o root -m 755 batch-job $(IROOT)$(atdatadir)
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir) - $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir)
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir) - $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir)
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir) - $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir)

View File

@ -1,7 +1,7 @@
diff -up at-3.1.20/at.c.pam at-3.1.20/at.c diff -ur b/at.c a/at.c
--- at-3.1.20/at.c.pam 2016-06-28 22:18:00.000000000 +0200 --- b/at.c 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/at.c 2016-07-01 09:44:22.251683924 +0200 +++ a/at.c 2021-05-20 17:57:36.909775361 +0200
@@ -144,18 +144,13 @@ sigc(int signo) @@ -145,18 +145,12 @@
/* If the user presses ^C, remove the spool file and exit /* If the user presses ^C, remove the spool file and exit
*/ */
if (fcreated) { if (fcreated) {
@ -16,13 +16,12 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
- unlink(atfile); - unlink(atfile);
- setregid(effective_gid, real_gid); - setregid(effective_gid, real_gid);
- /* - /*
+ unlink(atfile);
PRIV_END PRIV_END
- */ - */
} }
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@@ -315,26 +310,19 @@ writefile(time_t runtimer, char queue) @@ -316,26 +310,19 @@
* bit. Yes, this is a kluge. * bit. Yes, this is a kluge.
*/ */
cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR); cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR);
@ -52,7 +51,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
/* We've successfully created the file; let's set the flag so it /* We've successfully created the file; let's set the flag so it
* gets removed in case of an interrupt or error. * gets removed in case of an interrupt or error.
*/ */
@@ -673,7 +661,7 @@ process_jobs(int argc, char **argv, int @@ -694,7 +681,7 @@
We need the unprivileged uid here since the file is owned by the real We need the unprivileged uid here since the file is owned by the real
(not effective) uid. (not effective) uid.
*/ */
@ -61,7 +60,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
if (queue == '=') { if (queue == '=') {
fprintf(stderr, "Warning: deleting running job\n"); fprintf(stderr, "Warning: deleting running job\n");
@@ -682,8 +670,8 @@ process_jobs(int argc, char **argv, int @@ -703,8 +690,8 @@
perr("Cannot unlink %.500s", dirent->d_name); perr("Cannot unlink %.500s", dirent->d_name);
rc = EXIT_FAILURE; rc = EXIT_FAILURE;
} }
@ -71,7 +70,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
done = 1; done = 1;
break; break;
@@ -693,7 +681,7 @@ process_jobs(int argc, char **argv, int @@ -714,7 +701,7 @@
FILE *fp; FILE *fp;
int ch; int ch;
@ -80,7 +79,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
fp = fopen(dirent->d_name, "r"); fp = fopen(dirent->d_name, "r");
if (fp) { if (fp) {
@@ -706,7 +694,7 @@ process_jobs(int argc, char **argv, int @@ -727,7 +714,7 @@
perr("Cannot open %.500s", dirent->d_name); perr("Cannot open %.500s", dirent->d_name);
rc = EXIT_FAILURE; rc = EXIT_FAILURE;
} }
@ -89,10 +88,10 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c
} }
break; break;
diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c diff -ur b/atd.c a/atd.c
--- at-3.1.20/atd.c.pam 2016-06-28 22:14:39.000000000 +0200 --- b/atd.c 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/atd.c 2016-07-01 09:44:22.251683924 +0200 +++ a/atd.c 2021-05-20 17:57:35.005776469 +0200
@@ -91,6 +91,10 @@ int selinux_enabled = 0; @@ -91,6 +91,10 @@
/* Macros */ /* Macros */
@ -103,7 +102,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
#define BATCH_INTERVAL_DEFAULT 60 #define BATCH_INTERVAL_DEFAULT 60
#define CHECK_INTERVAL 3600 #define CHECK_INTERVAL 3600
@@ -114,7 +118,7 @@ static int run_as_daemon = 0; @@ -114,7 +118,7 @@
static volatile sig_atomic_t term_signal = 0; static volatile sig_atomic_t term_signal = 0;
@ -112,7 +111,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
#include <security/pam_appl.h> #include <security/pam_appl.h>
static pam_handle_t *pamh = NULL; static pam_handle_t *pamh = NULL;
@@ -123,15 +127,7 @@ static const struct pam_conv conv = { @@ -123,15 +127,7 @@
NULL NULL
}; };
@ -129,7 +128,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
/* Signal handlers */ /* Signal handlers */
RETSIGTYPE RETSIGTYPE
@@ -292,7 +288,7 @@ run_file(const char *filename, uid_t uid @@ -292,7 +288,7 @@
char fmt[64]; char fmt[64];
unsigned long jobno; unsigned long jobno;
int rc; int rc;
@ -138,7 +137,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
int retcode; int retcode;
#endif #endif
@@ -449,17 +445,11 @@ run_file(const char *filename, uid_t uid @@ -449,17 +445,11 @@
fstat(fd_out, &buf); fstat(fd_out, &buf);
size = buf.st_size; size = buf.st_size;
@ -161,12 +160,13 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
#endif #endif
close(STDIN_FILENO); close(STDIN_FILENO);
@@ -473,7 +463,14 @@ run_file(const char *filename, uid_t uid @@ -473,7 +463,14 @@
else if (pid == 0) { else if (pid == 0) {
char *nul = NULL; char *nul = NULL;
char **nenvp = &nul; char **nenvp = &nul;
-
+ char **pam_envp=0L; + char **pam_envp=0L;
+
+ PRIV_START + PRIV_START
+#ifdef WITH_PAM +#ifdef WITH_PAM
+ pam_envp = pam_getenvlist(pamh); + pam_envp = pam_getenvlist(pamh);
@ -176,16 +176,16 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
/* Set up things for the child; we want standard input from the /* Set up things for the child; we want standard input from the
* input file, and standard output and error sent to our output file. * input file, and standard output and error sent to our output file.
*/ */
@@ -492,8 +489,6 @@ run_file(const char *filename, uid_t uid @@ -492,8 +489,6 @@
close(fd_in); close(fd_in);
close(fd_out); close(fd_out);
- PRIV_START - PRIV_START
- -
nice((tolower((int) queue) - 'a' + 1) * 2); nice((tolower((int) queue) - 'a') * 2);
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
@@ -514,9 +509,9 @@ run_file(const char *filename, uid_t uid @@ -514,9 +509,9 @@
chdir("/"); chdir("/");
@ -198,7 +198,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
PRIV_END PRIV_END
} }
/* We're the parent. Let's wait. /* We're the parent. Let's wait.
@@ -529,14 +524,6 @@ run_file(const char *filename, uid_t uid @@ -529,14 +524,6 @@
*/ */
waitpid(pid, (int *) NULL, 0); waitpid(pid, (int *) NULL, 0);
@ -213,21 +213,21 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
/* Send mail. Unlink the output file after opening it, so it /* Send mail. Unlink the output file after opening it, so it
* doesn't hang around after the run. * doesn't hang around after the run.
*/ */
@@ -567,8 +554,13 @@ run_file(const char *filename, uid_t uid @@ -567,8 +554,13 @@
unlink(newname); unlink(newname);
free(newname); free(newname);
+#ifdef ATD_MAIL_PROGRAM +#ifdef ATD_MAIL_PROGRAM
if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) { if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) {
+ int mail_pid = -1; + int mail_pid = -1;
+ mail_pid = fork();
+ +
+ mail_pid = fork();
+ if ( mail_pid == 0 ) { + if ( mail_pid == 0 ) {
PRIV_START PRIV_START
if (initgroups(pentry->pw_name, pentry->pw_gid)) if (initgroups(pentry->pw_name, pentry->pw_gid))
@@ -590,7 +582,20 @@ run_file(const char *filename, uid_t uid @@ -590,7 +582,20 @@
perr("Exec failed for mail command"); perr("Exec failed for mail command");
PRIV_END PRIV_END
@ -248,10 +248,10 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
diff -up at-3.1.20/config.h.in.pam at-3.1.20/config.h.in diff -ur b/config.h.in a/config.h.in
--- at-3.1.20/config.h.in.pam 2015-12-18 21:29:24.000000000 +0100 --- b/config.h.in 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/config.h.in 2016-07-01 09:44:22.251683924 +0200 +++ a/config.h.in 2021-05-20 17:59:32.127708342 +0200
@@ -68,8 +68,8 @@ @@ -71,8 +71,8 @@
/* Define to 1 if you have the <nlist.h> header file. */ /* Define to 1 if you have the <nlist.h> header file. */
#undef HAVE_NLIST_H #undef HAVE_NLIST_H
@ -262,10 +262,10 @@ diff -up at-3.1.20/config.h.in.pam at-3.1.20/config.h.in
/* Define to 1 if you have the `pstat_getdynamic' function. */ /* Define to 1 if you have the `pstat_getdynamic' function. */
#undef HAVE_PSTAT_GETDYNAMIC #undef HAVE_PSTAT_GETDYNAMIC
diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac diff -ur b/configure.ac a/configure.ac
--- at-3.1.20/configure.ac.pam 2016-06-28 22:55:52.000000000 +0200 --- b/configure.ac 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/configure.ac 2016-07-01 09:45:23.268092527 +0200 +++ a/configure.ac 2021-05-20 17:59:29.088710109 +0200
@@ -78,7 +78,7 @@ AC_FUNC_GETLOADAVG @@ -96,7 +96,7 @@
AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid) AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
AC_CHECK_HEADERS(security/pam_appl.h, [ AC_CHECK_HEADERS(security/pam_appl.h, [
PAMLIB="-lpam" PAMLIB="-lpam"
@ -274,7 +274,7 @@ diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac
]) ])
dnl Checking for programs dnl Checking for programs
@@ -239,6 +239,13 @@ AC_ARG_WITH(daemon_username, @@ -257,6 +257,13 @@
) )
AC_SUBST(DAEMON_USERNAME) AC_SUBST(DAEMON_USERNAME)
@ -288,10 +288,10 @@ diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac
AC_ARG_WITH(selinux, AC_ARG_WITH(selinux,
[ --with-selinux Define to run with selinux (default=check)], [ --with-selinux Define to run with selinux (default=check)],
[], [],
diff -up at-3.1.20/Makefile.in.pam at-3.1.20/Makefile.in diff -ur b/Makefile.in a/Makefile.in
--- at-3.1.20/Makefile.in.pam 2016-07-01 09:44:22.250683901 +0200 --- b/Makefile.in 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/Makefile.in 2016-07-01 09:44:22.252683947 +0200 +++ a/Makefile.in 2021-05-20 18:00:04.874689294 +0200
@@ -68,7 +68,7 @@ LIST = Filelist Filelist.asc @@ -71,7 +71,7 @@
all: at atd atd.service atrun all: at atd atd.service atrun
at: $(ATOBJECTS) at: $(ATOBJECTS)
@ -300,9 +300,9 @@ diff -up at-3.1.20/Makefile.in.pam at-3.1.20/Makefile.in
rm -f $(CLONES) rm -f $(CLONES)
$(LN_S) -f at atq $(LN_S) -f at atq
$(LN_S) -f at atrm $(LN_S) -f at atrm
diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c diff -ur b/perm.c a/perm.c
--- at-3.1.20/perm.c.pam 2015-08-22 00:09:22.000000000 +0200 --- b/perm.c 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/perm.c 2016-07-01 09:44:22.252683947 +0200 +++ a/perm.c 2021-05-20 18:01:58.689621839 +0200
@@ -51,6 +51,14 @@ @@ -51,6 +51,14 @@
#define PRIV_END while(0) #define PRIV_END while(0)
#endif #endif
@ -318,7 +318,7 @@ diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c
/* Structures and unions */ /* Structures and unions */
@@ -108,18 +116,45 @@ user_in_file(const char *path, const cha @@ -108,18 +116,45 @@
int int
check_permission() check_permission()
{ {
@ -367,10 +367,10 @@ diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c
allow = user_in_file(ETCDIR "/at.allow", pentry->pw_name); allow = user_in_file(ETCDIR "/at.allow", pentry->pw_name);
if (allow==0 || allow==1) if (allow==0 || allow==1)
return allow; return allow;
diff -up at-3.1.20/privs.h.pam at-3.1.20/privs.h diff -ur b/privs.h a/privs.h
--- at-3.1.20/privs.h.pam 2015-08-22 00:09:22.000000000 +0200 --- b/privs.h 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/privs.h 2016-07-01 09:44:22.252683947 +0200 +++ a/privs.h 2021-05-20 18:02:51.847589692 +0200
@@ -144,3 +144,63 @@ extern gid_t real_gid, effective_gid, da @@ -144,3 +144,62 @@
#error "Cannot implement user ID swapping without setreuid or setresuid" #error "Cannot implement user ID swapping without setreuid or setresuid"
#endif #endif
#endif #endif
@ -433,4 +433,3 @@ diff -up at-3.1.20/privs.h.pam at-3.1.20/privs.h
+} +}
+ +
+#endif +#endif
+

View File

@ -1,6 +1,6 @@
diff -up at-3.1.20/at.c.shell at-3.1.20/at.c diff -ur b/at.c a/at.c
--- at-3.1.20/at.c.shell 2016-07-01 09:47:13.392684445 +0200 --- b/at.c 2021-04-25 03:31:30.000000000 +0200
+++ at-3.1.20/at.c 2016-07-01 09:48:47.679931959 +0200 +++ a/at.c 2021-05-21 12:51:48.123335137 +0200
@@ -62,11 +62,8 @@ @@ -62,11 +62,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -13,7 +13,7 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
@@ -239,6 +236,12 @@ writefile(time_t runtimer, char queue) @@ -245,6 +242,12 @@
int kill_errno; int kill_errno;
int rc; int rc;
int mailsize = 128; int mailsize = 128;
@ -26,7 +26,7 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c
/* Install the signal handler for SIGINT; terminate after removing the /* Install the signal handler for SIGINT; terminate after removing the
* spool file if necessary * spool file if necessary
@@ -465,6 +468,9 @@ writefile(time_t runtimer, char queue) @@ -492,6 +495,9 @@
fprintf(fp, " || {\n\t echo 'Execution directory " fprintf(fp, " || {\n\t echo 'Execution directory "
"inaccessible' >&2\n\t exit 1\n}\n"); "inaccessible' >&2\n\t exit 1\n}\n");
@ -35,8 +35,8 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c
+ +
istty = isatty(fileno(stdin)); istty = isatty(fileno(stdin));
if (istty) { if (istty) {
fprintf(stderr, "at> "); runtime = localtime(&runtimer);
@@ -480,7 +486,7 @@ writefile(time_t runtimer, char queue) @@ -512,7 +518,7 @@
if (istty) { if (istty) {
fprintf(stderr, "<EOT>\n"); fprintf(stderr, "<EOT>\n");
} }
@ -45,3 +45,4 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c
if (ferror(fp)) if (ferror(fp))
panic("Output error"); panic("Output error");
fflush(fp); fflush(fp);
Only in a: .vscode

18
at.spec
View File

@ -2,24 +2,24 @@
Summary: Job spooling tools Summary: Job spooling tools
Name: at Name: at
Version: 3.1.23 Version: 3.2.2
Release: 8%{?dist} Release: 1%{?dist}
# http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright
# + install-sh is MIT license with changes under Public Domain # + install-sh is MIT license with changes under Public Domain
License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
URL: http://ftp.debian.org/debian/pool/main/a/at URL: http://ftp.debian.org/debian/pool/main/a/at
Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz Source: http://software.calhariz.com/at/at_%{version}.orig.tar.gz
# git upstream source git://git.debian.org/git/collab-maint/at.git # git upstream source git://git.debian.org/git/collab-maint/at.git
Source1: pam_atd Source1: pam_atd
Source3: atd.sysconf Source3: atd.sysconf
Source5: atd.systemd Source5: atd.systemd
Patch: at-aarch64.patch Patch: at-aarch64.patch
Patch: at-3.1.18-make.patch Patch: at-3.2.2-make.patch
Patch: at-3.1.20-pam.patch Patch: at-3.2.2-pam.patch
Patch: at-3.1.14-opt_V.patch Patch: at-3.1.14-opt_V.patch
Patch: at-3.1.20-shell.patch Patch: at-3.2.2-shell.patch
Patch: at-3.1.18-nitpicks.patch Patch: at-3.1.18-nitpicks.patch
Patch: at-3.1.14-fix_no_export.patch Patch: at-3.1.14-fix_no_export.patch
Patch: at-3.1.14-mailwithhostname.patch Patch: at-3.1.14-mailwithhostname.patch
@ -28,8 +28,7 @@ Patch: at-3.1.20-aborted-jobs.patch
Patch: at-3.1.18-noabort.patch Patch: at-3.1.18-noabort.patch
Patch: at-3.1.16-fclose-error.patch Patch: at-3.1.16-fclose-error.patch
Patch: at-3.1.16-clear-nonjobs.patch Patch: at-3.1.16-clear-nonjobs.patch
Patch: at-3.1.18-utc-dst.patch Patch: at-3.2.2-lock-locks.patch
Patch: at-3.1.20-lock-locks.patch
Patch: at-3.1.23-document-n.patch Patch: at-3.1.23-document-n.patch
Patch: at-3.1.20-log-jobs.patch Patch: at-3.1.20-log-jobs.patch
Patch: at-3.2.23-coverity-fix.patch Patch: at-3.2.23-coverity-fix.patch
@ -167,6 +166,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
%attr(0644,root,root) /%{_unitdir}/atd.service %attr(0644,root,root) /%{_unitdir}/atd.service
%changelog %changelog
* Fri May 21 2021 Ondřej Pohořelský <opohorel@redhat.com> - 3.2.2-1
- Update to new upstream release
* Fri Apr 16 2021 Jan Staněk <jstanek@redhat.com> - 3.1.23-8 * Fri Apr 16 2021 Jan Staněk <jstanek@redhat.com> - 3.1.23-8
- Patch issues found by coverity (rhbz#1938678) - Patch issues found by coverity (rhbz#1938678)

View File

@ -1,2 +1,2 @@
SHA512 (at_3.1.23.orig.tar.gz) = ee5cf5abf32cf1e89746e427d1cc20005ef49fad47db55512c90042a77e86b2c15f5de029c79573bc86ce4aead6ed2d561b89812510aadbc5763f9288b467cfd SHA512 (at_3.2.2.orig.tar.gz) = e6f5aeddd89438aadff627d654ebc821a0b0e1a600ebaacc8a5fd3ec2c7c716f593757d00501311736d28f6d4276899667d6901d70836af208ff7d181b5b680f
SHA512 (at_3.1.23.orig.tar.gz.asc) = ccc32753d31cccd6257c25acfda3f407c3cab52ca9b6c120eca852207cb00e143daa78b81bc65cc2703c5f94cf5d7fae08d301cfc57541e1ebd31df6ae2121bb SHA512 (at_3.2.2.orig.tar.gz.asc) = 54716fef56436c352a08c4bba5b0693a3dd7e187c320dc1ebf4e840b9175f024f3eb11b0a1f5dd428cfb3f2d59de8ab45b394576d71c033f99291a7bee3c1005