Limit number of paths returned via glob() for authorized users

using tilde expansion.
This commit is contained in:
Chris D. Faulhaber 2001-04-17 02:33:20 +00:00
parent 1fd931b580
commit 6d3fe674ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75560

View File

@ -947,6 +947,8 @@ pathname
GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
memset(&gl, 0, sizeof(gl));
flags |= GLOB_MAXPATH;
gl.gl_matchc = MAXGLOBARGS;
if (glob($1, flags, NULL, &gl) ||
gl.gl_pathc == 0) {
reply(550, "not found");
@ -1037,6 +1039,8 @@ extern jmp_buf errcatch;
#define SITECMD 7 /* SITE command */
#define NSTR 8 /* Number followed by a string */
#define MAXGLOBARGS 1000
struct tab {
char *name;
short token;