From: Emilian U. <lo...@cl...> - 2003-05-31 19:07:26
|
Hi, there is a small bug in mod_xfer which makes MaxStoreFileSize unusable for user,group,class restrictions. The bug is located in find_max_nbytes() where the number of parameters is considered to be 3 instead of 4 (number,unit,restriction,expression) --snip--- while (c) { if (c->argc == 3) { if (!strcmp(c->argv[1], "user")) { --snip--- attached theres a patch against the cvs version. Theres also a small discrepancy between the documentation of MaxStoreFileSize and the actual behavoir. http://proftpd.org/docs/directives/linked/config_ref_MaxStoreFileSize.html --snip-- # Restrict anonymous uploads to 50k, but allow unlimited upload size for # everyone else MaxStoreFileSize 50 Kb user anonymous MaxStoreFileSize * --snip-- in set_maxfilesize the number of parameters is checked against 2 and 4 thous "MaxStoreFileSize *" will fail. --snip-- MODRET set_maxfilesize(cmd_rec *cmd) { ......... if (cmd->argc-1 != 2 && cmd->argc-1 != 4) CONF_ERROR(cmd, "incorrect number of parameters"); --snip-- I'm not sure where the fix should be, my opinion is to fix sex_maxfilesize with: --snip-- if (cmd->argc-1 != 2 && cmd->argc-1 != 4 && strcmp(cmd->argv[1], "*")) CONF_ERROR(cmd, "incorrect number of parameters"); --snip-- Let me know your thoughts about this. Thank you. |