首页>
外国专利>
Method and apparatus for automatically determining optimum placement of privileged code locations in existing code
Method and apparatus for automatically determining optimum placement of privileged code locations in existing code
展开▼
机译:自动确定现有代码中特权代码位置的最佳位置的方法和装置
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method and apparatus for automatically determining optimum placement of privileged code enablement locations in existing code are provided. With the apparatus and method, a method invocation graph of existing code is generated and a static analysis of the method invocation graph is performed. The static analysis is used to analyze the permission propagation through chains of method invocations in the method invocation graph. When a method invocation in the method invocation graph satisfies one or more user definable criteria, the location in the method invocation graph is save to a file that identifies recommended insertion points for a call to the authorization enablement code. A default criteria for insertion of a call to authorization enablement is the boundary between application code and API code. Thus, if no other points in the chain of method invocations satisfies the user definable criteria for insertion of a call to privileged mode enablement, the location at which the boundary between client code and API code is identified is written to the recommended privileged code enablement location file. This file may then be used user to manually review the code to determine if a call to privileged mode enablement should actually be made at the identified locations. ;Alternatively, the call to privileged mode enablement may be automatically inserted at the indicated locations using refactoring.
展开▼