components/proftpd/patches/006.18845170.patch
author Tomas Klacko <tomas.klacko@oracle.com>
Mon, 18 May 2015 01:59:30 -0700
branchs11-update
changeset 4303 fe962209b82f
parent 3224 components/proftpd/patches/18845170.patch@589e0e82672d
permissions -rw-r--r--
20553228 add proftpd dtrace provider from AK to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3224
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     1
http://bugs.proftpd.org/show_bug.cgi?id=4069
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     2
https://github.com/proftpd/proftpd/commit/38cf9e5028cbddee2b0dcba436d60199da1edf80
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     3
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     4
--- a/modules/mod_ls.c
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     5
+++ b/modules/mod_ls.c
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     6
@@ -2755,6 +2755,13 @@ MODRET ls_nlst(cmd_rec *cmd) {
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     7
     parse_list_opts(&list_options, &glob_flags, TRUE);
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     8
   }
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     9
 
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    10
+  /* If, after parsing out any options, the target string is empty, assume
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    11
+   * the current directory (Bug#4069).
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    12
+   */
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    13
+  if (*target == '\0') {
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    14
+    target = pstrdup(cmd->tmp_pool, ".");
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    15
+  }
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    16
+
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    17
   /* If the target starts with '~' ... */
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    18
   if (*target == '~') {
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    19
     char pb[PR_TUNABLE_PATH_MAX + 1] = {'\0'};
589e0e82672d 18771389 Update proftpd to 1.3.5
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    20