The branch, master has been updated
       via  3e8ce497f3d libsmb: Remove cli_state->dfs_mountpoint
       via  a7d39ed1433 libsmb: Remove "mntpoint" argument from 
cli_list_trans() callback
       via  4ebe72b942b libsmb: Remove "mntpoint" argument from cli_list() 
callback
       via  4cc4938a286 smbclient: Fix recursive "ls" across DFS links
       via  886665644c9 smbclient: Add "mask" to do_list_helper_state
       via  623bc39bb8e smbclient: Introduce struct do_list_helper_state
       via  fd4308640ff smbclient: Wrap a few long lines
       via  f879c833428 smbclient: Move variable declarations closer to their 
use
       via  95e235172aa torture: Show that recursive ls across dfs is broken
       via  7ea5c1f05d8 libsmb: Fix a signed/unsigned warning
       via  40cec27636b smbd: Align two integer types
       via  af49efcde2e libreplace: Compare a pointer against NULL, not 0
       via  669414efacc libsmb: Fix a typo
       via  0851afdffd1 libsmb: Improve wording of a comment in cli_smb2_list
      from  f9016912098 lookup_name: allow lookup for own realm

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3e8ce497f3d28cfafcf593dbc0b38707c813b513
Author: Volker Lendecke <[email protected]>
Date:   Sat Oct 31 16:48:31 2020 +0100

    libsmb: Remove cli_state->dfs_mountpoint
    
    Not used anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Wed Nov  4 20:17:47 UTC 2020 on sn-devel-184

commit a7d39ed14334c6a959d68ecd7eb451becf6a35e5
Author: Volker Lendecke <[email protected]>
Date:   Fri Oct 30 18:49:52 2020 +0100

    libsmb: Remove "mntpoint" argument from cli_list_trans() callback
    
    This was unused in the callers, also do this for symmetry.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 4ebe72b942b1404d131047a407b4aac5af0c349d
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 19 10:09:23 2020 +0200

    libsmb: Remove "mntpoint" argument from cli_list() callback
    
    do_list()/do_list_helper() in source3/client/client.c was the only user of 
this
    argument. And that use was wrong.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 4cc4938a2866738aaff4dc91550bb7a5ad05d7fb
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 19 09:37:03 2020 +0200

    smbclient: Fix recursive "ls" across DFS links
    
    This is an a bit subtle patch: The main trick is that the previous
    code a DFS-style \\server\share\dir1\dir2 path ended up in the list of
    directories to enumerate. This was then processed by do_list again,
    passing it to cli_resolve_path. However, cli_resolve_path always
    expects non-DFS style paths as input. This patch passes the original,
    non-DFS path to do_list_helper(), so that it ends up without the DFS
    style \\server\share prefix in the directory queue.
    
    From general failure it just fails on the SMB1-based environments,
    like the other smbclient_s3 ones in knownfail.d/smb1-tests
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 886665644c9c5fb0c0f36d79db80d0021b829b6b
Author: Volker Lendecke <[email protected]>
Date:   Sun Oct 18 18:39:17 2020 +0200

    smbclient: Add "mask" to do_list_helper_state
    
    To me this is simpler to understand than to rely on the cli_list
    callback which goes through some function call layers. Also, this
    gives more obvious control over what we pass in the next patch.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 623bc39bb8e54d4f86a524dd281f138a4b703970
Author: Volker Lendecke <[email protected]>
Date:   Sun Oct 11 07:41:01 2020 +0200

    smbclient: Introduce struct do_list_helper_state
    
    We'll pass more information to do_list_helper() soon
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit fd4308640ffde8de8fd79491539b01530c24e3c5
Author: Volker Lendecke <[email protected]>
Date:   Sun Oct 11 07:35:52 2020 +0200

    smbclient: Wrap a few long lines
    
    Make the next patch simpler
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit f879c83342865dd4c9c2265fb5ccbea343da7815
Author: Volker Lendecke <[email protected]>
Date:   Thu Oct 29 21:32:21 2020 +0100

    smbclient: Move variable declarations closer to their use
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 95e235172aa7773d7c9f1135c4181ad2c2519579
Author: Volker Lendecke <[email protected]>
Date:   Tue Oct 27 10:12:51 2020 +0100

    torture: Show that recursive ls across dfs is broken
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 7ea5c1f05d834ace9a12e193f237aa89ff2be486
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 26 09:18:57 2020 +0100

    libsmb: Fix a signed/unsigned warning
    
    "num_bytes" is uint32_t, "received" is uint16_t. The multiplication
    seems to implicitly widen "received" to int, leading to a
    signed/unsigned warning. This cast makes that warning go away.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 40cec27636bb283ebc256d10de5a20e561984f7d
Author: Volker Lendecke <[email protected]>
Date:   Wed Oct 21 12:59:29 2020 +0200

    smbd: Align two integer types
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit af49efcde2e69958e94e8e1d82183d5c4ea0cf5d
Author: Volker Lendecke <[email protected]>
Date:   Thu Oct 22 11:32:29 2020 +0200

    libreplace: Compare a pointer against NULL, not 0
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 669414efacce6f06b6d1c01a16c981b24c3e165f
Author: Volker Lendecke <[email protected]>
Date:   Sat Oct 31 17:32:14 2020 +0100

    libsmb: Fix a typo
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 0851afdffd1591eb71f3aa00158efbcb358ea5ed
Author: Volker Lendecke <[email protected]>
Date:   Sun Nov 1 09:58:23 2020 +0100

    libsmb: Improve wording of a comment in cli_smb2_list
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/closefrom.c                   |  2 +-
 libgpo/gpo_filesync.c                     |  6 +-
 selftest/knownfail.d/smb1-tests           |  1 +
 source3/client/client.c                   | 99 +++++++++++++++++++------------
 source3/include/client.h                  |  3 -
 source3/libsmb/cli_smb2_fnum.c            | 11 ++--
 source3/libsmb/cli_smb2_fnum.h            |  3 +-
 source3/libsmb/clidfs.c                   | 18 ------
 source3/libsmb/clientgen.c                |  4 --
 source3/libsmb/clilist.c                  | 20 +++----
 source3/libsmb/libsmb_dir.c               |  6 +-
 source3/libsmb/namequery.c                |  2 +-
 source3/libsmb/proto.h                    | 11 ++--
 source3/libsmb/pylibsmb.c                 | 10 ++--
 source3/script/tests/test_smbclient_s3.sh | 38 ++++++++++++
 source3/smbd/notify_inotify.c             |  4 +-
 source3/torture/masktest.c                |  6 +-
 source3/torture/nbio.c                    |  4 +-
 source3/torture/test_hidenewfiles.c       |  3 +-
 source3/torture/test_readdir_timestamp.c  |  1 -
 source3/torture/torture.c                 | 20 +++----
 source3/utils/net_rpc.c                   |  2 +-
 source3/utils/smbcacls.c                  |  2 +-
 23 files changed, 151 insertions(+), 125 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/closefrom.c b/lib/replace/closefrom.c
index a61a80f1b0f..bef53e42734 100644
--- a/lib/replace/closefrom.c
+++ b/lib/replace/closefrom.c
@@ -54,7 +54,7 @@ static int closefrom_procfs(int lower)
        int ret = ENOMEM;
 
        dirp = opendir("/proc/self/fd");
-       if (dirp == 0) {
+       if (dirp == NULL) {
                return errno;
        }
 
diff --git a/libgpo/gpo_filesync.c b/libgpo/gpo_filesync.c
index 3cd94706551..a547f5da77c 100644
--- a/libgpo/gpo_filesync.c
+++ b/libgpo/gpo_filesync.c
@@ -33,8 +33,7 @@ struct sync_context {
        uint16_t attribute;
 };
 
-static NTSTATUS gpo_sync_func(const char *mnt,
-                         struct file_info *info,
+static NTSTATUS gpo_sync_func(struct file_info *info,
                          const char *mask,
                          void *state);
 
@@ -136,8 +135,7 @@ static NTSTATUS gpo_sync_files(struct sync_context *ctx)
  syncronisation call back
 ****************************************************************/
 
-static NTSTATUS gpo_sync_func(const char *mnt,
-                         struct file_info *info,
+static NTSTATUS gpo_sync_func(struct file_info *info,
                          const char *mask,
                          void *state)
 {
diff --git a/selftest/knownfail.d/smb1-tests b/selftest/knownfail.d/smb1-tests
index 28e78fa0427..4ba1365b3a4 100644
--- a/selftest/knownfail.d/smb1-tests
+++ b/selftest/knownfail.d/smb1-tests
@@ -30,6 +30,7 @@
 
^samba3.blackbox.smbclient_s3.NT1.(plain|sign).member_creds.rename_dotdot\((ad_member|nt4_member)\)
 
^samba3.blackbox.smbclient_s3.NT1.(plain|sign).member_creds.volume\((ad_member|nt4_member)\)
 ^samba3.blackbox.smbclient_s3.NT1.(plain|sign).member_creds.delete a non empty 
directory\((ad_member|nt4_member)\)
+^samba3.blackbox.smbclient_s3.NT1.(plain|sign).member_creds.Recursive ls 
across MS-DFS links\((ad_member|nt4_member)\)
 ^samba3.blackbox.smbclient_s3.*valid.users.nt4.*
 ^samba3.blackbox.smbclient_s3.NT1.*valid.users.*
 ^samba3.unix.whoami machine account.whoami\(ad_member:local\)
diff --git a/source3/client/client.c b/source3/client/client.c
index 392b23f06ea..e2fdacd1251 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -585,6 +585,8 @@ static NTSTATUS display_finfo(struct cli_state *cli_state, 
struct file_info *fin
                        time_to_asc(t));
                dir_total += finfo->size;
        } else {
+               struct cli_state *targetcli = NULL;
+               char *targetpath = NULL;
                char *afname = NULL;
                uint16_t fnum;
 
@@ -605,9 +607,26 @@ static NTSTATUS display_finfo(struct cli_state *cli_state, 
struct file_info *fin
                d_printf( "MODE:%s\n", attrib_string(talloc_tos(), 
finfo->attr));
                d_printf( "SIZE:%.0f\n", (double)finfo->size);
                d_printf( "MTIME:%s", time_to_asc(t));
+
+               status = cli_resolve_path(
+                       ctx,
+                       "",
+                       get_cmdline_auth_info_creds(
+                               popt_get_cmdline_auth_info()),
+                       cli_state,
+                       afname,
+                       &targetcli,
+                       &targetpath);
+               if (!NT_STATUS_IS_OK(status)) {
+                       DBG_WARNING("display_finfo() Failed to resolve "
+                                   "%s: %s\n",
+                                   afname, nt_errstr(status));
+                       return status;
+               }
+
                status = cli_ntcreate(
-                       cli_state,            /* cli */
-                       afname,               /* fname */
+                       targetcli,            /* cli */
+                       targetpath,           /* fname */
                        0,                    /* CreatFlags */
                        READ_CONTROL_ACCESS,  /* DesiredAccess */
                        0,                    /* FileAttributes */
@@ -623,7 +642,7 @@ static NTSTATUS display_finfo(struct cli_state *cli_state, 
struct file_info *fin
                                   afname, nt_errstr(status)));
                } else {
                        struct security_descriptor *sd = NULL;
-                       status = cli_query_secdesc(cli_state, fnum,
+                       status = cli_query_secdesc(targetcli, fnum,
                                                   ctx, &sd);
                        if (!NT_STATUS_IS_OK(status)) {
                                DEBUG( 0, ("display_finfo() failed to "
@@ -723,19 +742,25 @@ static int do_list_queue_empty(void)
  A helper for do_list.
 ****************************************************************************/
 
-static NTSTATUS do_list_helper(const char *mntpoint, struct file_info *f,
-                          const char *mask, void *state)
+struct do_list_helper_state {
+       const char *mask;
+       struct cli_state *cli;
+};
+
+static NTSTATUS do_list_helper(
+       struct file_info *f,
+       const char *_mask,
+       void *private_data)
 {
-       struct cli_state *cli_state = (struct cli_state *)state;
+       struct do_list_helper_state *state = private_data;
        TALLOC_CTX *ctx = talloc_tos();
        char *dir = NULL;
        char *dir_end = NULL;
        NTSTATUS status = NT_STATUS_OK;
        char *mask2 = NULL;
-       char *p = NULL;
 
        /* Work out the directory. */
-       dir = talloc_strdup(ctx, mask);
+       dir = talloc_strdup(ctx, state->mask);
        if (!dir) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -745,14 +770,14 @@ static NTSTATUS do_list_helper(const char *mntpoint, 
struct file_info *f,
 
        if (!(f->attr & FILE_ATTRIBUTE_DIRECTORY)) {
                if (do_this_one(f)) {
-                       status = do_list_fn(cli_state, f, dir);
+                       status = do_list_fn(state->cli, f, dir);
                }
                TALLOC_FREE(dir);
                return status;
        }
 
        if (do_list_dirs && do_this_one(f)) {
-               status = do_list_fn(cli_state, f, dir);
+               status = do_list_fn(state->cli, f, dir);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
                }
@@ -772,23 +797,11 @@ static NTSTATUS do_list_helper(const char *mntpoint, 
struct file_info *f,
        }
 
        mask2 = talloc_asprintf(ctx,
-                               "%s%s",
-                               mntpoint,
-                               mask);
-       if (!mask2) {
-               TALLOC_FREE(dir);
-               return NT_STATUS_NO_MEMORY;
-       }
-       p = strrchr_m(mask2,CLI_DIRSEP_CHAR);
-       if (p) {
-               p[1] = 0;
-       } else {
-               mask2[0] = '\0';
-       }
-       mask2 = talloc_asprintf_append(mask2,
-                                      "%s%s*",
-                                      f->name,
-                                      CLI_DIRSEP_STR);
+                               "%s%c%s%c*",
+                               dir,
+                               CLI_DIRSEP_CHAR,
+                               f->name,
+                               CLI_DIRSEP_CHAR);
        if (!mask2) {
                TALLOC_FREE(dir);
                return NT_STATUS_NO_MEMORY;
@@ -811,10 +824,9 @@ NTSTATUS do_list(const char *mask,
                        bool rec,
                        bool dirs)
 {
+       struct do_list_helper_state state = { .cli = cli, };
        static int in_do_list = 0;
        TALLOC_CTX *ctx = talloc_tos();
-       struct cli_state *targetcli = NULL;
-       char *targetpath = NULL;
        struct cli_credentials *creds =
                get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
        NTSTATUS ret_status = NT_STATUS_OK;
@@ -835,22 +847,34 @@ NTSTATUS do_list(const char *mask,
        add_to_do_list_queue(mask);
 
        while (!do_list_queue_empty()) {
-               const char *head = do_list_queue_head();
+               struct cli_state *targetcli = NULL;
+               char *targetpath = NULL;
+
+               state.mask = do_list_queue_head();
 
                /* check for dfs */
 
-               status = cli_resolve_path(ctx, "",
-                                         creds,
-                                         cli, head, &targetcli, &targetpath);
+               status = cli_resolve_path(
+                       ctx,
+                       "",
+                       creds,
+                       cli,
+                       state.mask,
+                       &targetcli,
+                       &targetpath);
                if (!NT_STATUS_IS_OK(status)) {
-                       d_printf("do_list: [%s] %s\n", head,
+                       d_printf("do_list: [%s] %s\n", state.mask,
                                 nt_errstr(status));
                        remove_do_list_queue_head();
                        continue;
                }
 
-               status = cli_list(targetcli, targetpath, attribute,
-                                 do_list_helper, targetcli);
+               status = cli_list(
+                       targetcli,
+                       targetpath,
+                       attribute,
+                       do_list_helper,
+                       &state);
                if (!NT_STATUS_IS_OK(status)) {
                        d_printf("%s listing %s\n",
                                 nt_errstr(status), targetpath);
@@ -5696,8 +5720,7 @@ struct completion_remote {
        int len;
 };
 
-static NTSTATUS completion_remote_filter(const char *mnt,
-                               struct file_info *f,
+static NTSTATUS completion_remote_filter(struct file_info *f,
                                const char *mask,
                                void *state)
 {
diff --git a/source3/include/client.h b/source3/include/client.h
index 19a738900b7..14be20ef1e0 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -78,9 +78,6 @@ struct cli_state {
 
        bool use_oplocks; /* should we use oplocks? */
 
-       /* Where (if anywhere) this is mounted under DFS. */
-       char *dfs_mountpoint;
-
        struct smbXcli_conn *conn;
 
        struct {
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index c19fc4d7d39..b64ff087047 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -1287,8 +1287,7 @@ static bool windows_parent_dirname(TALLOC_CTX *mem_ctx,
 NTSTATUS cli_smb2_list(struct cli_state *cli,
                       const char *pathname,
                       uint32_t attribute,
-                      NTSTATUS (*fn)(const char *mointpoint,
-                                     struct file_info *finfo,
+                      NTSTATUS (*fn)(struct file_info *finfo,
                                      const char *mask,
                                      void *private_data),
                       void *private_data)
@@ -1422,15 +1421,15 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
                        if (dir_check_ftype(finfo->attr, attribute)) {
                                /*
                                 * Only process if attributes match.
-                                * On SMB1 server does this, so on
-                                * SMB2 we need to emulate in the
-                                * client.
+                                * SMB1 servers do the filtering, so
+                                * with SMB2 we need to emulate it in
+                                * the client.
                                 *
                                 * 
https://bugzilla.samba.org/show_bug.cgi?id=10260
                                 */
                                processed_file = true;
 
-                               status = fn(cli->dfs_mountpoint,
+                               status = fn(
                                        finfo,
                                        pathname,
                                        private_data);
diff --git a/source3/libsmb/cli_smb2_fnum.h b/source3/libsmb/cli_smb2_fnum.h
index e24c8cb7279..d47ca43f9dd 100644
--- a/source3/libsmb/cli_smb2_fnum.h
+++ b/source3/libsmb/cli_smb2_fnum.h
@@ -96,8 +96,7 @@ NTSTATUS cli_smb2_unlink_recv(struct tevent_req *req);
 NTSTATUS cli_smb2_list(struct cli_state *cli,
                       const char *pathname,
                       uint32_t attribute,
-                      NTSTATUS (*fn)(const char *mointpoint,
-                                     struct file_info *finfo,
+                      NTSTATUS (*fn)(struct file_info *finfo,
                                      const char *mask,
                                      void *private_data),
                       void *private_data);
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 081de18ac76..26b5499cf73 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -262,22 +262,6 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
        return NT_STATUS_OK;
 }
 
-/****************************************************************************
-****************************************************************************/
-
-static void cli_set_mntpoint(struct cli_state *cli, const char *mnt)
-{
-       TALLOC_CTX *frame = talloc_stackframe();
-       char *name = clean_name(frame, mnt);
-       if (!name) {
-               TALLOC_FREE(frame);
-               return;
-       }
-       TALLOC_FREE(cli->dfs_mountpoint);
-       cli->dfs_mountpoint = talloc_strdup(cli, name);
-       TALLOC_FREE(frame);
-}
-
 /********************************************************************
  Add a new connection to the list.
  referring_cli == NULL means a new initial connection.
@@ -1105,8 +1089,6 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
                return NT_STATUS_NOT_FOUND;
        }
 
-       cli_set_mntpoint(*targetcli, newmount);
-
        /* Check for another dfs referral, note that we are not
           checking for loops here. */
 
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 4412651f505..7cb89e87a9d 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -101,10 +101,6 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
                goto error;
        }
 
-       cli->dfs_mountpoint = talloc_strdup(cli, "");
-       if (!cli->dfs_mountpoint) {
-               goto error;
-       }
        cli->raw_status = NT_STATUS_INTERNAL_ERROR;
        cli->map_dos_errors = true; /* remove this */
        cli->timeout = CLIENT_TIMEOUT;
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 59404bce7bf..d0abd476d74 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -465,7 +465,7 @@ static void cli_list_old_done(struct tevent_req *subreq)
                 * I don't think this can wrap. received is
                 * initialized from a 16-bit value.
                 */
-               if (num_bytes < (received * DIR_STRUCT_SIZE + 3)) {
+               if (num_bytes < ((uint32_t)received * DIR_STRUCT_SIZE + 3)) {
                        TALLOC_FREE(subreq);
                        tevent_req_nterror(
                                req, NT_STATUS_INVALID_NETWORK_RESPONSE);
@@ -569,7 +569,7 @@ static NTSTATUS cli_list_old_recv(struct tevent_req *req, 
TALLOC_CTX *mem_ctx,
 
 NTSTATUS cli_list_old(struct cli_state *cli, const char *mask,
                      uint32_t attribute,
-                     NTSTATUS (*fn)(const char *, struct file_info *,
+                     NTSTATUS (*fn)(struct file_info *,
                                 const char *, void *), void *state)
 {
        TALLOC_CTX *frame = talloc_stackframe();
@@ -603,7 +603,7 @@ NTSTATUS cli_list_old(struct cli_state *cli, const char 
*mask,
        }
        num_finfo = talloc_array_length(finfo);
        for (i=0; i<num_finfo; i++) {
-               status = fn(cli->dfs_mountpoint, &finfo[i], mask, state);
+               status = fn(&finfo[i], mask, state);
                if (!NT_STATUS_IS_OK(status)) {
                        goto fail;
                }
@@ -922,8 +922,10 @@ static NTSTATUS cli_list_trans_recv(struct tevent_req *req,
 
 NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
                        uint32_t attribute, int info_level,
-                       NTSTATUS (*fn)(const char *mnt, struct file_info *finfo,
-                                  const char *mask, void *private_data),
+                       NTSTATUS (*fn)(
+                               struct file_info *finfo,
+                               const char *mask,
+                               void *private_data),
                        void *private_data)
 {
        TALLOC_CTX *frame = talloc_stackframe();
@@ -957,7 +959,7 @@ NTSTATUS cli_list_trans(struct cli_state *cli, const char 
*mask,
        }
        num_finfo = talloc_array_length(finfo);
        for (i=0; i<num_finfo; i++) {
-               status = fn(cli->dfs_mountpoint, &finfo[i], mask, private_data);
+               status = fn(&finfo[i], mask, private_data);
                if (!NT_STATUS_IS_OK(status)) {
                        goto fail;
                }
@@ -1040,8 +1042,7 @@ NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX 
*mem_ctx,
 NTSTATUS cli_list(struct cli_state *cli,
                  const char *mask,
                  uint32_t attribute,
-                 NTSTATUS (*fn)(const char *mointpoint,
-                                struct file_info *finfo,
+                 NTSTATUS (*fn)(struct file_info *finfo,
                                 const char *mask,
                                 void *private_data),
                  void *private_data)
@@ -1089,8 +1090,7 @@ NTSTATUS cli_list(struct cli_state *cli,
        }
 
        for (i=0; i<num_finfo; i++) {
-               status = fn(
-                       cli->dfs_mountpoint, &finfo[i], mask, private_data);
+               status = fn(&finfo[i], mask, private_data);
                if (!NT_STATUS_IS_OK(status)) {
                        goto fail;
                }
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 4fbfb19b15d..27d0fbd4db5 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -333,8 +333,7 @@ list_fn(const char *name,
 }
 
 static NTSTATUS
-dir_list_fn(const char *mnt,
-            struct file_info *finfo,
+dir_list_fn(struct file_info *finfo,
             const char *mask,
             void *state)
 {
@@ -1636,8 +1635,7 @@ SMBC_mkdir_ctx(SMBCCTX *context,
  */
 
 static NTSTATUS
-rmdir_list_fn(const char *mnt,
-              struct file_info *finfo,
+rmdir_list_fn(struct file_info *finfo,
               const char *mask,
               void *state)
 {
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index cd4a31fd8c9..1e109ecc371 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2469,7 +2469,7 @@ NTSTATUS dns_lookup_list_async(TALLOC_CTX *ctx,
                goto fail;
        }
 
-       /* Hit all the DNS servers with asnyc lookups for all the names. */
+       /* Hit all the DNS servers with async lookups for all the names. */
        for (i = 0; i < num_dns_names; i++) {
                DBG_INFO("async DNS lookup A record for %s\n",
                        dns_lookup_names[i]);
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index 0e036c5ddc8..8fd3a436fd5 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -742,12 +742,14 @@ NTSTATUS is_bad_finfo_name(const struct cli_state *cli,
                        const struct file_info *finfo);
 
 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint32_t 
attribute,
-                     NTSTATUS (*fn)(const char *, struct file_info *,
+                     NTSTATUS (*fn)(struct file_info *,
                                 const char *, void *), void *state);
 NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
                        uint32_t attribute, int info_level,
-                       NTSTATUS (*fn)(const char *mnt, struct file_info *finfo,
-                                  const char *mask, void *private_data),
+                       NTSTATUS (*fn)(
+                               struct file_info *finfo,
+                               const char *mask,
+                               void *private_data),
                        void *private_data);
 struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
                                 struct tevent_context *ev,
@@ -760,8 +762,7 @@ NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX 
*mem_ctx,
 NTSTATUS cli_list(struct cli_state *cli,
                  const char *mask,
                  uint32_t attribute,
-                 NTSTATUS (*fn)(const char *mointpoint,
-                                struct file_info *finfo,
+                 NTSTATUS (*fn)(struct file_info *finfo,
                                 const char *mask,
                                 void *private_data),
                  void *private_data);
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index c7a2d73afcb..7985b842a15 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c


-- 
Samba Shared Repository

Reply via email to