/usr/lib/nodejs/graceful-fs/fs.js is in node-graceful-fs 3.0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 | // eeeeeevvvvviiiiiiillllll
// more evil than monkey-patching the native builtin?
// Not sure.
var mod = require("module")
var pre = '(function (exports, require, module, __filename, __dirname) { '
var post = '});'
var src = pre + process.binding('natives').fs + post
var vm = require('vm')
var fn = vm.runInThisContext(src)
return fn(exports, require, module, __filename, __dirname)
|