Convert all uses of uint32/16/8 to _t in source3/passdb.
authorRichard Sharpe <rsharpe@samba.org>
Sat, 9 May 2015 20:34:31 +0000 (13:34 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 11 May 2015 23:32:12 +0000 (01:32 +0200)
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
15 files changed:
source3/passdb/account_pol.c
source3/passdb/login_cache.c
source3/passdb/lookup_sid.c
source3/passdb/pdb_compat.c
source3/passdb/pdb_get_set.c
source3/passdb/pdb_interface.c
source3/passdb/pdb_ldap.c
source3/passdb/pdb_ldap_util.c
source3/passdb/pdb_samba_dsdb.c
source3/passdb/pdb_secrets.c
source3/passdb/pdb_secrets.h
source3/passdb/pdb_smbpasswd.c
source3/passdb/pdb_tdb.c
source3/passdb/pdb_wbc_sam.c
source3/passdb/secrets.c

index 7b92f32744f8468152a9a6c1a5a35b92fca4927a..1a3ecc1bfbd257daf94d828d040fe7d429bd8e70 100644 (file)
@@ -40,7 +40,7 @@ static struct db_context *db;
 struct ap_table {
        enum pdb_policy_type type;
        const char *string;
-       uint32 default_val;
+       uint32_t default_val;
        const char *description;
        const char *ldap_attr;
 };
@@ -58,7 +58,7 @@ static const struct ap_table account_policy_names[] = {
                "Force Users to logon for password change (default: 0 => off, 2 => on)",
                "sambaLogonToChgPwd" },
 
-       {PDB_POLICY_MAX_PASSWORD_AGE, "maximum password age", (uint32) -1,
+       {PDB_POLICY_MAX_PASSWORD_AGE, "maximum password age", (uint32_t) -1,
                "Maximum password age, in seconds (default: -1 => never expire passwords)",
                "sambaMaxPwdAge" },
 
@@ -78,7 +78,7 @@ static const struct ap_table account_policy_names[] = {
                "Lockout users after bad logon attempts (default: 0 => off)",
                "sambaLockoutThreshold" },
 
-       {PDB_POLICY_TIME_TO_LOGOUT, "disconnect time", (uint32) -1,
+       {PDB_POLICY_TIME_TO_LOGOUT, "disconnect time", (uint32_t) -1,
                "Disconnect Users outside logon hours (default: -1 => off, 0 => on)",
                "sambaForceLogoff" },
 
@@ -193,7 +193,7 @@ bool account_policy_get_default(enum pdb_policy_type type, uint32_t *val)
 static bool account_policy_set_default_on_empty(enum pdb_policy_type type)
 {
 
-       uint32 value;
+       uint32_t value;
 
        if (!account_policy_get(type, &value) &&
            !account_policy_get_default(type, &value)) {
@@ -277,7 +277,7 @@ bool init_account_policy(void)
                status = dbwrap_store_uint32_bystring(db, vstring,
                                                      DATABASE_VERSION);
                if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(0, ("dbwrap_store_uint32 failed: %s\n",
+                       DEBUG(0, ("dbwrap_store_uint32_t failed: %s\n",
                                  nt_errstr(status)));
                        goto cancel;
                }
@@ -332,7 +332,7 @@ Get an account policy (from tdb)
 bool account_policy_get(enum pdb_policy_type type, uint32_t *value)
 {
        const char *name;
-       uint32 regval;
+       uint32_t regval;
        NTSTATUS status;
 
        if (!init_account_policy()) {
@@ -351,7 +351,7 @@ bool account_policy_get(enum pdb_policy_type type, uint32_t *value)
 
        status = dbwrap_fetch_uint32_bystring(db, name, &regval);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(2, ("account_policy_get: tdb_fetch_uint32 failed for type %d (%s), returning 0\n", type, name));
+               DEBUG(2, ("account_policy_get: tdb_fetch_uint32_t failed for type %d (%s), returning 0\n", type, name));
                return False;
        }
 
@@ -385,7 +385,7 @@ bool account_policy_set(enum pdb_policy_type type, uint32_t value)
 
        status = dbwrap_trans_store_uint32_bystring(db, name, value);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(1, ("store_uint32 failed for type %d (%s) on value "
+               DEBUG(1, ("store_uint32_t failed for type %d (%s) on value "
                          "%u: %s\n", type, name, value, nt_errstr(status)));
                return False;
        }
@@ -455,7 +455,7 @@ bool cache_account_policy_get(enum pdb_policy_type type, uint32_t *value)
        }
 
        if (gencache_get(cache_key, talloc_tos(), &cache_value, NULL)) {
-               uint32 tmp = strtoul(cache_value, NULL, 10);
+               uint32_t tmp = strtoul(cache_value, NULL, 10);
                *value = tmp;
                ret = True;
        }
index a53fe5b24f7f33dd7f6f0d6dea449fbf8db12322..eebb50a8b13f070c68a0083c42f5278a9e5eb858 100644 (file)
@@ -152,7 +152,7 @@ bool login_cache_write(const struct samu *sampass,
                         entry->acct_ctrl,
                         entry->bad_password_count,
                         bad_password_time);
-       databuf.dptr = SMB_MALLOC_ARRAY(uint8, databuf.dsize);
+       databuf.dptr = SMB_MALLOC_ARRAY(uint8_t, databuf.dsize);
        if (!databuf.dptr) {
                SAFE_FREE(keystr);
                return False;
index a85b28fbceb4876ee3da8134b2457167c0d93c9d..3cc64de36748319e6d4c8520990722c4a2f0f9af 100644 (file)
@@ -46,7 +46,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
        const char *tmp;
        const char *domain = NULL;
        const char *name = NULL;
-       uint32 rid;
+       uint32_t rid;
        struct dom_sid sid;
        enum lsa_SidType type;
        TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
@@ -450,7 +450,7 @@ bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
 
 static bool wb_lookup_rids(TALLOC_CTX *mem_ctx,
                           const struct dom_sid *domain_sid,
-                          int num_rids, uint32 *rids,
+                          int num_rids, uint32_t *rids,
                           const char **domain_name,
                           const char **names, enum lsa_SidType *types)
 {
@@ -671,7 +671,7 @@ static bool lookup_as_domain(const struct dom_sid *sid, TALLOC_CTX *mem_ctx,
        }
 
        if (IS_DC) {
-               uint32 i, num_domains;
+               uint32_t i, num_domains;
                struct trustdom_info **domains;
 
                /* This is relatively expensive, but it happens only on DCs
@@ -932,7 +932,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
                        continue;
                }
 
-               if (!(rids = talloc_array(tmp_ctx, uint32, dom->num_idxs))) {
+               if (!(rids = talloc_array(tmp_ctx, uint32_t, dom->num_idxs))) {
                        result = NT_STATUS_NO_MEMORY;
                        goto fail;
                }
@@ -1397,7 +1397,7 @@ bool sid_to_uid(const struct dom_sid *psid, uid_t *puid)
 {
        bool expired = true;
        bool ret;
-       uint32 rid;
+       uint32_t rid;
 
        /* Optimize for the Unix Users Domain
         * as the conversion is straightforward */
@@ -1450,7 +1450,7 @@ bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
 {
        bool expired = true;
        bool ret;
-       uint32 rid;
+       uint32_t rid;
 
        /* Optimize for the Unix Groups Domain
         * as the conversion is straightforward */
index a4fb1bf3c08f2ba202a33e0c43590aee05929559..6b7797a2d6df6de03961ce3aaf738e0fce43c816 100644 (file)
@@ -28,9 +28,9 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
 
-uint32 pdb_get_user_rid (const struct samu *sampass)
+uint32_t pdb_get_user_rid (const struct samu *sampass)
 {
-       uint32 u_rid;
+       uint32_t u_rid;
 
        if (sampass)
                if (sid_peek_check_rid(get_global_sam_sid(), pdb_get_user_sid(sampass),&u_rid))
@@ -39,9 +39,9 @@ uint32 pdb_get_user_rid (const struct samu *sampass)
        return (0);
 }
 
-uint32 pdb_get_group_rid (struct samu *sampass)
+uint32_t pdb_get_group_rid (struct samu *sampass)
 {
-       uint32 g_rid;
+       uint32_t g_rid;
 
        if (sampass)
                if (sid_peek_check_rid(get_global_sam_sid(), pdb_get_group_sid(sampass),&g_rid))
@@ -49,7 +49,7 @@ uint32 pdb_get_group_rid (struct samu *sampass)
        return (0);
 }
 
-bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag)
+bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32_t rid, enum pdb_value_state flag)
 {
        struct dom_sid u_sid;
        const struct dom_sid *global_sam_sid;
@@ -75,7 +75,7 @@ bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value
        return True;
 }
 
-bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag)
+bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32_t grid, enum pdb_value_state flag)
 {
        struct dom_sid g_sid;
        const struct dom_sid *global_sam_sid;
index 5e162db725dc2ec220a2e2cdd61ecccfc02de043..9f274594a34302103a0cf4f610a4fb95c6f93573 100644 (file)
@@ -169,31 +169,31 @@ uint32_t pdb_get_hours_len(const struct samu *sampass)
        return sampass->hours_len;
 }
 
-const uint8 *pdb_get_hours(const struct samu *sampass)
+const uint8_t *pdb_get_hours(const struct samu *sampass)
 {
        return (sampass->hours);
 }
 
-const uint8 *pdb_get_nt_passwd(const struct samu *sampass)
+const uint8_t *pdb_get_nt_passwd(const struct samu *sampass)
 {
        SMB_ASSERT((!sampass->nt_pw.data) 
                   || sampass->nt_pw.length == NT_HASH_LEN);
-       return (uint8 *)sampass->nt_pw.data;
+       return (uint8_t *)sampass->nt_pw.data;
 }
 
-const uint8 *pdb_get_lanman_passwd(const struct samu *sampass)
+const uint8_t *pdb_get_lanman_passwd(const struct samu *sampass)
 {
        SMB_ASSERT((!sampass->lm_pw.data) 
                   || sampass->lm_pw.length == LM_HASH_LEN);
-       return (uint8 *)sampass->lm_pw.data;
+       return (uint8_t *)sampass->lm_pw.data;
 }
 
-const uint8 *pdb_get_pw_history(const struct samu *sampass, uint32_t *current_hist_len)
+const uint8_t *pdb_get_pw_history(const struct samu *sampass, uint32_t *current_hist_len)
 {
        SMB_ASSERT((!sampass->nt_pw_his.data) 
           || ((sampass->nt_pw_his.length % PW_HISTORY_ENTRY_LEN) == 0));
        *current_hist_len = sampass->nt_pw_his.length / PW_HISTORY_ENTRY_LEN;
-       return (uint8 *)sampass->nt_pw_his.data;
+       return (uint8_t *)sampass->nt_pw_his.data;
 }
 
 /* Return the plaintext password if known.  Most of the time
@@ -830,7 +830,7 @@ bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb
  Set the user's NT hash.
  ********************************************************************/
 
-bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag)
+bool pdb_set_nt_passwd(struct samu *sampass, const uint8_t pwd[NT_HASH_LEN], enum pdb_value_state flag)
 {
        data_blob_clear_free(&sampass->nt_pw);
 
@@ -848,7 +848,7 @@ bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum
  Set the user's LM hash.
  ********************************************************************/
 
-bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag)
+bool pdb_set_lanman_passwd(struct samu *sampass, const uint8_t pwd[LM_HASH_LEN], enum pdb_value_state flag)
 {
        data_blob_clear_free(&sampass->lm_pw);
 
@@ -866,11 +866,11 @@ bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], e
 /*********************************************************************
  Set the user's password history hash. historyLen is the number of 
  PW_HISTORY_SALT_LEN+SALTED_MD5_HASH_LEN length
- entries to store in the history - this must match the size of the uint8 array
+ entries to store in the history - this must match the size of the uint8_t array
  in pwd.
 ********************************************************************/
 
-bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32_t historyLen, enum pdb_value_state flag)
+bool pdb_set_pw_history(struct samu *sampass, const uint8_t *pwd, uint32_t historyLen, enum pdb_value_state flag)
 {
        DATA_BLOB new_nt_pw_his = {};
 
@@ -945,7 +945,7 @@ bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state
        return pdb_set_init_flags(sampass, PDB_UNKNOWN6, flag);
 }
 
-bool pdb_set_hours(struct samu *sampass, const uint8 *hours, int hours_len,
+bool pdb_set_hours(struct samu *sampass, const uint8_t *hours, int hours_len,
                   enum pdb_value_state flag)
 {
        if (hours_len > sizeof(sampass->hours)) {
index f73c383b2797352f7c3c1fc90b69461c62a98336..d67e04ec9c42f3136e90148bfd6cfb7cd576b1a4 100644 (file)
@@ -54,7 +54,7 @@ static void lazy_initialize_passdb(void)
        initialized = True;
 }
 
-static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
+static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,
                                  const char **name,
                                  enum lsa_SidType *psid_name_use,
                                  uid_t *uid, gid_t *gid);
index 0d2c302081a485cea919f6046b783f65a679ad4d..c65fb0877a1bcfbdf7e48161b5196b8d27a9b819 100644 (file)
@@ -482,7 +482,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
                        *workstations = NULL,
                        *munged_dial = NULL;
        uint32_t                user_rid;
-       uint8           smblmpwd[LM_HASH_LEN],
+       uint8_t         smblmpwd[LM_HASH_LEN],
                        smbntpwd[NT_HASH_LEN];
        bool            use_samba_attrs = True;
        uint32_t                acct_ctrl = 0;
@@ -490,7 +490,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
        uint16_t                bad_password_count = 0,
                        logon_count = 0;
        uint32_t hours_len;
-       uint8           hours[MAX_HOURS_LEN];
+       uint8_t         hours[MAX_HOURS_LEN];
        char *temp = NULL;
        struct login_cache cache_entry;
        uint32_t                pwHistLen;
@@ -844,7 +844,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
 
        pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &pwHistLen);
        if (pwHistLen > 0){
-               uint8 *pwhist = NULL;
+               uint8_t *pwhist = NULL;
                int i;
                char *history_string = talloc_array(ctx, char,
                                                MAX_PW_HISTORY_LEN*64);
@@ -855,7 +855,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
 
                pwHistLen = MIN(pwHistLen, MAX_PW_HISTORY_LEN);
 
-               pwhist = talloc_zero_array(ctx, uint8,
+               pwhist = talloc_zero_array(ctx, uint8_t,
                                           pwHistLen * PW_HISTORY_ENTRY_LEN);
                if (pwhist == NULL) {
                        DEBUG(0, ("init_sam_from_ldap: talloc failed!\n"));
@@ -1306,7 +1306,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
                        } else {
                                int i;
                                uint32_t currHistLen = 0;
-                               const uint8 *pwhist = pdb_get_pw_history(sampass, &currHistLen);
+                               const uint8_t *pwhist = pdb_get_pw_history(sampass, &currHistLen);
                                if (pwhist != NULL) {
                                        /* We can only store (1024-1/64 password history entries. */
                                        pwHistLen = MIN(pwHistLen, ((1024-1)/64));
@@ -1339,7 +1339,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
        }
 
        if (need_update(sampass, PDB_HOURS)) {
-               const uint8 *hours = pdb_get_hours(sampass);
+               const uint8_t *hours = pdb_get_hours(sampass);
                if (hours) {
                        char hourstr[44];
                        pdb_sethexhours(hourstr, hours);
index 522c64fb5d9aa55db55fbc97c5db743df82facab..64ad53fc74546418e47dfb44ee89f13bd1ce5536 100644 (file)
@@ -37,7 +37,7 @@ static NTSTATUS add_new_domain_account_policies(struct smbldap_state *ldap_state
 {
        NTSTATUS ntstatus = NT_STATUS_UNSUCCESSFUL;
        int i, rc;
-       uint32 policy_default;
+       uint32_t policy_default;
        const char *policy_attr = NULL;
        char *dn = NULL;
        LDAPMod **mods = NULL;
@@ -213,7 +213,7 @@ static NTSTATUS add_new_domain_info(struct smbldap_state *ldap_state,
        /* add the sambaNextUserRid attributes. */
 
        {
-               uint32 rid = BASE_RID;
+               uint32_t rid = BASE_RID;
                fstring rid_str;
 
                fstr_sprintf( rid_str, "%i", rid );
index a933b2a491a99bd4791091fd63933ed294e6a348..6b99d8204a0e46686e1bed70b035d125b2d58b16 100644 (file)
@@ -730,8 +730,8 @@ static NTSTATUS pdb_samba_dsdb_getsampwsid(struct pdb_methods *m,
 
 static NTSTATUS pdb_samba_dsdb_create_user(struct pdb_methods *m,
                                    TALLOC_CTX *mem_ctx,
-                                   const char *name, uint32 acct_flags,
-                                   uint32 *rid)
+                                   const char *name, uint32_t acct_flags,
+                                   uint32_t *rid)
 {
        struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
                m->private_data, struct pdb_samba_dsdb_state);
@@ -1064,7 +1064,7 @@ static NTSTATUS pdb_samba_dsdb_getgrnam(struct pdb_methods *m, GROUP_MAP *map,
 
 static NTSTATUS pdb_samba_dsdb_create_dom_group(struct pdb_methods *m,
                                         TALLOC_CTX *mem_ctx, const char *name,
-                                        uint32 *rid)
+                                        uint32_t *rid)
 {
        struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
                m->private_data, struct pdb_samba_dsdb_state);
@@ -1086,7 +1086,7 @@ static NTSTATUS pdb_samba_dsdb_create_dom_group(struct pdb_methods *m,
 }
 
 static NTSTATUS pdb_samba_dsdb_delete_dom_group(struct pdb_methods *m,
-                                        TALLOC_CTX *mem_ctx, uint32 rid)
+                                        TALLOC_CTX *mem_ctx, uint32_t rid)
 {
        const char *attrs[] = { NULL };
        struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
@@ -1461,7 +1461,7 @@ static NTSTATUS pdb_samba_dsdb_mod_groupmem_by_sid(struct pdb_methods *m,
 
 static NTSTATUS pdb_samba_dsdb_mod_groupmem(struct pdb_methods *m,
                                     TALLOC_CTX *mem_ctx,
-                                    uint32 grouprid, uint32 memberrid,
+                                    uint32_t grouprid, uint32_t memberrid,
                                     int mod_op)
 {
        struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
@@ -1490,7 +1490,7 @@ static NTSTATUS pdb_samba_dsdb_mod_groupmem(struct pdb_methods *m,
 
 static NTSTATUS pdb_samba_dsdb_add_groupmem(struct pdb_methods *m,
                                     TALLOC_CTX *mem_ctx,
-                                    uint32 group_rid, uint32 member_rid)
+                                    uint32_t group_rid, uint32_t member_rid)
 {
        return pdb_samba_dsdb_mod_groupmem(m, mem_ctx, group_rid, member_rid,
                                    LDB_FLAG_MOD_ADD);
@@ -1498,14 +1498,14 @@ static NTSTATUS pdb_samba_dsdb_add_groupmem(struct pdb_methods *m,
 
 static NTSTATUS pdb_samba_dsdb_del_groupmem(struct pdb_methods *m,
                                     TALLOC_CTX *mem_ctx,
-                                    uint32 group_rid, uint32 member_rid)
+                                    uint32_t group_rid, uint32_t member_rid)
 {
        return pdb_samba_dsdb_mod_groupmem(m, mem_ctx, group_rid, member_rid,
                                       LDB_FLAG_MOD_DELETE);
 }
 
 static NTSTATUS pdb_samba_dsdb_create_alias(struct pdb_methods *m,
-                                    const char *name, uint32 *rid)
+                                    const char *name, uint32_t *rid)
 {
        TALLOC_CTX *frame = talloc_stackframe();
        struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
@@ -1793,7 +1793,7 @@ static NTSTATUS pdb_samba_dsdb_enum_alias_memberships(struct pdb_methods *m,
 static NTSTATUS pdb_samba_dsdb_lookup_rids(struct pdb_methods *m,
                                    const struct dom_sid *domain_sid,
                                    int num_rids,
-                                   uint32 *rids,
+                                   uint32_t *rids,
                                    const char **names,
                                    enum lsa_SidType *lsa_attrs)
 {
@@ -1819,7 +1819,7 @@ static NTSTATUS pdb_samba_dsdb_lookup_names(struct pdb_methods *m,
                                     const struct dom_sid *domain_sid,
                                     int num_names,
                                     const char **pp_names,
-                                    uint32 *rids,
+                                    uint32_t *rids,
                                     enum lsa_SidType *attrs)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
@@ -1995,7 +1995,7 @@ static bool pdb_samba_dsdb_search_filter(struct pdb_methods *m,
 
 static bool pdb_samba_dsdb_search_users(struct pdb_methods *m,
                                 struct pdb_search *search,
-                                uint32 acct_flags)
+                                uint32_t acct_flags)
 {
        struct pdb_samba_dsdb_search_state *sstate;
        bool ret;
@@ -2117,7 +2117,7 @@ static uint32_t pdb_samba_dsdb_capabilities(struct pdb_methods *m)
        return PDB_CAP_STORE_RIDS | PDB_CAP_ADS;
 }
 
-static bool pdb_samba_dsdb_new_rid(struct pdb_methods *m, uint32 *rid)
+static bool pdb_samba_dsdb_new_rid(struct pdb_methods *m, uint32_t *rid)
 {
        return false;
 }
@@ -2857,7 +2857,7 @@ static bool pdb_samba_dsdb_del_trusteddom_pw(struct pdb_methods *m,
 
 static NTSTATUS pdb_samba_dsdb_enum_trusteddoms(struct pdb_methods *m,
                                         TALLOC_CTX *mem_ctx,
-                                        uint32 *num_domains,
+                                        uint32_t *num_domains,
                                         struct trustdom_info ***domains)
 {
        *num_domains = 0;
index ad4fe4ab71e705882e13c243c301a6928de2ba0f..a581190a2250312f24119ad6e692f6873ba97a3a 100644 (file)
@@ -40,7 +40,7 @@
  **/
 
 struct list_trusted_domains_state {
-       uint32 num_domains;
+       uint32_t num_domains;
        struct trustdom_info **domains;
 };
 
@@ -105,7 +105,7 @@ static int list_trusted_domain(struct db_record *rec, void *private_data)
        return 0;
 }
 
-NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
+NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
                                 struct trustdom_info ***domains)
 {
        struct list_trusted_domains_state state;
index 2498b20d71a69a5be495352c0b9d49d0aa096b30..d9b1ace4c5cf34fb37815a8d8c0f26784e13855b 100644 (file)
@@ -24,7 +24,7 @@
 
 /* The following definitions come from passdb/pdb_secrets.c  */
 
-NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
+NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
                                 struct trustdom_info ***domains);
 
 #endif /* _PASSDB_PDB_SECRETS_H_ */
index 6e6fb5687e8bb241eaa303bfd214855a9d39a852..9250bea32fc772bd355e3181ab7a2f8db0b3ef11 100644 (file)
@@ -39,7 +39,7 @@
 
 struct smb_passwd
 {
-        uint32 smb_userid;        /* this is actually the unix uid_t */
+        uint32_t smb_userid;      /* this is actually the unix uid_t */
         const char *smb_name;     /* username string */
 
         const unsigned char *smb_passwd;    /* Null if no password */
@@ -1019,7 +1019,7 @@ This is no longer supported.!\n", pwd->smb_name));
 
 #ifdef DEBUG_PASSWORD
        DEBUG(100,("mod_smbfilepwd_entry: "));
-       dump_data(100, (uint8 *)ascii_p16, wr_len);
+       dump_data(100, (uint8_t *)ascii_p16, wr_len);
 #endif
 
        if(wr_len > LINEBUF_SIZE) {
index d1ff006f797f9f0dd7ad8d34583b3bacc6b1ec16..a32f1e318829ea0370333782305b67b456f61818 100644 (file)
@@ -101,27 +101,27 @@ static int tdbsam_convert_one(struct db_record *rec, void *priv)
        switch (state->from) {
        case 0:
                ret = init_samu_from_buffer(user, SAMU_BUFFER_V0,
-                                           (uint8 *)value.dptr,
+                                           (uint8_t *)value.dptr,
                                            value.dsize);
                break;
        case 1:
                ret = init_samu_from_buffer(user, SAMU_BUFFER_V1,
-                                           (uint8 *)value.dptr,
+                                           (uint8_t *)value.dptr,
                                            value.dsize);
                break;
        case 2:
                ret = init_samu_from_buffer(user, SAMU_BUFFER_V2,
-                                           (uint8 *)value.dptr,
+                                           (uint8_t *)value.dptr,
                                            value.dsize);
                break;
        case 3:
                ret = init_samu_from_buffer(user, SAMU_BUFFER_V3,
-                                           (uint8 *)value.dptr,
+                                           (uint8_t *)value.dptr,
                                            value.dsize);
                break;
        case 4:
                ret = init_samu_from_buffer(user, SAMU_BUFFER_V4,
-                                           (uint8 *)value.dptr,
+                                           (uint8_t *)value.dptr,
                                            value.dsize);
                break;
        default:
@@ -326,7 +326,7 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
 static bool tdbsam_upgrade_next_rid(struct db_context *db)
 {
        TDB_CONTEXT *tdb;
-       uint32 rid;
+       uint32_t rid;
        bool ok = false;
        NTSTATUS status;
        char *db_path;
@@ -628,7 +628,7 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods,
  **************************************************************************/
 
 static NTSTATUS tdbsam_getsampwrid (struct pdb_methods *my_methods,
-                                   struct samu *user, uint32 rid)
+                                   struct samu *user, uint32_t rid)
 {
        NTSTATUS                nt_status = NT_STATUS_UNSUCCESSFUL;
        TDB_DATA                data;
@@ -668,7 +668,7 @@ static NTSTATUS tdbsam_getsampwrid (struct pdb_methods *my_methods,
 static NTSTATUS tdbsam_getsampwsid(struct pdb_methods *my_methods,
                                   struct samu * user, const struct dom_sid *sid)
 {
-       uint32 rid;
+       uint32_t rid;
 
        if ( !sid_peek_check_rid(get_global_sam_sid(), sid, &rid) )
                return NT_STATUS_UNSUCCESSFUL;
@@ -717,7 +717,7 @@ static NTSTATUS tdbsam_delete_sam_account(struct pdb_methods *my_methods,
 {
        NTSTATUS        nt_status = NT_STATUS_UNSUCCESSFUL;
        fstring         keystr;
-       uint32          rid;
+       uint32_t        rid;
        fstring         name;
 
        /* open the database */
@@ -789,7 +789,7 @@ static NTSTATUS tdbsam_delete_sam_account(struct pdb_methods *my_methods,
 static bool tdb_update_samacct_only( struct samu* newpwd, int flag )
 {
        TDB_DATA        data;
-       uint8           *buf = NULL;
+       uint8_t         *buf = NULL;
        fstring         keystr;
        fstring         name;
        bool            ret = false;
@@ -1132,9 +1132,9 @@ static uint32_t tdbsam_capabilities(struct pdb_methods *methods)
        return PDB_CAP_STORE_RIDS;
 }
 
-static bool tdbsam_new_rid(struct pdb_methods *methods, uint32 *prid)
+static bool tdbsam_new_rid(struct pdb_methods *methods, uint32_t *prid)
 {
-       uint32 rid;
+       uint32_t rid;
        NTSTATUS status;
 
        rid = BASE_RID;         /* Default if not set */
@@ -1173,7 +1173,7 @@ static int tdbsam_collect_rids(struct db_record *rec, void *private_data)
        struct tdbsam_search_state *state = talloc_get_type_abort(
                private_data, struct tdbsam_search_state);
        size_t prefixlen = strlen(RIDPREFIX);
-       uint32 rid;
+       uint32_t rid;
        TDB_DATA key;
 
        key = dbwrap_record_get_key(rec);
@@ -1185,7 +1185,7 @@ static int tdbsam_collect_rids(struct db_record *rec, void *private_data)
 
        rid = strtoul((char *)key.dptr+prefixlen, NULL, 16);
 
-       ADD_TO_LARGE_ARRAY(state, uint32, rid, &state->rids, &state->num_rids,
+       ADD_TO_LARGE_ARRAY(state, uint32_t, rid, &state->rids, &state->num_rids,
                           &state->array_size);
 
        return 0;
@@ -1262,7 +1262,7 @@ static bool tdbsam_search_next_entry(struct pdb_search *search,
 
 static bool tdbsam_search_users(struct pdb_methods *methods,
                                struct pdb_search *search,
-                               uint32 acct_flags)
+                               uint32_t acct_flags)
 {
        struct tdbsam_search_state *state;
 
index b20a35a4fa963d1b7abef5d6884360f979e7f600..b73fcc4a46eb92fc62607be88a7815377185ec33 100644 (file)
@@ -91,7 +91,7 @@ static bool pdb_wbc_sam_id_to_sid(struct pdb_methods *methods, struct unixid *id
 static NTSTATUS pdb_wbc_sam_enum_group_members(struct pdb_methods *methods,
                                               TALLOC_CTX *mem_ctx,
                                               const struct dom_sid *group,
-                                              uint32 **pp_member_rids,
+                                              uint32_t **pp_member_rids,
                                               size_t *p_num_members)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
@@ -134,7 +134,7 @@ static NTSTATUS pdb_wbc_sam_enum_group_memberships(struct pdb_methods *methods,
 static NTSTATUS pdb_wbc_sam_lookup_rids(struct pdb_methods *methods,
                                        const struct dom_sid *domain_sid,
                                        int num_rids,
-                                       uint32 *rids,
+                                       uint32_t *rids,
                                        const char **names,
                                        enum lsa_SidType *attrs)
 {
@@ -227,7 +227,7 @@ static bool pdb_wbc_sam_del_trusteddom_pw(struct pdb_methods *methods,
 
 static NTSTATUS pdb_wbc_sam_enum_trusteddoms(struct pdb_methods *methods,
                                             TALLOC_CTX *mem_ctx,
-                                            uint32 *num_domains,
+                                            uint32_t *num_domains,
                                             struct trustdom_info ***domains)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
@@ -395,7 +395,7 @@ static NTSTATUS pdb_wbc_sam_alias_memberships(struct pdb_methods *methods,
                                       const struct dom_sid *domain_sid,
                                       const struct dom_sid *members,
                                       size_t num_members,
-                                      uint32 **pp_alias_rids,
+                                      uint32_t **pp_alias_rids,
                                       size_t *p_num_alias_rids)
 {
        if (!winbind_get_sid_aliases(mem_ctx, domain_sid,
index 73935be1abc2c98d0aa5691a5771d15f8f7523b4..7071fd9b9b06ea08a2fc7c5d2dfa600769ddb52f 100644 (file)
@@ -167,7 +167,7 @@ bool secrets_store(const char *key, const void *data, size_t size)
        }
 
        status = dbwrap_trans_store(db_ctx, string_tdb_data(key),
-                                   make_tdb_data((const uint8 *)data, size),
+                                   make_tdb_data((const uint8_t *)data, size),
                                    TDB_REPLACE);
        return NT_STATUS_IS_OK(status);
 }
@@ -419,7 +419,7 @@ bool secrets_fetch_afs_key(const char *cell, struct afs_key *result)
        fstring key;
        struct afs_keyfile *keyfile;
        size_t size = 0;
-       uint32 i;
+       uint32_t i;
 
        slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_AFS_KEYFILE, cell);