summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-29 22:54:55 +0100
committerVolker Lendecke <vl@samba.org>2009-01-30 12:48:00 +0100
commit22e3004829fe742efdbf750611749b9aaf585515 (patch)
treed35089002df57ce272d99d6a7c68f6f4ed8da166 /source3/include
parentb873ede89d3155438f7f9938d9a027cb4e3791e7 (diff)
downloadsamba-22e3004829fe742efdbf750611749b9aaf585515.tar.gz
samba-22e3004829fe742efdbf750611749b9aaf585515.tar.bz2
samba-22e3004829fe742efdbf750611749b9aaf585515.zip
Add the "SMBD" rpc transport
The idea of this is that all client utils like smbpasswd and also for example "net join" do not access our internal databases like passdb and secrets.tdb directly anymore but pass everything throught the well-established RPC interfaces. The way you use this is the following: With rpc_cli_smbd_conn_init() or its async variant you initialize a "struct rpc_cli_smbd_conn". This structure is the link to a freshly forked smbd, ready to be used for RPC services. You should only ever have one such structure in your program. More don't hurt, but are plainly unnecessary. If you want to use the SAMR pipe to change a passwort, you connect to that pipe with rpc_pipe_open_local. Do you normal rpccli_samr calls on that and your locally forked smbd will connect to passdb for you. GD, this might make the distinction between the _l and _r calls in libnetapi mostly unnecessary. At least it is intended to do so... :-)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h34
-rw-r--r--source3/include/smb.h1
2 files changed, 35 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 60e80bd87d..d30eb09f6a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5326,6 +5326,10 @@ NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
DATA_BLOB *session_key);
+NTSTATUS rpc_pipe_open_local(TALLOC_CTX *mem_ctx,
+ struct rpc_cli_smbd_conn *conn,
+ const struct ndr_syntax_id *syntax,
+ struct rpc_pipe_client **presult);
/* The following definitions come from rpc_client/rpc_transport_np.c */
@@ -5341,6 +5345,36 @@ NTSTATUS rpc_transport_np_init(TALLOC_CTX *mem_ctx, struct cli_state *cli,
struct rpc_cli_transport **presult);
struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
+/* The following definitions come from rpc_client/rpc_transport_smbd.c */
+
+struct async_req *rpc_cli_smbd_conn_init_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ void (*stdout_callback)(char *buf,
+ size_t len,
+ void *priv),
+ void *priv);
+NTSTATUS rpc_cli_smbd_conn_init_recv(struct async_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct rpc_cli_smbd_conn **pconn);
+NTSTATUS rpc_cli_smbd_conn_init(TALLOC_CTX *mem_ctx,
+ struct rpc_cli_smbd_conn **pconn,
+ void (*stdout_callback)(char *buf,
+ size_t len,
+ void *priv),
+ void *priv);
+
+struct async_req *rpc_transport_smbd_init_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct rpc_cli_smbd_conn *conn,
+ const struct ndr_syntax_id *abstract_syntax);
+NTSTATUS rpc_transport_smbd_init_recv(struct async_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct rpc_cli_transport **presult);
+NTSTATUS rpc_transport_smbd_init(TALLOC_CTX *mem_ctx,
+ struct rpc_cli_smbd_conn *conn,
+ const struct ndr_syntax_id *abstract_syntax,
+ struct rpc_cli_transport **presult);
+
/* The following definitions come from rpc_client/rpc_transport_sock.c */
NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 3f71cde395..9451710255 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -367,6 +367,7 @@ struct uuid;
struct named_mutex;
struct pcap_cache;
struct wb_context;
+struct rpc_cli_smbd_conn;
struct vfs_fsp_data {
struct vfs_fsp_data *next;