netutils/ftpd: add option to login to FTPD using FSUTILS_PASSWD

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2022-03-28 13:46:07 +02:00 committed by Xiang Xiao
parent e3df21cd4c
commit c1dfaf42ff
4 changed files with 242 additions and 217 deletions

View File

@ -69,7 +69,7 @@ static const struct fptd_account_s g_ftpdaccounts[] =
* Public Data * Public Data
****************************************************************************/ ****************************************************************************/
/* To minimize the probability of name collisitions, all FTPD example /* To minimize the probability of name collisions, all FTPD example
* global data is maintained in a single instance of a structure. * global data is maintained in a single instance of a structure.
*/ */

View File

@ -13,7 +13,17 @@ config NETUTILS_FTPD
if NETUTILS_FTPD if NETUTILS_FTPD
config FTPD_WORKERSTACKSIZE config FTPD_WORKERSTACKSIZE
int "FTPD client thread stack size" int "FTPD server thread stack size"
default DEFAULT_TASK_STACKSIZE default DEFAULT_TASK_STACKSIZE
config FTPD_LOGIN_PASSWD
bool "Verify FTPD server login with encrypted password file"
default n
depends on FSUTILS_PASSWD
---help---
Use the content of an encrypted password file to verify user
credentials. This option requires that you have selected
CONFIG_FSUTILS_PASSWD to enable the access methods of
apps/fsutils/passwd.
endif endif

File diff suppressed because it is too large Load Diff

View File

@ -120,7 +120,7 @@ struct ftpd_session_s
{ {
FAR struct ftpd_server_s *server; FAR struct ftpd_server_s *server;
FAR struct ftpd_account_s *head; FAR struct ftpd_account_s *head;
FAR struct ftpd_account_s *curr; bool loggedin;
uint8_t flags; /* See TPD_SESSIONFLAG_* definitions */ uint8_t flags; /* See TPD_SESSIONFLAG_* definitions */
int rxtimeout; int rxtimeout;
int txtimeout; int txtimeout;