/* */
/* Exit Normal: (See OUTPUT) */
/* */
/* Exit Error: None */
/* */
/* End Function Specification *****************************************/
static void qtmfsvrlgn(int ApplId, /* Entry point */
char *UserId_p,
int Lgth_UserId,
char *AuthStr_p,
int Lgth_AuthStr,
char *ClientIPaddr_p,
int Lgth_ClientIPaddr,
int *ReturnCode,
char *UserProfile_p,
char *Password_p,
char *InitCurrLib_p)
{/********************************************************************/
/* Local Variables */
/********************************************************************/
/* The following lists serve as an example of an additional layer */
/* of control over user authentication to an application server. */

Figure 301. Sample FTPLogon Exit Program (Part 13 of 26)

/* Here, logon operations using the following user identifiers */
/* will be allowed to continue, but the output parameters returned */
/* by this example exit program will vary depending on which list */
/* a user identifier (UserId_p) is found in. */
/* For example, attempts to logon as FTPUSR11 or FTPUSR2 will be */
/* allowed, and this example exit will return the initial current */
/* library as an output parameter along with a return code of 2. */
/********************************************************************/
/* Continue the logon operation, Return Code = 1 */
char Return1[] = "FTPUSR10 ";
/* Continue the logon operation, Return Code = 2 */
char Return2[] = "FTPUSR11 FTPUSR2 ";
/* Continue the logon operation, Return Code = 3 */
char Return3[] = "FTPUSR12 FTPUSR3 FTPUSR23 ";
/* Continue the logon operation, Return Code = 4 */
char Return4[] = "FTPUSER FTPUSR4 FTPUSR24 FTPUSR94 ";
int rc; /* Results of server logon request */
Qsy_USRI0300_T Receiver_var; /* QSYRUSRI API Receiver variable */
int Lgth_Receiver_var; /* Receiver variable length */
char Format_Name[8]; /* Format name buffer */
char User_Id[10]; /* User Identifier buffer */

Figure 301. Sample FTPLogon Exit Program (Part 14 of 26)

562 OS/400 TCP/IPConfiguration and Reference V4R4