|
This is a multi-part message in MIME format. -- something wrong for attached file, Sorry. I repost sample code as following: * Module Description *********************************************** * * ******************************************************************** * * * DISCLAIMER: This material contains programming source code * * for your consideration. These examples have not been thoroughly * * tested under all conditions. IBM, therefore, cannot guarantee * * or imply reliability, serviceability, performance or function of * * these programs. All programs contained herein are provided to * * you "AS IS". THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * * FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. * * * * LIMITATION OF LIABILITY: Neither IBM nor the author shall * * be liable for any claims or damages whatsoever, including * * property damage, personal injury, intellectual property * * infringement, loss of profits, or interruption of business, or * * for any special, consequential or incidental damages, however * * caused, whether arising out of breach of warranty, contract, * * tort (including negligence), strict liability, or otherwise. * * * ******************************************************************** * * * PROGRAM FUNCTION * * * * This program demonstrates some of the abilities an FTP Server * * Logon Exit Program can have. * * * ******************************************************************** F/SPACE 3 ******************************************************************** * * * INDICATOR USAGE * * * * IND. DESCRIPTION * * * * LR - CLOSE FILES ON EXIT * * * ******************************************************************** F/EJECT ******************************************************************** * DATA STRUCTURES USED BY THIS PROGRAM * ******************************************************************** * * Define constants * D Anonym C CONST('ANONYMOUS ') D Text1 C CONST('Anonymous (') D Text2 C CONST(') FTP logon') D InvalidNet C CONST('10.') C/EJECT ******************************************************************** * VARIABLE DEFINITIONS AND LISTS USED BY THIS PROGRAM * ******************************************************************** C/SPACE 2 * * Define binary parameters * D APPIDds S 10I 0 D USRLENds S 10I 0 D AUTLENds S 10I 0 D IPLENds S 10I 0 D RETCDds S 10I 0 * * Define parameter list * </PRE> <PRE> C *Entry PLIST * Input parameters: C PARM APPIDIN Application ID * possible values: 1 = FTP Server Program C PARM USRIN 999 User ID C PARM USRLENIN Length of User ID C PARM AUTIN 999 Authentication Strg C PARM AUTLENIN Length of Auth. Strg C PARM IPADDRIN 15 Client IP Address C PARM IPLENIN Length of IP Address * Return parameters: C PARM RETCDOUT Return Code (Out) * possible values: 0 = Reject Logon * 1 = Continue Logon * 2 = Continue Logon, * override current * library * 3 = Continue Logon, * override user prf, * password * 4 = Continue Logon, * override user prf, * password, current * library * 5 = Accept logon with * user prf returned * 6 = Accept logon with * user prf returned, * override current * library C PARM USRPRFOUT 10 User Profile (Out) C PARM PASSWDOUT 10 Password (Out) C PARM CURLIBOUT 10 Current Lib. (Out) C/EJECT ******************************************************************** * THE MAIN PROGRAM * ******************************************************************** * * Check for ANONYMOUS user * C USRLENIN SUBST(P) USRIN:1 User 10 C User IFEQ Anonym C MOVEL Anonym USRPRFOUT * * Check if the user entered something as an e-mail address * C AUTLENIN IFGT *ZERO E-mail addr. entered * * Check if the E-mail address is a valid one * C Z-ADD 0 i 3 0 C '@' SCAN AUTIN:1 i Valid E-mail address * contains @ character * C i IFGT 0 Found a '@' C AUTLENIN SUBST(P) AUTIN:1 Email 30 C Z-ADD 5 RETCDOUT Accept Logon </PRE> <PRE> * * Log Anonymous FTP Logon to message queue QSYSOPR * (The logging should be done to a secure physical file!!!!!!!) * C Text1 CAT(p) Email:0 Message 43 C Message CAT(p) Text2:0 Message C Message DSPLY 'QSYSOPR' * C ELSE Invalid E-mail addr C Z-ADD 0 RETCDOUT Reject Logon attempt C ENDIF * C ELSE No E-mail address C Z-ADD 0 RETCDOUT Reject Logon attempt C ENDIF * C ELSE * * Any Other User: Proceed with Normal Logon Processing, but the Client address must not belong * to network 10.xxx.xxx.xxx * C SUBST IPADDRIN:1 TheNet 3 C TheNet IFEQ InvalidNet Wrong Net C Z-ADD 0 RETCDOUT Reject Logon attempt C ELSE Right Net C Z-ADD 1 RETCDOUT Continue with Logon C ENDIF * C ENDIF * C EVAL *INLR = *ON C RETURN -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On Behalf Of Vengoal Chang ??? Sent: Wednesday, October 16, 2002 8:52 AM To: rpg400-l@midrange.com Subject: RE: Access control of FTP clients to AS/400 This is a multi-part message in MIME format. -- I found the FTP SERVER LOGON exit program applied to exit point QIBM_QTMF_SVR_LOGON by IBM for your refference. Best regards, Vengoal Chang -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On Behalf Of Gwiazdowski Wojciech Sent: Tuesday, October 15, 2002 9:04 PM To: rpg400-l@midrange.com Subject: RE: Access control of FTP clients to AS/400 > -----Original Message----- > From: Ramón Garcés [mailto:ramon_garces@yahoo.es] > Sent: Tuesday, October 15, 2002 10:58 AM > To: RPG400-L@midrange.com > Subject: Access control of FTP clients to AS/400 [....] > We have problems in understanding how to define the > variable length parameters used in the program we must > to develop in order to manage the exit point > QIBM_QTMF_SVR_LOGON. > > Can anyone help me to understand this, if possible > through a sample program. Ramon, if you want to use format TCPL0100, it's very simply. Bellow are few (most important) lines of source code. *----- Variable declaration D #AppIdent S 9B 0 D #UsrIdent S 10A D #UsrLen S 9B 0 D #AuthStr S 10A D #AuthStrLen S 9B 0 D #IPAddr S 15A D #IPAddrLen S 9B 0 D #RtnCode S 9B 0 D #UsrPrf S 10A D #Password S 10A D #InitLib S 10A C *ENTRY PLIST C PARM #AppIdent Input C PARM #UsrIdent Input C PARM #UsrLen Input C PARM #AuthStr Input C PARM #AuthStrLen Input C PARM #IPAddr Input C PARM #IPAddrLen Input C PARM #RtnCode Output C PARM #UsrPrf Output C PARM #Password Output C PARM #InitLib Output Hier is a place for your logic. This depends on you. After that you should set value #RtnCode. This value indicates whether the logon operation should be accepted or rejected. If it's nessesary you should set #UsrPrf, #Password, #InitLib. Example : C EVAL #RtnCode = 0 (reject the logon operation) C EVAL #RtnCode = 1 (continue the logon operation with the specified user identifier and authentication string) The valid values are : 0 - 6. Sorry for my English. J hope you can understend me. regards Wojciech Gwiazdowski _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- [ winmail.dat of type application/ms-tnef deleted ] -- _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- [ winmail.dat of type application/ms-tnef deleted ] --
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.