diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-25 16:24:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:15 -0500 |
commit | f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d (patch) | |
tree | 8c6360be102dee63e893526ac7128e9cd52d362c /source4/rpc_server/samr | |
parent | 59e739a2f9f4b10f5f6184ef397f034d09959f26 (diff) | |
download | samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.gz samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.bz2 samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.zip |
r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 12 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.h | 6 | ||||
-rw-r--r-- | source4/rpc_server/samr/samdb.c | 10 | ||||
-rw-r--r-- | source4/rpc_server/samr/samr_password.c | 10 | ||||
-rw-r--r-- | source4/rpc_server/samr/samr_utils.c | 20 |
5 files changed, 29 insertions, 29 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 7592c479fa..1ffda9795b 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -405,7 +405,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO struct dcesrv_handle *h; const char *name; struct ldb_message msg; - uint32 rid; + uint32_t rid; const char *groupname, *sidstr; time_t now = time(NULL); TALLOC_CTX *mem_ctx2; @@ -549,7 +549,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX struct dcesrv_handle *h; const char *name; struct ldb_message msg; - uint32 rid; + uint32_t rid; const char *username, *sidstr; time_t now = time(NULL); TALLOC_CTX *mem_ctx2; @@ -718,7 +718,7 @@ static NTSTATUS samr_CreateUser(struct dcesrv_call_state *dce_call, TALLOC_CTX * struct samr_CreateUser *r) { struct samr_CreateUser2 r2; - uint32 access_granted; + uint32_t access_granted; /* a simple wrapper around samr_CreateUser2 works nicely */ @@ -873,8 +873,8 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX return NT_STATUS_OK; } - r->out.rids.ids = talloc_array_p(mem_ctx, uint32, r->in.num_names); - r->out.types.ids = talloc_array_p(mem_ctx, uint32, r->in.num_names); + r->out.rids.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names); + r->out.types.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names); if (!r->out.rids.ids || !r->out.types.ids) { return NT_STATUS_NO_MEMORY; } @@ -885,7 +885,7 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX struct ldb_message **res; struct dom_sid2 *sid; const char *sidstr; - uint32 atype, rtype; + uint32_t atype, rtype; r->out.rids.ids[i] = 0; r->out.types.ids[i] = SID_NAME_UNKNOWN; diff --git a/source4/rpc_server/samr/dcesrv_samr.h b/source4/rpc_server/samr/dcesrv_samr.h index 980bb5e9cd..205e107207 100644 --- a/source4/rpc_server/samr/dcesrv_samr.h +++ b/source4/rpc_server/samr/dcesrv_samr.h @@ -39,7 +39,7 @@ struct samr_connect_state { int reference_count; void *sam_ctx; TALLOC_CTX *mem_ctx; - uint32 access_mask; + uint32_t access_mask; }; /* @@ -50,7 +50,7 @@ struct samr_domain_state { int reference_count; void *sam_ctx; TALLOC_CTX *mem_ctx; - uint32 access_mask; + uint32_t access_mask; const char *domain_sid; const char *domain_name; const char *domain_dn; @@ -63,7 +63,7 @@ struct samr_account_state { struct samr_domain_state *domain_state; void *sam_ctx; TALLOC_CTX *mem_ctx; - uint32 access_mask; + uint32_t access_mask; const char *account_sid; const char *account_name; const char *account_dn; diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c index 36aa8be4d4..98374c6c86 100644 --- a/source4/rpc_server/samr/samdb.c +++ b/source4/rpc_server/samr/samdb.c @@ -334,8 +334,8 @@ const char *samdb_result_string(struct ldb_message *msg, const char *attr, /* pull a rid from a objectSid in a result set. */ -uint32 samdb_result_rid_from_sid(TALLOC_CTX *mem_ctx, struct ldb_message *msg, - const char *attr, uint32 default_value) +uint32_t samdb_result_rid_from_sid(TALLOC_CTX *mem_ctx, struct ldb_message *msg, + const char *attr, uint32_t default_value) { struct dom_sid *sid; const char *sidstr = ldb_msg_find_string(msg, attr, NULL); @@ -625,7 +625,7 @@ int samdb_copy_template(void *ctx, TALLOC_CTX *mem_ctx, return 0 on failure, the id on success */ static NTSTATUS _samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const char *dn, - const char *attr, uint32 *id) + const char *attr, uint32_t *id) { struct samdb_context *sam_ctx = ctx; struct ldb_message msg; @@ -696,7 +696,7 @@ static NTSTATUS _samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const ch return 0 on failure, the id on success */ NTSTATUS samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const char *dn, const char *attr, - uint32 *id) + uint32_t *id) { int tries = 10; NTSTATUS status; @@ -824,7 +824,7 @@ int samdb_msg_add_hashes(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg add a acct_flags element to a message */ int samdb_msg_add_acct_flags(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg, - const char *attr_name, uint32 v) + const char *attr_name, uint32_t v) { return samdb_msg_add_uint(ctx, mem_ctx, msg, attr_name, samdb_acb2uf(v)); } diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c index 812e0c69b9..24a467d49f 100644 --- a/source4/rpc_server/samr/samr_password.c +++ b/source4/rpc_server/samr/samr_password.c @@ -132,7 +132,7 @@ NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, TALLOC_ { NTSTATUS status; char new_pass[512]; - uint32 new_pass_len; + uint32_t new_pass_len; struct samr_CryptPassword *pwbuf = r->in.password; void *sam_ctx; const char *user_dn, *domain_dn; @@ -248,7 +248,7 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call, { NTSTATUS status; char new_pass[512]; - uint32 new_pass_len; + uint32_t new_pass_len; void *sam_ctx = NULL; const char *user_dn, *domain_dn = NULL; int ret; @@ -261,7 +261,7 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call, struct samr_Hash *ntPwdHash; struct samr_DomInfo1 *dominfo; struct samr_ChangeReject *reject; - uint32 reason = 0; + uint32_t reason = 0; ZERO_STRUCT(r->out); @@ -424,7 +424,7 @@ NTSTATUS samdb_set_password(void *ctx, TALLOC_CTX *mem_ctx, struct samr_Hash *lmNewHash, struct samr_Hash *ntNewHash, BOOL user_change, - uint32 *reject_reason) + uint32_t *reject_reason) { const char * const user_attrs[] = { "userAccountControl", "lmPwdHistory", "ntPwdHistory", "unicodePwd", @@ -677,7 +677,7 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call, struct samr_CryptPassword *pwbuf) { char new_pass[512]; - uint32 new_pass_len; + uint32_t new_pass_len; DATA_BLOB session_key = dce_call->conn->session_key; SamOEMhashBlob(pwbuf->data, 516, &session_key); diff --git a/source4/rpc_server/samr/samr_utils.c b/source4/rpc_server/samr/samr_utils.c index 247b2d47f4..6b8a2ff19a 100644 --- a/source4/rpc_server/samr/samr_utils.c +++ b/source4/rpc_server/samr/samr_utils.c @@ -27,7 +27,7 @@ translated the ACB_CTRL Flags to UserFlags (userAccountControl) */ /* mapping between ADS userAccountControl and SAMR acct_flags */ static const struct { - uint32 uf; + uint32_t uf; uint16 acb; } acct_flags_map[] = { { UF_ACCOUNTDISABLE, ACB_DISABLED }, @@ -43,9 +43,9 @@ static const struct { { UF_LOCKOUT, ACB_AUTOLOCK } }; -uint32 samdb_acb2uf(uint16 acb) +uint32_t samdb_acb2uf(uint16 acb) { - uint32 i, ret = 0; + uint32_t i, ret = 0; for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) { if (acct_flags_map[i].acb & acb) { ret |= acct_flags_map[i].uf; @@ -57,9 +57,9 @@ uint32 samdb_acb2uf(uint16 acb) /* translated the UserFlags (userAccountControl) to ACB_CTRL Flags */ -uint16 samdb_uf2acb(uint32 uf) +uint16 samdb_uf2acb(uint32_t uf) { - uint32 i; + uint32_t i; uint16 ret = 0; for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) { if (acct_flags_map[i].uf & uf) { @@ -72,9 +72,9 @@ uint16 samdb_uf2acb(uint32 uf) /* get the accountType from the UserFlags */ -uint32 samdb_uf2atype(uint32 uf) +uint32_t samdb_uf2atype(uint32_t uf) { - uint32 atype = 0x00000000; + uint32_t atype = 0x00000000; if (uf & UF_NORMAL_ACCOUNT) atype = ATYPE_NORMAL_ACCOUNT; else if (uf & UF_TEMP_DUPLICATE_ACCOUNT) atype = ATYPE_NORMAL_ACCOUNT; @@ -88,9 +88,9 @@ uint32 samdb_uf2atype(uint32 uf) /* get the accountType from the groupType */ -uint32 samdb_gtype2atype(uint32 gtype) +uint32_t samdb_gtype2atype(uint32_t gtype) { - uint32 atype = 0x00000000; + uint32_t atype = 0x00000000; switch(gtype) { case GTYPE_SECURITY_BUILTIN_LOCAL_GROUP: @@ -118,7 +118,7 @@ uint32 samdb_gtype2atype(uint32 gtype) } /* turn a sAMAccountType into a SID_NAME_USE */ -enum SID_NAME_USE samdb_atype_map(uint32 atype) +enum SID_NAME_USE samdb_atype_map(uint32_t atype) { switch (atype & 0xF0000000) { case ATYPE_GLOBAL_GROUP: |