diff options
| author | Tom Yu <tlyu@mit.edu> | 2001-12-08 01:58:07 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2001-12-08 01:58:07 +0000 |
| commit | 6a85ddebf1bb152f75938e8058f9bd38ba92045e (patch) | |
| tree | 464f100745f55d6f13c35820a459133962cafa8f /src | |
| parent | 021f2a8ba6d99472b1726eb6d91602a6339ce334 (diff) | |
| download | krb5-6a85ddebf1bb152f75938e8058f9bd38ba92045e.tar.gz krb5-6a85ddebf1bb152f75938e8058f9bd38ba92045e.tar.xz krb5-6a85ddebf1bb152f75938e8058f9bd38ba92045e.zip | |
* ftpcmd.y (pathname): Handle returns from ftpglob() better so
that errors get sent via reply(), while causing some match
failures to match to simply return $1, so the higher level can
deal. Previously, some failures would cause synch problems since
NULL would be returned and no reply was sent.
[pullup from 1.2.3]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14059 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/gssftp/ftpd/ChangeLog | 8 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/ftpcmd.y | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index c02c68047..7577d5697 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,11 @@ +2001-11-30 Tom Yu <tlyu@mit.edu> + + * ftpcmd.y (pathname): Handle returns from ftpglob() better so + that errors get sent via reply(), while causing some match + failures to match to simply return $1, so the higher level can + deal. Previously, some failures would cause synch problems since + NULL would be returned and no reply was sent. + 2001-10-11 Mitchell Berger <mitchb@mit.edu> * ftpd.M: Remove improper formatting from the .SH NAME section, as it diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y index 282697e58..f7f16122a 100644 --- a/src/appl/gssftp/ftpd/ftpcmd.y +++ b/src/appl/gssftp/ftpd/ftpcmd.y @@ -811,13 +811,16 @@ pathname: pathstring char **vv; vv = ftpglob((char *) $1); - if (vv == NULL || globerr != NULL) { - reply(550, globerr); - $$ = NULL; + $$ = (vv != NULL) ? *vv : NULL; + if ($$ == NULL) { + if (globerr == NULL) + $$ = $1; + else { + reply(550, "%s", globerr); + free((char *) $1); + } } else - $$ = *vv; - - free((char *) $1); + free((char *) $1); } else $$ = $1; } |
