diff options
Diffstat (limited to 'source3/utils/net_rpc_samsync.c')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index bd8118ab8e..44c95f9509 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -336,6 +336,7 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd, struct netr_Authenticator return_authenticator; uint16_t restart_state = 0; uint32_t sync_context = 0; + DATA_BLOB session_key; ZERO_STRUCT(return_authenticator); @@ -386,6 +387,14 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd, break; } + session_key = data_blob_const(pipe_hnd->dc->sess_key, 16); + + samsync_fix_delta_array(mem_ctx, + &session_key, + true, + database_id, + delta_enum_array); + /* Display results */ for (i = 0; i < delta_enum_array->num_deltas; i++) { display_sam_entry(&delta_enum_array->delta_enum[i]); @@ -1169,6 +1178,7 @@ static NTSTATUS fetch_database(struct rpc_pipe_client *pipe_hnd, uint32 db_type, enum netr_SamDatabaseID database_id = db_type; uint16_t restart_state = 0; uint32_t sync_context = 0; + DATA_BLOB session_key; if (!(mem_ctx = talloc_init("fetch_database"))) return NT_STATUS_NO_MEMORY; @@ -1215,6 +1225,14 @@ static NTSTATUS fetch_database(struct rpc_pipe_client *pipe_hnd, uint32 db_type, break; } + session_key = data_blob_const(pipe_hnd->dc->sess_key, 16); + + samsync_fix_delta_array(mem_ctx, + &session_key, + true, + database_id, + delta_enum_array); + for (i = 0; i < delta_enum_array->num_deltas; i++) { fetch_sam_entry(&delta_enum_array->delta_enum[i], dom_sid); } @@ -1990,6 +2008,7 @@ static NTSTATUS fetch_database_to_ldif(struct rpc_pipe_client *pipe_hnd, enum netr_SamDatabaseID database_id = db_type; uint16_t restart_state = 0; uint32_t sync_context = 0; + DATA_BLOB session_key; /* Set up array for mapping accounts to groups */ /* Array element is the group rid */ @@ -2122,6 +2141,14 @@ static NTSTATUS fetch_database_to_ldif(struct rpc_pipe_client *pipe_hnd, break; } + session_key = data_blob_const(pipe_hnd->dc->sess_key, 16); + + samsync_fix_delta_array(mem_ctx, + &session_key, + true, + database_id, + delta_enum_array); + num_deltas = delta_enum_array->num_deltas; /* Re-allocate memory for groupmap and accountmap arrays */ |