make it possible to set list of good filename characters from command

line


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9370 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2000-12-11 18:47:54 +00:00
parent 04fb3dd9ba
commit 1034af2170

View File

@@ -206,6 +206,8 @@ int use_builtin_ls = -1;
static int help_flag; static int help_flag;
static int version_flag; static int version_flag;
static const char *good_chars = "+-=_,.";
struct getargs args[] = { struct getargs args[] = {
{ NULL, 'a', arg_string, &auth_string, "required authentication" }, { NULL, 'a', arg_string, &auth_string, "required authentication" },
{ NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" }, { NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" },
@@ -218,6 +220,7 @@ struct getargs args[] = {
{ NULL, 'd', arg_flag, &debug, "enable debugging" }, { NULL, 'd', arg_flag, &debug, "enable debugging" },
{ NULL, 'v', arg_flag, &debug, "enable debugging" }, { NULL, 'v', arg_flag, &debug, "enable debugging" },
{ "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" }, { "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" },
{ "good-chars", 0, arg_string, &good_chars, "allowed anonymous upload filename chars" },
{ "version", 0, arg_flag, &version_flag }, { "version", 0, arg_flag, &version_flag },
{ "help", 'h', arg_flag, &help_flag } { "help", 'h', arg_flag, &help_flag }
}; };
@@ -1102,7 +1105,6 @@ done:
int int
filename_check(char *filename) filename_check(char *filename)
{ {
static const char good_chars[] = "+-=_,.";
char *p; char *p;
p = strrchr(filename, '/'); p = strrchr(filename, '/');