Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission: add debug log when inserting fs nodes #48677

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

RafaelGSS
Copy link
Member

This will help when debugging issues in the filesystem Radix tree.

Output example:

$ NODE_DEBUG_NATIVE=PERMISSION_MODEL ./node --experimental-permission --allow-fs-read=/tmp/,/home/,/host -p '1 + 1'
Inserting /tmp/*
 Prefix:
 Child(1): /
   Wildcard: /tmp/*
 End of tree - child(1)
Inserting /home/*
 Prefix:
 Child(1): /
   Prefix: /
   Child(1): h
     Wildcard: home/*
   Child(2): t
     Wildcard: tmp/*
   End of tree - child(2)
 End of tree - child(1)
Inserting /host
 Prefix:
 Child(1): /
   Prefix: /
   Child(1): h
     Prefix: ho
     Child(1): s
       Prefix: st
       End of tree: st
     Child(2): m
       Wildcard: me/*
     End of tree - child(2)
   Child(2): t
     Wildcard: tmp/*
   End of tree - child(2)
 End of tree - child(1)
2
(node:999070) ExperimentalWarning: Permission is an experimental feature
(Use `node --trace-warnings ...` to show where the warning was created)

cc: @nodejs/security-wg

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels Jul 6, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
@RafaelGSS RafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 7, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 7, 2023
@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 13, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 13, 2023
@nodejs-github-bot nodejs-github-bot merged commit 8efdc7d into nodejs:main Jul 13, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 8efdc7d

juanarbol pushed a commit that referenced this pull request Jul 13, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: #48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
@juanarbol juanarbol mentioned this pull request Jul 13, 2023
tniessen added a commit to tniessen/node that referenced this pull request Jul 14, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
nodejs-github-bot pushed a commit that referenced this pull request Jul 14, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: #48677
PR-URL: #48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@tniessen tniessen added the permission Issues and PRs related to the Permission Model label Aug 10, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: nodejs#48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
PR-URL: nodejs#48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: nodejs#48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
PR-URL: nodejs#48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
UlisesGascon pushed a commit to UlisesGascon/node that referenced this pull request Aug 14, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
PR-URL: nodejs#48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
RafaelGSS pushed a commit that referenced this pull request Aug 15, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: #48677
PR-URL: #48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
ruyadorno pushed a commit that referenced this pull request Sep 12, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: #48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
ruyadorno pushed a commit that referenced this pull request Sep 12, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: #48677
PR-URL: #48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: #48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: #48677
PR-URL: #48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@ruyadorno ruyadorno mentioned this pull request Sep 13, 2023
ruyadorno pushed a commit that referenced this pull request Sep 17, 2023
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: #48677
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
ruyadorno pushed a commit that referenced this pull request Sep 17, 2023
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: #48677
PR-URL: #48770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. permission Issues and PRs related to the Permission Model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants