|
I have a service program with a lot of miscellaneous functions. One--
of these functions is an "ExecuteCommand" function using SQL. It
uses SQL so it can reach out to other systems to execute commands.
From SYSTEMA, it can do a CALL PGMA on SYSTEMB using the following logic.
EXEC SQL CONNECT TO SYSTEMB;
ExecuteCommand('CALL PGMA');
ExecuteCommand does
Build sqlString which then looks like this.CALL
QSYS2/QCMDEXC('CALL PGMA');
EXEC SQL EXECUTE IMMEDIATE :sqlString;
Return sqlcode = 0;
I have an RPGLE program (not SQLRPGLE) that is owned by a *SECOFR
profile and adopts *OWNER authority. When it calls the ExecuteCommand
function in the service program, it appears that it is not adopting
any authority from the calling program.
I do not want the service program to adopt *OWNER authority because
then any program could call ExecuteCommand and do major damage if they
want.ExecuteCommand('DLTLIB ProdLib').
Is there a way to have the service program adopt the authority of the
calling RPGLE program (Use adopted authority = *YES already) when it
does the ExecuteCommand? Is my problem because of the service program
or the SQL inside of it?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.