× 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.




This might be a long shoot but if you're using RPGLE look under Service Program
Information. DSPPGM, enter until you get to the Service Program Information
pages. look at the first Module. In my example it's "QRNXINIT". Put a 5 to
display. Look for the "User profile . . . " and see if it's *USER. I'm not an
RPG programmer but we've had a few issues before with adoption not working at
this level. I believe these values can only be changed at compile time. There
might be more levels of Display Service Program Information so check them all.

Again I'm not an RPG programmer and I don't pretend play one on TV.

Good luck.


Display Service Program Information
Display 3 of 10
Service program . . . . . . . . . . . . : QRNXIE
Library . . . . . . . . . . . . . . . : QSYS
Owner . . . . . . . . . . . . . . . . . : QSYS
Service program attribute . . . . . . . : CLE
Detail . . . . . . . . . . . . . . . . . : *MODULE

Type options, press Enter.
5=Display description 6=Print description

Creation Optimization Debug
Opt Module Library Attribute Date Level Data
QRNXINIT QBUILDSS1 CLE 12/03/03 40 *NO
QRNXERR QBUILDSS1 CLE 12/03/03 40 *NO
QRNXMSG QBUILDSS1 CLE 06/25/04 40 *NO
QRNXMTX QBUILDSS1 CLE 12/03/03 40 *NO



Display Service Program Information
Display 1 of 10
Service program . . . . . . . . . . . . : QRNXIE
Library . . . . . . . . . . . . . . . : QSYS
Owner . . . . . . . . . . . . . . . . . : QSYS
Service program attribute . . . . . . . : CLE
Detail . . . . . . . . . . . . . . . . . : *BASIC

Service program creation information:
Service program creation date/time . . . . . . . : 06/25/04 12:48:27
Export source file . . . . . . . . . . . . . . . : S000000056
Library . . . . . . . . . . . . . . . . . . . : $PTFBLD4
Export member . . . . . . . . . . . . . . . . . : S000000056
Activation group attribute . . . . . . . . . . . : *CALLER
Shared activation group . . . . . . . . . . . . : *NO
Current export signature . . . . . . . . . . . . : D8D9D5E7C9C5404040404040
40404040
User profile . . . . . . . . . . . . . . . . . . : *USER
More...

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Mackie, Roger L.
(Precision Press)
Sent: Tuesday, April 03, 2007 7:18 AM
To: Midrange Systems Technical Discussion
Subject: RE: Rép. : Adopted authority and triggers


I agree that it is acting as though the owner does not have enough authority to
the object. However, the profile owns every instance (WRKOBJ (*All/EXTTRG)) of
the trigger with *ALL authority it, the file and the library that both are in.
As you suggest in a subsequent related reply, I'll see if our iSeries
administrator will agree to give the profile *ALLOBJECT authority for testing
purposes. I'm sure it won't be acceptable on a continuing basis, but it is a
good suggestion for identifying the issue.

Thanks,
Roger Mackie

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]
On Behalf Of Denis Robitaille
Sent: Tuesday, April 03, 2007 9:01 AM
To: Midrange Systems Technical Discussion
Subject: RE: Rép. : Adopted authority and triggers

Then, the most likely explanation is that the owner of the trigger progra do
not have enough right to the files.

Or maybe there is another copy of the trigger program out there that gets
called instead of the right one.

"Mackie, Roger L. (Precision Press)" <RLMackie@xxxxxxxxxxxxx>
2007-04-03 09:39 >>>
I used USRPRF(*OWNER). When that didn't work, I removed the triggers,
recompiled the external programs with USRPRF(*OWNER) and reapplied the
triggers. Here is a portion of the current DSPPGM output for one of the
external triggers. The other is the same:
User profile . . . . . . . . . . . . . . . . . : *OWNER
Use adopted authority . . . . . . . . . . . . : *YES

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Denis Robitaille
Sent: Tuesday, April 03, 2007 8:23 AM
To: Midrange Systems Technical Discussion
Subject: RE: Rép. : Adopted authority and triggers

What keyword do you use when compiling the trigger to make them adopt autority.
Sometimes, we can confuse the USRPRF parameter and the AUT parameter.

"Mackie, Roger L. (Precision Press)" <RLMackie@xxxxxxxxxxxxx>
2007-04-03 09:04 >>>
The trigger programs are strictly RPGLE with no SQL statements.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Denis Robitaille
Sent: Tuesday, April 03, 2007 8:00 AM
To: Midrange Systems Technical Discussion
Subject: Rép. : Adopted authority and triggers

Trigger should be able to adopt autority. Maybe your trigger programs uses
dynamic SQL, if so, they must be compile with the option DYNUSRPRF(*OWNER). By
dynamic SQL, I mean that the SQL statement to run is not known at compile time.

"Mackie, Roger L. (Precision Press)" <RLMackie@xxxxxxxxxxxxx>
2007-04-03 08:50 >>>
I am working on a project to give a specific user (LMTUSR) limited access to
our database. As currently designed, LMTUSR is excluded from all but one
library. The external stored procedures (SQLRPGLE and
RPGLE)
in that library adopt the owner's authority to access functions and data in
other libraries. As long as those functions are in modules that only read the
data, they work fine. However, the project requires procedures to insert data
in certain tables that have *BEFORE *INSERT and *BEFORE *UPDATE external
triggers.

From reading the security reference manual (we are on v5r3) I
understand
that triggers do not adopt authority from programs earlier in the call stack.
Changing the external trigger programs to adopt authority (CHGPGM
PGM(EXTTRG) USRPRF(*OWNER)) did not allow LMTUSR to open the files for update
using adopted authority. When the triggers are disabled, UDFs that access the
files complete correctly. When the triggers are enabled, the process fails with
SQL0443 and CPF4236 "Not authorized to open.."
in
the job log. I could not find a parameter on the ADDPFTRG command to adopt
authority.

Did I miss something? While using adopted authority is there a way to insert
and/or update data into files with triggers? If not, I'll probably use a data
queue to get the data to a job whose user does have authority. Or is there a
better way?

Thanks,
Roger Mackie



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To
post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment
to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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