Re:Unix Administration Horror Stories (1993)
by gruez on Wednesday September 02, 2015 @09:55PM
(#10162998)
why would you use absolute path for qmail?
[ Parent
| on HN ]
Re:Unix Administration Horror Stories (1993)
by camperman on Friday September 04, 2015 @11:06AM
(#10170937)
This was years ago - about 15 I think - and I can't actually remember why. I could lie and say it was something that djb wrote in the manual about best practice at the time but I think it was more likely habit.
Re:Unix Administration Horror Stories (1993)
by dredmorbius on Wednesday September 02, 2015 @10:00PM
(#10163016)
Not trusting root's path is defensive practice.
What's 'qmail'?
Re:Unix Administration Horror Stories (1993)
by ciupicri on Wednesday September 02, 2015 @10:12PM
(#10163047)
If root's PATH environment variable can be compromised, then you might as well ditch the whole system.
Re:Unix Administration Horror Stories (1993)
by dredmorbius on Wednesday September 02, 2015 @10:30PM
(#10163090)
It may not be common practice (I typically rely on $PATH). But it is, as I noted, defensive.
There are numerous ways in which $PATH can change. Shared profiles and other users modifying root's init among them. Intent isn't necessarily malicious. It can still be unexpected.
Re:Unix Administration Horror Stories (1993)
by rhinoceraptor on Wednesday September 02, 2015 @11:57PM
(#10163273)
There was a Steam script that had a nasty habit of running '# rm /*' due to an empty script variable.
Re:Unix Administration Horror Stories (1993)
by dredmorbius on Thursday September 03, 2015 @06:06AM
(#10164086)
I do not trust vendor scripts.
Really fscking annoying: scripts that include inline binary data.
Re:Unix Administration Horror Stories (1993)
by ketralnis on Wednesday September 02, 2015 @10:10PM
(#10163041)
The first google result for qmail:
> qmail is a mail transfer agent (MTA) that runs on Unix. It was written, starting December 1995, by Daniel J. Bernstein as a more secure replacement for the popular Sendmail program; qmail's source code is in the public domain.
Re:Unix Administration Horror Stories (1993)
by dredmorbius on Wednesday September 02, 2015 @10:29PM
(#10163086)
Wrong question.
Not "what is the application 'qmail'" (I'm quite aware, thanks). But "what is the token 'qmail'" evaluated to by the shell.
If you prefer: "which qmail".
Re:Unix Administration Horror Stories (1993)
by nailer on Thursday September 03, 2015 @09:40AM
(#10164845)
That's a a good question. The mail client (most boxes uses mailx to implement it these days) is normally just 'mail'. and qmail would normally be in an sbin dir.
Re:Unix Administration Horror Stories (1993)
by dredmorbius on Thursday September 03, 2015 @05:06PM
(#10167527)
Note: the question applies to all executed commands.
Re:Unix Administration Horror Stories (1993)
by ketralnis on Friday September 04, 2015 @06:21PM
(#10173104)
Sorry, I misunderstood you. I retract my snark :)
Re:Unix Administration Horror Stories (1993)
by photosinensis on Thursday September 03, 2015 @12:39PM
(#10165909)
Habit from scripting. Remember that users can modify their own paths, possibly to prioritize ~/bin over everything else (which may have unexpected behavior).