From 209e35027f0f37ead15c7b9c7bd426d1f336d9e5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 15 Sep 2007 20:07:50 +0000 Subject: [PATCH] Reorder things such that the definition of env_reset come right before the env variable lists. --- def_data.c | 16 +++---- def_data.h | 124 ++++++++++++++++++++++++++-------------------------- def_data.in | 12 ++--- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/def_data.c b/def_data.c index 5f334639e..ce7c424fb 100644 --- a/def_data.c +++ b/def_data.c @@ -146,10 +146,6 @@ struct sudo_defs_types sudo_defs_table[] = { "stay_setuid", T_FLAG, "Only set the effective uid to the target user, not the real uid", NULL, - }, { - "env_reset", T_FLAG, - "Reset the environment to a default set of variables", - NULL, }, { "preserve_groups", T_FLAG, "Don't initialize the group vector to that of the target user", @@ -255,6 +251,14 @@ struct sudo_defs_types sudo_defs_table[] = { "closefrom_override", T_FLAG, "If set, users may override the value of `closefrom' with the -C option", NULL, + }, { + "setenv", T_FLAG, + "Allow users to set arbitrary environment variables", + NULL, + }, { + "env_reset", T_FLAG, + "Reset the environment to a default set of variables", + NULL, }, { "env_check", T_LIST|T_BOOL, "Environment variables to check for sanity:", @@ -267,10 +271,6 @@ struct sudo_defs_types sudo_defs_table[] = { "env_keep", T_LIST|T_BOOL, "Environment variables to preserve:", NULL, - }, { - "setenv", T_FLAG, - "Allow users to set arbitrary environment variables", - NULL, }, { NULL, 0, NULL } diff --git a/def_data.h b/def_data.h index 0313ebde2..9848437cb 100644 --- a/def_data.h +++ b/def_data.h @@ -60,68 +60,68 @@ #define I_SET_LOGNAME 29 #define def_stay_setuid (sudo_defs_table[30].sd_un.flag) #define I_STAY_SETUID 30 -#define def_env_reset (sudo_defs_table[31].sd_un.flag) -#define I_ENV_RESET 31 -#define def_preserve_groups (sudo_defs_table[32].sd_un.flag) -#define I_PRESERVE_GROUPS 32 -#define def_loglinelen (sudo_defs_table[33].sd_un.ival) -#define I_LOGLINELEN 33 -#define def_timestamp_timeout (sudo_defs_table[34].sd_un.ival) -#define I_TIMESTAMP_TIMEOUT 34 -#define def_passwd_timeout (sudo_defs_table[35].sd_un.ival) -#define I_PASSWD_TIMEOUT 35 -#define def_passwd_tries (sudo_defs_table[36].sd_un.ival) -#define I_PASSWD_TRIES 36 -#define def_umask (sudo_defs_table[37].sd_un.mode) -#define I_UMASK 37 -#define def_logfile (sudo_defs_table[38].sd_un.str) -#define I_LOGFILE 38 -#define def_mailerpath (sudo_defs_table[39].sd_un.str) -#define I_MAILERPATH 39 -#define def_mailerflags (sudo_defs_table[40].sd_un.str) -#define I_MAILERFLAGS 40 -#define def_mailto (sudo_defs_table[41].sd_un.str) -#define I_MAILTO 41 -#define def_mailsub (sudo_defs_table[42].sd_un.str) -#define I_MAILSUB 42 -#define def_badpass_message (sudo_defs_table[43].sd_un.str) -#define I_BADPASS_MESSAGE 43 -#define def_timestampdir (sudo_defs_table[44].sd_un.str) -#define I_TIMESTAMPDIR 44 -#define def_timestampowner (sudo_defs_table[45].sd_un.str) -#define I_TIMESTAMPOWNER 45 -#define def_exempt_group (sudo_defs_table[46].sd_un.str) -#define I_EXEMPT_GROUP 46 -#define def_passprompt (sudo_defs_table[47].sd_un.str) -#define I_PASSPROMPT 47 -#define def_runas_default (sudo_defs_table[48].sd_un.str) -#define I_RUNAS_DEFAULT 48 -#define def_secure_path (sudo_defs_table[49].sd_un.str) -#define I_SECURE_PATH 49 -#define def_editor (sudo_defs_table[50].sd_un.str) -#define I_EDITOR 50 -#define def_listpw (sudo_defs_table[51].sd_un.tuple) -#define I_LISTPW 51 -#define def_verifypw (sudo_defs_table[52].sd_un.tuple) -#define I_VERIFYPW 52 -#define def_noexec (sudo_defs_table[53].sd_un.flag) -#define I_NOEXEC 53 -#define def_noexec_file (sudo_defs_table[54].sd_un.str) -#define I_NOEXEC_FILE 54 -#define def_ignore_local_sudoers (sudo_defs_table[55].sd_un.flag) -#define I_IGNORE_LOCAL_SUDOERS 55 -#define def_closefrom (sudo_defs_table[56].sd_un.ival) -#define I_CLOSEFROM 56 -#define def_closefrom_override (sudo_defs_table[57].sd_un.flag) -#define I_CLOSEFROM_OVERRIDE 57 -#define def_env_check (sudo_defs_table[58].sd_un.list) -#define I_ENV_CHECK 58 -#define def_env_delete (sudo_defs_table[59].sd_un.list) -#define I_ENV_DELETE 59 -#define def_env_keep (sudo_defs_table[60].sd_un.list) -#define I_ENV_KEEP 60 -#define def_setenv (sudo_defs_table[61].sd_un.flag) -#define I_SETENV 61 +#define def_preserve_groups (sudo_defs_table[31].sd_un.flag) +#define I_PRESERVE_GROUPS 31 +#define def_loglinelen (sudo_defs_table[32].sd_un.ival) +#define I_LOGLINELEN 32 +#define def_timestamp_timeout (sudo_defs_table[33].sd_un.ival) +#define I_TIMESTAMP_TIMEOUT 33 +#define def_passwd_timeout (sudo_defs_table[34].sd_un.ival) +#define I_PASSWD_TIMEOUT 34 +#define def_passwd_tries (sudo_defs_table[35].sd_un.ival) +#define I_PASSWD_TRIES 35 +#define def_umask (sudo_defs_table[36].sd_un.mode) +#define I_UMASK 36 +#define def_logfile (sudo_defs_table[37].sd_un.str) +#define I_LOGFILE 37 +#define def_mailerpath (sudo_defs_table[38].sd_un.str) +#define I_MAILERPATH 38 +#define def_mailerflags (sudo_defs_table[39].sd_un.str) +#define I_MAILERFLAGS 39 +#define def_mailto (sudo_defs_table[40].sd_un.str) +#define I_MAILTO 40 +#define def_mailsub (sudo_defs_table[41].sd_un.str) +#define I_MAILSUB 41 +#define def_badpass_message (sudo_defs_table[42].sd_un.str) +#define I_BADPASS_MESSAGE 42 +#define def_timestampdir (sudo_defs_table[43].sd_un.str) +#define I_TIMESTAMPDIR 43 +#define def_timestampowner (sudo_defs_table[44].sd_un.str) +#define I_TIMESTAMPOWNER 44 +#define def_exempt_group (sudo_defs_table[45].sd_un.str) +#define I_EXEMPT_GROUP 45 +#define def_passprompt (sudo_defs_table[46].sd_un.str) +#define I_PASSPROMPT 46 +#define def_runas_default (sudo_defs_table[47].sd_un.str) +#define I_RUNAS_DEFAULT 47 +#define def_secure_path (sudo_defs_table[48].sd_un.str) +#define I_SECURE_PATH 48 +#define def_editor (sudo_defs_table[49].sd_un.str) +#define I_EDITOR 49 +#define def_listpw (sudo_defs_table[50].sd_un.tuple) +#define I_LISTPW 50 +#define def_verifypw (sudo_defs_table[51].sd_un.tuple) +#define I_VERIFYPW 51 +#define def_noexec (sudo_defs_table[52].sd_un.flag) +#define I_NOEXEC 52 +#define def_noexec_file (sudo_defs_table[53].sd_un.str) +#define I_NOEXEC_FILE 53 +#define def_ignore_local_sudoers (sudo_defs_table[54].sd_un.flag) +#define I_IGNORE_LOCAL_SUDOERS 54 +#define def_closefrom (sudo_defs_table[55].sd_un.ival) +#define I_CLOSEFROM 55 +#define def_closefrom_override (sudo_defs_table[56].sd_un.flag) +#define I_CLOSEFROM_OVERRIDE 56 +#define def_setenv (sudo_defs_table[57].sd_un.flag) +#define I_SETENV 57 +#define def_env_reset (sudo_defs_table[58].sd_un.flag) +#define I_ENV_RESET 58 +#define def_env_check (sudo_defs_table[59].sd_un.list) +#define I_ENV_CHECK 59 +#define def_env_delete (sudo_defs_table[60].sd_un.list) +#define I_ENV_DELETE 60 +#define def_env_keep (sudo_defs_table[61].sd_un.list) +#define I_ENV_KEEP 61 enum def_tupple { never, diff --git a/def_data.in b/def_data.in index 3f7579186..9a79d33bb 100644 --- a/def_data.in +++ b/def_data.in @@ -104,9 +104,6 @@ set_logname stay_setuid T_FLAG "Only set the effective uid to the target user, not the real uid" -env_reset - T_FLAG - "Reset the environment to a default set of variables" preserve_groups T_FLAG "Don't initialize the group vector to that of the target user" @@ -188,6 +185,12 @@ closefrom closefrom_override T_FLAG "If set, users may override the value of `closefrom' with the -C option" +setenv + T_FLAG + "Allow users to set arbitrary environment variables" +env_reset + T_FLAG + "Reset the environment to a default set of variables" env_check T_LIST|T_BOOL "Environment variables to check for sanity:" @@ -197,6 +200,3 @@ env_delete env_keep T_LIST|T_BOOL "Environment variables to preserve:" -setenv - T_FLAG - "Allow users to set arbitrary environment variables" -- 2.40.0