I changed our initial program to adopted authority and *OWNER. The Owner profile has *ALLOBJ authority. The user ran an option that submitted a job; the job generated an authority error with work files. I changed the authority of the object and the process continued. I returned the users profile to *ALLOBJ.
I thought once a program adopted authority, the owners authority was in affect until it ended.
Is there a default on the SBMJOB command that controls this?
If there is, can I change the default without recompiling all the programs that have SBMJOB's?
The key to knowing when adopted authority is in effect is to first understand that adopted authority is stack-based. Here's what happens in most cases: When a program that adopts is called (in this case your initial program), adopted authority will be in effect for as long as that program is in the program call stack. So if Program_A calls Program_B and Program_B then calls Program_C, the adopted authority is passed along to each program (as long as the Use Adopted Authority parameter is set to the default setting "*YES). Adopted authority will be in effect as long as Program_A is in the program call stack. When you do a SBMJOB, that command starts another job and, therefore, another program stack. Nowhere in this new stack does Program_A exist. In other words, adopted authority is not passed along to new jobs even though the submitting job has adopted authority. One way to solve your situation is to have the first program called by the submitted job adopt authority.
Hope this helps.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Search400's targeted search engine: Get relevant information on security.
Dig Deeper on iSeries physical security
Related Q&A from Carol Woodbury
Before changing password levels and upgrading operating systems on the AS/400, ensure the clients connecting to the NetServer do not need the old ... Continue Reading
Look in the audit journal (QAUDJRN) on the AS/400 for an authority failure message with the name of the library as the object name. Use the ... Continue Reading
The UPPWEI field corresponds to the password expiration interval field, and its values "0" and "-1" represent the *SYSVAL and *NOXMAX commands. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.