summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1b75d3e)
fix globbing - need NOCHECK flag
SCCS-vsn: libexec/ftpd/ftpcmd.y 8.3
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ftpcmd.y 8.2 (Berkeley) %G%
+ * @(#)ftpcmd.y 8.3 (Berkeley) %G%
-static char sccsid[] = "@(#)ftpcmd.y 8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
*/
if (logged_in && $1 && *$1 == '~') {
glob_t gl;
*/
if (logged_in && $1 && *$1 == '~') {
glob_t gl;
- int flags = GLOB_BRACE|GLOB_QUOTE|GLOB_TILDE;
+ int flags =
+ GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
memset(&gl, 0, sizeof(gl));
memset(&gl, 0, sizeof(gl));
- if (glob($1, flags, NULL, &gl)) {
+ if (glob($1, flags, NULL, &gl) ||
+ gl.gl_pathc == 0) {
reply(550, "not found");
$$ = NULL;
} else {
reply(550, "not found");
$$ = NULL;
} else {