$ Verify = 'F$Verify(0) $! $! Copyright (C) 1989, 1992, 1993 TGV, Incorporated $! $! This command procedure is invoked after the system SYLOGIN.COM and $! the users' LOGIN.COM when the FTP Server logs in. It purges the $! FTP_SERVER.LOG files which accumulate in the users' login directory $! and runs the real FTP_SERVER. $! $ $! Don't be broken by people who do weird things in their login.com $ $ Set := "Set" $ Set Symbol/Scope=(NoGlobal,NoLocal) $ $! Purge only if lower versions exist $ $ If F$Search("SYS$LOGIN:FTP_SERVER.LOG;-1") .Eqs. "" Then Goto NoPurge $ Keep = F$TrnLNM("MULTINET_FTP_SERVER_LOG_LIMIT") $ If Keep .Eqs. "-" Then Goto NoPurge $ If Keep .Eqs. "" then Keep = "1" $ Define/User/NoLog Sys$Output NL: $ Define/User/NoLog Sys$Error NL: $ Purge/Keep='Keep' SYS$LOGIN:FTP_SERVER.LOG $NoPurge: $ $! This is a hack to stop this log file from printing $ $ Define/NoLog Sys$Print "***NEVER***" $ $! $! This next line is an example of how one might reject or accept $! FTP connections based on the source address or name. It is commented $! out because the invocation of the MULTINET FTP/SERVER/GET_REMOTE_INFO $! command takes an extra invocation and will add a small, but unnecessary $! delay to the FTP LOGIN. $! $! After invoking FTP/SERVER/GET_REMOTE_INFO, the job logical name $! MULTINET_FTP_ADDRESS will be defined as the remote IP address, and $! the job logical name MULTINET_FTP_HOSTNAME *MAY* be defined as the $! remote hostname (only if the address is listed in the host tables $! or DNS). $! $ $ ! MultiNet FTP/Server/Get_Remote_Info $ $! $! Set up to reject or accept the login, and find the message to $! display. Pass this to the FTP Server via the appropriate switches. $! $ $ FtpOptions = "" $ Username = F$Edit(F$GetJPI("","USERNAME"),"TRIM") $ If F$TrnLNM("MULTINET_FTP_MESSAGE") .Nes. "" Then - FtpOptions = "/MESSAGE=""" + F$TrnLNM("MULTINET_FTP_MESSAGE") + """ $ If F$TrnLNM("MULTINET_FTP_REJECT") .Nes. "" $ Then $ FtpOptions = FtpOptions + "/REJECT" $ Else $ Directory = F$TrnLNM("MULTINET_''Username'_FTP_DIRECTORY","LNM$SYSTEM") $ If Directory .Nes. "" Then - FtpOptions = FtpOptions + "/DIRECTORY=(''Directory')" $ RestrictOptions = "" $ If Username .Eqs. "ANONYMOUS" Then RestrictOptions = "/ACCESS=(NOWRITE,NOSPAWN)" $ Control = F$TrnLNM("MULTINET_''Username'_FTP_CONTROL","LNM$SYSTEM") $ If Control .Nes. "" Then - RestrictOptions = "/ACCESS=(''Control')" $ If Control .Eqs. "-" Then - RestrictOptions = "" $ Endif $ $ $! Run the real FTP Server $ $ MultiNet FTP/Server 'FtpOptions' 'RestrictOptions' $ $! Exit silently $ $ Logout/Brief