Bug 213742 - /etc/crontab $PATH modification
Summary: /etc/crontab $PATH modification
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Warner Losh
Keywords: patch
Depends on:
Reported: 2016-10-24 13:31 UTC by Ben RUBSON
Modified: 2018-12-15 04:49 UTC (History)
1 user (show)

See Also:
koobs: mfc-stable11+


Note You need to log in before you can comment on or make changes to this bug.
Description Ben RUBSON 2016-10-24 13:31:08 UTC

crontab(5) :
Several environment variables are set up automatically by the cron(8) daemon.  SHELL is set to /bin/sh, PATH is set to
and LOGNAME and HOME are set from the /etc/passwd line of the crontab's owner.

/etc/crontab :

I then think that /etc/crontab should set :

(I also think that /etc is no more needed in $PATH since this commit :

It would be more coherent, and also more convenient, without being more risky.

Thank you very much !

Comment 1 Ben RUBSON 2017-08-24 15:23:35 UTC
Any thoughts about this ?
Many thx !
Comment 2 Ben RUBSON 2018-06-09 10:56:33 UTC
See https://github.com/freebsd/freebsd/pull/155 for a fix.
Thank you !
Comment 3 Ben RUBSON 2018-06-10 07:40:01 UTC
Fix merged with r334909, thank you Warner Losh !
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-14 11:30:26 UTC
Assign to committer that resolved.

Unsure if this was eventually MFC'd to stable/11, but appears to be a good candidate.

@Warner, can we re-open this and merge it there? [1]

[1] https://twitter.com/socrueldotnu/status/1073538274449391616
Comment 5 Warner Losh freebsd_committer 2018-12-14 21:30:48 UTC
(In reply to Kubilay Kocak from comment #4)
I'd forgotten about this. MFC'd now.
Comment 6 Warner Losh freebsd_committer 2018-12-14 21:31:07 UTC
MFC'd in r342103