Use session key from cli_state struct rather than the uninitialised one
authorTim Potter <tpot@samba.org>
Fri, 14 Sep 2001 04:32:52 +0000 (04:32 +0000)
committerTim Potter <tpot@samba.org>
Fri, 14 Sep 2001 04:32:52 +0000 (04:32 +0000)
when calling cli_netlogon_sam_sync().  (-:

source/libsmb/cli_netlogon.c

index cd68ea3503fd51607946ffbdd49c7f7046f9c998..98f448c6a71fe9712b98c7d6f225215fb818f66a 100644 (file)
@@ -289,7 +289,6 @@ NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
        NET_R_SAM_SYNC r;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
         DOM_CRED clnt_creds;
-        uchar sess_key[16];
 
        ZERO_STRUCT(q);
        ZERO_STRUCT(r);
@@ -316,7 +315,7 @@ NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 
        /* Unmarshall response */
 
-       if (!net_io_r_sam_sync("", sess_key, &r, &rbuf, 0)) {
+       if (!net_io_r_sam_sync("", cli->sess_key, &r, &rbuf, 0)) {
                result = NT_STATUS_UNSUCCESSFUL;
                goto done;
        }
@@ -348,7 +347,6 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
        NET_R_SAM_DELTAS r;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
         DOM_CRED clnt_creds;
-        uchar sess_key[16];
 
        ZERO_STRUCT(q);
        ZERO_STRUCT(r);
@@ -376,7 +374,7 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 
        /* Unmarshall response */
 
-       if (!net_io_r_sam_deltas("", sess_key, &r, &rbuf, 0)) {
+       if (!net_io_r_sam_deltas("", cli->sess_key, &r, &rbuf, 0)) {
                result = NT_STATUS_UNSUCCESSFUL;
                goto done;
        }