libsmb: Make SMB1-only cli_nt_hardlink calls static
authorVolker Lendecke <vl@samba.org>
Mon, 18 Mar 2019 10:03:32 +0000 (11:03 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 20 Mar 2019 23:32:31 +0000 (23:32 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 20 23:32:31 UTC 2019 on sn-devel-144

source3/libsmb/clifile.c
source3/libsmb/proto.h

index 0ceffe8..f2bfdcc 100644 (file)
@@ -1458,7 +1458,7 @@ NTSTATUS cli_ntrename(struct cli_state *cli, const char *fname_src, const char *
  NT hardlink a file.
 ****************************************************************************/
 
-struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx,
+static struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx,
                                struct tevent_context *ev,
                                struct cli_state *cli,
                                const char *fname_src,
@@ -1472,49 +1472,11 @@ struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx,
                                          RENAME_FLAG_HARD_LINK);
 }
 
-NTSTATUS cli_nt_hardlink_recv(struct tevent_req *req)
+static NTSTATUS cli_nt_hardlink_recv(struct tevent_req *req)
 {
        return cli_ntrename_internal_recv(req);
 }
 
-NTSTATUS cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst)
-{
-       TALLOC_CTX *frame = talloc_stackframe();
-       struct tevent_context *ev;
-       struct tevent_req *req;
-       NTSTATUS status = NT_STATUS_OK;
-
-       if (smbXcli_conn_has_async_calls(cli->conn)) {
-               /*
-                * Can't use sync call while an async call is in flight
-                */
-               status = NT_STATUS_INVALID_PARAMETER;
-               goto fail;
-       }
-
-       ev = samba_tevent_context_init(frame);
-       if (ev == NULL) {
-               status = NT_STATUS_NO_MEMORY;
-               goto fail;
-       }
-
-       req = cli_nt_hardlink_send(frame, ev, cli, fname_src, fname_dst);
-       if (req == NULL) {
-               status = NT_STATUS_NO_MEMORY;
-               goto fail;
-       }
-
-       if (!tevent_req_poll_ntstatus(req, ev, &status)) {
-               goto fail;
-       }
-
-       status = cli_nt_hardlink_recv(req);
-
- fail:
-       TALLOC_FREE(frame);
-       return status;
-}
-
 struct cli_smb2_hardlink_state {
        struct tevent_context *ev;
        struct cli_state *cli;
index a42f424..4b9cfbe 100644 (file)
@@ -352,14 +352,6 @@ struct tevent_req *cli_ntrename_send(TALLOC_CTX *mem_ctx,
 NTSTATUS cli_ntrename_recv(struct tevent_req *req);
 NTSTATUS cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
 
-struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx,
-                                struct tevent_context *ev,
-                                struct cli_state *cli,
-                                const char *fname_src,
-                                const char *fname_dst);
-NTSTATUS cli_nt_hardlink_recv(struct tevent_req *req);
-NTSTATUS cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst);
-
 struct tevent_req *cli_hardlink_send(
        TALLOC_CTX *mem_ctx,
        struct tevent_context *ev,