+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Calling password API in CL program

  1. #1
    Guest.Visitor Guest

    Default Calling password API in CL program

    A client on our AS/400 requires a production ID set up with extra security to allow the programmers to do some things they cannot do with their own ID's. What I want to do is when one of the programmers logs on with the production ID call in a program that will have the user enter his or her own ID and password and update a log before allowing them into the production ID. Has anyone ever called in the password API in a program that allows you to compare a users password? If so how is it done? Thanks in advance.

  2. #2
    Guest.Visitor Guest

    Default Calling password API in CL program

    Wade, Take a look at the Get Profile Handle (QSYGETPH) and Set Profile (QWTSETP) APIs that are documented at http://publib.boulder.ibm.com/pubs/h...s/QSYGETPH.htm , and http://publib.boulder.ibm.com/pubs/h...s/QSYRLSPH.htm . The Get Profile Handle API will take a user-ID and a password, verify the password and then return a profile handle. Ed Fishel

  3. #3
    Guest.Visitor Guest

    Default Calling password API in CL program

    Wade - You might look into the CHKPWD command if you are writing CL and only want to verify that the correct password was entered. I would be very careful with the security of the program itself, though. HTH, Steve

  4. #4
    Guest.Visitor Guest

    Default Calling password API in CL program

    Check out the January Security Patrol column in MC. There is a program there that uses the QSYGETPH and QWTSETP API's to do what you want to do. jte

  5. #5
    Guest.Visitor Guest

    Default Calling password API in CL program

    John, I'm testing the API's QSYGETPH, QWTSETP and QSYRLSPH by calling a utility CL program that initially gets the profile handle and swaps the profile. I then do some processing in my main CL program and then call the CL program again to release the same handle (via a parm) with QSYRLSPH. The problem is that when my main CL program is finished, my signon user profile is not the current profile. Isn't QSYRLSPH supposed to "unswap" the profiles for me? Or do I need to "unswap" the profiles myself with additional calls to QSYGETPH and QWTSETP? Thanks Chris Ringer

  6. #6

    Default Calling password API in CL program

    Hello Chris, You have to save the original user's handle and explicitly swap back to it, here's an example: http://publib.boulder.ibm.com/cgi-bi.../QB3APD03/A.22 Best regards, Carsten Flensburg

  7. #7
    Guest.Visitor Guest

    Default Calling password API in CL program

    Perhaps, I should explain my situation... As far as I know, the IFS does not support adopted authority but I have users that need to copy/delete/rename files in IFS folders where the users ordinarily only have *Read authority. I can meet this demand by temporarily swapping profiles for the interactive job (needs to be done interactively, not in batch). Does anyone have a better idea? Thanks. Chris Ringer

  8. #8
    Guest.Visitor Guest

    Default Calling password API in CL program

    You are correct about the Integrated File System not using adopted authorities as we conventionally associate them with a program. In V4R5 there are however new Unix-type APIs that provide many of these types of functions. Check out the various Set group ID, Set effective group ID, Set effective user ID, etc. APIs found in the Integrated File System APIs category.

  9. #9

    Default Calling password API in CL program

    Hello Bruce, Is the CPYFRMSTMF command included in the non-adopting IFS security setup? Currently I have a problem where a program adopting *ALL authority to the target file gets a CPFA09C exception when issuing a CPYFRMTSTMF command. If I change the file's *PUBLIC authority to *USE or give the user *USE private authority to the file the command works fine. If I then remove adoption from the program it fails again - *USE is of course not enough to replace the member. And that's what puzzles me - the adopted *ALL authority is only providing *CHANGE plus *OBJMGT access in conjunction with a public or private *USE authority to the file? Best regards, Carsten Flensburg

  10. #10
    Guest.Visitor Guest

    Default Calling password API in CL program

    I can fully understand your puzzlement on this. What's happening is that CPYFRMSTMF is using traditional file interfaces to the target file, and so while the Integrated File System command is not using the adopted authority, the underlying implementation of traditional data management (that is called) is. Normally we don't see implementation details like this surface to the user, but this is an unfortunate exception to that general rule. Whether this would be considered a bug or a feature I'm not sure.

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Similar Threads

  1. Password Validation Program
    By Guest.Visitor in forum Shooting the Breeze
    Replies: 1
    Last Post: 01-24-2005, 04:39 PM
  2. Password validation using "in-house" program
    By David Abramowitz in forum General
    Replies: 6
    Last Post: 07-26-2003, 06:00 PM
  3. Replies: 4
    Last Post: 03-25-2003, 11:46 AM
  4. QUSER and Password Validation Program
    By Guest.Visitor in forum Security
    Replies: 7
    Last Post: 01-17-2001, 03:46 AM
  5. Get Name of Calling Program in a Called Program
    By Guest.Visitor in forum Application Software
    Replies: 2
    Last Post: 07-13-2000, 09:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts