Changeset 84a5921d in rtems


Ignore:
Timestamp:
Oct 9, 2018, 6:12:46 AM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
2806e10
Parents:
dc32b6a
git-author:
Sebastian Huber <sebastian.huber@…> (10/09/18 06:12:46)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/09/18 11:26:46)
Message:

ftpd: Restructure chroot() handling.

Remove superfluous setting of errno = 0.

Update #3530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ftpd/ftpd.c

    rdc32b6a r84a5921d  
    18731873  {
    18741874    rtems_event_set set;
    1875     int rv;
    18761875
    18771876    rtems_event_receive(FTPD_RTEMS_EVENT, RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT,
     
    18831882
    18841883    /*
    1885      * The chdir() must immediatly follow the chroot(), otherwise static
     1884     * The chdir() must immediately follow the chroot(), otherwise static
    18861885     * analysis tools may complain about a security issue.
    1887     */
    1888     rv = chroot_made ? chdir("/") : -1;
    1889 
    1890     errno = 0;
    1891 
    1892     if (rv == 0)
     1886     */
     1887
     1888    if (chroot_made && chdir("/") == 0)
    18931889    {
    18941890      send_reply(info, 220, FTPD_SERVER_MESSAGE);
Note: See TracChangeset for help on using the changeset viewer.