Skip to content

Commit

Permalink
include LC_* in the secure environment (Closes #643988)
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Apr 29, 2012
1 parent 7061200 commit ca2a58a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions security.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ int clearEnvironment(void)
char* gpg_agent_info;
char* home;
char* lang;
char* lc;
char* lcm;
char* lines;
char* no_utf8_acs;
char* term;
Expand All @@ -361,6 +363,10 @@ int clearEnvironment(void)
/* Flawfinder: ignore */
lang = getenv("LANG");
/* Flawfinder: ignore */
lc = getenv("LC_ALL");
/* Flawfinder: ignore */
lcm = getenv("LC_MESSAGES");
/* Flawfinder: ignore */
lines = getenv("LINES");
/* Flawfinder: ignore */
no_utf8_acs = getenv("NCURSES_NO_UTF8_ACS");
Expand Down Expand Up @@ -410,6 +416,8 @@ int clearEnvironment(void)

/* general */
PutEnv(eptr, ptr, STRTYPE_ALPHANUMERIC, "LANG=", lang);
PutEnv(eptr, ptr, STRTYPE_ALPHANUMERIC, "LC_ALL=", lc);
PutEnv(eptr, ptr, STRTYPE_ALPHANUMERIC, "LC_MESSAGES=", lcm);
PutEnv(eptr, ptr, STRTYPE_FILENAME, "HOME=", home);

/* terminal */
Expand Down

0 comments on commit ca2a58a

Please sign in to comment.