From e4547a542bf1a79d0a556cc5575b47ea7d542d0c Mon Sep 17 00:00:00 2001 From: hardya Date: Tue, 5 Feb 2008 10:28:17 +0000 Subject: [PATCH] Add support for system calls (ticket #77). git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3465 248e525c-4dfb-0310-94bc-949c084e9493 --- Data/BulkLoad/BULK_LOAD.xls | Bin 1060864 -> 1060864 bytes ...ItemToFunctionalSpecificationReference.xls | Bin 37376 -> 37376 bytes Modules/Modules.sql | 5 ++- Modules/mip_systemcall.pck | 40 ++++++++++++++++++ Schema/InstallMIP.sql | 10 +++-- Schema/mipLibraries.sql | 4 ++ 6 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Modules/mip_systemcall.pck create mode 100644 Schema/mipLibraries.sql diff --git a/Data/BulkLoad/BULK_LOAD.xls b/Data/BulkLoad/BULK_LOAD.xls index 78bdb364c424adfbc7e4a7df2a96a682068eaa07..7fd0f8076fbba29eae7941dc90610964b840f117 100644 GIT binary patch delta 84 zcmZp8;Lz~EVM7iJYlB*5@3rPami9sxMj&PaVrC!)@mYbG4T#x+m;;D8ftU-3xq+Am Shw&w9e diff --git a/Documentation/Design/DatabaseItemToFunctionalSpecificationReference.xls b/Documentation/Design/DatabaseItemToFunctionalSpecificationReference.xls index ce2c50d9d9671e74c8d2fda3508c9763db1a7ad9..ed749cd5523865305893d72f7cda72787a7039da 100644 GIT binary patch delta 21 dcmZoz!ql*YX+zEgHihk>Yp$hlE}GEC2moZ730MFC delta 21 dcmZoz!ql*YX+zEgwt_=1=HE%&Tr{DN5ddvL3ON7( diff --git a/Modules/Modules.sql b/Modules/Modules.sql index a8ddf6b..39e0e00 100644 --- a/Modules/Modules.sql +++ b/Modules/Modules.sql @@ -1,13 +1,14 @@ set scan off set define off + +@@mip_mandatory.pck @@mip_helper_special_cases.pck @@gen_mandatory.prc exec gen_mandatory -@@mip_mandatory.pck - +@@mip_systemcall.pck @@mip_files.pck @@mip_security.pck @@mip_parties.pck diff --git a/Modules/mip_systemcall.pck b/Modules/mip_systemcall.pck new file mode 100644 index 0000000..b8a5ab9 --- /dev/null +++ b/Modules/mip_systemcall.pck @@ -0,0 +1,40 @@ +CREATE OR REPLACE PACKAGE mip_systemcall IS + + -- Author : HARDYA + -- Created : 05/02/2008 09:46:18 + -- Purpose : Provide access to OS system calls + -- $Id:$ + + /** Execute OS command + %param p_cmd_str the OS command to be executed + %return exit code from the OS command + */ + FUNCTION syscall(p_cmd_str IN VARCHAR2) RETURN BINARY_INTEGER; + + /** Execute OS command + %param p_cmd_str the OS command to be executed + */ + PROCEDURE syscall(p_cmd_str IN VARCHAR2); + +END mip_systemcall; +/ +CREATE OR REPLACE PACKAGE BODY mip_systemcall IS + + -- $Id:$ + + FUNCTION syscall(p_cmd_str IN VARCHAR2) RETURN BINARY_INTEGER AS + LANGUAGE c NAME "system" + LIBRARY systemcall + PARAMETERS(p_cmd_str STRING); + + PROCEDURE syscall(p_cmd_str IN VARCHAR2) IS + l_dummy BINARY_INTEGER; + BEGIN + l_dummy := syscall(p_cmd_str); + END syscall; + +BEGIN + -- Initialization + NULL; +END mip_systemcall; +/ diff --git a/Schema/InstallMIP.sql b/Schema/InstallMIP.sql index d9a1d1f..0d068bc 100644 --- a/Schema/InstallMIP.sql +++ b/Schema/InstallMIP.sql @@ -4,6 +4,7 @@ drop user &3 cascade; grant connect, resource to &3 identified by &4; grant create any view, create any directory to &3; +grant create library to &3; grant debug connect session, javauserpriv to &3; grant execute on dbms_sql to &3; grant create any procedure to &3; @@ -15,10 +16,11 @@ create synonym &3..plpdf_img for plpdf.plpdf_img; connect &3/&4@&5 -@@mip -@@mipDirectories -@@mipExtTables +@@mip.sql +@@mipDirectories.sql +@@mipExtTables.sql @@gtt_dir_list.pdc -@@mipViews +@@mipViews.sql +@@mipLibraries.sql exit diff --git a/Schema/mipLibraries.sql b/Schema/mipLibraries.sql new file mode 100644 index 0000000..7e1226b --- /dev/null +++ b/Schema/mipLibraries.sql @@ -0,0 +1,4 @@ +-- $Id:$ +create or replace library SYSTEMCALL + as 'c:\windows\system32\msvcrt.dll' +/ \ No newline at end of file