Bug 2 - In case EDITOR envar is empty, wierd error message.
In case EDITOR envar is empty, wierd error message.
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Visudo
1.6.2
PC Linux
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-09 04:24 MDT by inoue
Modified: 2000-07-09 19:08 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description inoue 2000-07-09 04:24:25 MDT
This is a trivial proposal.
If EDITOR envar is an empty string, wierd error message appears.
Typically, the following case occurs,
# EDITOR= visudo
sh: /etc/sudoers.tmp: Permission denied

I suggest you to do Editor[0] != '\0' check in addition to Editor != NULL check.

Thanks.
Comment 1 Todd C. Miller 2000-07-09 15:08:59 MDT
The EDITOR handling in my current source tree  has been rewritten and has this
fixed.  The next sudo release will not have this problem.