]> granicus.if.org Git - cronie/commitdiff
Do not use putenv with string literal.
authorTomas Mraz <tmraz@fedoraproject.org>
Thu, 6 Jun 2013 18:13:26 +0000 (20:13 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Thu, 6 Jun 2013 18:13:26 +0000 (20:13 +0200)
src/cron.c

index 997488703bdacceb6dbe547335c86f020f172ccd..08d08121d2eff65bd4b10724be3acd78dcef6f7e 100644 (file)
@@ -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) < 0) {
+                       log_it("CRON", pid, "DEATH", "can't setenv PATH",
                                errno);
                        exit(1);
                }