Patent ID: 7725922

Claim:
A method for using sandboxes in a managed shell, comprising: creating a managed environment for executing a shell script on a computer; executing the shell script in the managed environment on one or more processors associated with the computer, wherein the managed environment includes a first sandbox configured to enforce one or more security policies for the shell script during runtime execution of the shell script in the managed environment; recognizing at least one shell tool that the shell script requests during the runtime execution in the managed environment, wherein a security manager recognizes the shell tool as an entity separate from the shell script that has one or more additional security policies separate from the one or more security policies for the shell script; identifying the additional security policies for the recognized shell tool requested by the shell script during the runtime execution in the managed environment; dynamically creating a second sandbox inside the first sandbox in response to recognizing the at least one shell tool requested by the shell script during the run time execution in the managed environment, wherein the second sandbox is configured to enforce the additional security policies identified for the requested shell tool; merging the one or more security policies for the shell script with the additional security policies identified for the requested shell tool; and executing the requested shell tool in the managed environment, wherein the managed environment is configured to use the first sandbox and the second sandbox to enforce the merged security policies for the shell script and the requested shell tool.