• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Running Query Without Adopted Authority

    February 9, 2005 Hey, Ted

    Because of the Sarbanes/Oxley Act, we are tightening our security. One problem we have is using AS/400 Query. Several of our menus include options that run the Work with Queries command. The problem is that a user who takes one of these options is running WRKQRY under adopted authority, and therefore has access to files that should from now on be secured. How can we change the WRKQRY command so that the user does not have adopted authority?

    –Lin

    You can’t change the command. You may be able to change the command-processing program, QSYS/QQUDA, but I don’t like to monkey with IBM-created objects. I’m so conservative, I wear a belt and suspenders, and I have no idea what might happen.

    Here’s what I suggest you do. First, create a new CL source member from your CL program template. (You do have a template, don’t you? If not, use this one.) You will need only one CL command in the regular routine: WRKQRY.

    Compile the new CL program. It should run as either an OPM program or an ILE program.

    If necessary, transfer ownership of the new program to the user who owns your applications.

    CHGOBJOWN OBJ(mylib/mypgm)  OBJTYPE(*PGM) NEWOWN(newowner)
    


    Then change the program not to use adopted authority.

    CHGPGM PGM(mylib/mypgm) USRPRF(*USER) USEADPAUT(*NO)
    

    The parameter USRPRF(*USER) says that the program uses the current user’s authority only when it runs. USEADPAUT(*NO) does not allow the program to adopt authority from programs higher in the call stack.

    –Ted

    Click here to contact Ted Holt by e-mail.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Maxava

    Migrate IBM i with Confidence

    Tired of costly and risky migrations? Maxava Migrate Live minimizes disruption with seamless transitions. Upgrading to Power10 or cloud hosted system, Maxava has you covered!

    Learn More

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Linoma Serves Up Better-Looking Screens with aXes Service Packs Put a Crimp in Third Party Maintenance Plans

    Leave a Reply Cancel reply

Volume 5, Number 6 -- February 9, 2005
THIS ISSUE
SPONSORED BY:

T.L. Ashford
WorksRight Software
COMMON

Table of Contents

  • The Integrated File System for Intelligent People
  • Limiting All-Object Authority
  • Running Query Without Adopted Authority

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle