GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: fix chown abort by RaisinTen · Pull Request #38004 · nodejs/node

Conversation

@RaisinTen

@RaisinTen RaisinTen commented Mar 31, 2021

Copy link
Copy Markdown
Member

This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: #37995
Refs: #31694

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ycjcl868 and bricss reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@RaisinTen
fs: fix chown abort
5402b26
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: nodejs#37995
Refs: nodejs#31694
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels Mar 31, 2021
RaisinTen added 2 commits March 31, 2021 19:11
@RaisinTen
fixup! fs: fix chown abort
0c5fea2
@RaisinTen
update validation in fs promises
d9c96b6
@RaisinTen RaisinTen mentioned this pull request Mar 31, 2021
"fs.chownSync" results in an abort #37995
Closed
aduh95
aduh95 reviewed Mar 31, 2021
View reviewed changes
Comment thread lib/internal/fs/promises.js
const kWriteFileMaxChunkSize = 512 * 1024;

// 2 ** 32 - 1
const kMaxUserId = 4294967295;

@aduh95 aduh95 Mar 31, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this value? Is this documented somewhere? Could you add a comment explaining where does it come from please?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@RaisinTen RaisinTen Mar 31, 2021

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually pasted it from:

node/lib/fs.js

Lines 139 to 140 in 82bc5c3

// 2 ** 32 - 1
const kMaxUserId = 4294967295;

since I could not require it because of a circular dependency.
Should we move this (and possibly other k* constants) into lib/internal/fs/utils.js and require them from there?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@RaisinTen
fixup! update validation in fs promises
97e3d0c
addaleax
addaleax approved these changes Mar 31, 2021
View reviewed changes
@benjamingr

benjamingr commented Mar 31, 2021

Copy link
Copy Markdown
Member

Nice, though looks like #37997 was opened already?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ycjcl868

ycjcl868 commented Apr 1, 2021

Copy link
Copy Markdown
Contributor

CI broken

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ycjcl868 ycjcl868 mentioned this pull request Apr 1, 2021
fs: fix valid id range on fs.chown, fs.chownSync, fs.lchown, fs.fchown #37997
Closed
@RaisinTen
fixup! update validation in fs promises
9749f64
@RaisinTen

RaisinTen commented Apr 1, 2021

Copy link
Copy Markdown
Member Author

Nice, though looks like #37997 was opened already?

@benjamingr I opened this as it has a different approach of fixing the issue. Also, #37997 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 1, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/37085/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RaisinTen

RaisinTen commented Apr 1, 2021

Copy link
Copy Markdown
Member Author

CI broken

@ycjcl868 The Github Actions CI seems to be fixed now. Started the Jenkins CI run.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RaisinTen RaisinTen added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Apr 2, 2021
Trott
Trott approved these changes Apr 3, 2021
View reviewed changes
@Trott

Trott commented Apr 3, 2021

Copy link
Copy Markdown
Member

Landed in e9ed113

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott closed this Apr 3, 2021
Trott pushed a commit that referenced this pull request Apr 3, 2021
@RaisinTen @Trott
fs: fix chown abort
e9ed113
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: #37995
Refs: #31694

PR-URL: #38004
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@RaisinTen
RaisinTen deleted the fs/fix-chown-abort branch April 3, 2021 14:35
RaisinTen added a commit to RaisinTen/node that referenced this pull request Apr 3, 2021
@RaisinTen
fs: move constants to internal/fs/utils.js
fcdbf00
Refs: nodejs#38004 (comment)
@RaisinTen RaisinTen mentioned this pull request Apr 3, 2021
fs: move constants to internal/fs/utils.js #38061
Closed
@RA80533 RA80533 mentioned this pull request Apr 4, 2021
"fs.chmod" results in an abort #38080
Closed
MylesBorins pushed a commit that referenced this pull request Apr 4, 2021
@RaisinTen @MylesBorins
fs: fix chown abort
dc46073
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: #37995
Refs: #31694

PR-URL: #38004
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 4, 2021
v15.14.0 proposal #38084
Merged
MylesBorins pushed a commit that referenced this pull request Apr 5, 2021
@RaisinTen @MylesBorins
fs: fix chown abort
ad7e344
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: #37995
Refs: #31694

PR-URL: #38004
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
jasnell pushed a commit that referenced this pull request Apr 6, 2021
@RaisinTen @jasnell
fs: move constants to internal/fs/utils.js
24fd791
Refs: #38004 (comment)

PR-URL: #38061
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Nitzan Uziely <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
@RaisinTen @targos
fs: fix chown abort
8598745
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.

Fixes: #37995
Refs: #31694

PR-URL: #38004
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@danielleadams danielleadams mentioned this pull request May 3, 2021
v14.17.0 proposal #38507
Merged
MoritzLoewenstein pushed a commit to MoritzLoewenstein/node that referenced this pull request Sep 1, 2021
@RaisinTen @MoritzLoewenstein
fs: move constants to internal/fs/utils.js
07d5dd2
Refs: nodejs#38004 (comment)

PR-URL: nodejs#38061
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Nitzan Uziely <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Sep 4, 2021
@RaisinTen @targos
fs: move constants to internal/fs/utils.js
a4d6f78
Refs: #38004 (comment)

PR-URL: #38061
Backport-PR-URL: #39838
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Nitzan Uziely <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 left review comments
@Trott Trott Trott approved these changes
@addaleax addaleax addaleax approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

"fs.chownSync" results in an abort

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@RaisinTen @benjamingr @ycjcl868 @nodejs-github-bot @Trott @addaleax @aduh95
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.