![]() |
||
February 29, 2012 - Vol 2, Issue 5 |
||
![]() |
||
![]() ![]() ![]() |
Carsten's Security Code for IBM i![]() Controlling IBM Query/400 Output FilesDownloadable Source code included!![]() By Carsten Flensburg Some time ago I needed a way to identify all of the files on the system that had been created as an output file from the IBM Query/400 product, a.k.a. IBM Query for i. The reason for my need to identify these query output files, was a requirement to allow query output files to only reside in specific libraries. My research did not provide me with a conclusive answer but after consulting with Chuck R. Pence of IBM who knows Query/400 inside and out, I arrived at a criteria, that so far has been accurate in determining whether a file was created by the Query/400 product.
In this article I provide 2 utilities that can assist you in finding and controlling those files created with Query/400. Utility 1 – Locating Files created by Query/400I have provided the source code for the CL program SEC100T. This program allows you to find all the files in a specified library that were created by Query/400. All files determined to have been created by Query/400 will cause a message to be sent to the message queue of the user running the program. Granted, it's not an elegant output option, but it does the job. Utility 2 – The VFYQRYOUTF(Verify Query Output File) commandThe VFYQRYOUTF command is used to check a specific file to determine if it was created by Query/400. If the file was created by Query/400, the command return variable is set to 'Y'. This command is used in Utility 1, to determine which files were created by Query/400. You can examine the program SEC100T to see how the command is used within a CL program. The VFYQRYOUTF command has the following appearance, when prompted: Verify Query Output File (VFYQRYOUTF) Type choices, press Enter. File . . . . . . . . . . . . . . Name Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB CL var for QRYFIND (1) . . Character value |
|
In This Issue
Carsten's Security Code for IBM i Security Quick Links
SecureMyi Website Please Visit Our Sponsors
Platinum Sponsor |
IBM i Security and Audit ResourcesIBM i Security Videos from SecureMyi.com SecureMyi Newsletter Home and ArchivesIBM i Security Reference - IBM i 6.1 IBM i Security Reference - IBM i 7.1 QAUDJRN Audit Types By AUDLVL 6.1 QAUDJRN Entry Type Record Layouts 6.1 PCI SSC Data Security Standards ![]() ![]() ![]() |
![]() ![]() |
Featured YouTube Educational Video![]() IBM i Security
![]() |
||
IBM i Security Industry NewsRaz-Lee Security offers FREE Anti-Virus software for IBM i. Arpeggio Software offers FREE Zip-Unzip tool. Safestone launches Compliance Center for IBM Power Systems IBM PTF Extends Capability of CL Command Exit Programs IBM i Security Calendar of Events
|
![]() ![]() ![]() ![]() |
|
![]() |
||
Security Shorts
![]() *SECOFR User Class Does Not Make A User PowerfulBy Dan Riehl When we create user accounts on the IBM i, we use the command CRTUSRPRF(Create User Profile). One of the attributes of a user profile is the User Class. The choices are *SECOFR, *SECADM, *SYSOPR, *PGMR or *USER. The Security Officer(*SECOFR) user class does not make the user powerful, just as the user class of System Operator(*SYSOPR) does not convey any power to the user to manage the operations of the system. The user class assigned to a user does one major thing. It determines what menu options are displayed on IBM supplied menus. You can easily see the result of user class and menus on the MAIN menu. If a user runs the command GO MAIN, some menu options will be shown, others may not be shown, all based upon the user's assigned user class. In another example, consider the IBM supplied menu named SECURITY. To access the menu the user runs the command GO SECURITY. If the user has a user class of *USER, only one menu option is shown, "Change your Password". On the other hand, if the user has a user class of *SECOFR, all options on the SECURITY menu are displayed. But, just because a menu option is shown, does not mean the user has the authority to exercise the menu option. Option 8 from the SECURITY menu runs the command, GO SECTOOLS. Unless the user has *ALLOBJ special authority, or is specifically granted a private authority to the SECTOOLS menu, selecting option 8 from the menu will result in an error message "Not Authorized to object SECTOOLS". The user profile attribute that provides *ALLOBJ, and other special abilities is NOT the User Class, it is the attribute Special Authority(SPCAUT). When we create user profiles we typically specify the command as follows: CRTUSRPRF USRPRF(MYUSER) USRCLS(*SECOFR) SPCAUT(*USRCLS) Here we create a powerful user by specifying that the user has all of the special authorities(SPCAUT) of the *SECOFR User Class(USRCLS). We could have just as easily specified the command as: CRTUSRPRF USRPRF(MYUSER) USRCLS(*SECOFR) SPCAUT(*NONE) In this example, the user would be able to see all of the menu options on the SECURITY menu, but would not be able to run most of them. This is because the user was not granted any special authorities. I know that this is a somewhat goofy example. We would never create a user profile as a *SECOFR class with no special authorities, but I wanted to illustrate the point, that the User Class alone, does not provide any capabilities to the user, except the ability to see menu options on IBM supplied Menus. When we consider the command again, CRTUSRPRF USRPRF(MYUSER) USRCLS(*SECOFR) SPCAUT(*USRCLS) The default value for the SPCAUT parameter is *USRCLS. So, unless we override the SPCAUT value *USRCLS, the user will have special authorities assigned according to the user's user class. Assuming you are running QSECURITY level 30 or higher, here are the default special authorities assigned by user class.
(Note: The User Class can also be specified in the CRITMSGUSR parameter of the CHGSRVA(Change Service Attributes) command, to cause users of a particular User Class to receive critical system break messages.) |
Sponsored Links
IBM i, iSeries and AS/400
|
|
![]() |
||
![]() |
||
Send your IBM i Security Related News and Events! Sponsor the SecureMyi.com Security Newsletter © Copyright 2012 - SecureMyi.com, all rights reserved SecureMyi.com | St Louis MO 63017 |