Skip to content

permission: add debug log when inserting fs nodes#48677

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
RafaelGSS:debug-pm
Jul 13, 2023
Merged

permission: add debug log when inserting fs nodes#48677
nodejs-github-bot merged 1 commit intonodejs:mainfrom
RafaelGSS:debug-pm

Conversation

@RafaelGSS
Copy link
Copy Markdown
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

Loading
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