Changeset dcf42bb2 in rtems for cpukit


Ignore:
Timestamp:
Oct 5, 2018, 12:39:46 PM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
51da629
Parents:
e761fb4
Message:

ftpd: Remove FTPD_SessionInfo_t::pass member

There is no need to keep the password throughout the session.

Update #3530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ftpd/ftpd.c

    re761fb4 rdcf42bb2  
    266266  rtems_id            tid;         /* Task id */
    267267  char                *user;       /* user name (0 if not supplied) */
    268   char                *pass;       /* password (0 if not supplied) */
    269268  bool                auth;        /* true if user/pass was valid, false if not or not supplied */
    270269} FTPD_SessionInfo_t;
     
    17401739    sscanf(args, "%254s", fname);
    17411740    free(info->user);
    1742     free(info->pass);
    1743     info->pass = NULL;
    17441741    info->user = strdup(fname);
    17451742    if (ftpd_config->login &&
     
    17541751  else if (!strcmp("PASS", cmd))
    17551752  {
    1756     sscanf(args, "%254s", fname);
    1757     free(info->pass);
    1758     info->pass = strdup(fname);
    17591753    if (!info->user) {
    17601754      send_reply(info, 332, "Need account to log in");
    17611755    } else {
    17621756      if (ftpd_config->login &&
    1763         !ftpd_config->login(info->user, info->pass)) {
     1757        !ftpd_config->login(info->user, args)) {
    17641758        info->auth = false;
    17651759        send_reply(info, 530, "Not logged in.");
     
    19521946    close_stream(info);
    19531947    free(info->user);
    1954     free(info->pass);
    19551948    task_pool_release(info);
    19561949  }
     
    20392032            info->idle = ftpd_timeout;
    20402033            info->user = NULL;
    2041             info->pass = NULL;
    20422034            if (ftpd_config->login)
    20432035              info->auth = false;
Note: See TracChangeset for help on using the changeset viewer.