Add support for system calls (ticket #77).
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3465 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
40
Modules/mip_systemcall.pck
Normal file
40
Modules/mip_systemcall.pck
Normal file
@@ -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;
|
||||
/
|
||||
@@ -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
|
||||
|
||||
4
Schema/mipLibraries.sql
Normal file
4
Schema/mipLibraries.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- $Id:$
|
||||
create or replace library SYSTEMCALL
|
||||
as 'c:\windows\system32\msvcrt.dll'
|
||||
/
|
||||
Reference in New Issue
Block a user