summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_ad.c8
-rw-r--r--source3/winbindd/idmap_adex/cell_util.c2
-rw-r--r--source3/winbindd/idmap_adex/domain_util.c2
-rw-r--r--source3/winbindd/idmap_adex/gc_util.c4
-rw-r--r--source3/winbindd/idmap_adex/idmap_adex.c4
-rw-r--r--source3/winbindd/idmap_adex/idmap_adex.h16
-rw-r--r--source3/winbindd/idmap_adex/likewise_cell.c2
-rw-r--r--source3/winbindd/idmap_adex/provider_unified.c20
-rw-r--r--source3/winbindd/idmap_hash/idmap_hash.c10
-rw-r--r--source3/winbindd/idmap_ldap.c4
-rw-r--r--source3/winbindd/idmap_tdb.c4
-rw-r--r--source3/winbindd/idmap_util.c8
-rw-r--r--source3/winbindd/nss_info.c2
-rw-r--r--source3/winbindd/nss_info_template.c2
-rw-r--r--source3/winbindd/winbindd.h36
-rw-r--r--source3/winbindd/winbindd_ads.c48
-rw-r--r--source3/winbindd/winbindd_async.c6
-rw-r--r--source3/winbindd/winbindd_cache.c64
-rw-r--r--source3/winbindd/winbindd_creds.c8
-rw-r--r--source3/winbindd/winbindd_pam.c10
-rw-r--r--source3/winbindd/winbindd_passdb.c28
-rw-r--r--source3/winbindd/winbindd_proto.h48
-rw-r--r--source3/winbindd/winbindd_reconnect.c18
-rw-r--r--source3/winbindd/winbindd_rpc.c30
-rw-r--r--source3/winbindd/winbindd_util.c24
25 files changed, 204 insertions, 204 deletions
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c
index 4e1ca346c0..1671d90499 100644
--- a/source3/winbindd/idmap_ad.c
+++ b/source3/winbindd/idmap_ad.c
@@ -267,7 +267,7 @@ static struct id_map *find_map_by_id(struct id_map **maps, enum id_type type, ui
Search up to IDMAP_AD_MAX_IDS entries in maps for a match
***********************************************************************/
-static struct id_map *find_map_by_sid(struct id_map **maps, DOM_SID *sid)
+static struct id_map *find_map_by_sid(struct id_map **maps, struct dom_sid *sid)
{
int i;
@@ -400,7 +400,7 @@ again:
entry = res;
for (i = 0; (i < count) && entry; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
enum id_type type;
struct id_map *map;
uint32_t id;
@@ -593,7 +593,7 @@ again:
entry = res;
for (i = 0; (i < count) && entry; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
enum id_type type;
struct id_map *map;
uint32_t id;
@@ -818,7 +818,7 @@ static NTSTATUS nss_rfc2307_init( struct nss_domain_entry *e )
***********************************************************************/
static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
TALLOC_CTX *mem_ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
diff --git a/source3/winbindd/idmap_adex/cell_util.c b/source3/winbindd/idmap_adex/cell_util.c
index f5c08a0454..4ca3bf516a 100644
--- a/source3/winbindd/idmap_adex/cell_util.c
+++ b/source3/winbindd/idmap_adex/cell_util.c
@@ -138,7 +138,7 @@ done:
ADS_STATUS status;
char *domain_dn = ads_build_dn(lp_realm());
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
- DOM_SID sid;
+ struct dom_sid sid;
struct likewise_cell *cell = NULL;
/* In the Likewise plugin, I had to support the concept of cells
diff --git a/source3/winbindd/idmap_adex/domain_util.c b/source3/winbindd/idmap_adex/domain_util.c
index 6851503cc8..dae5415b3b 100644
--- a/source3/winbindd/idmap_adex/domain_util.c
+++ b/source3/winbindd/idmap_adex/domain_util.c
@@ -208,7 +208,7 @@ static struct dc_info *dc_find_domain(const char *dns_domain)
NTSTATUS dc_search_domains(struct likewise_cell **cell,
LDAPMessage **msg,
const char *dn,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
TALLOC_CTX *frame = talloc_stackframe();
diff --git a/source3/winbindd/idmap_adex/gc_util.c b/source3/winbindd/idmap_adex/gc_util.c
index 879c2e0ecf..634fd980e8 100644
--- a/source3/winbindd/idmap_adex/gc_util.c
+++ b/source3/winbindd/idmap_adex/gc_util.c
@@ -545,7 +545,7 @@ done:
NTSTATUS gc_name_to_sid(const char *domain,
const char *name,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *sid_type)
{
TALLOC_CTX *frame = talloc_stackframe();
@@ -703,7 +703,7 @@ done:
/*********************************************************************
********************************************************************/
- NTSTATUS gc_sid_to_name(const DOM_SID *sid,
+ NTSTATUS gc_sid_to_name(const struct dom_sid *sid,
char **name,
enum lsa_SidType *sid_type)
{
diff --git a/source3/winbindd/idmap_adex/idmap_adex.c b/source3/winbindd/idmap_adex/idmap_adex.c
index 5ca7df0b4a..e5ddfad946 100644
--- a/source3/winbindd/idmap_adex/idmap_adex.c
+++ b/source3/winbindd/idmap_adex/idmap_adex.c
@@ -44,7 +44,7 @@ static NTSTATUS _idmap_adex_init(struct idmap_domain *dom,
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
static NTSTATUS init_status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
- DOM_SID domain_sid;
+ struct dom_sid domain_sid;
fstring dcname;
struct sockaddr_storage ip;
struct likewise_cell *lwcell;
@@ -314,7 +314,7 @@ static NTSTATUS _nss_adex_init(struct nss_domain_entry
static NTSTATUS _nss_adex_get_info(struct
nss_domain_entry *e,
- const DOM_SID * sid,
+ const struct dom_sid * sid,
TALLOC_CTX * ctx,
ADS_STRUCT * ads,
LDAPMessage * msg,
diff --git a/source3/winbindd/idmap_adex/idmap_adex.h b/source3/winbindd/idmap_adex/idmap_adex.h
index 6d6881e01d..cfb3b807f9 100644
--- a/source3/winbindd/idmap_adex/idmap_adex.h
+++ b/source3/winbindd/idmap_adex/idmap_adex.h
@@ -91,11 +91,11 @@
*/
struct cell_provider_api {
- NTSTATUS(*get_sid_from_id) (DOM_SID * sid,
+ NTSTATUS(*get_sid_from_id) (struct dom_sid * sid,
uint32_t id, enum id_type type);
NTSTATUS(*get_id_from_sid) (uint32_t * id,
- enum id_type * type, const DOM_SID * sid);
- NTSTATUS(*get_nss_info) (const DOM_SID * sid,
+ enum id_type * type, const struct dom_sid * sid);
+ NTSTATUS(*get_nss_info) (const struct dom_sid * sid,
TALLOC_CTX * ctx,
const char **homedir,
const char **shell,
@@ -122,7 +122,7 @@ struct likewise_cell {
struct likewise_cell *prev, *next;
ADS_STRUCT *conn;
struct likewise_cell *gc_search_cell;
- DOM_SID domain_sid;
+ struct dom_sid domain_sid;
char *dns_domain;
char *forest_name;
char *dn;
@@ -179,7 +179,7 @@ void cell_set_connection(struct likewise_cell *c,
void cell_set_dn(struct likewise_cell *c,
const char *dn);
void cell_set_domain_sid(struct likewise_cell *c,
- DOM_SID *sid);
+ struct dom_sid *sid);
void cell_set_flags(struct likewise_cell *c, uint32_t flags);
void cell_clear_flags(struct likewise_cell *c, uint32_t flags);
@@ -224,10 +224,10 @@ NTSTATUS gc_search_all_forests_unique(const char *filter,
NTSTATUS gc_name_to_sid(const char *domain,
const char *name,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *sid_type);
-NTSTATUS gc_sid_to_name(const DOM_SID *sid,
+NTSTATUS gc_sid_to_name(const struct dom_sid *sid,
char **name,
enum lsa_SidType *sid_type);
@@ -252,7 +252,7 @@ NTSTATUS domain_init_list(void);
NTSTATUS dc_search_domains(struct likewise_cell **cell,
LDAPMessage **msg,
const char *dn,
- const DOM_SID *user_sid);
+ const struct dom_sid *user_sid);
#endif /* _IDMAP_ADEX_H */
diff --git a/source3/winbindd/idmap_adex/likewise_cell.c b/source3/winbindd/idmap_adex/likewise_cell.c
index d666d8c01a..f1abb24da2 100644
--- a/source3/winbindd/idmap_adex/likewise_cell.c
+++ b/source3/winbindd/idmap_adex/likewise_cell.c
@@ -176,7 +176,7 @@ static struct likewise_cell *_lw_cell_list = NULL;
/**********************************************************************
*********************************************************************/
- void cell_set_domain_sid(struct likewise_cell *c, DOM_SID *sid)
+ void cell_set_domain_sid(struct likewise_cell *c, struct dom_sid *sid)
{
sid_copy(&c->domain_sid, sid);
}
diff --git a/source3/winbindd/idmap_adex/provider_unified.c b/source3/winbindd/idmap_adex/provider_unified.c
index af33405747..f66d4dfbf4 100644
--- a/source3/winbindd/idmap_adex/provider_unified.c
+++ b/source3/winbindd/idmap_adex/provider_unified.c
@@ -35,7 +35,7 @@ struct lwcell_filter
enum filterType ftype;
bool use2307;
union {
- DOM_SID sid;
+ struct dom_sid sid;
struct {
uint32_t id;
enum id_type type;
@@ -245,7 +245,7 @@ done:
static NTSTATUS search_domain(struct likewise_cell **cell,
LDAPMessage **msg,
const char *dn,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
TALLOC_CTX* frame = talloc_stackframe();
@@ -341,7 +341,7 @@ static NTSTATUS check_result_unique_scoped(ADS_STRUCT **ads_list,
LDAPMessage **msg_list,
int num_resp,
char **dn,
- DOM_SID *user_sid)
+ struct dom_sid *user_sid)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int i;
@@ -465,7 +465,7 @@ static NTSTATUS search_forest(struct likewise_cell *forest_cell,
LDAPMessage **msg_list = NULL;
int num_resp = 0;
LDAPMessage *m;
- DOM_SID user_sid;
+ struct dom_sid user_sid;
struct likewise_cell *domain_cell = NULL;
if ((gc = gc_search_start()) == NULL) {
@@ -611,7 +611,7 @@ done:
static NTSTATUS pull_sid(struct likewise_cell *c,
LDAPMessage *msg,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
TALLOC_CTX *frame = talloc_stackframe();
@@ -967,7 +967,7 @@ done:
/********************************************************************
*******************************************************************/
-static NTSTATUS _ccp_get_sid_from_id(DOM_SID * sid,
+static NTSTATUS _ccp_get_sid_from_id(struct dom_sid * sid,
uint32_t id, enum id_type type)
{
struct likewise_cell *cell = NULL;
@@ -996,7 +996,7 @@ done:
static NTSTATUS _ccp_get_id_from_sid(uint32_t * id,
enum id_type *type,
- const DOM_SID * sid)
+ const struct dom_sid * sid)
{
struct likewise_cell *cell = NULL;
LDAPMessage *msg = NULL;
@@ -1026,7 +1026,7 @@ done:
/********************************************************************
*******************************************************************/
-static NTSTATUS _ccp_nss_get_info(const DOM_SID * sid,
+static NTSTATUS _ccp_nss_get_info(const struct dom_sid * sid,
TALLOC_CTX * ctx,
const char **homedir,
const char **shell,
@@ -1071,7 +1071,7 @@ static NTSTATUS _ccp_map_to_alias(TALLOC_CTX *ctx,
{
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
- DOM_SID sid;
+ struct dom_sid sid;
struct likewise_cell *cell = NULL;
LDAPMessage *msg = NULL;
struct lwcell_filter filter;
@@ -1116,7 +1116,7 @@ static NTSTATUS _ccp_map_from_alias(TALLOC_CTX *mem_ctx,
{
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
- DOM_SID sid;
+ struct dom_sid sid;
struct likewise_cell *cell_alias = NULL;
LDAPMessage *msg_alias = NULL;
struct likewise_cell *cell_sid = NULL;
diff --git a/source3/winbindd/idmap_hash/idmap_hash.c b/source3/winbindd/idmap_hash/idmap_hash.c
index 1227b2a052..844950e737 100644
--- a/source3/winbindd/idmap_hash/idmap_hash.c
+++ b/source3/winbindd/idmap_hash/idmap_hash.c
@@ -26,7 +26,7 @@
#define DBGC_CLASS DBGC_IDMAP
struct sid_hash_table {
- DOM_SID *sid;
+ struct dom_sid *sid;
};
struct sid_hash_table *hashed_domains = NULL;
@@ -35,7 +35,7 @@ struct sid_hash_table *hashed_domains = NULL;
Hash a domain SID (S-1-5-12-aaa-bbb-ccc) to a 12bit number
********************************************************************/
-static uint32_t hash_domain_sid(const DOM_SID *sid)
+static uint32_t hash_domain_sid(const struct dom_sid *sid)
{
uint32_t hash;
@@ -143,7 +143,7 @@ static NTSTATUS be_init(struct idmap_domain *dom,
sid_string_dbg(&dom_list[i].sid),
hash));
- hashed_domains[hash].sid = talloc(hashed_domains, DOM_SID);
+ hashed_domains[hash].sid = talloc(hashed_domains, struct dom_sid);
sid_copy(hashed_domains[hash].sid, &dom_list[i].sid);
}
@@ -224,7 +224,7 @@ static NTSTATUS sids_to_unixids(struct idmap_domain *dom,
}
for (i=0; ids[i]; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
uint32_t rid;
uint32_t h_domain, h_rid;
@@ -271,7 +271,7 @@ static NTSTATUS nss_hash_init(struct nss_domain_entry *e )
*********************************************************************/
static NTSTATUS nss_hash_get_info(struct nss_domain_entry *e,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 22736c6721..fd714a0a7f 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -1145,7 +1145,7 @@ done:
/* this function searches up to IDMAP_LDAP_MAX_IDS entries
* in maps for a match */
-static struct id_map *find_map_by_sid(struct id_map **maps, DOM_SID *sid)
+static struct id_map *find_map_by_sid(struct id_map **maps, struct dom_sid *sid)
{
int i;
@@ -1262,7 +1262,7 @@ again:
char *tmp = NULL;
enum id_type type;
struct id_map *map;
- DOM_SID sid;
+ struct dom_sid sid;
uint32_t id;
if (i == 0) { /* first entry */
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index 45266abe15..27d73d6ab5 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -60,7 +60,7 @@ static int convert_fn(struct db_record *rec, void *private_data)
struct winbindd_domain *domain;
char *p;
NTSTATUS status;
- DOM_SID sid;
+ struct dom_sid sid;
uint32 rid;
fstring keystr;
fstring dom_name;
@@ -1146,7 +1146,7 @@ static int idmap_tdb_dump_one_entry(struct db_record *rec, void *pdata)
return -1;
}
*data->maps = maps;
- maps[num_maps].sid = talloc(maps, DOM_SID);
+ maps[num_maps].sid = talloc(maps, struct dom_sid);
if ( ! maps[num_maps].sid) {
DEBUG(0, ("Out of memory!\n"));
data->ret = NT_STATUS_NO_MEMORY;
diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c
index 37b7ecb1f3..a8974a9024 100644
--- a/source3/winbindd/idmap_util.c
+++ b/source3/winbindd/idmap_util.c
@@ -29,7 +29,7 @@
If mapping is not possible returns an error.
*****************************************************************/
-NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid)
+NTSTATUS idmap_uid_to_sid(const char *domname, struct dom_sid *sid, uid_t uid)
{
NTSTATUS ret;
struct id_map map;
@@ -88,7 +88,7 @@ backend:
If mapping is not possible returns an error.
*****************************************************************/
-NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid)
+NTSTATUS idmap_gid_to_sid(const char *domname, struct dom_sid *sid, gid_t gid)
{
NTSTATUS ret;
struct id_map map;
@@ -147,7 +147,7 @@ backend:
If mapping is not possible or SID maps to a GID returns an error.
*****************************************************************/
-NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID *sid, uid_t *uid)
+NTSTATUS idmap_sid_to_uid(const char *dom_name, struct dom_sid *sid, uid_t *uid)
{
NTSTATUS ret;
struct id_map map;
@@ -229,7 +229,7 @@ done:
If mapping is not possible or SID maps to a UID returns an error.
*****************************************************************/
-NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid)
+NTSTATUS idmap_sid_to_gid(const char *domname, struct dom_sid *sid, gid_t *gid)
{
NTSTATUS ret;
struct id_map map;
diff --git a/source3/winbindd/nss_info.c b/source3/winbindd/nss_info.c
index 663fc9a2a5..82eb6c7db5 100644
--- a/source3/winbindd/nss_info.c
+++ b/source3/winbindd/nss_info.c
@@ -303,7 +303,7 @@ static struct nss_domain_entry *find_nss_domain( const char *domain )
/********************************************************************
*******************************************************************/
-NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
+NTSTATUS nss_get_info( const char *domain, const struct dom_sid *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const char **homedir, const char **shell,
diff --git a/source3/winbindd/nss_info_template.c b/source3/winbindd/nss_info_template.c
index 12d9c51896..1b69a8cb2b 100644
--- a/source3/winbindd/nss_info_template.c
+++ b/source3/winbindd/nss_info_template.c
@@ -33,7 +33,7 @@ static NTSTATUS nss_template_init( struct nss_domain_entry *e )
***********************************************************************/
static NTSTATUS nss_template_get_info( struct nss_domain_entry *e,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h
index f1815ac870..b8835c0b0b 100644
--- a/source3/winbindd/winbindd.h
+++ b/source3/winbindd/winbindd.h
@@ -41,7 +41,7 @@
#define WB_REPLACE_CHAR '_'
struct sid_ctr {
- DOM_SID *sid;
+ struct dom_sid *sid;
bool finished;
const char *domain;
const char *name;
@@ -92,8 +92,8 @@ struct getpwent_user {
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 */
@@ -145,7 +145,7 @@ struct winbindd_domain {
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 */
@@ -246,20 +246,20 @@ struct winbindd_methods {
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,
@@ -269,7 +269,7 @@ struct winbindd_methods {
/* 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
@@ -277,25 +277,25 @@ struct winbindd_methods {
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 */
@@ -322,11 +322,11 @@ struct winbindd_idmap_methods {
/* 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);
@@ -339,7 +339,7 @@ struct winbindd_idmap_methods {
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;
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 50abcc30c3..faa4d8ee26 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -206,7 +206,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
const char *shell = NULL;
uint32 group;
uint32 atype;
- DOM_SID user_sid;
+ struct dom_sid user_sid;
gid_t primary_gid = (gid_t)-1;
if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) ||
@@ -346,7 +346,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
char *name, *gecos;
- DOM_SID sid;
+ struct dom_sid sid;
uint32 rid;
name = ads_pull_username(ads, mem_ctx, msg);
@@ -407,7 +407,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
return reconnect_methods.name_to_sid(domain, mem_ctx,
@@ -418,7 +418,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
/* convert a domain SID to a user or group name - use rpc methods */
static 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)
@@ -430,7 +430,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
/* convert a list of rids to names - use rpc methods */
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
uint32 *rids,
size_t num_rids,
char **domain_name,
@@ -450,7 +450,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
/* Lookup user information from a rid */
static NTSTATUS query_user(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
struct wbint_userinfo *info)
{
ADS_STRUCT *ads = NULL;
@@ -582,8 +582,8 @@ done:
static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const char *user_dn,
- DOM_SID *primary_group,
- size_t *p_num_groups, DOM_SID **user_sids)
+ struct dom_sid *primary_group,
+ size_t *p_num_groups, struct dom_sid **user_sids)
{
ADS_STATUS rc;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -652,7 +652,7 @@ static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain,
if (count > 0) {
for (msg = ads_first_entry(ads, res); msg;
msg = ads_next_entry(ads, msg)) {
- DOM_SID group_sid;
+ struct dom_sid group_sid;
if (!ads_pull_sid(ads, msg, "objectSid", &group_sid)) {
DEBUG(1,("No sid for this group ?!?\n"));
@@ -689,16 +689,16 @@ done:
static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const char *user_dn,
- DOM_SID *primary_group,
+ struct dom_sid *primary_group,
size_t *p_num_groups,
- DOM_SID **user_sids)
+ struct dom_sid **user_sids)
{
ADS_STATUS rc;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
ADS_STRUCT *ads;
const char *attrs[] = {"memberOf", NULL};
size_t num_groups = 0;
- DOM_SID *group_sids = NULL;
+ struct dom_sid *group_sids = NULL;
int i;
char **strings = NULL;
size_t num_strings = 0, num_sids = 0;
@@ -739,7 +739,7 @@ static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain,
goto done;
}
- group_sids = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, num_strings + 1);
+ group_sids = TALLOC_ZERO_ARRAY(mem_ctx, struct dom_sid, num_strings + 1);
if (!group_sids) {
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -801,8 +801,8 @@ done:
/* Lookup groups a user is a member of. */
static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
- uint32 *p_num_groups, DOM_SID **user_sids)
+ const struct dom_sid *sid,
+ uint32 *p_num_groups, struct dom_sid **user_sids)
{
ADS_STRUCT *ads = NULL;
const char *attrs[] = {"tokenGroups", "primaryGroupID", NULL};
@@ -810,9 +810,9 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
int count;
LDAPMessage *msg = NULL;
char *user_dn = NULL;
- DOM_SID *sids;
+ struct dom_sid *sids;
int i;
- DOM_SID primary_group;
+ struct dom_sid primary_group;
uint32 primary_group_rid;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
size_t num_groups = 0;
@@ -952,7 +952,7 @@ done:
/* Lookup aliases a user is member of - use rpc methods */
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *num_aliases, uint32 **alias_rids)
{
return reconnect_methods.lookup_useraliases(domain, mem_ctx,
@@ -966,10 +966,10 @@ static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
*/
static 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)
{
ADS_STATUS rc;
@@ -981,7 +981,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
int i;
size_t num_members = 0;
ads_control args;
- DOM_SID *sid_mem_nocache = NULL;
+ struct dom_sid *sid_mem_nocache = NULL;
char **names_nocache = NULL;
enum lsa_SidType *name_types_nocache = NULL;
char **domains_nocache = NULL; /* only needed for rpccli_lsa_lookup_sids */
@@ -1055,10 +1055,10 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
* cache. Only the rest is passed to the lsa_lookup_sids call. */
if (num_members) {
- (*sid_mem) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, num_members);
+ (*sid_mem) = TALLOC_ZERO_ARRAY(mem_ctx, struct dom_sid, num_members);
(*names) = TALLOC_ZERO_ARRAY(mem_ctx, char *, num_members);
(*name_types) = TALLOC_ZERO_ARRAY(mem_ctx, uint32, num_members);
- (sid_mem_nocache) = TALLOC_ZERO_ARRAY(tmp_ctx, DOM_SID, num_members);
+ (sid_mem_nocache) = TALLOC_ZERO_ARRAY(tmp_ctx, struct dom_sid, num_members);
if ((members == NULL) || (*sid_mem == NULL) ||
(*names == NULL) || (*name_types == NULL) ||
@@ -1078,7 +1078,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
for (i=0; i<num_members; i++) {
enum lsa_SidType name_type;
char *name, *domain_name;
- DOM_SID sid;
+ struct dom_sid sid;
rc = ads_get_sid_from_extended_dn(tmp_ctx, members[i], args.val,
&sid);
diff --git a/source3/winbindd/winbindd_async.c b/source3/winbindd/winbindd_async.c
index 5a350b99bc..9e7be6b041 100644
--- a/source3/winbindd/winbindd_async.c
+++ b/source3/winbindd/winbindd_async.c
@@ -26,7 +26,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
+bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
size_t num_sids, char **result, ssize_t *len)
{
size_t i;
@@ -48,7 +48,7 @@ bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
}
bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
- DOM_SID **sids, size_t *num_sids)
+ struct dom_sid **sids, size_t *num_sids)
{
const char *p, *q;
@@ -59,7 +59,7 @@ bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
while (p[0] != '\0') {
fstring tmp;
size_t sidlen;
- DOM_SID sid;
+ struct dom_sid sid;
q = strchr(p, '\n');
if (q == NULL) {
DEBUG(0, ("Got invalid sidstr: %s\n", p));
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index db2f3b6b8b..b92ef2fabb 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -807,7 +807,7 @@ static void centry_put_hash16(struct cache_entry *centry, const uint8 val[16])
centry->ofs += 16;
}
-static void centry_put_sid(struct cache_entry *centry, const DOM_SID *sid)
+static void centry_put_sid(struct cache_entry *centry, const struct dom_sid *sid)
{
fstring sid_string;
centry_put_string(centry, sid_to_fstring(sid_string, sid));
@@ -895,7 +895,7 @@ static void centry_end(struct cache_entry *centry, const char *format, ...)
static void wcache_save_name_to_sid(struct winbindd_domain *domain,
NTSTATUS status, const char *domain_name,
- const char *name, const DOM_SID *sid,
+ const char *name, const struct dom_sid *sid,
enum lsa_SidType type)
{
struct cache_entry *centry;
@@ -915,7 +915,7 @@ static void wcache_save_name_to_sid(struct winbindd_domain *domain,
}
static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS status,
- const DOM_SID *sid, const char *domain_name, const char *name, enum lsa_SidType type)
+ const struct dom_sid *sid, const char *domain_name, const char *name, enum lsa_SidType type)
{
struct cache_entry *centry;
fstring sid_string;
@@ -1212,7 +1212,7 @@ do_query:
return status;
}
-NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID *sid)
+NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid)
{
struct winbind_cache *cache = get_cache(domain);
TDB_DATA data;
@@ -1247,7 +1247,7 @@ NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID
NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const uint8 **cached_nt_pass,
const uint8 **cached_salt)
{
@@ -1328,7 +1328,7 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const uint8 nt_pass[NT_HASH_LEN])
{
struct cache_entry *centry;
@@ -1766,7 +1766,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
NTSTATUS status;
@@ -1875,7 +1875,7 @@ NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,
given */
static 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)
@@ -1938,7 +1938,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
static 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,
@@ -1976,7 +1976,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
have_mapped = have_unmapped = false;
for (i=0; i<num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
struct cache_entry *centry;
fstring tmp;
@@ -2049,7 +2049,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
have_mapped = have_unmapped = false;
for (i=0; i<num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
struct cache_entry *centry;
fstring tmp;
@@ -2109,7 +2109,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
*/
if (NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED)) {
for (i = 0; i < num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
const char *name = "";
const enum lsa_SidType type = SID_NAME_UNKNOWN;
NTSTATUS status = NT_STATUS_NONE_MAPPED;
@@ -2136,7 +2136,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
refresh_sequence_number(domain, false);
for (i=0; i<num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
NTSTATUS status;
if (!sid_compose(&sid, domain_sid, rids[i])) {
@@ -2222,7 +2222,7 @@ NTSTATUS wcache_query_user(struct winbindd_domain *domain,
/* Lookup user information from a rid */
static 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 *info)
{
NTSTATUS status;
@@ -2331,8 +2331,8 @@ NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
/* Lookup groups a user is a member of. */
static 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)
{
struct cache_entry *centry = NULL;
NTSTATUS status;
@@ -2482,7 +2482,7 @@ NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *num_aliases, uint32 **alias_rids)
{
struct cache_entry *centry = NULL;
@@ -2586,7 +2586,7 @@ NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
return NT_STATUS_OK;
}
- *sid_mem = talloc_array(mem_ctx, DOM_SID, *num_names);
+ *sid_mem = talloc_array(mem_ctx, struct dom_sid, *num_names);
*names = talloc_array(mem_ctx, char *, *num_names);
*name_types = talloc_array(mem_ctx, uint32, *num_names);
@@ -2615,10 +2615,10 @@ NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
static 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)
{
struct cache_entry *centry = NULL;
@@ -2967,7 +2967,7 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf,
void wcache_invalidate_samlogon(struct winbindd_domain *domain,
struct netr_SamInfo3 *info3)
{
- DOM_SID sid;
+ struct dom_sid sid;
fstring key_str, sid_string;
struct winbind_cache *cache;
@@ -3146,7 +3146,7 @@ void close_winbindd_cache(void)
}
}
-bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
char **domain_name, char **name,
enum lsa_SidType *type)
{
@@ -3165,7 +3165,7 @@ bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
bool lookup_cached_name(TALLOC_CTX *mem_ctx,
const char *domain_name,
const char *name,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
struct winbindd_domain *domain;
@@ -3190,7 +3190,7 @@ bool lookup_cached_name(TALLOC_CTX *mem_ctx,
void cache_name2sid(struct winbindd_domain *domain,
const char *domain_name, const char *name,
- enum lsa_SidType type, const DOM_SID *sid)
+ enum lsa_SidType type, const struct dom_sid *sid)
{
refresh_sequence_number(domain, false);
wcache_save_name_to_sid(domain, NT_STATUS_OK, domain_name, name,
@@ -3315,7 +3315,7 @@ static int traverse_fn_get_credlist(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DAT
return 0;
}
-NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const DOM_SID *sid)
+NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid)
{
struct winbind_cache *cache = get_cache(domain);
NTSTATUS status;
@@ -3516,7 +3516,7 @@ static int validate_ns(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
(void)centry_uint32(centry);
if (NT_STATUS_IS_OK(centry->status)) {
- DOM_SID sid;
+ struct dom_sid sid;
(void)centry_sid(centry, &sid);
}
@@ -3556,7 +3556,7 @@ static int validate_u(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
struct tdb_validation_status *state)
{
struct cache_entry *centry = create_centry_validate(keystr, dbuf, state);
- DOM_SID sid;
+ struct dom_sid sid;
if (!centry) {
return 1;
@@ -3664,7 +3664,7 @@ static int validate_ul(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
num_entries = (int32)centry_uint32(centry);
for (i=0; i< num_entries; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
(void)centry_string(centry, mem_ctx);
(void)centry_string(centry, mem_ctx);
(void)centry_string(centry, mem_ctx);
@@ -3722,7 +3722,7 @@ static int validate_ug(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
num_groups = centry_uint32(centry);
for (i=0; i< num_groups; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
centry_sid(centry, &sid);
}
@@ -3773,7 +3773,7 @@ static int validate_gm(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf,
num_names = centry_uint32(centry);
for (i=0; i< num_names; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
centry_sid(centry, &sid);
(void)centry_string(centry, mem_ctx);
(void)centry_uint32(centry);
@@ -4524,7 +4524,7 @@ void wcache_tdc_clear( void )
static void wcache_save_user_pwinfo(struct winbindd_domain *domain,
NTSTATUS status,
- const DOM_SID *user_sid,
+ const struct dom_sid *user_sid,
const char *homedir,
const char *shell,
const char *gecos,
@@ -4549,7 +4549,7 @@ static void wcache_save_user_pwinfo(struct winbindd_domain *domain,
}
NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
- const DOM_SID *user_sid,
+ const struct dom_sid *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const char **homedir, const char **shell,
diff --git a/source3/winbindd/winbindd_creds.c b/source3/winbindd/winbindd_creds.c
index 46c7a06f7c..00b38e3aae 100644
--- a/source3/winbindd/winbindd_creds.c
+++ b/source3/winbindd/winbindd_creds.c
@@ -29,7 +29,7 @@
NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
struct netr_SamInfo3 **info3,
const uint8 *cached_nt_pass[NT_HASH_LEN],
const uint8 *cred_salt[NT_HASH_LEN])
@@ -58,11 +58,11 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
const char *user,
const char *pass,
struct netr_SamInfo3 *info3,
- const DOM_SID *user_sid)
+ const struct dom_sid *user_sid)
{
NTSTATUS status;
uchar nt_pass[NT_HASH_LEN];
- DOM_SID cred_sid;
+ struct dom_sid cred_sid;
if (info3 != NULL) {
@@ -144,7 +144,7 @@ NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const char *pass)
{
return winbindd_store_creds(domain, mem_ctx, NULL, pass, NULL, sid);
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index f2e3829361..cf5ffdf325 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -196,7 +196,7 @@ static NTSTATUS append_afs_token(TALLOC_CTX *mem_ctx,
"%U", name_user);
{
- DOM_SID user_sid;
+ struct dom_sid user_sid;
fstring sidstr;
sid_compose(&user_sid, info3->base.domain_sid,
@@ -252,11 +252,11 @@ static NTSTATUS check_info3_in_group(struct netr_SamInfo3 *info3,
* or other NT_STATUS_IS_ERR(status) for other kinds of failure.
*/
{
- DOM_SID *require_membership_of_sid;
+ struct dom_sid *require_membership_of_sid;
size_t num_require_membership_of_sid;
char *req_sid;
const char *p;
- DOM_SID sid;
+ struct dom_sid sid;
size_t i;
struct nt_user_token *token;
TALLOC_CTX *frame = talloc_stackframe();
@@ -812,7 +812,7 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
NTSTATUS result = NT_STATUS_LOGON_FAILURE;
uint16 max_allowed_bad_attempts;
fstring name_domain, name_user;
- DOM_SID sid;
+ struct dom_sid sid;
enum lsa_SidType type;
uchar new_nt_pass[NT_HASH_LEN];
const uint8 *cached_nt_pass;
@@ -1590,7 +1590,7 @@ process_result:
if (NT_STATUS_IS_OK(result)) {
- DOM_SID user_sid;
+ struct dom_sid user_sid;
/* In all codepaths where result == NT_STATUS_OK info3 must have
been initialized. */
diff --git a/source3/winbindd/winbindd_passdb.c b/source3/winbindd/winbindd_passdb.c
index 023f68f1b3..6ac9a463fa 100644
--- a/source3/winbindd/winbindd_passdb.c
+++ b/source3/winbindd/winbindd_passdb.c
@@ -91,7 +91,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
const char *fullname;
@@ -127,7 +127,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
*/
static 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)
@@ -162,7 +162,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
uint32 *rids,
size_t num_rids,
char **domain_name,
@@ -205,7 +205,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
have_mapped = have_unmapped = false;
for (i=0; i<num_rids; i++) {
- DOM_SID lsid;
+ struct dom_sid lsid;
const char *dom = NULL, *nam = NULL;
enum lsa_SidType type = SID_NAME_UNKNOWN;
@@ -243,11 +243,11 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
/* Lookup groups a user is a member of. I wish Unix had a call like this! */
static 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)
{
NTSTATUS result;
- DOM_SID *groups = NULL;
+ struct dom_sid *groups = NULL;
gid_t *gids = NULL;
size_t ngroups = 0;
struct samu *user;
@@ -273,7 +273,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *p_num_aliases, uint32 **rids)
{
NTSTATUS result;
@@ -390,7 +390,7 @@ static NTSTATUS builtin_query_user_list(struct winbindd_domain *domain,
/* Lookup user information from a rid or username. */
static NTSTATUS builtin_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)
{
return NT_STATUS_NO_SUCH_USER;
@@ -477,7 +477,7 @@ static NTSTATUS sam_query_user_list(struct winbindd_domain *domain,
/* Lookup user information from a rid or username. */
static NTSTATUS sam_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)
{
struct samu *sampass = NULL;
@@ -531,15 +531,15 @@ static NTSTATUS sam_query_user(struct winbindd_domain *domain,
/* Lookup group membership given a rid. */
static NTSTATUS sam_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)
{
size_t i, num_members, num_mapped;
NTSTATUS result;
- const DOM_SID **sids;
+ const struct dom_sid **sids;
struct lsa_dom_info *lsa_domains;
struct lsa_name_info *lsa_names;
TALLOC_CTX *tmp_ctx;
@@ -594,7 +594,7 @@ static NTSTATUS sam_lookup_groupmem(struct winbindd_domain *domain,
*names = TALLOC_ARRAY(mem_ctx, char *, num_members);
*name_types = TALLOC_ARRAY(mem_ctx, uint32, num_members);
- sids = TALLOC_ARRAY(tmp_ctx, const DOM_SID *, num_members);
+ sids = TALLOC_ARRAY(tmp_ctx, const struct dom_sid *, num_members);
if (((*names) == NULL) || ((*name_types) == NULL) || (sids == NULL)) {
TALLOC_FREE(tmp_ctx);
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 41e96b87b7..6a6490f9f7 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -26,16 +26,16 @@
/* The following definitions come from auth/token_util.c */
-bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token );
+bool nt_token_check_sid ( const struct dom_sid *sid, const NT_USER_TOKEN *token );
bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid );
NT_USER_TOKEN *get_root_nt_token( void );
-NTSTATUS add_aliases(const DOM_SID *domain_sid,
+NTSTATUS add_aliases(const struct dom_sid *domain_sid,
struct nt_user_token *token);
struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
+ const struct dom_sid *user_sid,
bool is_guest,
int num_groupsids,
- const DOM_SID *groupsids);
+ const struct dom_sid *groupsids);
void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
int n_groups, gid_t *groups);
@@ -76,24 +76,24 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
/* The following definitions come from winbindd/winbindd_async.c */
-bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
+bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
size_t num_sids, char **result, ssize_t *len);
bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
- DOM_SID **sids, size_t *num_sids);
+ struct dom_sid **sids, size_t *num_sids);
/* The following definitions come from winbindd/winbindd_cache.c */
void winbindd_check_cache_size(time_t t);
struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
-NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID *sid);
+NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const uint8 **cached_nt_pass,
const uint8 **cached_salt);
NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const uint8 nt_pass[NT_HASH_LEN]);
void wcache_invalidate_samlogon(struct winbindd_domain *domain,
struct netr_SamInfo3 *info3);
@@ -114,17 +114,17 @@ NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
uint32_t *num_names,
struct dom_sid **sid_mem, char ***names,
uint32_t **name_types);
-bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
char **domain_name, char **name,
enum lsa_SidType *type);
bool lookup_cached_name(TALLOC_CTX *mem_ctx,
const char *domain_name,
const char *name,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type);
void cache_name2sid(struct winbindd_domain *domain,
const char *domain_name, const char *name,
- enum lsa_SidType type, const DOM_SID *sid);
+ enum lsa_SidType type, const struct dom_sid *sid);
NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
@@ -136,7 +136,7 @@ NTSTATUS wcache_query_user(struct winbindd_domain *domain,
struct wbint_userinfo *info);
NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *pnum_aliases, uint32 **paliases);
NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
@@ -146,7 +146,7 @@ NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
void wcache_flush_cache(void);
NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
-NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const DOM_SID *sid) ;
+NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
bool set_global_winbindd_state_offline(void);
void set_global_winbindd_state_online(void);
bool get_global_winbindd_state_offline(void);
@@ -158,7 +158,7 @@ bool wcache_tdc_add_domain( struct winbindd_domain *domain );
struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
void wcache_tdc_clear( void );
NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
- const DOM_SID *user_sid,
+ const struct dom_sid *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const char **homedir, const char **shell,
@@ -230,7 +230,7 @@ NTSTATUS winbindd_replace_memory_creds(const char *username,
NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
struct netr_SamInfo3 **info3,
const uint8 *cached_nt_pass[NT_HASH_LEN],
const uint8 *cred_salt[NT_HASH_LEN]);
@@ -239,7 +239,7 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
const char *user,
const char *pass,
struct netr_SamInfo3 *info3,
- const DOM_SID *user_sid);
+ const struct dom_sid *user_sid);
NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const char *user,
@@ -247,7 +247,7 @@ NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
struct netr_SamInfo3 *info3);
NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
const char *pass);
NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
@@ -397,15 +397,15 @@ void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
bool init_domain_list(void);
-void check_domain_trusted( const char *name, const DOM_SID *user_sid );
+void check_domain_trusted( const char *name, const struct dom_sid *user_sid );
struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
struct winbindd_domain *find_domain_from_name(const char *domain_name);
-struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid);
-struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid);
+struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
+struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
struct winbindd_domain *find_our_domain(void);
struct winbindd_domain *find_root_domain(void);
struct winbindd_domain *find_builtin_domain(void);
-struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid);
+struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
bool parse_domain_user(const char *domuser, fstring domain, fstring user);
bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
@@ -428,8 +428,8 @@ void winbindd_kill_all_clients(void);
int winbindd_num_clients(void);
NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
- uint32 *p_num_groups, DOM_SID **user_sids);
+ const struct dom_sid *user_sid,
+ uint32 *p_num_groups, struct dom_sid **user_sids);
NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
diff --git a/source3/winbindd/winbindd_reconnect.c b/source3/winbindd/winbindd_reconnect.c
index 28fbcb954d..d04c1bf61f 100644
--- a/source3/winbindd/winbindd_reconnect.c
+++ b/source3/winbindd/winbindd_reconnect.c
@@ -131,7 +131,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
NTSTATUS result;
@@ -152,7 +152,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
*/
static 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)
@@ -171,7 +171,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
uint32 *rids,
size_t num_rids,
char **domain_name,
@@ -196,7 +196,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
/* Lookup user information from a rid or username. */
static 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)
{
NTSTATUS result;
@@ -214,8 +214,8 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
/* Lookup groups a user is a member of. I wish Unix had a call like this! */
static 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)
{
NTSTATUS result;
@@ -233,7 +233,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *num_aliases, uint32 **alias_rids)
{
NTSTATUS result;
@@ -255,10 +255,10 @@ static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
/* Lookup group membership given a rid. */
static 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)
{
NTSTATUS result;
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 0111191d83..1515cfa6e3 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -280,11 +280,11 @@ static NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
uint32_t flags,
- DOM_SID *sid,
+ struct dom_sid *sid,
enum lsa_SidType *type)
{
NTSTATUS result;
- DOM_SID *sids = NULL;
+ struct dom_sid *sids = NULL;
enum lsa_SidType *types = NULL;
char *full_name = NULL;
NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
@@ -337,7 +337,7 @@ static NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain,
*/
static NTSTATUS msrpc_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)
@@ -386,7 +386,7 @@ static NTSTATUS msrpc_sid_to_name(struct winbindd_domain *domain,
static NTSTATUS msrpc_rids_to_names(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
uint32 *rids,
size_t num_rids,
char **domain_name,
@@ -395,14 +395,14 @@ static NTSTATUS msrpc_rids_to_names(struct winbindd_domain *domain,
{
char **domains;
NTSTATUS result;
- DOM_SID *sids;
+ struct dom_sid *sids;
size_t i;
char **ret_names;
DEBUG(3, ("rids_to_names [rpc] for domain %s\n", domain->name ));
if (num_rids) {
- sids = TALLOC_ARRAY(mem_ctx, DOM_SID, num_rids);
+ sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, num_rids);
if (sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -455,7 +455,7 @@ static NTSTATUS msrpc_rids_to_names(struct winbindd_domain *domain,
/* Lookup user information from a rid or username. */
static 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)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
@@ -546,8 +546,8 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
/* Lookup groups a user is a member of. I wish Unix had a call like this! */
static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
- uint32 *num_groups, DOM_SID **user_grpsids)
+ const struct dom_sid *user_sid,
+ uint32 *num_groups, struct dom_sid **user_grpsids)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
struct policy_handle dom_pol, user_pol;
@@ -609,7 +609,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
if (!NT_STATUS_IS_OK(result) || (*num_groups) == 0)
return result;
- (*user_grpsids) = TALLOC_ARRAY(mem_ctx, DOM_SID, *num_groups);
+ (*user_grpsids) = TALLOC_ARRAY(mem_ctx, struct dom_sid, *num_groups);
if (!(*user_grpsids))
return NT_STATUS_NO_MEMORY;
@@ -625,7 +625,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
static NTSTATUS msrpc_lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- uint32 num_sids, const DOM_SID *sids,
+ uint32 num_sids, const struct dom_sid *sids,
uint32 *num_aliases,
uint32 **alias_rids)
{
@@ -724,10 +724,10 @@ static NTSTATUS msrpc_lookup_useraliases(struct winbindd_domain *domain,
/* Lookup group membership given a rid. */
static 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)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
@@ -807,7 +807,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
*names = TALLOC_ZERO_ARRAY(mem_ctx, char *, *num_names);
*name_types = TALLOC_ZERO_ARRAY(mem_ctx, uint32, *num_names);
- *sid_mem = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, *num_names);
+ *sid_mem = TALLOC_ZERO_ARRAY(mem_ctx, struct dom_sid, *num_names);
for (j=0;j<(*num_names);j++)
sid_compose(&(*sid_mem)[j], &domain->sid, rid_mem[j]);
@@ -1183,7 +1183,7 @@ typedef NTSTATUS (*lookup_sids_fn_t)(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *pol,
int num_sids,
- const DOM_SID *sids,
+ const struct dom_sid *sids,
char ***pdomains,
char ***pnames,
enum lsa_SidType **ptypes);
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index eb471e8d13..c808d2df37 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -71,7 +71,7 @@ static void free_domain_list(void)
}
}
-static bool is_internal_domain(const DOM_SID *sid)
+static bool is_internal_domain(const struct dom_sid *sid)
{
if (sid == NULL)
return False;
@@ -79,7 +79,7 @@ static bool is_internal_domain(const DOM_SID *sid)
return (sid_check_is_domain(sid) || sid_check_is_builtin(sid));
}
-static bool is_in_internal_domain(const DOM_SID *sid)
+static bool is_in_internal_domain(const struct dom_sid *sid)
{
if (sid == NULL)
return False;
@@ -91,7 +91,7 @@ static bool is_in_internal_domain(const DOM_SID *sid)
/* Add a trusted domain to our list of domains */
static struct winbindd_domain *add_trusted_domain(const char *domain_name, const char *alt_name,
struct winbindd_methods *methods,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct winbindd_domain *domain;
const char *alternative_name = NULL;
@@ -289,7 +289,7 @@ static void trustdom_list_done(struct tevent_req *req)
while ((p != NULL) && (*p != '\0')) {
char *q, *sidstr, *alt_name;
- DOM_SID sid;
+ struct dom_sid sid;
struct winbindd_domain *domain;
char *alternate_name = NULL;
@@ -618,7 +618,7 @@ bool init_domain_list(void)
/* Add ourselves as the first entry. */
if ( role == ROLE_DOMAIN_MEMBER ) {
- DOM_SID our_sid;
+ struct dom_sid our_sid;
if (!secrets_fetch_domain_sid(lp_workgroup(), &our_sid)) {
DEBUG(0, ("Could not fetch our SID - did we join?\n"));
@@ -644,10 +644,10 @@ bool init_domain_list(void)
return True;
}
-void check_domain_trusted( const char *name, const DOM_SID *user_sid )
+void check_domain_trusted( const char *name, const struct dom_sid *user_sid )
{
struct winbindd_domain *domain;
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
/* Check if we even care */
@@ -735,7 +735,7 @@ struct winbindd_domain *find_domain_from_name(const char *domain_name)
/* Given a domain sid, return the struct winbindd domain info for it */
-struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid)
+struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid)
{
struct winbindd_domain *domain;
@@ -753,7 +753,7 @@ struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid)
/* Given a domain sid, return the struct winbindd domain info for it */
-struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid)
+struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid)
{
struct winbindd_domain *domain;
@@ -808,7 +808,7 @@ struct winbindd_domain *find_builtin_domain(void)
/* Find the appropriate domain to lookup a name or SID */
-struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid)
+struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid)
{
/* SIDs in the S-1-22-{1,2} domain should be handled by our passdb */
@@ -1127,8 +1127,8 @@ int winbindd_num_clients(void)
NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- const DOM_SID *user_sid,
- uint32 *p_num_groups, DOM_SID **user_sids)
+ const struct dom_sid *user_sid,
+ uint32 *p_num_groups, struct dom_sid **user_sids)
{
struct netr_SamInfo3 *info3 = NULL;
NTSTATUS status = NT_STATUS_NO_MEMORY;