| Index: nss/lib/freebl/unix_rand.c
|
| diff --git a/nss/lib/freebl/unix_rand.c b/nss/lib/freebl/unix_rand.c
|
| index 2f9b3e540de5758c0364cd4ab7c6713b06a55374..e0d8f58732e53087325b12a67dd905b7bfe538e6 100644
|
| --- a/nss/lib/freebl/unix_rand.c
|
| +++ b/nss/lib/freebl/unix_rand.c
|
| @@ -17,6 +17,7 @@
|
| #include "prerror.h"
|
| #include "prthread.h"
|
| #include "prprf.h"
|
| +#include "prenv.h"
|
|
|
| size_t RNG_FileUpdate(const char *fileName, size_t limit);
|
|
|
| @@ -888,9 +889,9 @@ void RNG_SystemInfoForRNG(void)
|
| bytes = RNG_FileUpdate("/dev/urandom", SYSTEM_RNG_SEED_COUNT);
|
|
|
| /* If the user points us to a random file, pass it through the rng */
|
| - randfile = getenv("NSRANDFILE");
|
| + randfile = PR_GetEnvSecure("NSRANDFILE");
|
| if ( ( randfile != NULL ) && ( randfile[0] != '\0') ) {
|
| - char *randCountString = getenv("NSRANDCOUNT");
|
| + char *randCountString = PR_GetEnvSecure("NSRANDCOUNT");
|
| int randCount = randCountString ? atoi(randCountString) : 0;
|
| if (randCount != 0) {
|
| RNG_FileUpdate(randfile, randCount);
|
| @@ -1086,7 +1087,7 @@ int ReadOneFile(int fileToRead)
|
| int i, error = -1;
|
|
|
| if (fd == NULL) {
|
| - dir = getenv("HOME");
|
| + dir = PR_GetEnvSecure("HOME");
|
| if (dir) {
|
| fd = opendir(dir);
|
| }
|
|
|