ALT Linux repos
S: | 4.1.20060426-alt10.3 |
5.0: | 4.1.20060426-alt6 |
4.1: | 4.1.20060426-alt4 |
4.0: | 4.1.20060426-alt4 |
3.0: | 4.1.20040916-alt2 |
Group :: System/Servers
RPM: vixie-cron
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: vixie-cron-4.1.20060426-alt-path.patch
Download
Download
--- vixie-cron-4.1.20060426/usr.sbin/cron/entry.c
+++ vixie-cron-4.1.20060426/usr.sbin/cron/entry.c
@@ -306,8 +306,10 @@
#ifndef LOGIN_CAP
/* If login.conf is in use we will get the default PATH later. */
if (!env_get("PATH", e->envp)) {
- if (snprintf(envstr, sizeof envstr, "PATH=%s", _PATH_DEFPATH) >=
- sizeof(envstr))
+ if (snprintf(envstr, sizeof(envstr), "PATH=%s:%s/bin",
+ (pw->pw_uid ? "/usr/local/bin:/usr/bin:/bin" :
+ "/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"),
+ pw->pw_dir) >= sizeof(envstr))
log_it("CRON", getpid(), "error", "can't set PATH");
else {
if ((tenvp = env_set(e->envp, envstr)) == NULL) {