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;
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;
/* The child pid we're talking to */
- struct winbindd_child child;
+ struct winbindd_child *children;
/* Callback we use to try put us back online. */
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,
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
#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 */