Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37414204
en ru br
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


--- 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) {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin