Repository navigation
Commit 84b846a
fs: check permissions once in bindings with async and sync paths
Eleven fs bindings (stat, statfs, link, rename, unlink, realpath,
readdir, copyFile, chown, lchown, mkdtemp) repeated every permission
check in both the asynchronous and the synchronous branch, differing
only in whether the denial is reported through the request or thrown.
Obtain the request wrap up front with a new GetAsyncReqWrap() helper
and perform each check once with FS_THROW_IF_INSUFFICIENT_PERMISSIONS(),
which picks the reporting style based on whether the call is async.
How permission denials are reported is unchanged.
Assisted-by: Claude
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #67497
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 0258bef commit 84b846a
1 file changed
Lines changed: 131 additions & 161 deletions
0 commit comments