• 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
    Rocket Software

    Two Steps Forward, No Steps Back

    For over 35 years, Rocket Software’s solutions have empowered businesses to modernize their infrastructure, unlock data value, and drive transformation – all while ensuring modernization without disruption.

    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

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

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