mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Change all uint32/16/8 to 32_t/16_t/8_t in winbindd.
Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
2224796fc3
commit
57303c30b2
@ -672,7 +672,7 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
|
||||
const char **homedir,
|
||||
const char **shell,
|
||||
const char **gecos,
|
||||
uint32 *gid )
|
||||
uint32_t *gid )
|
||||
{
|
||||
const char *attrs[] = {NULL, /* attr_homedir */
|
||||
NULL, /* attr_shell */
|
||||
@ -743,7 +743,7 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
|
||||
|
||||
if (gid) {
|
||||
if (!ads_pull_uint32(ctx->ads, msg_internal, ctx->ad_schema->posix_gidnumber_attr, gid))
|
||||
*gid = (uint32)-1;
|
||||
*gid = (uint32_t)-1;
|
||||
}
|
||||
|
||||
nt_status = NT_STATUS_OK;
|
||||
|
@ -151,7 +151,7 @@ static NTSTATUS idmap_rfc2307_ldap_search(struct idmap_rfc2307_context *ctx,
|
||||
}
|
||||
|
||||
static bool idmap_rfc2307_get_uint32(LDAP *ldap, LDAPMessage *entry,
|
||||
const char *field, uint32 *value)
|
||||
const char *field, uint32_t *value)
|
||||
{
|
||||
bool b;
|
||||
char str[20];
|
||||
|
@ -62,7 +62,7 @@ static int convert_fn(struct db_record *rec, void *private_data)
|
||||
char *p;
|
||||
NTSTATUS status;
|
||||
struct dom_sid sid;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
fstring keystr;
|
||||
fstring dom_name;
|
||||
TDB_DATA key;
|
||||
|
@ -59,7 +59,7 @@ struct idmap_tdb2_context {
|
||||
static NTSTATUS idmap_tdb2_init_hwm(struct idmap_domain *dom)
|
||||
{
|
||||
NTSTATUS status;
|
||||
uint32 low_id;
|
||||
uint32_t low_id;
|
||||
struct idmap_tdb_common_context *ctx;
|
||||
|
||||
ctx = talloc_get_type(dom->private_data,
|
||||
|
@ -152,9 +152,9 @@ struct winbindd_domain {
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 ? */
|
||||
@ -193,7 +193,7 @@ struct winbindd_domain {
|
||||
/* Sequence number stuff */
|
||||
|
||||
time_t last_seq_check;
|
||||
uint32 sequence_number;
|
||||
uint32_t sequence_number;
|
||||
NTSTATUS last_status;
|
||||
|
||||
/* The smb connection */
|
||||
@ -206,7 +206,7 @@ struct winbindd_domain {
|
||||
|
||||
/* Callback we use to try put us back online. */
|
||||
|
||||
uint32 check_online_timeout;
|
||||
uint32_t check_online_timeout;
|
||||
struct tevent_timer *check_online_event;
|
||||
|
||||
/* Linked list info */
|
||||
@ -230,19 +230,19 @@ struct winbindd_methods {
|
||||
/* 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 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wbint_userinfo **info);
|
||||
|
||||
/* get a list of domain groups */
|
||||
NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info);
|
||||
|
||||
/* get a list of domain local groups */
|
||||
NTSTATUS (*enum_local_groups)(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info);
|
||||
|
||||
/* convert one user or group name to a sid */
|
||||
@ -265,7 +265,7 @@ struct winbindd_methods {
|
||||
NTSTATUS (*rids_to_names)(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **domain_name,
|
||||
char ***names,
|
||||
@ -283,28 +283,28 @@ struct winbindd_methods {
|
||||
NTSTATUS (*lookup_usergroups)(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *user_sid,
|
||||
uint32 *num_groups, struct dom_sid **user_gids);
|
||||
uint32_t *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,
|
||||
uint32_t num_sids,
|
||||
const struct dom_sid *sids,
|
||||
uint32 *num_aliases,
|
||||
uint32 **alias_rids);
|
||||
uint32_t *num_aliases,
|
||||
uint32_t **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 struct dom_sid *group_sid,
|
||||
enum lsa_SidType type,
|
||||
uint32 *num_names,
|
||||
uint32_t *num_names,
|
||||
struct dom_sid **sid_mem, char ***names,
|
||||
uint32 **name_types);
|
||||
uint32_t **name_types);
|
||||
|
||||
/* return the current global sequence number */
|
||||
NTSTATUS (*sequence_number)(struct winbindd_domain *domain, uint32 *seq);
|
||||
NTSTATUS (*sequence_number)(struct winbindd_domain *domain, uint32_t *seq);
|
||||
|
||||
/* return the lockout policy */
|
||||
NTSTATUS (*lockout_policy)(struct winbindd_domain *domain,
|
||||
@ -345,9 +345,9 @@ struct winbindd_tdc_domain {
|
||||
const char *domain_name;
|
||||
const char *dns_name;
|
||||
struct dom_sid sid;
|
||||
uint32 trust_flags;
|
||||
uint32 trust_attribs;
|
||||
uint32 trust_type;
|
||||
uint32_t trust_flags;
|
||||
uint32_t trust_attribs;
|
||||
uint32_t trust_type;
|
||||
};
|
||||
|
||||
/* Switch for listing users or groups */
|
||||
|
@ -57,8 +57,8 @@ static void ads_cached_connection_reuse(ADS_STRUCT **adsp)
|
||||
expire = MIN(ads->auth.tgt_expire, ads->auth.tgs_expire);
|
||||
|
||||
DEBUG(7, ("Current tickets expire in %d seconds (at %d, time "
|
||||
"is now %d)\n", (uint32)expire - (uint32)now,
|
||||
(uint32) expire, (uint32) now));
|
||||
"is now %d)\n", (uint32_t)expire - (uint32_t)now,
|
||||
(uint32_t) expire, (uint32_t) now));
|
||||
|
||||
if ( ads->config.realm && (expire > now)) {
|
||||
return;
|
||||
@ -286,7 +286,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
|
||||
/* Query display info for a realm. This is the basic user list fn */
|
||||
static NTSTATUS query_user_list(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wbint_userinfo **pinfo)
|
||||
{
|
||||
ADS_STRUCT *ads = NULL;
|
||||
@ -340,8 +340,8 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
|
||||
|
||||
for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
|
||||
struct wbint_userinfo *info = &((*pinfo)[count]);
|
||||
uint32 group;
|
||||
uint32 atype;
|
||||
uint32_t group;
|
||||
uint32_t atype;
|
||||
|
||||
if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) ||
|
||||
ds_atype_map(atype) != SID_NAME_USER) {
|
||||
@ -410,7 +410,7 @@ done:
|
||||
/* list all domain groups */
|
||||
static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
ADS_STRUCT *ads = NULL;
|
||||
@ -500,7 +500,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;
|
||||
struct dom_sid sid;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
|
||||
name = ads_pull_username(ads, mem_ctx, msg);
|
||||
gecos = ads_pull_string(ads, mem_ctx, msg, "name");
|
||||
@ -536,7 +536,7 @@ done:
|
||||
/* list all domain local groups */
|
||||
static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
/*
|
||||
@ -584,7 +584,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
|
||||
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **domain_name,
|
||||
char ***names,
|
||||
@ -613,7 +613,7 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
|
||||
LDAPMessage *msg = NULL;
|
||||
char *ldap_exp;
|
||||
char *sidstr;
|
||||
uint32 group_rid;
|
||||
uint32_t group_rid;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
struct netr_SamInfo3 *user = NULL;
|
||||
gid_t gid = -1;
|
||||
@ -989,7 +989,7 @@ done:
|
||||
static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *sid,
|
||||
uint32 *p_num_groups, struct dom_sid **user_sids)
|
||||
uint32_t *p_num_groups, struct dom_sid **user_sids)
|
||||
{
|
||||
ADS_STRUCT *ads = NULL;
|
||||
const char *attrs[] = {"tokenGroups", "primaryGroupID", NULL};
|
||||
@ -1000,7 +1000,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
struct dom_sid *sids;
|
||||
int i;
|
||||
struct dom_sid primary_group;
|
||||
uint32 primary_group_rid;
|
||||
uint32_t primary_group_rid;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
uint32_t num_groups = 0;
|
||||
|
||||
@ -1125,7 +1125,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
}
|
||||
}
|
||||
|
||||
*p_num_groups = (uint32)num_groups;
|
||||
*p_num_groups = (uint32_t)num_groups;
|
||||
status = (*user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
||||
|
||||
DEBUG(3,("ads lookup_usergroups (tokenGroups) succeeded for sid=%s\n",
|
||||
@ -1139,8 +1139,8 @@ 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 struct dom_sid *sids,
|
||||
uint32 *num_aliases, uint32 **alias_rids)
|
||||
uint32_t num_sids, const struct dom_sid *sids,
|
||||
uint32_t *num_aliases, uint32_t **alias_rids)
|
||||
{
|
||||
return reconnect_methods.lookup_useraliases(domain, mem_ctx,
|
||||
num_sids, sids,
|
||||
@ -1155,9 +1155,9 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *group_sid,
|
||||
enum lsa_SidType type,
|
||||
uint32 *num_names,
|
||||
uint32_t *num_names,
|
||||
struct dom_sid **sid_mem, char ***names,
|
||||
uint32 **name_types)
|
||||
uint32_t **name_types)
|
||||
{
|
||||
ADS_STATUS rc;
|
||||
ADS_STRUCT *ads = NULL;
|
||||
@ -1172,7 +1172,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
|
||||
char **names_nocache = NULL;
|
||||
enum lsa_SidType *name_types_nocache = NULL;
|
||||
char **domains_nocache = NULL; /* only needed for rpccli_lsa_lookup_sids */
|
||||
uint32 num_nocache = 0;
|
||||
uint32_t num_nocache = 0;
|
||||
TALLOC_CTX *tmp_ctx = NULL;
|
||||
|
||||
DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name,
|
||||
@ -1384,7 +1384,7 @@ done:
|
||||
}
|
||||
|
||||
/* find the sequence number for a domain */
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32_t *seq)
|
||||
{
|
||||
ADS_STRUCT *ads = NULL;
|
||||
ADS_STATUS rc;
|
||||
|
@ -99,10 +99,10 @@ struct winbind_cache {
|
||||
|
||||
struct cache_entry {
|
||||
NTSTATUS status;
|
||||
uint32 sequence_number;
|
||||
uint32_t sequence_number;
|
||||
uint64_t timeout;
|
||||
uint8 *data;
|
||||
uint32 len, ofs;
|
||||
uint8_t *data;
|
||||
uint32_t len, ofs;
|
||||
};
|
||||
|
||||
void (*smb_panic_fn)(const char *const why) = smb_panic;
|
||||
@ -228,11 +228,11 @@ static uint64_t centry_uint64_t(struct cache_entry *centry)
|
||||
}
|
||||
|
||||
/*
|
||||
pull a uint32 from a cache entry
|
||||
pull a uint32_t from a cache entry
|
||||
*/
|
||||
static uint32 centry_uint32(struct cache_entry *centry)
|
||||
static uint32_t centry_uint32(struct cache_entry *centry)
|
||||
{
|
||||
uint32 ret;
|
||||
uint32_t ret;
|
||||
|
||||
if (!centry_check_bytes(centry, 4)) {
|
||||
smb_panic_fn("centry_uint32");
|
||||
@ -243,11 +243,11 @@ static uint32 centry_uint32(struct cache_entry *centry)
|
||||
}
|
||||
|
||||
/*
|
||||
pull a uint16 from a cache entry
|
||||
pull a uint16_t from a cache entry
|
||||
*/
|
||||
static uint16 centry_uint16(struct cache_entry *centry)
|
||||
static uint16_t centry_uint16(struct cache_entry *centry)
|
||||
{
|
||||
uint16 ret;
|
||||
uint16_t ret;
|
||||
if (!centry_check_bytes(centry, 2)) {
|
||||
smb_panic_fn("centry_uint16");
|
||||
}
|
||||
@ -257,11 +257,11 @@ static uint16 centry_uint16(struct cache_entry *centry)
|
||||
}
|
||||
|
||||
/*
|
||||
pull a uint8 from a cache entry
|
||||
pull a uint8_t from a cache entry
|
||||
*/
|
||||
static uint8 centry_uint8(struct cache_entry *centry)
|
||||
static uint8_t centry_uint8(struct cache_entry *centry)
|
||||
{
|
||||
uint8 ret;
|
||||
uint8_t ret;
|
||||
if (!centry_check_bytes(centry, 1)) {
|
||||
smb_panic_fn("centry_uint8");
|
||||
}
|
||||
@ -299,7 +299,7 @@ static time_t centry_time(struct cache_entry *centry)
|
||||
*/
|
||||
static char *centry_string(struct cache_entry *centry, TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
uint32 len;
|
||||
uint32_t len;
|
||||
char *ret;
|
||||
|
||||
len = centry_uint8(centry);
|
||||
@ -328,7 +328,7 @@ static char *centry_string(struct cache_entry *centry, TALLOC_CTX *mem_ctx)
|
||||
*/
|
||||
static char *centry_hash16(struct cache_entry *centry, TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
uint32 len;
|
||||
uint32_t len;
|
||||
char *ret;
|
||||
|
||||
len = centry_uint8(centry);
|
||||
@ -444,7 +444,7 @@ static bool wcache_fetch_seqnum(const char *domain_name, uint32_t *seqnum,
|
||||
|
||||
static NTSTATUS fetch_cache_seqnum( struct winbindd_domain *domain, time_t now )
|
||||
{
|
||||
uint32 last_check, time_diff;
|
||||
uint32_t last_check, time_diff;
|
||||
|
||||
if (!wcache_fetch_seqnum(domain->name, &domain->sequence_number,
|
||||
&last_check)) {
|
||||
@ -458,13 +458,13 @@ static NTSTATUS fetch_cache_seqnum( struct winbindd_domain *domain, time_t now )
|
||||
if ( time_diff > lp_winbind_cache_time() ) {
|
||||
DEBUG(10,("fetch_cache_seqnum: timeout [%s][%u @ %u]\n",
|
||||
domain->name, domain->sequence_number,
|
||||
(uint32)domain->last_seq_check));
|
||||
(uint32_t)domain->last_seq_check));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
DEBUG(10,("fetch_cache_seqnum: success [%s][%u @ %u]\n",
|
||||
domain->name, domain->sequence_number,
|
||||
(uint32)domain->last_seq_check));
|
||||
(uint32_t)domain->last_seq_check));
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
@ -759,7 +759,7 @@ static void wcache_delete(const char *format, ...)
|
||||
/*
|
||||
make sure we have at least len bytes available in a centry
|
||||
*/
|
||||
static void centry_expand(struct cache_entry *centry, uint32 len)
|
||||
static void centry_expand(struct cache_entry *centry, uint32_t len)
|
||||
{
|
||||
if (centry->len - centry->ofs >= len)
|
||||
return;
|
||||
@ -783,9 +783,9 @@ static void centry_put_uint64_t(struct cache_entry *centry, uint64_t v)
|
||||
}
|
||||
|
||||
/*
|
||||
push a uint32 into a centry
|
||||
push a uint32_t into a centry
|
||||
*/
|
||||
static void centry_put_uint32(struct cache_entry *centry, uint32 v)
|
||||
static void centry_put_uint32(struct cache_entry *centry, uint32_t v)
|
||||
{
|
||||
centry_expand(centry, 4);
|
||||
SIVAL(centry->data, centry->ofs, v);
|
||||
@ -793,9 +793,9 @@ static void centry_put_uint32(struct cache_entry *centry, uint32 v)
|
||||
}
|
||||
|
||||
/*
|
||||
push a uint16 into a centry
|
||||
push a uint16_t into a centry
|
||||
*/
|
||||
static void centry_put_uint16(struct cache_entry *centry, uint16 v)
|
||||
static void centry_put_uint16(struct cache_entry *centry, uint16_t v)
|
||||
{
|
||||
centry_expand(centry, 2);
|
||||
SSVAL(centry->data, centry->ofs, v);
|
||||
@ -803,9 +803,9 @@ static void centry_put_uint16(struct cache_entry *centry, uint16 v)
|
||||
}
|
||||
|
||||
/*
|
||||
push a uint8 into a centry
|
||||
push a uint8_t into a centry
|
||||
*/
|
||||
static void centry_put_uint8(struct cache_entry *centry, uint8 v)
|
||||
static void centry_put_uint8(struct cache_entry *centry, uint8_t v)
|
||||
{
|
||||
centry_expand(centry, 1);
|
||||
SCVAL(centry->data, centry->ofs, v);
|
||||
@ -840,7 +840,7 @@ static void centry_put_string(struct cache_entry *centry, const char *s)
|
||||
/*
|
||||
push a 16 byte hash into a centry - treat as 16 byte string.
|
||||
*/
|
||||
static void centry_put_hash16(struct cache_entry *centry, const uint8 val[16])
|
||||
static void centry_put_hash16(struct cache_entry *centry, const uint8_t val[16])
|
||||
{
|
||||
centry_put_uint8(centry, 16);
|
||||
centry_expand(centry, 16);
|
||||
@ -860,7 +860,7 @@ static void centry_put_sid(struct cache_entry *centry, const struct dom_sid *sid
|
||||
*/
|
||||
static void centry_put_ntstatus(struct cache_entry *centry, NTSTATUS status)
|
||||
{
|
||||
uint32 status_value = NT_STATUS_V(status);
|
||||
uint32_t status_value = NT_STATUS_V(status);
|
||||
centry_put_uint32(centry, status_value);
|
||||
}
|
||||
|
||||
@ -1288,7 +1288,7 @@ NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct
|
||||
struct winbind_cache *cache = get_cache(domain);
|
||||
TDB_DATA data;
|
||||
fstring key_str, tmp;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
|
||||
if (!cache->tdb) {
|
||||
return NT_STATUS_INTERNAL_DB_ERROR;
|
||||
@ -1319,13 +1319,13 @@ NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct
|
||||
NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *sid,
|
||||
const uint8 **cached_nt_pass,
|
||||
const uint8 **cached_salt)
|
||||
const uint8_t **cached_nt_pass,
|
||||
const uint8_t **cached_salt)
|
||||
{
|
||||
struct winbind_cache *cache = get_cache(domain);
|
||||
struct cache_entry *centry = NULL;
|
||||
NTSTATUS status;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
fstring tmp;
|
||||
|
||||
if (!cache->tdb) {
|
||||
@ -1363,7 +1363,7 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
|
||||
sort this out. It can tell as we only return the cached_salt
|
||||
if we are returning a salted cred. */
|
||||
|
||||
*cached_nt_pass = (const uint8 *)centry_hash16(centry, mem_ctx);
|
||||
*cached_nt_pass = (const uint8_t *)centry_hash16(centry, mem_ctx);
|
||||
if (*cached_nt_pass == NULL) {
|
||||
fstring sidstr;
|
||||
|
||||
@ -1380,7 +1380,7 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
|
||||
|
||||
/* We only have 17 bytes more data in the salted cred case. */
|
||||
if (centry->len - centry->ofs == 17) {
|
||||
*cached_salt = (const uint8 *)centry_hash16(centry, mem_ctx);
|
||||
*cached_salt = (const uint8_t *)centry_hash16(centry, mem_ctx);
|
||||
} else {
|
||||
*cached_salt = NULL;
|
||||
}
|
||||
@ -1403,13 +1403,13 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
|
||||
|
||||
NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
|
||||
const struct dom_sid *sid,
|
||||
const uint8 nt_pass[NT_HASH_LEN])
|
||||
const uint8_t nt_pass[NT_HASH_LEN])
|
||||
{
|
||||
struct cache_entry *centry;
|
||||
fstring sid_string;
|
||||
uint32 rid;
|
||||
uint8 cred_salt[NT_HASH_LEN];
|
||||
uint8 salted_hash[NT_HASH_LEN];
|
||||
uint32_t rid;
|
||||
uint8_t cred_salt[NT_HASH_LEN];
|
||||
uint8_t salted_hash[NT_HASH_LEN];
|
||||
|
||||
if (is_null_sid(sid)) {
|
||||
return NT_STATUS_INVALID_SID;
|
||||
@ -1447,7 +1447,7 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
|
||||
/* Query display info. This is the basic user list fn */
|
||||
static NTSTATUS query_user_list(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wbint_userinfo **info)
|
||||
{
|
||||
struct winbind_cache *cache = get_cache(domain);
|
||||
@ -1598,7 +1598,7 @@ skip_save:
|
||||
/* list all domain groups */
|
||||
static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
struct winbind_cache *cache = get_cache(domain);
|
||||
@ -1693,7 +1693,7 @@ skip_save:
|
||||
/* list all domain groups */
|
||||
static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
struct winbind_cache *cache = get_cache(domain);
|
||||
@ -2019,7 +2019,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
|
||||
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **domain_name,
|
||||
char ***names,
|
||||
@ -2462,7 +2462,7 @@ NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
|
||||
static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *user_sid,
|
||||
uint32 *num_groups, struct dom_sid **user_gids)
|
||||
uint32_t *num_groups, struct dom_sid **user_gids)
|
||||
{
|
||||
struct cache_entry *centry = NULL;
|
||||
NTSTATUS status;
|
||||
@ -2612,8 +2612,8 @@ NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
|
||||
|
||||
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 num_sids, const struct dom_sid *sids,
|
||||
uint32 *num_aliases, uint32 **alias_rids)
|
||||
uint32_t num_sids, const struct dom_sid *sids,
|
||||
uint32_t *num_aliases, uint32_t **alias_rids)
|
||||
{
|
||||
struct cache_entry *centry = NULL;
|
||||
NTSTATUS status;
|
||||
@ -2747,9 +2747,9 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *group_sid,
|
||||
enum lsa_SidType type,
|
||||
uint32 *num_names,
|
||||
uint32_t *num_names,
|
||||
struct dom_sid **sid_mem, char ***names,
|
||||
uint32 **name_types)
|
||||
uint32_t **name_types)
|
||||
{
|
||||
struct cache_entry *centry = NULL;
|
||||
NTSTATUS status;
|
||||
@ -2818,7 +2818,7 @@ skip_save:
|
||||
}
|
||||
|
||||
/* find the sequence number for a domain */
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32_t *seq)
|
||||
{
|
||||
refresh_sequence_number(domain, false);
|
||||
|
||||
@ -3224,7 +3224,7 @@ bool init_wcache(void)
|
||||
bool initialize_winbindd_cache(void)
|
||||
{
|
||||
bool cache_bad = true;
|
||||
uint32 vers;
|
||||
uint32_t vers;
|
||||
|
||||
if (!init_wcache()) {
|
||||
DEBUG(0,("initialize_winbindd_cache: init_wcache failed.\n"));
|
||||
@ -4182,9 +4182,9 @@ static int cache_traverse_validate_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_D
|
||||
}
|
||||
|
||||
DEBUG(0,("cache_traverse_validate_fn: unknown cache entry\nkey :\n"));
|
||||
dump_data(0, (uint8 *)kbuf.dptr, kbuf.dsize);
|
||||
dump_data(0, (uint8_t *)kbuf.dptr, kbuf.dsize);
|
||||
DEBUG(0,("data :\n"));
|
||||
dump_data(0, (uint8 *)dbuf.dptr, dbuf.dsize);
|
||||
dump_data(0, (uint8_t *)dbuf.dptr, dbuf.dsize);
|
||||
v_state->unknown_key = true;
|
||||
v_state->success = false;
|
||||
return 1; /* terminate. */
|
||||
@ -4554,7 +4554,7 @@ static size_t unpack_tdc_domains( unsigned char *buf, int buflen,
|
||||
struct winbindd_tdc_domain **domains )
|
||||
{
|
||||
fstring domain_name, dns_name, sid_string;
|
||||
uint32 type, attribs, flags;
|
||||
uint32_t type, attribs, flags;
|
||||
int num_domains;
|
||||
int len = 0;
|
||||
int i;
|
||||
@ -4860,7 +4860,7 @@ static void wcache_save_user_pwinfo(struct winbindd_domain *domain,
|
||||
const char *homedir,
|
||||
const char *shell,
|
||||
const char *gecos,
|
||||
uint32 gid)
|
||||
uint32_t gid)
|
||||
{
|
||||
struct cache_entry *centry;
|
||||
fstring tmp;
|
||||
|
@ -185,7 +185,7 @@ void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state)
|
||||
NTSTATUS result = NT_STATUS_NOT_SUPPORTED;
|
||||
struct WINBINDD_MEMORY_CREDS *entry;
|
||||
DATA_BLOB initial, challenge, auth;
|
||||
uint32 initial_blob_len, challenge_blob_len, extra_len;
|
||||
uint32_t initial_blob_len, challenge_blob_len, extra_len;
|
||||
|
||||
/* Ensure null termination */
|
||||
state->request->data.ccache_ntlm_auth.user[
|
||||
|
@ -446,7 +446,7 @@ void set_domain_offline(struct winbindd_domain *domain)
|
||||
messaging_send_buf(winbind_messaging_context(),
|
||||
pid_to_procid(parent_pid),
|
||||
MSG_WINBIND_DOMAIN_OFFLINE,
|
||||
(uint8 *)domain->name,
|
||||
(uint8_t *)domain->name,
|
||||
strlen(domain->name) + 1);
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ static void set_domain_online(struct winbindd_domain *domain)
|
||||
messaging_send_buf(winbind_messaging_context(),
|
||||
pid_to_procid(parent_pid),
|
||||
MSG_WINBIND_DOMAIN_ONLINE,
|
||||
(uint8 *)domain->name,
|
||||
(uint8_t *)domain->name,
|
||||
strlen(domain->name) + 1);
|
||||
}
|
||||
|
||||
@ -1353,7 +1353,7 @@ static bool add_one_dc_unique(TALLOC_CTX *mem_ctx, const char *domain_name,
|
||||
}
|
||||
|
||||
static bool add_sockaddr_to_array(TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage *pss, uint16 port,
|
||||
struct sockaddr_storage *pss, uint16_t port,
|
||||
struct sockaddr_storage **addrs, int *num)
|
||||
{
|
||||
*addrs = talloc_realloc(mem_ctx, *addrs, struct sockaddr_storage, (*num)+1);
|
||||
@ -2212,7 +2212,7 @@ static bool set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain )
|
||||
WERROR werr;
|
||||
struct netr_DomainTrustList trusts;
|
||||
int i;
|
||||
uint32 flags = (NETR_TRUST_FLAG_IN_FOREST |
|
||||
uint32_t flags = (NETR_TRUST_FLAG_IN_FOREST |
|
||||
NETR_TRUST_FLAG_OUTBOUND |
|
||||
NETR_TRUST_FLAG_INBOUND);
|
||||
struct rpc_pipe_client *cli;
|
||||
|
@ -124,7 +124,7 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
|
||||
return status;
|
||||
}
|
||||
|
||||
response->data.gr.num_gr_mem = (uint32)num_members;
|
||||
response->data.gr.num_gr_mem = (uint32_t)num_members;
|
||||
|
||||
/* Group membership lives at start of extra data */
|
||||
|
||||
|
@ -337,7 +337,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 struct dom_sid *sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **domain_name,
|
||||
char ***names,
|
||||
@ -556,9 +556,9 @@ done:
|
||||
|
||||
static NTSTATUS msrpc_lookup_useraliases(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 num_sids, const struct dom_sid *sids,
|
||||
uint32 *pnum_aliases,
|
||||
uint32 **palias_rids)
|
||||
uint32_t num_sids, const struct dom_sid *sids,
|
||||
uint32_t *pnum_aliases,
|
||||
uint32_t **palias_rids)
|
||||
{
|
||||
struct rpc_pipe_client *samr_pipe;
|
||||
struct policy_handle dom_pol;
|
||||
@ -627,11 +627,11 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
|
||||
uint32_t **name_types)
|
||||
{
|
||||
NTSTATUS status, result;
|
||||
uint32 i, total_names = 0;
|
||||
uint32_t i, total_names = 0;
|
||||
struct policy_handle dom_pol, group_pol;
|
||||
uint32 des_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
uint32 *rid_mem = NULL;
|
||||
uint32 group_rid;
|
||||
uint32_t des_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
uint32_t *rid_mem = NULL;
|
||||
uint32_t group_rid;
|
||||
unsigned int j, r;
|
||||
struct rpc_pipe_client *cli;
|
||||
unsigned int orig_timeout;
|
||||
@ -718,7 +718,7 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
|
||||
#define MAX_LOOKUP_RIDS 900
|
||||
|
||||
*names = talloc_zero_array(mem_ctx, char *, *num_names);
|
||||
*name_types = talloc_zero_array(mem_ctx, uint32, *num_names);
|
||||
*name_types = talloc_zero_array(mem_ctx, uint32_t, *num_names);
|
||||
*sid_mem = talloc_zero_array(mem_ctx, struct dom_sid, *num_names);
|
||||
|
||||
for (j=0;j<(*num_names);j++)
|
||||
@ -786,7 +786,7 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
|
||||
|
||||
#include "ads.h"
|
||||
|
||||
static int get_ldap_seq(const char *server, struct sockaddr_storage *ss, int port, uint32 *seq)
|
||||
static int get_ldap_seq(const char *server, struct sockaddr_storage *ss, int port, uint32_t *seq)
|
||||
{
|
||||
int ret = -1;
|
||||
struct timeval to;
|
||||
@ -840,7 +840,7 @@ static int get_ldap_seq(const char *server, struct sockaddr_storage *ss, int por
|
||||
LDAP queries.
|
||||
**********************************************************************/
|
||||
|
||||
static int get_ldap_sequence_number(struct winbindd_domain *domain, uint32 *seq)
|
||||
static int get_ldap_sequence_number(struct winbindd_domain *domain, uint32_t *seq)
|
||||
{
|
||||
int ret = -1;
|
||||
char addr[INET6_ADDRSTRLEN];
|
||||
|
@ -429,7 +429,7 @@ done:
|
||||
|
||||
static NTSTATUS get_max_bad_attempts_from_lockout_policy(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint16 *lockout_threshold)
|
||||
uint16_t *lockout_threshold)
|
||||
{
|
||||
struct winbindd_methods *methods;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
@ -451,7 +451,7 @@ static NTSTATUS get_max_bad_attempts_from_lockout_policy(struct winbindd_domain
|
||||
|
||||
static NTSTATUS get_pwd_properties(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *password_properties)
|
||||
uint32_t *password_properties)
|
||||
{
|
||||
struct winbindd_methods *methods;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
@ -886,13 +886,13 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
|
||||
struct netr_SamInfo3 **info3)
|
||||
{
|
||||
NTSTATUS result = NT_STATUS_LOGON_FAILURE;
|
||||
uint16 max_allowed_bad_attempts;
|
||||
uint16_t max_allowed_bad_attempts;
|
||||
fstring name_domain, name_user;
|
||||
struct dom_sid sid;
|
||||
enum lsa_SidType type;
|
||||
uchar new_nt_pass[NT_HASH_LEN];
|
||||
const uint8 *cached_nt_pass;
|
||||
const uint8 *cached_salt;
|
||||
const uint8_t *cached_nt_pass;
|
||||
const uint8_t *cached_salt;
|
||||
struct netr_SamInfo3 *my_info3;
|
||||
time_t kickoff_time, must_change_time;
|
||||
bool password_good = false;
|
||||
@ -1124,7 +1124,7 @@ static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
|
||||
/* lockout user */
|
||||
if (my_info3->base.bad_password_count >= max_allowed_bad_attempts) {
|
||||
|
||||
uint32 password_properties;
|
||||
uint32_t password_properties;
|
||||
|
||||
result = get_pwd_properties(domain, state->mem_ctx, &password_properties);
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
@ -1568,7 +1568,7 @@ static NTSTATUS winbindd_dual_pam_auth_samlogon(TALLOC_CTX *mem_ctx,
|
||||
struct policy_handle samr_domain_handle, user_pol;
|
||||
union samr_UserInfo *info = NULL;
|
||||
NTSTATUS status_tmp, result_tmp;
|
||||
uint32 acct_flags;
|
||||
uint32_t acct_flags;
|
||||
struct dcerpc_binding_handle *b;
|
||||
|
||||
status_tmp = cm_connect_sam(domain, mem_ctx, false,
|
||||
|
@ -75,7 +75,7 @@ static bool reconnect_need_retry(NTSTATUS status)
|
||||
/* List all users */
|
||||
static NTSTATUS query_user_list(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wbint_userinfo **info)
|
||||
{
|
||||
NTSTATUS result;
|
||||
@ -92,7 +92,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
|
||||
/* list all domain groups */
|
||||
static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
NTSTATUS result;
|
||||
@ -110,7 +110,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
|
||||
|
||||
static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
NTSTATUS result;
|
||||
@ -172,7 +172,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
|
||||
static NTSTATUS rids_to_names(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **domain_name,
|
||||
char ***names,
|
||||
@ -215,7 +215,7 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
|
||||
static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *user_sid,
|
||||
uint32 *num_groups, struct dom_sid **user_gids)
|
||||
uint32_t *num_groups, struct dom_sid **user_gids)
|
||||
{
|
||||
NTSTATUS result;
|
||||
|
||||
@ -233,8 +233,8 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
|
||||
|
||||
static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 num_sids, const struct dom_sid *sids,
|
||||
uint32 *num_aliases, uint32 **alias_rids)
|
||||
uint32_t num_sids, const struct dom_sid *sids,
|
||||
uint32_t *num_aliases, uint32_t **alias_rids)
|
||||
{
|
||||
NTSTATUS result;
|
||||
|
||||
@ -257,9 +257,9 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *group_sid,
|
||||
enum lsa_SidType type,
|
||||
uint32 *num_names,
|
||||
uint32_t *num_names,
|
||||
struct dom_sid **sid_mem, char ***names,
|
||||
uint32 **name_types)
|
||||
uint32_t **name_types)
|
||||
{
|
||||
NTSTATUS result;
|
||||
|
||||
@ -279,7 +279,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
|
||||
}
|
||||
|
||||
/* find the sequence number for a domain */
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
|
||||
static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32_t *seq)
|
||||
{
|
||||
NTSTATUS result;
|
||||
|
||||
|
@ -425,7 +425,7 @@ done:
|
||||
/* List all domain groups */
|
||||
static NTSTATUS builtin_enum_dom_groups(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wb_acct_info **info)
|
||||
{
|
||||
/* BUILTIN doesn't have domain groups */
|
||||
@ -437,7 +437,7 @@ static NTSTATUS builtin_enum_dom_groups(struct winbindd_domain *domain,
|
||||
/* Query display info for a domain */
|
||||
static NTSTATUS builtin_query_user_list(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 *num_entries,
|
||||
uint32_t *num_entries,
|
||||
struct wbint_userinfo **info)
|
||||
{
|
||||
/* We don't have users */
|
||||
@ -670,7 +670,7 @@ done:
|
||||
static NTSTATUS sam_rids_to_names(struct winbindd_domain *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
uint32 *rids,
|
||||
uint32_t *rids,
|
||||
size_t num_rids,
|
||||
char **pdomain_name,
|
||||
char ***pnames,
|
||||
|
@ -517,9 +517,9 @@ static void rescan_forest_trusts( void )
|
||||
return;
|
||||
|
||||
for ( i=0; i<num_trusts; i++ ) {
|
||||
uint32 flags = dom_list[i].trust_flags;
|
||||
uint32 type = dom_list[i].trust_type;
|
||||
uint32 attribs = dom_list[i].trust_attribs;
|
||||
uint32_t flags = dom_list[i].trust_flags;
|
||||
uint32_t type = dom_list[i].trust_type;
|
||||
uint32_t attribs = dom_list[i].trust_attribs;
|
||||
|
||||
d = find_domain_from_name_noinit( dom_list[i].domain_name );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user