mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-17 08:01:49 +03:00
Concise JEMALLOC_HAVE_ISSETUGID case in secure_getenv().
This commit is contained in:
parent
897503521d
commit
95e88de0aa
1 changed files with 6 additions and 14 deletions
|
|
@ -709,24 +709,16 @@ stats_print_atexit(void)
|
|||
*/
|
||||
|
||||
#ifndef JEMALLOC_HAVE_SECURE_GETENV
|
||||
static char *
|
||||
secure_getenv(const char *name)
|
||||
{
|
||||
|
||||
# ifdef JEMALLOC_HAVE_ISSETUGID
|
||||
static char *
|
||||
secure_getenv(const char *name)
|
||||
{
|
||||
|
||||
if (issetugid() == 0)
|
||||
return (getenv(name));
|
||||
else
|
||||
if (issetugid() != 0)
|
||||
return (NULL);
|
||||
}
|
||||
# else
|
||||
static char *
|
||||
secure_getenv(const char *name)
|
||||
{
|
||||
|
||||
# endif
|
||||
return (getenv(name));
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static unsigned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue