s3: Fork multiple children per domain
[obnox/samba-ctdb.git] / source / winbindd / winbindd.h
index c4c1278d739868899b457189e44e2e6ada4ec558..07033379bfac240972129b86296c6ee6072b5ba0 100644 (file)
@@ -176,6 +176,14 @@ struct winbindd_domain {
        time_t startup_time;                   /* When we set "startup" true. */
        bool startup;                          /* are we in the first 30 seconds after startup_time ? */
 
+       bool can_do_samlogon_ex; /* Due to the lack of finer control what type
+                                 * of DC we have, let us try to do a
+                                 * credential-chain less samlogon_ex call
+                                 * with AD and schannel. If this fails with
+                                 * DCERPC_FAULT_OP_RNG_ERROR, then set this
+                                 * to False. This variable is around so that
+                                 * we don't have to try _ex every time. */
+
        /* Lookup methods for this domain (LDAP or RPC) */
        struct winbindd_methods *methods;
 
@@ -187,6 +195,13 @@ struct winbindd_domain {
 
        void *private_data;
 
+       /*
+        * idmap config settings, used to tell the idmap child which
+        * special domain config to use for a mapping
+        */
+       bool have_idmap_config;
+       uint32_t id_range_low, id_range_high;
+
        /* A working DC */
        fstring dcname;
        struct sockaddr_storage dcaddr;
@@ -203,7 +218,7 @@ struct winbindd_domain {
 
        /* The child pid we're talking to */
 
-       struct winbindd_child child;
+       struct winbindd_child *children;
 
        /* Callback we use to try put us back online. */
 
@@ -301,15 +316,15 @@ struct winbindd_methods {
        NTSTATUS (*sequence_number)(struct winbindd_domain *domain, uint32 *seq);
 
        /* return the lockout policy */
-       NTSTATUS (*lockout_policy)(struct winbindd_domain *domain, 
+       NTSTATUS (*lockout_policy)(struct winbindd_domain *domain,
                                   TALLOC_CTX *mem_ctx,
-                                  SAM_UNK_INFO_12 *lockout_policy);
+                                  struct samr_DomInfo12 *lockout_policy);
+
        /* return the lockout policy */
-       NTSTATUS (*password_policy)(struct winbindd_domain *domain, 
+       NTSTATUS (*password_policy)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
-                                   SAM_UNK_INFO_1 *password_policy);
+                                   struct samr_DomInfo1 *password_policy);
+
        /* enumerate trusted domains */
        NTSTATUS (*trusted_domains)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
@@ -354,7 +369,12 @@ struct winbindd_tdc_domain {
        uint32 trust_type;
 };
 
-
+/* Switch for listing users or groups */
+enum ent_type {
+       LIST_USERS = 0,
+       LIST_GROUPS,
+};
 #include "winbindd/winbindd_proto.h"
 
 #define WINBINDD_ESTABLISH_LOOP 30
@@ -365,4 +385,6 @@ struct winbindd_tdc_domain {
 #define IS_DOMAIN_OFFLINE(x) ( lp_winbind_offline_logon() && \
                               ( get_global_winbindd_state_offline() \
                                 || !(x)->online ) )
+#define IS_DOMAIN_ONLINE(x) (!IS_DOMAIN_OFFLINE(x))
+
 #endif /* _WINBINDD_H */