Comparing version 0.0.7 to 0.0.8
@@ -66,2 +66,3 @@ /* | ||
function permissionDenied(name, originalMethod) { | ||
return function () { | ||
@@ -74,6 +75,6 @@ | ||
// command could be in arguments[0] in case of exec | ||
// or arguments[1][1] in case of execFile | ||
toCheckCommands.push(arguments[0]); | ||
if (arguments.length >= 2 && (arguments[1])[1]) { | ||
toCheckCommands.push((arguments[1])[1]); | ||
// or arguments[1][1] in case of execFile for node v0.10 | ||
toCheckCommands.push(arguments[0].split(/\s+/)[0]); | ||
if (arguments.length >= 2 && arguments[1][1]) { | ||
toCheckCommands.push(arguments[1][1].split(/\s+/)[0]); | ||
} | ||
@@ -80,0 +81,0 @@ |
{ | ||
"name": "restrict", | ||
"description": "Restricts applications from calling certain methods on process and all methods on child_process", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": "Rohini Harendra <rohini.raghav@gmail.com>", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -42,3 +42,5 @@ /* | ||
try { | ||
require('child_process').exec('ls',['-ltr']); | ||
require('child_process').exec('ls'); | ||
require('child_process').exec('ls -l /tmp'); | ||
require('child_process').spawn('ls', ['-lh', '/usr']); | ||
self.callback(null, {}); | ||
@@ -45,0 +47,0 @@ } catch (e) { |
Sorry, the diff of this file is not supported yet
15952
8
430
17