summaryrefslogtreecommitdiffstats
path: root/source/libnet/libnet_samsync.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-06-17 21:22:06 +0200
committerGünther Deschner <gd@samba.org>2008-06-23 23:38:52 +0200
commit8ec64a96e43d2e55e81f725fe693178ecdc65e88 (patch)
tree4b7f2b7de7aa3fb8cff0c7045ec0105172fa0e41 /source/libnet/libnet_samsync.c
parent58f54f180f0a942776455ab6e813628422493dac (diff)
downloadsamba-8ec64a96e43d2e55e81f725fe693178ecdc65e88.tar.gz
samba-8ec64a96e43d2e55e81f725fe693178ecdc65e88.tar.xz
samba-8ec64a96e43d2e55e81f725fe693178ecdc65e88.zip
net_vampire: move pull_netr_AcctLockStr() to libnet.
Guenther
Diffstat (limited to 'source/libnet/libnet_samsync.c')
-rw-r--r--source/libnet/libnet_samsync.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/libnet/libnet_samsync.c b/source/libnet/libnet_samsync.c
index c86c5c12e11..fab77e83983 100644
--- a/source/libnet/libnet_samsync.c
+++ b/source/libnet/libnet_samsync.c
@@ -375,3 +375,41 @@ NTSTATUS samsync_process_database(struct rpc_pipe_client *pipe_hnd,
return result;
}
+
+/**
+ * pull_netr_AcctLockStr
+ */
+
+NTSTATUS pull_netr_AcctLockStr(TALLOC_CTX *mem_ctx,
+ struct lsa_BinaryString *r,
+ struct netr_AcctLockStr **str_p)
+{
+ struct netr_AcctLockStr *str;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+
+ if (!mem_ctx || !r || !str_p) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ *str_p = NULL;
+
+ str = TALLOC_ZERO_P(mem_ctx, struct netr_AcctLockStr);
+ if (!str) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ blob = data_blob_const(r->array, r->length);
+
+ ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, str,
+ (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
+
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
+
+ *str_p = str;
+
+ return NT_STATUS_OK;
+}
+