=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/defaults.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/sudo/Attic/defaults.c 2000/01/24 04:22:53 1.3 +++ src/usr.bin/sudo/Attic/defaults.c 2000/03/27 03:44:38 1.4 @@ -53,7 +53,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: defaults.c,v 1.17 2000/01/17 23:46:24 millert Exp $"; +static const char rcsid[] = "$Sudo: defaults.c,v 1.23 2000/03/22 23:40:09 millert Exp $"; #endif /* lint */ /* @@ -182,6 +182,24 @@ "requiretty", T_FLAG, "Only allow the user to run sudo if they have a tty" }, { + "env_editor", T_FLAG, + "Visudo will honor the EDITOR environment variable" + }, { + "rootpw", T_FLAG, + "Prompt for root's password, not the users's" + }, { + "runaspw", T_FLAG, + "Prompt for the runas_default user's password, not the users's" + }, { + "targetpw", T_FLAG, + "Prompt for the target user's password, not the users's" + }, { + "use_loginclass", T_FLAG, + "Apply defaults in the target user's login class if there is one" + }, { + "set_logname", T_FLAG, + "Set the LOGNAME and USER environment variables" + }, { "loglinelen", T_INT|T_BOOL, "Length at which to wrap log file lines (0 for no wrap): %d" }, { @@ -230,6 +248,9 @@ "secure_path", T_STR|T_BOOL, "Value to override user's $PATH with: %s" }, { + "editor", T_STR|T_PATH, + "Path to the editor for use by visudo: %s" + }, { "listpw_i", T_INT, NULL }, { "verifypw_i", T_INT, NULL @@ -279,12 +300,6 @@ } } } - -#ifdef ENV_EDITOR - (void) printf("Default editor for visudo: %s\n", EDITOR); -#else - (void) printf("Editor for visudo: %s\n", EDITOR); -#endif } /* @@ -533,6 +548,10 @@ #ifdef USE_INSULTS def_flag(I_INSULTS) = TRUE; #endif +#ifdef ENV_EDITOR + def_flag(I_ENV_EDITOR) = TRUE; +#endif + def_flag(I_LOGNAME) = TRUE; /* Syslog options need special care since they both strings and ints */ #if (LOGGING & SLOG_SYSLOG) @@ -576,6 +595,7 @@ #ifdef SECURE_PATH def_str(I_SECURE_PATH) = estrdup(SECURE_PATH); #endif + def_str(I_EDITOR) = estrdup(EDITOR); /* * The following depend on the above values. @@ -653,7 +673,7 @@ free(def->sd_un.str); closelog(); } - openlog("sudo", 0, fac->num); + openlog(Argv[0], 0, fac->num); def->sd_un.str = estrdup(fac->name); sudo_defs_table[I_LOGFAC].sd_un.ival = fac->num; #else @@ -661,7 +681,7 @@ free(def->sd_un.str); closelog(); } - openlog("sudo", 0); + openlog(Argv[0], 0); def->sd_un.str = estrdup("default"); #endif /* LOG_NFACILITIES */ return(TRUE);