Index: nspr/pr/include/prenv.h |
diff --git a/nspr/pr/include/prenv.h b/nspr/pr/include/prenv.h |
index 2a4771673a68dbe6745433da852609a7f0a432f4..468c7d596295e7296cff555e04e3351d747d53dc 100644 |
--- a/nspr/pr/include/prenv.h |
+++ b/nspr/pr/include/prenv.h |
@@ -91,6 +91,20 @@ PR_BEGIN_EXTERN_C |
NSPR_API(char*) PR_GetEnv(const char *var); |
/* |
+** PR_GetEnvSecure() -- get a security-sensitive environment variable |
+** |
+** Description: |
+** |
+** PR_GetEnvSecure() is similar to PR_GetEnv(), but it returns NULL if |
+** the program was run with elevated privilege (e.g., setuid or setgid |
+** on Unix). This can be used for cases like log file paths which |
+** could otherwise be used for privilege escalation. Note that some |
+** platforms may have platform-specific privilege elevation mechanisms |
+** not recognized by this function; see the implementation for details. |
+*/ |
+NSPR_API(char*) PR_GetEnvSecure(const char *var); |
+ |
+/* |
** PR_SetEnv() -- set, unset or change an environment variable |
** |
** Description: |