components/proftpd/patches/006.18845170.patch
author Tomas Klacko <tomas.klacko@oracle.com>
Wed, 11 Mar 2015 03:50:20 -0700
changeset 3932 1b7dd68f6aa9
parent 1952 components/proftpd/patches/18845170.patch@edbaa9c65514
permissions -rw-r--r--
20553228 add proftpd dtrace provider from AK to Userland

http://bugs.proftpd.org/show_bug.cgi?id=4069
https://github.com/proftpd/proftpd/commit/38cf9e5028cbddee2b0dcba436d60199da1edf80

--- a/modules/mod_ls.c
+++ b/modules/mod_ls.c
@@ -2755,6 +2755,13 @@ MODRET ls_nlst(cmd_rec *cmd) {
     parse_list_opts(&list_options, &glob_flags, TRUE);
   }
 
+  /* If, after parsing out any options, the target string is empty, assume
+   * the current directory (Bug#4069).
+   */
+  if (*target == '\0') {
+    target = pstrdup(cmd->tmp_pool, ".");
+  }
+
   /* If the target starts with '~' ... */
   if (*target == '~') {
     char pb[PR_TUNABLE_PATH_MAX + 1] = {'\0'};