s4:lib/tevent: rename structs
[bbaumbach/samba-autobuild/.git] / source4 / winbind / wb_server.h
index 47ebcb237102ee69fa62e391ec00f7a726faf5a7..be79872e6582b477662d89d1b139998c204b86b3 100644 (file)
@@ -20,9 +20,9 @@
 */
 
 #include "nsswitch/winbind_nss_config.h"
-#include "nsswitch/winbindd_nss.h"
-
-
+#include "nsswitch/winbind_struct_protocol.h"
+#include "winbind/idmap.h"
+#include "libnet/libnet.h"
 
 #define WINBINDD_SAMBA3_SOCKET "pipe"
 /* the privileged socket is in smbd_tmp_dir() */
@@ -34,6 +34,9 @@ struct wbsrv_service {
 
        const struct dom_sid *primary_sid;
        struct wbsrv_domain *domains;
+       struct idmap_context *idmap_ctx;
+
+       const char *priv_socket_path;
 };
 
 struct wbsrv_samconn {
@@ -62,20 +65,14 @@ struct wbsrv_domain {
        const char *dc_address;
        const char *dc_name;
 
-       struct dcerpc_pipe *lsa_pipe;
-       struct policy_handle *lsa_policy_handle;
+       struct libnet_context *libnet_ctx;
+
        struct dcerpc_binding *lsa_binding;
 
-       struct dcerpc_pipe *samr_pipe;
-       struct policy_handle *samr_handle;
-       struct policy_handle *domain_handle;
        struct dcerpc_binding *samr_binding;
 
-       struct ldap_connection *ldap_conn;
-
        struct dcerpc_pipe *netlogon_pipe;
        struct dcerpc_binding *netlogon_binding;
-       struct cli_credentials *schannel_creds;
 };
 
 /*
@@ -84,7 +81,7 @@ struct wbsrv_domain {
 struct wbsrv_listen_socket {
        const char *socket_path;
        struct wbsrv_service *service;
-       BOOL privileged;
+       bool privileged;
 };
 
 /*
@@ -104,12 +101,28 @@ struct wbsrv_connection {
        uint32_t pending_calls;
 
        struct packet_context *packet;
+
+       struct loadparm_context *lp_ctx;
 };
 
 #define WBSRV_SAMBA3_SET_STRING(dest, src) do { \
-       strncpy(dest, src, sizeof(dest)-1);\
+       safe_strcpy(dest, src, sizeof(dest)-1);\
 } while(0)
 
+/*
+  state of a pwent query
+*/
+struct wbsrv_pwent {
+       /* Current UserList structure, contains 1+ user structs */
+       struct libnet_UserList *user_list;
+
+       /* Index of the next user struct in the current UserList struct */
+       uint32_t page_index;
+
+       /* The libnet_ctx to use for the libnet_UserList call */
+       struct libnet_context *libnet_ctx;
+};
+
 /*
   state of one request
 
@@ -136,7 +149,7 @@ struct wbsrv_samba3_call {
        struct wbsrv_connection *wbconn;
 
        /* the backend should use this event context */
-       struct event_context *event_ctx;
+       struct tevent_context *event_ctx;
 
        /* here the backend can store stuff like composite_context's ... */
        void *private_data;