Skip to content

Instantly share code, notes, and snippets.

@negima1976
Created December 19, 2011 08:54
Show Gist options
  • Select an option

  • Save negima1976/1496164 to your computer and use it in GitHub Desktop.

Select an option

Save negima1976/1496164 to your computer and use it in GitHub Desktop.
proftpd-1.3.4a用 NLSTパッチ
--- proftpd-1.3.4a/modules/mod_ls.c 2011-11-06 08:01:58.000000000 +0900
+++ proftpd-1.3.4a/modules/mod_ls_new.c 2011-12-19 16:16:38.000000000 +0900
@@ -1319,10 +1319,8 @@
break;
case 'C':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_l = 0;
- opt_C = 1;
- }
+ opt_l = 0;
+ opt_C = 1;
break;
case 'c':
@@ -1335,15 +1333,11 @@
break;
case 'F':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_F = 1;
- }
+ opt_F = 1;
break;
case 'h':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_h = 1;
- }
+ opt_h = 1;
break;
case 'L':
@@ -1351,16 +1345,12 @@
break;
case 'l':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_l = 1;
- opt_C = 0;
- }
+ opt_l = 1;
+ opt_C = 0;
break;
case 'n':
- if (strcmp(session.curr_cmd, C_NLST) != 0) {
- opt_n = 1;
- }
+ opt_n = 1;
break;
case 'R':
@@ -2323,6 +2313,10 @@
while (arg && *arg && isspace((int) *arg)) {
arg++;
}
+
+ /* In case the client used NLST instead of LIST. */
+ if (cmd->argc > 1 && cmd->argv[1][0] == '-' )
+ return genericlist(cmd);
tmp = get_param_ptr(TOPLEVEL_CONF, "ShowSymlinks", FALSE);
if (tmp != NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment