× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Le 19/05/2022 à 21:05, smith5646midrange@xxxxxxxxx a écrit :
I have to be overlooking something and I'm hoping one of you will see it.


I have an SQLRPGLE program named SCRTEST. It is owned by QSECOFR and is
USRPRF(*OWNER);

In the program it needs to execute the below MOV command which is built on
the fly. FYI - I'm using MOV because I can rename the file and move it to a
different library at the same time.


MOV OBJ('/QSYS.LIB/OLDLIB.LIB/OLDFILE.FILE')
TOOBJ('/QSYS.LIB/NEWLIB.LIB/NEWFILE.FILE')


I have tried calls using both system() and QCMDEXC().


If I run the program with the QSECOFR profile, both versions work. If I run
it with a *USER profile, both versions fail.


What am I missing? Do system() and QCMDEXC() not pass the adopted authority
to the command that they call? If not, is there a different command that
does?

Beside the profile swap technique for non QSYS objects, SQL ILE programs must also specify DYNUSRPRF(*OWNER) in order for owner authority adoption to apply to QSYS objects.

check out https://www.ibm.com/docs/en/i/7.1?topic=protection-security-sql-objects


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2023 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.