summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-31 20:40:16 +0200
committerGünther Deschner <gd@samba.org>2008-03-31 20:55:40 +0200
commite8775623bdf40dab976c4540771e5078d632fe01 (patch)
tree3482acf0360d6146aba22d23dcd080a4018c2d00
parent5414a21ba39f9ad5a7d65f46033d4fa5eed21225 (diff)
downloadsamba-e8775623bdf40dab976c4540771e5078d632fe01.tar.gz
samba-e8775623bdf40dab976c4540771e5078d632fe01.tar.bz2
samba-e8775623bdf40dab976c4540771e5078d632fe01.zip
Add init_samr_parameters_string().
Guenther (This used to be commit 8f6f0d1601cb93af51f8d493382cd707c3eb0cdf)
-rw-r--r--source3/rpc_server/srv_samr_nt.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index eeb3e400dd..034392ed21 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2155,6 +2155,41 @@ NTSTATUS _samr_OpenUser(pipes_struct *p,
}
/*************************************************************************
+ *************************************************************************/
+
+static NTSTATUS init_samr_parameters_string(TALLOC_CTX *mem_ctx,
+ DATA_BLOB *blob,
+ struct lsa_BinaryString **_r)
+{
+ struct lsa_BinaryString *r;
+
+ if (!blob || !_r) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ r = TALLOC_ZERO_P(mem_ctx, struct lsa_BinaryString);
+ if (!r) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->array = TALLOC_ZERO_ARRAY(mem_ctx, uint16_t, blob->length/2);
+ if (!r->array) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ memcpy(r->array, blob->data, blob->length);
+ r->size = blob->length;
+ r->length = blob->length;
+
+ if (!r->array) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ *_r = r;
+
+ return NT_STATUS_OK;
+}
+
+/*************************************************************************
get_user_info_7. Safe. Only gives out account_name.
*************************************************************************/