diff --git a/at-3.1.8-closedir.patch b/at-3.1.8-closedir.patch deleted file mode 100644 index 2d1f051..0000000 --- a/at-3.1.8-closedir.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- at.c.orig 2002-01-18 05:15:27.000000000 +0100 -+++ at.c 2009-08-13 22:48:21.000000000 +0200 -@@ -580,6 +580,9 @@ - else - printf("%ld\t%s %c\n", jobno, timestr, queue); - } -+ -+ closedir(spool); -+ - PRIV_END - } - diff --git a/at-3.1.8-leak-fix.patch b/at-3.1.8-leak-fix.patch new file mode 100644 index 0000000..31daf60 --- /dev/null +++ b/at-3.1.8-leak-fix.patch @@ -0,0 +1,39 @@ +--- at.c.orig 2009-08-27 11:22:49.000000000 +0200 ++++ at.c 2009-08-27 12:12:58.000000000 +0200 +@@ -600,6 +600,9 @@ + else + printf("%ld\t%s %c\n", jobno, timestr, queue); + } ++ ++ closedir(spool); ++ + PRIV_END + } + +@@ -676,6 +679,11 @@ + while ((ch = getc(fp)) != EOF) { + putchar(ch); + } ++ PRIV_START ++ if (fp!=NULL) { ++ fclose(fp); ++ } ++ PRIV_END + } + break; + +@@ -687,7 +695,13 @@ + } + } + } +- } ++ } ++ ++ PRIV_START ++ if (spool!=NULL) { ++ closedir(spool); ++ } ++ PRIV_END + } /* delete_jobs */ + + #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; diff --git a/at.changes b/at.changes index 58f4a77..e19bc3c 100644 --- a/at.changes +++ b/at.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 27 12:16:43 CEST 2009 - mseben@novell.com + +- closedir.patch renamed to leak-fix.patch and added others fixs + of resource leaks (bnc#533454) + ------------------------------------------------------------------- Thu Aug 13 20:50:51 UTC 2009 - mseben@novell.com diff --git a/at.spec b/at.spec index 0be2773..59e166b 100644 --- a/at.spec +++ b/at.spec @@ -49,7 +49,8 @@ Patch12: %{name}-%{version}-queue-nice-level.patch Patch13: %{name}-%{version}-cleanup_perm.patch # PATCH-FIX-UPSTRAM pam-session-as-root (bnc#408986, bnc#239210) Patch14: %{name}-%{version}-pam-session-as-root.patch -Patch15: %{name}-%{version}-closedir.patch +# PATCH-FIX-UPSTRAM clean-up opened descriptors (bnc#533454, bnc#523346) +Patch15: %{name}-%{version}-leak-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /usr/sbin/useradd /usr/sbin/groupadd %fillup_prereq %insserv_prereq