Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeth Griggs <Bethany.Griggs@uk.ibm.com>2020-09-25 01:02:33 +0300
committerMyles Borins <myles.borins@gmail.com>2020-10-01 04:46:25 +0300
commit4acab22ac2dd4d066c7d50eb1916e34af555eccf (patch)
tree82e145106a9e6b7b5bcc4fa215f14ccc73f32ba2 /src
parent869ded3b0e9b1f53b7161827bc2275a584881fc7 (diff)
Revert "src: runtime deprecate process.umask()"
This reverts commit 60c4c2b6c557efbb2f8f3a3de147baf987931d41. PR-URL: https://github.com/nodejs/node/pull/35332 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Diffstat (limited to 'src')
-rw-r--r--src/env-inl.h8
-rw-r--r--src/env.h3
-rw-r--r--src/node_process_methods.cc11
3 files changed, 0 insertions, 22 deletions
diff --git a/src/env-inl.h b/src/env-inl.h
index de3d651fa7d..ec80faba4c4 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -808,14 +808,6 @@ void Environment::set_filehandle_close_warning(bool on) {
emit_filehandle_warning_ = on;
}
-bool Environment::emit_insecure_umask_warning() const {
- return emit_insecure_umask_warning_;
-}
-
-void Environment::set_emit_insecure_umask_warning(bool on) {
- emit_insecure_umask_warning_ = on;
-}
-
void Environment::set_source_maps_enabled(bool on) {
source_maps_enabled_ = on;
}
diff --git a/src/env.h b/src/env.h
index 16546fdd494..410d5c3fc9d 100644
--- a/src/env.h
+++ b/src/env.h
@@ -1160,8 +1160,6 @@ class Environment : public MemoryRetainer {
inline bool filehandle_close_warning() const;
inline void set_filehandle_close_warning(bool on);
- inline bool emit_insecure_umask_warning() const;
- inline void set_emit_insecure_umask_warning(bool on);
inline void set_source_maps_enabled(bool on);
inline bool source_maps_enabled() const;
@@ -1386,7 +1384,6 @@ class Environment : public MemoryRetainer {
bool emit_env_nonstring_warning_ = true;
bool emit_err_name_warning_ = true;
bool emit_filehandle_warning_ = true;
- bool emit_insecure_umask_warning_ = true;
bool source_maps_enabled_ = false;
size_t async_callback_scope_depth_ = 0;
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index 105cbff151b..1d8bcd54057 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -206,17 +206,6 @@ static void Umask(const FunctionCallbackInfo<Value>& args) {
uint32_t old;
if (args[0]->IsUndefined()) {
- if (env->emit_insecure_umask_warning()) {
- env->set_emit_insecure_umask_warning(false);
- if (ProcessEmitDeprecationWarning(
- env,
- "Calling process.umask() with no arguments is prone to race "
- "conditions and is a potential security vulnerability.",
- "DEP0139").IsNothing()) {
- return;
- }
- }
-
old = umask(0);
umask(static_cast<mode_t>(old));
} else {