summaryrefslogtreecommitdiff
path: root/otherlibs
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez@gmail.com>2017-06-28 14:02:15 +0200
committerDamien Doligez <damien.doligez@inria.fr>2017-06-28 14:08:07 +0200
commitfee01100fb0664a3b18aa6214b9eb12976c77e99 (patch)
tree3e3b5c04ba738b0b91ff17d9f91448685f183e18 /otherlibs
parentc34e24277450e4f5a08b7f338abd09e81ca7b943 (diff)
downloadocaml-fee01100fb0664a3b18aa6214b9eb12976c77e99.tar.gz
Some tweaks for MPR#7557 (#1213)
* fall back to __secure_getenv when secure_getenv is not available * use secure_getenv for instrumented runtimes * documentation: warn against setting the setuid or setgid bits on custom bytecode executables
Diffstat (limited to 'otherlibs')
-rw-r--r--otherlibs/unix/unix.mli7
-rw-r--r--otherlibs/unix/unixLabels.mli7
2 files changed, 8 insertions, 6 deletions
diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli
index 72cbae99d4..d0759f1d5e 100644
--- a/otherlibs/unix/unix.mli
+++ b/otherlibs/unix/unix.mli
@@ -137,9 +137,10 @@ val unsafe_getenv : string -> string
Unlike {!getenv}, this function returns the value even if the
process has special privileges. It is considered unsafe because the
- programmer of a setuid program must be careful to prevent execution
- of arbitrary commands through manipulation of the environment
- variables.
+ programmer of a setuid or setgid program must be careful to avoid
+ using maliciously crafted environment variables in the search path
+ for executables, the locations for temporary files or logs, and the
+ like.
@raise Not_found if the variable is unbound.
@since 4.06.0 *)
diff --git a/otherlibs/unix/unixLabels.mli b/otherlibs/unix/unixLabels.mli
index 06586f2dcf..058198d534 100644
--- a/otherlibs/unix/unixLabels.mli
+++ b/otherlibs/unix/unixLabels.mli
@@ -132,9 +132,10 @@ val unsafe_getenv : string -> string
Unlike {!getenv}, this function returns the value even if the
process has special privileges. It is considered unsafe because the
- programmer of a setuid program must be careful to prevent execution
- of arbitrary commands through manipulation of the environment
- variables.
+ programmer of a setuid or setgid program must be careful to avoid
+ using maliciously crafted environment variables in the search path
+ for executables, the locations for temporary files or logs, and the
+ like.
@raise Not_found if the variable is unbound.
@since 4.06.0 *)