#include "librpc/gen_ndr/dcerpc.h"
#include "librpc/gen_ndr/winbind.h"
-#include "talloc_dict.h"
-
#include "../lib/util/tevent_ntstatus.h"
#ifdef HAVE_LIBNSCD
struct getpwent_state {
struct winbindd_domain *domain;
- int next_user;
- int num_users;
- struct wbint_userinfo *users;
+ uint32_t next_user;
+ struct wbint_RidArray rids;
};
struct getgrent_state {
struct wbint_Principal *groups;
};
-/* Storage for cached getpwent() user entries */
-
-struct getpwent_user {
- fstring name; /* Account name */
- fstring gecos; /* User information */
- fstring homedir; /* User Home Directory */
- fstring shell; /* User Login Shell */
- struct dom_sid user_sid; /* NT user and primary group SIDs */
- struct dom_sid group_sid;
-};
-
/* Our connection to the DC */
struct winbindd_cm_conn {
struct policy_handle lsa_policy;
struct rpc_pipe_client *netlogon_pipe;
- struct netlogon_creds_cli_context *netlogon_creds;
- uint32_t netlogon_flags;
+ struct netlogon_creds_cli_context *netlogon_creds_ctx;
bool netlogon_force_reauth;
};
char *alt_name; /* alt Domain name, if any (FQDN for ADS) */
char *forest_name; /* Name of the AD forest we're in */
struct dom_sid sid; /* SID for this domain */
+ enum netr_SchannelType secure_channel_type;
uint32_t domain_flags; /* Domain flags from netlogon.h */
uint32_t domain_type; /* Domain type from netlogon.h */
uint32_t domain_trust_attribs; /* Trust attribs from netlogon.h */
+ struct winbindd_domain *routing_domain;
bool initialized; /* Did we already ask for the domain mode? */
bool native_mode; /* is this a win2k domain in native mode ? */
bool active_directory; /* is this a win2k active directory ? */
bool can_do_ncacn_ip_tcp;
- /* Lookup methods for this domain (LDAP or RPC) */
- struct winbindd_methods *methods;
-
- /* the backend methods are used by the cache layer to find the right
- backend */
+ /*
+ * Lookup methods for this domain (LDAP or RPC). The backend
+ * methods are used by the cache layer.
+ */
struct winbindd_methods *backend;
/* Private data for the backends (used for connection cache) */
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 */
pid_t dc_probe_pid; /* Child we're using to detect the DC. */
char *dcname;
struct winbindd_child *children;
+ struct tevent_queue *queue;
+ struct dcerpc_binding_handle *binding_handle;
+
/* Callback we use to try put us back online. */
uint32_t check_online_timeout;
/* get a list of users, returning a wbint_userinfo for each one */
NTSTATUS (*query_user_list)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32_t *num_entries,
- struct wbint_userinfo **info);
+ uint32_t **rids);
/* get a list of domain groups */
NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain,
char ***names,
enum lsa_SidType **types);
- /* lookup user info for a given SID */
- NTSTATUS (*query_user)(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- const struct dom_sid *user_sid,
- struct wbint_userinfo *user_info);
-
/* lookup all groups that a user is a member of. The backend
can also choose to lookup by username or rid for this
function */
uint32_t trust_type;
};
-/* Switch for listing users or groups */
-enum ent_type {
- LIST_USERS = 0,
- LIST_GROUPS,
-};
-
struct WINBINDD_MEMORY_CREDS {
struct WINBINDD_MEMORY_CREDS *next, *prev;
const char *username; /* lookup key. */