diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-03-19 19:11:00 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-03-19 19:11:00 +0000 |
commit | e62162bcfed469d20700ca4e9be98574f1b728c1 (patch) | |
tree | 8a86ad9995e318b5714573473b9967aac2002642 /libexec/ftpd/ftpd.c | |
parent | b7db4c94c39d3b8f980a3c3f3ce1166ce5c3004e (diff) | |
download | FreeBSD-src-e62162bcfed469d20700ca4e9be98574f1b728c1.zip FreeBSD-src-e62162bcfed469d20700ca4e9be98574f1b728c1.tar.gz |
Teach ftpd about the new GLOB_MAXPATH flag.
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 43ab6bf..b5b6136 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -189,6 +189,13 @@ static int auth_pam __P((struct passwd**, const char*)); char *pid_file = NULL; /* + * Limit number of pathnames that glob can return. + * A limit of 0 indicates the number of pathnames is unlimited. + */ +#define MAXGLOBARGS 16384 +# + +/* * Timeout intervals for retrying connections * to hosts that don't accept PORT cmds. This * is a kludge, but given the problems with TCP... @@ -2621,6 +2628,8 @@ send_file_list(whichf) int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; memset(&gl, 0, sizeof(gl)); + gl.gl_matchc = MAXGLOBARGS; + flags |= GLOB_MAXPATH; freeglob = 1; if (glob(whichf, flags, 0, &gl)) { reply(550, "not found"); |