summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-08 22:10:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:08 -0500
commitfed660877c16562265327c6093ea645cf4176b5c (patch)
treee92ae1356542ba095d806bbe1093fa56fbc8ddcc /source3/include
parent66bb4f03c3466205488f72e4878e8801c5bbb295 (diff)
downloadsamba-fed660877c16562265327c6093ea645cf4176b5c.tar.gz
samba-fed660877c16562265327c6093ea645cf4176b5c.tar.bz2
samba-fed660877c16562265327c6093ea645cf4176b5c.zip
r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/client.h35
-rw-r--r--source3/include/idmap.h1
-rw-r--r--source3/include/includes.h5
-rw-r--r--source3/include/messages.h5
-rw-r--r--source3/include/rpc_client.h23
5 files changed, 57 insertions, 12 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 61c420c06b..e9d40c3b7c 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -57,6 +57,27 @@ struct print_job_info
time_t t;
};
+struct rpc_pipe_client {
+ TALLOC_CTX *mem_ctx;
+
+ struct cli_state *cli;
+
+ int pipe_idx;
+ uint16 fnum;
+
+ int pipe_auth_flags;
+
+ NTLMSSP_STATE *ntlmssp_pipe_state;
+ const char *user_name;
+ const char *domain;
+ struct pwd_info pwd;
+
+ struct netsec_auth_struct auth_info;
+
+ uint16 max_xmit_frag;
+ uint16 max_recv_frag;
+};
+
struct cli_state {
int port;
int fd;
@@ -124,25 +145,19 @@ struct cli_state {
of the pipe we're talking to,
if any */
- uint16 nt_pipe_fnum[PI_MAX_PIPES]; /* Pipe handle. */
+ struct rpc_pipe_client pipes[PI_MAX_PIPES];
/* Secure pipe parameters */
int pipe_auth_flags;
- uint16 saved_netlogon_pipe_fnum; /* The "first" pipe to get
- the session key for the
- schannel. */
- struct netsec_auth_struct auth_info;
-
- NTLMSSP_STATE *ntlmssp_pipe_state;
-
+ struct rpc_pipe_client netlogon_pipe; /* The "first" pipe to get
+ the session key for the
+ schannel. */
unsigned char sess_key[16]; /* Current session key. */
DOM_CRED clnt_cred; /* Client credential. */
fstring mach_acct; /* MYNAME$. */
fstring srv_name_slash; /* \\remote server. */
fstring clnt_name_slash; /* \\local client. */
- uint16 max_xmit_frag;
- uint16 max_recv_frag;
BOOL use_kerberos;
BOOL fallback_after_kerberos;
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index 20b1015285..7205058ee8 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -35,6 +35,7 @@
#define ID_TYPEMASK 0x0f
#define ID_QUERY_ONLY 0x10
+#define ID_CACHE_ONLY 0x20
/* Filled out by IDMAP backends */
struct idmap_methods {
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 1fabe44e0e..da4c98fc72 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -804,7 +804,12 @@ extern int errno;
#include "tdb/tdb.h"
#include "tdb/spinlock.h"
#include "tdb/tdbutil.h"
+
#include "talloc.h"
+/* And a little extension. Abort on type mismatch */
+#define talloc_get_type_abort(ptr, type) \
+ (type *)talloc_check_name_abort(ptr, #type)
+
#include "nt_status.h"
#include "ads.h"
#include "interfaces.h"
diff --git a/source3/include/messages.h b/source3/include/messages.h
index a87659f498..1039e0d9a7 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -46,6 +46,7 @@
/* nmbd messages */
#define MSG_FORCE_ELECTION 1001
#define MSG_WINS_NEW_ENTRY 1002
+#define MSG_SEND_PACKET 1003
/* printing messages */
/* #define MSG_PRINTER_NOTIFY 2001*/ /* Obsolete */
@@ -63,6 +64,10 @@
#define MSG_SMB_SAM_REPL 3004
#define MSG_SMB_UNLOCK 3005
+/* winbind messages */
+#define MSG_WINBIND_FINISHED 4001
+#define MSG_WINBIND_FORGET_STATE 4002
+
/* Flags to classify messages - used in message_send_all() */
/* Sender will filter by flag. */
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index 4ac2f43ee0..9ca2d5aa8c 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -21,9 +21,10 @@
#ifndef _RPC_CLIENT_H
#define _RPC_CLIENT_H
-/* macro to expand cookie-cutter code in cli_xxx() */
+/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
-#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, q_ps, r_ps, q_io_fn, r_io_fn, default_error) \
+#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, \
+ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
{ r_out.status = default_error;\
prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \
prs_init( &r_ps, 0, ctx, UNMARSHALL );\
@@ -38,4 +39,22 @@
prs_mem_free( &r_ps );\
}
+/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req_int() */
+
+#define CLI_DO_RPC_EX( pcli, ctx, pipe_num, opnum, q_in, r_out, \
+ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
+{ r_out.status = default_error;\
+ prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \
+ prs_init( &r_ps, 0, ctx, UNMARSHALL );\
+ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
+ if ( rpc_api_pipe_req_int(pcli, opnum, &q_ps, &r_ps) ) {\
+ if (!r_io_fn("", &r_out, &r_ps, 0)) {\
+ r_out.status = default_error;\
+ }\
+ }\
+ }\
+ prs_mem_free( &q_ps );\
+ prs_mem_free( &r_ps );\
+}
+
#endif /* _RPC_CLIENT_H */