summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr.c
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-08-06 18:02:56 +0000
committerJim McDonough <jmcd@samba.org>2002-08-06 18:02:56 +0000
commit5e42dcfe467d48fa7e8d87b88ae2bb2f54e5d28d (patch)
tree7f48b45c0b7dcfd7120259121cd760e391fb61d3 /source3/rpc_server/srv_samr.c
parentf23d88ab786c81fdd9e3036d862907ab06f7f5d1 (diff)
downloadsamba-5e42dcfe467d48fa7e8d87b88ae2bb2f54e5d28d.tar.gz
samba-5e42dcfe467d48fa7e8d87b88ae2bb2f54e5d28d.tar.bz2
samba-5e42dcfe467d48fa7e8d87b88ae2bb2f54e5d28d.zip
Add SAMR 0x3e, which is samr_connect4. Seems to be the same as our
existing connect (which I've been told is really connect2), with one extra dword. We've only seen 0x00000002 there... (This used to be commit 266344634944dff30f56453f9d86c490e7ac7a55)
Diffstat (limited to 'source3/rpc_server/srv_samr.c')
-rw-r--r--source3/rpc_server/srv_samr.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index f002a7d1c9..bc3b8970d6 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -3,9 +3,11 @@
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
- * Copyright (C) Paul Ashton 1997.
- * Copyright (C) Marc Jacobsen 1999.
- * Copyright (C) Jean François Micouleau 1998-2001.
+ * Copyright (C) Paul Ashton 1997,
+ * Copyright (C) Marc Jacobsen 1999,
+ * Copyright (C) Jean François Micouleau 1998-2001,
+ * Copyright (C) Anthony Liguori 2002,
+ * Copyright (C) Jim McDonough 2002.
*
* Split into interface and implementation modules by,
*
@@ -652,6 +654,37 @@ static BOOL api_samr_connect(pipes_struct *p)
return True;
}
+/*******************************************************************
+ api_samr_connect4
+ ********************************************************************/
+
+static BOOL api_samr_connect4(pipes_struct *p)
+{
+ SAMR_Q_CONNECT4 q_u;
+ SAMR_R_CONNECT4 r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ /* grab the samr open policy */
+ if(!samr_io_q_connect4("", &q_u, data, 0)) {
+ DEBUG(0,("api_samr_connect4: unable to unmarshall SAMR_Q_CONNECT4.\n"));
+ return False;
+ }
+
+ r_u.status = _samr_connect4(p, &q_u, &r_u);
+
+ /* store the response in the SMB stream */
+ if(!samr_io_r_connect4("", &r_u, rdata, 0)) {
+ DEBUG(0,("api_samr_connect4: unable to marshall SAMR_R_CONNECT4.\n"));
+ return False;
+ }
+
+ return True;
+}
+
/**********************************************************************
api_samr_lookup_domain
**********************************************************************/
@@ -1465,6 +1498,7 @@ static struct api_struct api_samr_cmds [] =
{"SAMR_GET_USRDOM_PWINFO" , SAMR_GET_USRDOM_PWINFO, api_samr_get_usrdom_pwinfo},
{"SAMR_UNKNOWN_2E" , SAMR_UNKNOWN_2E , api_samr_unknown_2e },
{"SAMR_SET_DOMAIN_INFO" , SAMR_SET_DOMAIN_INFO , api_samr_set_dom_info },
+ {"SAMR_CONNECT4" , SAMR_CONNECT4 , api_samr_connect4 },
{NULL , 0 , NULL }
};