FTPs_AuthUser()
Authenticates FTP users
Files
ftp-s.h
/ Application’s source file
Called from
FTPs_ProcessCtrlCmd()
Prototype
CPU_BOOLEAN FTPs_AuthUser (FTPs_SESSION_STRUCT *ftp_session);
Arguments
ftp_session
Pointer to FTP session state and control data.
Returned Values
DEF_OK
, FTP user successfully authenticated;
DEF_FAIL
, otherwise.
Required Configuration
None.
Notes / Warnings
- 1 The application should use the
User
andPass
fields of theftp_session
structure to authenticate users. - 2 After authentication, the application must set fields
BasePath
andRelPath
in the ftp_session structure:
See also ‘ftp-s.c
FTPs_AuthUser()
’.
Example Template
CPU_BOOLEAN FTPs_AuthUser (FTPs_SESSION_STRUCT *ftp_session) { /* Accept ALL users. */ /* Set paths to ROOT. */ Str_FmtPrint((char *)ftp_session->BasePath, sizeof(ftp_session->BasePath), "%c", FTPs_PATH_SEP_CHAR); Str_FmtPrint((char *)ftp_session->BasePath, sizeof(ftp_session->BasePath), "%c", FTPs_PATH_SEP_CHAR); }