Mark the putenv(), setenv() and unsetenv() symbols as global, not

hidden.  Fixes a mismatch where a plugin (or its loaded dso) would
call setenv() to set a variables but be unable to find it later
with getenv().
This commit is contained in:
Todd C. Miller
2014-10-29 10:54:40 -06:00
parent bbf3c08320
commit 55098ff6ec

View File

@@ -76,9 +76,7 @@ getenv_unhooked(const char *name)
return rpl_getenv(name);
}
__dso_public char *getenv(const char *);
char *
__dso_public char *
getenv(const char *name)
{
char *val = NULL;
@@ -148,7 +146,7 @@ putenv_unhooked(PUTENV_CONST char *string)
return rpl_putenv(string);
}
int
__dso_public int
putenv(PUTENV_CONST char *string)
{
switch (process_hooks_putenv((char *)string)) {
@@ -216,7 +214,7 @@ setenv_unhooked(const char *var, const char *val, int overwrite)
return rpl_setenv(var, val, overwrite);
}
int
__dso_public int
setenv(const char *var, const char *val, int overwrite)
{
switch (process_hooks_setenv(var, val, overwrite)) {
@@ -281,9 +279,9 @@ unsetenv_unhooked(const char *var)
}
#ifdef UNSETENV_VOID
void
__dso_public void
#else
int
__dso_public int
#endif
unsetenv(const char *var)
{