mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Honor FTP_PASSIVE_MODE so caller doesn't need to.
This commit is contained in:
parent
c4de295680
commit
d02e84a626
1 changed files with 4 additions and 0 deletions
|
|
@ -218,6 +218,10 @@ _ftp_transfer(int cd, char *oper, char *file,
|
|||
high = (flags && strchr(flags, 'h'));
|
||||
verbose = (flags && strchr(flags, 'v'));
|
||||
|
||||
/* passive mode */
|
||||
if (!pasv && (s = getenv("FTP_PASSIVE_MODE")) != NULL)
|
||||
pasv = (strncasecmp(s, "no", 2) != 0);
|
||||
|
||||
/* change directory */
|
||||
if (((s = strrchr(file, '/')) != NULL) && (s != file)) {
|
||||
*s = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue