#include "nsswitch/libwbclient/wbclient.h"
#include "librpc/gen_ndr/wbint.h"
+#include "talloc_dict.h"
+
#ifdef HAVE_LIBNSCD
#include <libnscd.h>
#endif
#define WB_REPLACE_CHAR '_'
struct sid_ctr {
- DOM_SID *sid;
+ struct dom_sid *sid;
bool finished;
const char *domain;
const char *name;
bool privileged; /* Is the client 'privileged' */
TALLOC_CTX *mem_ctx; /* memory per request */
+ const char *cmd_name;
NTSTATUS (*recv_fn)(struct tevent_req *req,
struct winbindd_response *presp);
struct winbindd_request *request; /* Request from client */
fstring gecos; /* User information */
fstring homedir; /* User Home Directory */
fstring shell; /* User Login Shell */
- DOM_SID user_sid; /* NT user and primary group SIDs */
- DOM_SID group_sid;
+ struct dom_sid user_sid; /* NT user and primary group SIDs */
+ struct dom_sid group_sid;
};
/* Our connection to the DC */
int sock;
struct tevent_queue *queue;
- struct rpc_pipe_client *rpccli;
+ struct dcerpc_binding_handle *binding_handle;
struct timed_event *lockout_policy_event;
struct timed_event *machine_password_change_event;
fstring name; /* Domain name (NetBIOS) */
fstring alt_name; /* alt Domain name, if any (FQDN for ADS) */
fstring forest_name; /* Name of the AD forest we're in */
- DOM_SID sid; /* SID for this domain */
+ struct dom_sid sid; /* SID for this domain */
uint32 domain_flags; /* Domain flags from netlogon.h */
uint32 domain_type; /* Domain type from netlogon.h */
uint32 domain_trust_attribs; /* Trust attribs from netlogon.h */
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type);
/* convert a sid to a user or group name */
NTSTATUS (*sid_to_name)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
char **domain_name,
char **name,
enum lsa_SidType *type);
NTSTATUS (*rids_to_names)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
uint32 *rids,
size_t num_rids,
char **domain_name,
/* lookup user info for a given SID */
NTSTATUS (*query_user)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
+ const struct dom_sid *user_sid,
struct wbint_userinfo *user_info);
/* lookup all groups that a user is a member of. The backend
function */
NTSTATUS (*lookup_usergroups)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
- uint32 *num_groups, DOM_SID **user_gids);
+ const struct dom_sid *user_sid,
+ uint32 *num_groups, struct dom_sid **user_gids);
/* Lookup all aliases that the sids delivered are member of. This is
* to implement 'domain local groups' correctly */
NTSTATUS (*lookup_useraliases)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
uint32 num_sids,
- const DOM_SID *sids,
+ const struct dom_sid *sids,
uint32 *num_aliases,
uint32 **alias_rids);
/* find all members of the group with the specified group_rid */
NTSTATUS (*lookup_groupmem)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *group_sid,
+ const struct dom_sid *group_sid,
enum lsa_SidType type,
uint32 *num_names,
- DOM_SID **sid_mem, char ***names,
+ struct dom_sid **sid_mem, char ***names,
uint32 **name_types);
/* return the current global sequence number */
/* Called when backend is first loaded */
bool (*init)(void);
- bool (*get_sid_from_uid)(uid_t uid, DOM_SID *sid);
- bool (*get_sid_from_gid)(gid_t gid, DOM_SID *sid);
+ bool (*get_sid_from_uid)(uid_t uid, struct dom_sid *sid);
+ bool (*get_sid_from_gid)(gid_t gid, struct dom_sid *sid);
- bool (*get_uid_from_sid)(DOM_SID *sid, uid_t *uid);
- bool (*get_gid_from_sid)(DOM_SID *sid, gid_t *gid);
+ bool (*get_uid_from_sid)(struct dom_sid *sid, uid_t *uid);
+ bool (*get_gid_from_sid)(struct dom_sid *sid, gid_t *gid);
/* Called when backend is unloaded */
bool (*close)(void);
struct winbindd_tdc_domain {
const char *domain_name;
const char *dns_name;
- DOM_SID sid;
+ struct dom_sid sid;
uint32 trust_flags;
uint32 trust_attribs;
uint32 trust_type;
#define WINBINDD_PAM_AUTH_KRB5_RENEW_TIME 2592000 /* one month */
#define DOM_SEQUENCE_NONE ((uint32)-1)
+#define winbind_event_context server_event_context
+#define winbind_messaging_context server_messaging_context
+
#endif /* _WINBINDD_H */