{
int fd;
struct stat sbuf;
+#ifdef ENV_EDITOR
char * Editor;
+#endif /* ENV_EDITOR */
/*
* handle the signals
*/
umask(077);
+#ifdef ENV_EDITOR
/*
* set up the Editor variable correctly
*/
-#ifndef STATICEDITOR
if ( (Editor = getenv("EDITOR")) == NULL)
if ( (Editor = getenv("VISUAL")) == NULL )
-#endif /* !STATICEDITOR */
Editor = EDITOR;
+#endif /* ENV_EDITOR */
/*
* open the sudoers file read only
/*
* build strings in buffer to be executed by system()
*/
+#ifdef ENV_EDITOR
(void) sprintf(buffer, "%s +%d %s", Editor, err_line_no,
sudoers_tmp_file);
+#else
+ (void) sprintf(buffer, "%s +%d %s", EDITOR, err_line_no,
+ sudoers_tmp_file);
+#endif /* ENV_EDITOR */
/* edit the file */
if (system(buffer) == 0) {