- prevent arbitrary destruction of at jobs (based on 564243)

This commit is contained in:
Marcela Mašláňová 2010-02-12 12:18:30 +00:00
parent c5c176fd70
commit 40fa1a06f1
2 changed files with 23 additions and 1 deletions

17
at-3.1.12-nowrap.patch Normal file
View File

@ -0,0 +1,17 @@
diff -up at-3.1.12/at.c.nowrap at-3.1.12/at.c
--- at-3.1.12/at.c.nowrap 2010-02-12 12:48:23.000000000 +0100
+++ at-3.1.12/at.c 2010-02-12 12:51:18.781921727 +0100
@@ -308,9 +308,12 @@ writefile(time_t runtimer, char queue)
if (*ap == ' ')
*ap = '0';
- if (stat(atfile, &statbuf) != 0)
+ if (stat(atfile, &statbuf) != 0) {
if (errno != ENOENT)
perr("Cannot access " ATJOB_DIR);
+ } else {
+ perr("atjob file already exists; bailing");
+ }
/* Create the file. The x bit is only going to be set after it has
* been completely written out, to make sure it is not executed in the

View File

@ -6,7 +6,7 @@
Summary: Job spooling tools Summary: Job spooling tools
Name: at Name: at
Version: %{major_ver} Version: %{major_ver}
Release: 2%{dist} Release: 3%{dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://ftp.debian.org/debian/pool/main/a/at URL: http://ftp.debian.org/debian/pool/main/a/at
@ -24,6 +24,7 @@ Patch4: at-3.1.12-nitpicks.patch
Patch5: at-3.1.12-pam.patch Patch5: at-3.1.12-pam.patch
Patch6: at-3.1.12-selinux.patch Patch6: at-3.1.12-selinux.patch
Patch7: at-3.1.12-fix.patch Patch7: at-3.1.12-fix.patch
Patch8: at-3.1.12-nowrap.patch
BuildRequires: fileutils chkconfig /etc/init.d BuildRequires: fileutils chkconfig /etc/init.d
BuildRequires: flex bison autoconf BuildRequires: flex bison autoconf
@ -60,6 +61,7 @@ cp %{SOURCE1} .
%patch5 -p1 -b .pam %patch5 -p1 -b .pam
%patch6 -p1 -b .selinux %patch6 -p1 -b .selinux
%patch7 -p1 -b .fix %patch7 -p1 -b .fix
%patch8 -p1 -b .nowrap
%build %build
# patch9 touches configure.in # patch9 touches configure.in
@ -161,6 +163,9 @@ fi
%attr(0755,root,root) %{_libdir}/pm-utils/sleep.d/56atd %attr(0755,root,root) %{_libdir}/pm-utils/sleep.d/56atd
%changelog %changelog
* Fri Feb 12 2010 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-41
- prevent arbitrary destruction of at jobs (based on 564243)
* Mon Jan 18 2010 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.12-2 * Mon Jan 18 2010 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.12-2
- polish pam in atd again - polish pam in atd again