]>
Commit | Line | Data |
---|---|---|
8950e52d MT |
1 | From 5ac31751adfa31c5e5e316afc2f800037bd1cdca Mon Sep 17 00:00:00 2001 |
2 | From: Tomas Mraz <tmraz@fedoraproject.org> | |
3 | Date: Thu, 6 Jun 2013 20:13:26 +0200 | |
4 | Subject: [PATCH] Do not use putenv with string literal. | |
5 | ||
6 | --- | |
7 | src/cron.c | 4 ++-- | |
8 | 1 files changed, 2 insertions(+), 2 deletions(-) | |
9 | ||
10 | diff --git a/src/cron.c b/src/cron.c | |
11 | index 9974887..08d0812 100644 | |
12 | --- a/src/cron.c | |
13 | +++ b/src/cron.c | |
14 | @@ -244,8 +244,8 @@ int main(int argc, char *argv[]) { | |
15 | check_spool_dir(); | |
16 | ||
17 | if (ChangePath) { | |
18 | - if (putenv("PATH=" _PATH_DEFPATH) < 0) { | |
19 | - log_it("CRON", pid, "DEATH", "can't putenv PATH", | |
20 | + if (setenv("PATH", _PATH_DEFPATH, 1) < 0) { | |
21 | + log_it("CRON", pid, "DEATH", "can't setenv PATH", | |
22 | errno); | |
23 | exit(1); | |
24 | } | |
25 | -- | |
26 | 1.7.7.6 | |
27 |