]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - cronie/patches/cronie-1.4.10-use-setenv.patch
cronie: Update to 1.4.9.
[people/ms/ipfire-3.x.git] / cronie / patches / cronie-1.4.10-use-setenv.patch
diff --git a/cronie/patches/cronie-1.4.10-use-setenv.patch b/cronie/patches/cronie-1.4.10-use-setenv.patch
new file mode 100644 (file)
index 0000000..ddbfbbb
--- /dev/null
@@ -0,0 +1,27 @@
+From 5ac31751adfa31c5e5e316afc2f800037bd1cdca Mon Sep 17 00:00:00 2001
+From: Tomas Mraz <tmraz@fedoraproject.org>
+Date: Thu, 6 Jun 2013 20:13:26 +0200
+Subject: [PATCH] Do not use putenv with string literal.
+
+---
+ src/cron.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cron.c b/src/cron.c
+index 9974887..08d0812 100644
+--- a/src/cron.c
++++ b/src/cron.c
+@@ -244,8 +244,8 @@ int main(int argc, char *argv[]) {
+       check_spool_dir();
+       if (ChangePath) {
+-              if (putenv("PATH=" _PATH_DEFPATH) < 0) {
+-                      log_it("CRON", pid, "DEATH", "can't putenv PATH",
++              if (setenv("PATH", _PATH_DEFPATH, 1) < 0) {
++                      log_it("CRON", pid, "DEATH", "can't setenv PATH",
+                               errno);
+                       exit(1);
+               }
+-- 
+1.7.7.6
+