0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/fs
Joyee Cheung a18e130e59
lib: mask mode_t type of arguments with 0o777
- Introduce the `validateAndMaskMode` validator that
  validates `mode_t` arguments and mask them with 0o777
  if they are 32-bit unsigned integer or octal string
  to be more consistent with POSIX APIs.
- Use the validator in fs APIs and process.umask for
  consistency.
- Add tests for 32-bit unsigned modes larger than 0o777.

PR-URL: https://github.com/nodejs/node/pull/20636
Fixes: https://github.com/nodejs/node/issues/20498
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-05-17 17:14:35 +08:00
..
promises.js lib: mask mode_t type of arguments with 0o777 2018-05-17 17:14:35 +08:00
utils.js lib: mask mode_t type of arguments with 0o777 2018-05-17 17:14:35 +08:00