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



Scott,

Apparently I was unclear.

I am checking programs in the call stack for USRPRF(*OWNER). But I am also checking for USEADPAUT(*YES), because if I find a program with *NO I need look nu further.

The situation is this:
- User DUMMY runs the command for a database file for which he has no authority.
- The first program in the call stack with USRPRF(*OWNER) is a program called #PFM, which is owned by user PANTHEON. User PANTHEON has sufficient authority for the database file. All programs in the call stack so far have USEADPAUT(*YES).
- I call QSYGETPH to get a profile handle for user profile PANTHEON.

At this point I would expect QSYGETPH to succeed, because user PANTHEON has *USE authority for *USRPRF object PANTHEON. However, QSYGETPH fails when *USRPRF PANTHEON has *PUBLIC authority *EXCLUDE. When *USRPRF PANTHEON has *PUBLIC authority *USE, QSYGETPH succeeds.

Joep Beckeringh


Scott Klement schreef:
Joep,

If your program is, indeed, running under additional authority via the adopted authority mechanism, then QSYGETPH will use that authority.

However, I'm not sure (from your description) that you are correctly checking to determine whether it's using adopted authority or not.

To clarify... there are two things involved in what we typically refer to as "adopted authority."

1) Running a program with USRPRF = *OWNER. This is what creates the additional authority.. Each time authority is checked, they check to see if the current user *or* the program's owner has authority to something. Thus enabling greater authority while that program is active.

2) Use Adopted Authority = *YES (or *NO). This is set, by default to *YES. So every program you compile (unless you change it) will have Use Adopted Authority = *YES. This setting means that this program will run under the same authority as _the_program_that_called_it_. So if the caller was using usrprf=*owner, this one will adopt that same authority. But if the caller was using no special authority, then a program with "use adopted = *yes" would also have no special authority.

It sounds to me like you're seeing "Use Adopted Authority = Y" and assuming that the program is running with additional authority -- which just is not true.


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.