This can be committed regardless of the state of the PIDL changes.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
- r->out.out_data = talloc_array(p->mem_ctx, uint8, r->in.len);
+ r->out.out_data = talloc_array(p->mem_ctx, uint8_t, r->in.len);
memcpy( r->out.out_data, r->in.in_data, r->in.len );
return;
}
memcpy( r->out.out_data, r->in.in_data, r->in.len );
return;
}
void _echo_SourceData(struct pipes_struct *p, struct echo_SourceData *r)
{
void _echo_SourceData(struct pipes_struct *p, struct echo_SourceData *r)
{
DEBUG(10, ("_echo_SourceData\n"));
DEBUG(10, ("_echo_SourceData\n"));
- r->out.data = talloc_array(p->mem_ctx, uint8, r->in.len );
+ r->out.data = talloc_array(p->mem_ctx, uint8_t, r->in.len );
for (i = 0; i < r->in.len; i++ ) {
r->out.data[i] = i & 0xff;
for (i = 0; i < r->in.len; i++ ) {
r->out.data[i] = i & 0xff;
-uint32 _echo_TestSleep(struct pipes_struct *p, struct echo_TestSleep *r)
+uint32_t _echo_TestSleep(struct pipes_struct *p, struct echo_TestSleep *r)
{
smb_msleep(r->in.seconds * 1000);
return 0;
{
smb_msleep(r->in.seconds * 1000);
return 0;
-uint16 _echo_TestDoublePointer(struct pipes_struct *p, struct echo_TestDoublePointer *r)
+uint16_t _echo_TestDoublePointer(struct pipes_struct *p, struct echo_TestDoublePointer *r)
{
p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
return 0;
{
p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
return 0;
typedef struct {
char *logname;
ELOG_TDB *etdb;
typedef struct {
char *logname;
ELOG_TDB *etdb;
- uint32 current_record;
- uint32 num_records;
- uint32 oldest_entry;
- uint32 flags;
- uint32 access_granted;
+ uint32_t current_record;
+ uint32_t num_records;
+ uint32_t oldest_entry;
+ uint32_t flags;
+ uint32_t access_granted;
} EVENTLOG_INFO;
/********************************************************************
} EVENTLOG_INFO;
/********************************************************************
struct lsa_info {
struct dom_sid sid;
const char *name;
struct lsa_info {
struct dom_sid sid;
const char *name;
enum lsa_handle_type type;
struct security_descriptor *sd;
};
enum lsa_handle_type type;
struct security_descriptor *sd;
};
int flags,
uint32_t *pmapped_count)
{
int flags,
uint32_t *pmapped_count)
{
- uint32 mapped_count, i;
+ uint32_t mapped_count, i;
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
for (i = 0; i < num_entries; i++) {
struct dom_sid sid;
for (i = 0; i < num_entries; i++) {
struct dom_sid sid;
int dom_idx;
const char *full_name;
const char *domain;
int dom_idx;
const char *full_name;
const char *domain;
uint32_t num_entries,
struct lsa_String *name,
int flags,
uint32_t num_entries,
struct lsa_String *name,
int flags,
+ uint32_t *pmapped_count)
- uint32 mapped_count, i;
+ uint32_t mapped_count, i;
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
for (i = 0; i < num_entries; i++) {
struct dom_sid sid;
for (i = 0; i < num_entries; i++) {
struct dom_sid sid;
int dom_idx;
const char *full_name;
const char *domain;
int dom_idx;
const char *full_name;
const char *domain;
{
struct security_descriptor *psd = NULL;
size_t sd_size;
{
struct security_descriptor *psd = NULL;
size_t sd_size;
- uint32 des_access = r->in.access_mask;
- uint32 acc_granted;
+ uint32_t des_access = r->in.access_mask;
+ uint32_t acc_granted;
NTSTATUS status;
if (p->transport != NCACN_NP && p->transport != NCALRPC) {
NTSTATUS status;
if (p->transport != NCACN_NP && p->transport != NCALRPC) {
case LSA_POLICY_INFO_AUDIT_EVENTS:
{
case LSA_POLICY_INFO_AUDIT_EVENTS:
{
- uint32 policy_def = LSA_AUDIT_POLICY_ALL;
+ uint32_t policy_def = LSA_AUDIT_POLICY_ALL;
/* check if the user has enough rights */
if (!(handle->access & LSA_POLICY_VIEW_AUDIT_INFORMATION)) {
/* check if the user has enough rights */
if (!(handle->access & LSA_POLICY_VIEW_AUDIT_INFORMATION)) {
int i;
const struct dom_sid **sids = NULL;
struct lsa_RefDomainList *ref = NULL;
int i;
const struct dom_sid **sids = NULL;
struct lsa_RefDomainList *ref = NULL;
- uint32 mapped_count = 0;
+ uint32_t mapped_count = 0;
struct lsa_dom_info *dom_infos = NULL;
struct lsa_name_info *name_infos = NULL;
struct lsa_TranslatedName2 *names = NULL;
struct lsa_dom_info *dom_infos = NULL;
struct lsa_name_info *name_infos = NULL;
struct lsa_TranslatedName2 *names = NULL;
NTSTATUS status;
struct lsa_info *handle;
int num_sids = r->in.sids->num_sids;
NTSTATUS status;
struct lsa_info *handle;
int num_sids = r->in.sids->num_sids;
- uint32 mapped_count = 0;
+ uint32_t mapped_count = 0;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedName *names_out = NULL;
struct lsa_TranslatedName2 *names = NULL;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedName *names_out = NULL;
struct lsa_TranslatedName2 *names = NULL;
NTSTATUS status;
struct lsa_info *handle;
int num_sids = r->in.sids->num_sids;
NTSTATUS status;
struct lsa_info *handle;
int num_sids = r->in.sids->num_sids;
- uint32 mapped_count = 0;
+ uint32_t mapped_count = 0;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedName2 *names = NULL;
bool check_policy = true;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedName2 *names = NULL;
bool check_policy = true;
NTSTATUS status = NT_STATUS_NONE_MAPPED;
struct lsa_info *handle;
struct lsa_String *names = r->in.names;
NTSTATUS status = NT_STATUS_NONE_MAPPED;
struct lsa_info *handle;
struct lsa_String *names = r->in.names;
- uint32 num_entries = r->in.num_names;
+ uint32_t num_entries = r->in.num_names;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedSid *rids = NULL;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedSid *rids = NULL;
- uint32 mapped_count = 0;
+ uint32_t mapped_count = 0;
int flags = 0;
if (p->transport != NCACN_NP && p->transport != NCALRPC) {
int flags = 0;
if (p->transport != NCACN_NP && p->transport != NCALRPC) {
NTSTATUS status;
struct lsa_info *handle;
struct lsa_String *names = r->in.names;
NTSTATUS status;
struct lsa_info *handle;
struct lsa_String *names = r->in.names;
- uint32 num_entries = r->in.num_names;
+ uint32_t num_entries = r->in.num_names;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedSid3 *trans_sids = NULL;
struct lsa_RefDomainList *domains = NULL;
struct lsa_TranslatedSid3 *trans_sids = NULL;
- uint32 mapped_count = 0;
+ uint32_t mapped_count = 0;
int flags = 0;
bool check_policy = true;
int flags = 0;
bool check_policy = true;
struct lsa_EnumPrivs *r)
{
struct lsa_info *handle;
struct lsa_EnumPrivs *r)
{
struct lsa_info *handle;
- uint32 i;
- uint32 enum_context = *r->in.resume_handle;
+ uint32_t i;
+ uint32_t enum_context = *r->in.resume_handle;
int num_privs = num_privileges_in_short_list();
struct lsa_PrivEntry *entries = NULL;
int num_privs = num_privileges_in_short_list();
struct lsa_PrivEntry *entries = NULL;
struct lsa_RightSet *r,
PRIVILEGE_SET *privileges)
{
struct lsa_RightSet *r,
PRIVILEGE_SET *privileges)
{
const char *privname;
const char **privname_array = NULL;
size_t num_priv = 0;
const char *privname;
const char **privname_array = NULL;
size_t num_priv = 0;
{
uchar null_pw[16];
uchar null_ntpw[16];
{
uchar null_pw[16];
uchar null_ntpw[16];
- uint8 *password_encrypted;
- const uint8 *encryption_key;
- const uint8 *lanman_pw, *nt_pw;
- uint32 acct_ctrl;
+ uint8_t *password_encrypted;
+ const uint8_t *encryption_key;
+ const uint8_t *lanman_pw, *nt_pw;
+ uint32_t acct_ctrl;
size_t new_pw_len;
uchar new_nt_hash[16];
uchar new_lm_hash[16];
size_t new_pw_len;
uchar new_nt_hash[16];
uchar new_lm_hash[16];
static bool check_passwd_history(struct samu *sampass, const char *plaintext)
{
uchar new_nt_p16[NT_HASH_LEN];
static bool check_passwd_history(struct samu *sampass, const char *plaintext)
{
uchar new_nt_p16[NT_HASH_LEN];
- const uint8 *nt_pw;
- const uint8 *pwhistory;
- uint32 pwHisLen, curr_pwHisLen;
+ const uint8_t *nt_pw;
+ const uint8_t *pwhistory;
+ uint32_t pwHisLen, curr_pwHisLen;
pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &pwHisLen);
if (pwHisLen == 0) {
pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &pwHisLen);
if (pwHisLen == 0) {
bool as_root,
enum samPwdChangeReason *samr_reject_reason)
{
bool as_root,
enum samPwdChangeReason *samr_reject_reason)
{
- uint32 min_len;
- uint32 refuse;
+ uint32_t min_len;
+ uint32_t refuse;
TALLOC_CTX *tosctx = talloc_tos();
struct passwd *pass = NULL;
const char *username = pdb_get_username(hnd);
TALLOC_CTX *tosctx = talloc_tos();
struct passwd *pass = NULL;
const char *username = pdb_get_username(hnd);
static NTSTATUS make_samr_object_sd( TALLOC_CTX *ctx, struct security_descriptor **psd, size_t *sd_size,
const struct generic_mapping *map,
static NTSTATUS make_samr_object_sd( TALLOC_CTX *ctx, struct security_descriptor **psd, size_t *sd_size,
const struct generic_mapping *map,
- struct dom_sid *sid, uint32 sid_access )
+ struct dom_sid *sid, uint32_t sid_access )
{
struct dom_sid domadmin_sid;
struct security_ace ace[5]; /* at most 5 entries */
{
struct dom_sid domadmin_sid;
struct security_ace ace[5]; /* at most 5 entries */
pdb_set_nt_passwd(sam_pass, NULL, PDB_DEFAULT);
}
pdb_set_nt_passwd(sam_pass, NULL, PDB_DEFAULT);
}
-static uint32 count_sam_users(struct disp_info *info, uint32 acct_flags)
+static uint32_t count_sam_users(struct disp_info *info, uint32_t acct_flags)
{
struct samr_displayentry *entry;
{
struct samr_displayentry *entry;
return info->users->num_entries;
}
return info->users->num_entries;
}
-static uint32 count_sam_groups(struct disp_info *info)
+static uint32_t count_sam_groups(struct disp_info *info)
{
struct samr_displayentry *entry;
{
struct samr_displayentry *entry;
return info->groups->num_entries;
}
return info->groups->num_entries;
}
-static uint32 count_sam_aliases(struct disp_info *info)
+static uint32_t count_sam_aliases(struct disp_info *info)
{
struct samr_displayentry *entry;
{
struct samr_displayentry *entry;
{
struct samr_domain_info *dinfo;
struct security_descriptor *psd = NULL;
{
struct samr_domain_info *dinfo;
struct security_descriptor *psd = NULL;
- uint32 acc_granted;
- uint32 des_access = r->in.access_mask;
+ uint32_t acc_granted;
+ uint32_t des_access = r->in.access_mask;
NTSTATUS status;
size_t sd_size;
uint32_t extra_access = SAMR_DOMAIN_ACCESS_CREATE_USER;
NTSTATUS status;
size_t sd_size;
uint32_t extra_access = SAMR_DOMAIN_ACCESS_CREATE_USER;
struct samr_SetSecurity *r)
{
struct samr_user_info *uinfo;
struct samr_SetSecurity *r)
{
struct samr_user_info *uinfo;
struct security_acl *dacl;
bool ret;
struct samu *sampass=NULL;
struct security_acl *dacl;
bool ret;
struct samu *sampass=NULL;
NTSTATUS status;
struct samr_domain_info *dinfo;
int num_account;
NTSTATUS status;
struct samr_domain_info *dinfo;
int num_account;
- uint32 enum_context = *r->in.resume_handle;
+ uint32_t enum_context = *r->in.resume_handle;
enum remote_arch_types ra_type = get_remote_arch();
int max_sam_entries = (ra_type == RA_WIN95) ? MAX_SAM_ENTRIES_W95 : MAX_SAM_ENTRIES_W2K;
enum remote_arch_types ra_type = get_remote_arch();
int max_sam_entries = (ra_type == RA_WIN95) ? MAX_SAM_ENTRIES_W95 : MAX_SAM_ENTRIES_W2K;
- uint32 max_entries = max_sam_entries;
+ uint32_t max_entries = max_sam_entries;
struct samr_displayentry *entries = NULL;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
struct samr_displayentry *entries = NULL;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
NTSTATUS status;
struct samr_domain_info *dinfo;
struct samr_displayentry *groups;
NTSTATUS status;
struct samr_domain_info *dinfo;
struct samr_displayentry *groups;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
NTSTATUS status;
struct samr_domain_info *dinfo;
struct samr_displayentry *aliases;
NTSTATUS status;
struct samr_domain_info *dinfo;
struct samr_displayentry *aliases;
- uint32 num_aliases = 0;
+ uint32_t num_aliases = 0;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
struct samr_SamArray *samr_array = NULL;
struct samr_SamEntry *samr_entries = NULL;
uint32_t start_idx,
struct samr_displayentry *entries)
{
uint32_t start_idx,
struct samr_displayentry *entries)
{
DEBUG(10, ("init_samr_dispinfo_1: num_entries: %d\n", num_entries));
DEBUG(10, ("init_samr_dispinfo_1: num_entries: %d\n", num_entries));
{
NTSTATUS status;
struct samr_domain_info *dinfo;
{
NTSTATUS status;
struct samr_domain_info *dinfo;
- uint32 struct_size=0x20; /* W2K always reply that, client doesn't care */
+ uint32_t struct_size=0x20; /* W2K always reply that, client doesn't care */
- uint32 max_entries = r->in.max_entries;
+ uint32_t max_entries = r->in.max_entries;
union samr_DispInfo *disp_info = r->out.info;
union samr_DispInfo *disp_info = r->out.info;
NTSTATUS disp_ret = NT_STATUS_UNSUCCESSFUL;
NTSTATUS disp_ret = NT_STATUS_UNSUCCESSFUL;
- uint32 num_account = 0;
+ uint32_t num_account = 0;
enum remote_arch_types ra_type = get_remote_arch();
int max_sam_entries = (ra_type == RA_WIN95) ? MAX_SAM_ENTRIES_W95 : MAX_SAM_ENTRIES_W2K;
struct samr_displayentry *entries = NULL;
enum remote_arch_types ra_type = get_remote_arch();
int max_sam_entries = (ra_type == RA_WIN95) ? MAX_SAM_ENTRIES_W95 : MAX_SAM_ENTRIES_W2K;
struct samr_displayentry *entries = NULL;
{
struct samr_domain_info *dinfo;
NTSTATUS status;
{
struct samr_domain_info *dinfo;
NTSTATUS status;
enum lsa_SidType *type;
int i;
int num_rids = r->in.num_names;
enum lsa_SidType *type;
int i;
int num_rids = r->in.num_names;
DEBUG(5,("_samr_LookupNames: truncating entries to %d\n", num_rids));
}
DEBUG(5,("_samr_LookupNames: truncating entries to %d\n", num_rids));
}
- rid = talloc_array(p->mem_ctx, uint32, num_rids);
+ rid = talloc_array(p->mem_ctx, uint32_t, num_rids);
NT_STATUS_HAVE_NO_MEMORY(rid);
type = talloc_array(p->mem_ctx, enum lsa_SidType, num_rids);
NT_STATUS_HAVE_NO_MEMORY(rid);
type = talloc_array(p->mem_ctx, enum lsa_SidType, num_rids);
NT_STATUS_EQUAL(status, NT_STATUS_ACCOUNT_RESTRICTION)) {
time_t u_expire, u_min_age;
NT_STATUS_EQUAL(status, NT_STATUS_ACCOUNT_RESTRICTION)) {
time_t u_expire, u_min_age;
- uint32 account_policy_temp;
+ uint32_t account_policy_temp;
dominfo = talloc_zero(p->mem_ctx, struct samr_DomInfo1);
if (!dominfo) {
dominfo = talloc_zero(p->mem_ctx, struct samr_DomInfo1);
if (!dominfo) {
makes a SAMR_R_LOOKUP_RIDS structure.
********************************************************************/
makes a SAMR_R_LOOKUP_RIDS structure.
********************************************************************/
-static bool make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
+static bool make_samr_lookup_rids(TALLOC_CTX *ctx, uint32_t num_names,
const char **names,
struct lsa_String **lsa_name_array_p)
{
const char **names,
struct lsa_String **lsa_name_array_p)
{
NTSTATUS status;
const char **names;
enum lsa_SidType *attrs = NULL;
NTSTATUS status;
const char **names;
enum lsa_SidType *attrs = NULL;
- uint32 *wire_attrs = NULL;
+ uint32_t *wire_attrs = NULL;
int num_rids = (int)r->in.num_rids;
int i;
struct lsa_Strings names_array;
int num_rids = (int)r->in.num_rids;
int i;
struct lsa_Strings names_array;
if (num_rids) {
names = talloc_zero_array(p->mem_ctx, const char *, num_rids);
attrs = talloc_zero_array(p->mem_ctx, enum lsa_SidType, num_rids);
if (num_rids) {
names = talloc_zero_array(p->mem_ctx, const char *, num_rids);
attrs = talloc_zero_array(p->mem_ctx, enum lsa_SidType, num_rids);
- wire_attrs = talloc_zero_array(p->mem_ctx, uint32, num_rids);
+ wire_attrs = talloc_zero_array(p->mem_ctx, uint32_t, num_rids);
if ((names == NULL) || (attrs == NULL) || (wire_attrs==NULL))
return NT_STATUS_NO_MEMORY;
if ((names == NULL) || (attrs == NULL) || (wire_attrs==NULL))
return NT_STATUS_NO_MEMORY;
return NT_STATUS_NO_MEMORY;
}
return NT_STATUS_NO_MEMORY;
}
- /* Convert from enum lsa_SidType to uint32 for wire format. */
+ /* Convert from enum lsa_SidType to uint32_t for wire format. */
for (i = 0; i < num_rids; i++) {
for (i = 0; i < num_rids; i++) {
- wire_attrs[i] = (uint32)attrs[i];
+ wire_attrs[i] = (uint32_t)attrs[i];
}
names_array.count = num_rids;
}
names_array.count = num_rids;
struct samr_domain_info *dinfo;
struct samr_user_info *uinfo;
struct security_descriptor *psd = NULL;
struct samr_domain_info *dinfo;
struct samr_user_info *uinfo;
struct security_descriptor *psd = NULL;
- uint32 acc_granted;
- uint32 des_access = r->in.access_mask;
+ uint32_t acc_granted;
+ uint32_t des_access = r->in.access_mask;
uint32_t extra_access = 0;
size_t sd_size;
bool ret;
uint32_t extra_access = 0;
size_t sd_size;
bool ret;
union samr_UserInfo *user_info = NULL;
struct samr_user_info *uinfo;
struct dom_sid domain_sid;
union samr_UserInfo *user_info = NULL;
struct samr_user_info *uinfo;
struct dom_sid domain_sid;
bool ret = false;
struct samu *pwd = NULL;
uint32_t acc_required, acc_granted;
bool ret = false;
struct samu *pwd = NULL;
uint32_t acc_required, acc_granted;
struct dom_sid *sids;
struct samr_RidWithAttribute dom_gid;
struct samr_RidWithAttribute *gids = NULL;
struct dom_sid *sids;
struct samr_RidWithAttribute dom_gid;
struct samr_RidWithAttribute *gids = NULL;
- uint32 primary_group_rid;
+ uint32_t primary_group_rid;
uint32_t num_groups = 0;
gid_t *unix_gids;
uint32_t i, num_gids;
uint32_t num_groups = 0;
gid_t *unix_gids;
uint32_t i, num_gids;
struct samr_domain_info *dinfo;
struct samr_user_info *uinfo;
NTSTATUS nt_status;
struct samr_domain_info *dinfo;
struct samr_user_info *uinfo;
NTSTATUS nt_status;
struct security_descriptor *psd;
size_t sd_size;
/* check this, when giving away 'add computer to domain' privs */
struct security_descriptor *psd;
size_t sd_size;
/* check this, when giving away 'add computer to domain' privs */
- uint32 des_access = GENERIC_RIGHTS_USER_ALL_ACCESS;
+ uint32_t des_access = GENERIC_RIGHTS_USER_ALL_ACCESS;
bool can_add_account = False;
/* Which privilege is needed to override the ACL? */
bool can_add_account = False;
/* Which privilege is needed to override the ACL? */
{
uint32_t acc_granted;
struct policy_handle hnd;
{
uint32_t acc_granted;
struct policy_handle hnd;
- uint32 des_access = r->in.access_mask;
+ uint32_t des_access = r->in.access_mask;
NTSTATUS status;
/* Access check */
NTSTATUS status;
/* Access check */
{
struct policy_handle hnd;
struct security_descriptor *psd = NULL;
{
struct policy_handle hnd;
struct security_descriptor *psd = NULL;
- uint32 acc_granted;
- uint32 des_access = r->in.access_mask;
+ uint32_t acc_granted;
+ uint32_t des_access = r->in.access_mask;
NTSTATUS nt_status;
size_t sd_size;
const char *fn = "_samr_Connect2";
NTSTATUS nt_status;
size_t sd_size;
const char *fn = "_samr_Connect2";
struct samr_OpenAlias *r)
{
struct dom_sid sid;
struct samr_OpenAlias *r)
{
struct dom_sid sid;
- uint32 alias_rid = r->in.rid;
+ uint32_t alias_rid = r->in.rid;
struct samr_alias_info *ainfo;
struct samr_domain_info *dinfo;
struct security_descriptor *psd = NULL;
struct samr_alias_info *ainfo;
struct samr_domain_info *dinfo;
struct security_descriptor *psd = NULL;
- uint32 acc_granted;
- uint32 des_access = r->in.access_mask;
+ uint32_t acc_granted;
+ uint32_t des_access = r->in.access_mask;
size_t sd_size;
NTSTATUS status;
size_t sd_size;
NTSTATUS status;
set_user_info_pw
********************************************************************/
set_user_info_pw
********************************************************************/
-static bool set_user_info_pw(uint8 *pass, const char *rhost, struct samu *pwd)
+static bool set_user_info_pw(uint8_t *pass, const char *rhost, struct samu *pwd)
{
size_t len = 0;
char *plaintext_buf = NULL;
{
size_t len = 0;
char *plaintext_buf = NULL;
DEBUG(5, ("Attempting administrator password change for user %s\n",
pdb_get_username(pwd)));
DEBUG(5, ("Attempting administrator password change for user %s\n",
pdb_get_username(pwd)));
struct samr_GetAliasMembership *r)
{
size_t num_alias_rids;
struct samr_GetAliasMembership *r)
{
size_t num_alias_rids;
struct samr_domain_info *dinfo;
size_t i;
struct samr_domain_info *dinfo;
size_t i;
struct samr_group_info *ginfo;
size_t i, num_members;
struct samr_group_info *ginfo;
size_t i, num_members;
- uint32 *rid=NULL;
- uint32 *attr=NULL;
+ uint32_t *rid=NULL;
+ uint32_t *attr=NULL;
NTSTATUS status;
struct samr_RidAttrArray *rids = NULL;
NTSTATUS status;
struct samr_RidAttrArray *rids = NULL;
return status;
if (num_members) {
return status;
if (num_members) {
- attr=talloc_zero_array(p->mem_ctx, uint32, num_members);
+ attr=talloc_zero_array(p->mem_ctx, uint32_t, num_members);
if (attr == NULL) {
return NT_STATUS_NO_MEMORY;
}
if (attr == NULL) {
return NT_STATUS_NO_MEMORY;
}
{
struct samr_group_info *ginfo;
NTSTATUS status;
{
struct samr_group_info *ginfo;
NTSTATUS status;
ginfo = policy_handle_find(p, r->in.group_handle,
SAMR_GROUP_ACCESS_ADD_MEMBER, NULL,
ginfo = policy_handle_find(p, r->in.group_handle,
SAMR_GROUP_ACCESS_ADD_MEMBER, NULL,
{
struct samr_group_info *ginfo;
NTSTATUS status;
{
struct samr_group_info *ginfo;
NTSTATUS status;
/*
* delete the group member named r->in.rid
/*
* delete the group member named r->in.rid
{
struct samr_group_info *ginfo;
NTSTATUS status;
{
struct samr_group_info *ginfo;
NTSTATUS status;
DEBUG(5, ("samr_DeleteDomainGroup: %d\n", __LINE__));
DEBUG(5, ("samr_DeleteDomainGroup: %d\n", __LINE__));
switch (r->in.level) {
case 1: {
switch (r->in.level) {
case 1: {
size_t num_members;
become_root();
size_t num_members;
become_root();
struct samr_domain_info *dinfo;
struct samr_group_info *ginfo;
struct security_descriptor *psd = NULL;
struct samr_domain_info *dinfo;
struct samr_group_info *ginfo;
struct security_descriptor *psd = NULL;
- uint32 acc_granted;
- uint32 des_access = r->in.access_mask;
+ uint32_t acc_granted;
+ uint32_t des_access = r->in.access_mask;
size_t sd_size;
NTSTATUS status;
bool ret;
size_t sd_size;
NTSTATUS status;
bool ret;
struct printer_handle *prev, *next;
bool document_started;
bool page_started;
struct printer_handle *prev, *next;
bool document_started;
bool page_started;
- uint32 jobid; /* jobid in printing backend */
+ uint32_t jobid; /* jobid in printing backend */
int printer_type;
const char *servername;
fstring sharename;
int printer_type;
const char *servername;
fstring sharename;
- uint32 type;
- uint32 access_granted;
+ uint32_t type;
+ uint32_t access_granted;
- uint32 flags;
- uint32 options;
+ uint32_t flags;
+ uint32_t options;
struct spoolss_NotifyOption *option;
struct policy_handle cli_hnd;
struct notify_back_channel *cli_chan;
struct spoolss_NotifyOption *option;
struct policy_handle cli_hnd;
struct notify_back_channel *cli_chan;
/* are we in a FindNextPrinterChangeNotify() call? */
bool fnpcn;
struct messaging_context *msg_ctx;
/* are we in a FindNextPrinterChangeNotify() call? */
bool fnpcn;
struct messaging_context *msg_ctx;
NTSTATUS access_check_object( struct security_descriptor *psd, struct security_token *token,
enum sec_privilege needed_priv_1, enum sec_privilege needed_priv_2,
uint32_t rights_mask,
NTSTATUS access_check_object( struct security_descriptor *psd, struct security_token *token,
enum sec_privilege needed_priv_1, enum sec_privilege needed_priv_2,
uint32_t rights_mask,
- uint32_t des_access, uint32 *acc_granted,
+ uint32_t des_access, uint32_t *acc_granted,
const char *debug )
{
NTSTATUS status = NT_STATUS_ACCESS_DENIED;
const char *debug )
{
NTSTATUS status = NT_STATUS_ACCESS_DENIED;
NTSTATUS access_check_object( struct security_descriptor *psd, struct security_token *token,
enum sec_privilege needed_priv_1, enum sec_privilege needed_priv_2,
uint32_t rights_mask,
NTSTATUS access_check_object( struct security_descriptor *psd, struct security_token *token,
enum sec_privilege needed_priv_1, enum sec_privilege needed_priv_2,
uint32_t rights_mask,
- uint32_t des_access, uint32 *acc_granted,
+ uint32_t des_access, uint32_t *acc_granted,
const char *debug );
void map_max_allowed_access(const struct security_token *nt_token,
const struct security_unix_token *unix_token,
const char *debug );
void map_max_allowed_access(const struct security_token *nt_token,
const struct security_unix_token *unix_token,
struct byte_range_lock *brl;
int num_locks = 0;
char *fullpath = NULL;
struct byte_range_lock *brl;
int num_locks = 0;
char *fullpath = NULL;
const char *username;
/* If the pid was not found delete the entry from connections.tdb */
const char *username;
/* If the pid was not found delete the entry from connections.tdb */
for (i = 0; i < ps_dacl->num_aces; i++) {
struct security_ace *psa = &ps_dacl->aces[i];
for (i = 0; i < ps_dacl->num_aces; i++) {
struct security_ace *psa = &ps_dacl->aces[i];
- uint32 orig_mask = psa->access_mask;
+ uint32_t orig_mask = psa->access_mask;
se_map_generic(&psa->access_mask, &file_generic_mapping);
psa->access_mask |= orig_mask;
se_map_generic(&psa->access_mask, &file_generic_mapping);
psa->access_mask |= orig_mask;
W_ERROR_HAVE_NO_MEMORY(ctr1->array);
for (num_entries = 0; resume_handle < *total_entries; num_entries++, resume_handle++) {
W_ERROR_HAVE_NO_MEMORY(ctr1->array);
for (num_entries = 0; resume_handle < *total_entries; num_entries++, resume_handle++) {
bool guest;
connect_time = (uint32_t)(now - session_list[resume_handle].connect_start);
bool guest;
connect_time = (uint32_t)(now - session_list[resume_handle].connect_start);
/* We do this call first as if we do it *after* the gmtime call
it overwrites the pointed-to values. JRA */
/* We do this call first as if we do it *after* the gmtime call
it overwrites the pointed-to values. JRA */
- uint32 zone = get_time_zone(unixdate)/60;
+ uint32_t zone = get_time_zone(unixdate)/60;
DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
static const char *server_disks[] = {"C:"};
static const char *server_disks[] = {"C:"};
-static uint32 get_server_disk_count(void)
+static uint32_t get_server_disk_count(void)
{
return sizeof(server_disks)/sizeof(server_disks[0]);
}
{
return sizeof(server_disks)/sizeof(server_disks[0]);
}
-static uint32 init_server_disk_enum(uint32 *resume)
+static uint32_t init_server_disk_enum(uint32_t *resume)
- uint32 server_disk_count = get_server_disk_count();
+ uint32_t server_disk_count = get_server_disk_count();
/*resume can be an offset into the list for now*/
/*resume can be an offset into the list for now*/
return server_disk_count - *resume;
}
return server_disk_count - *resume;
}
-static const char *next_server_disk_enum(uint32 *resume)
+static const char *next_server_disk_enum(uint32_t *resume)
WERROR _srvsvc_NetDiskEnum(struct pipes_struct *p,
struct srvsvc_NetDiskEnum *r)
{
WERROR _srvsvc_NetDiskEnum(struct pipes_struct *p,
struct srvsvc_NetDiskEnum *r)
{
const char *disk_name;
TALLOC_CTX *ctx = p->mem_ctx;
WERROR werr;
const char *disk_name;
TALLOC_CTX *ctx = p->mem_ctx;
WERROR werr;
state->r->out.result = ntstatus_to_werror(
messaging_send_buf(state->msg_ctx,
e->pid, MSG_SMB_CLOSE_FILE,
state->r->out.result = ntstatus_to_werror(
messaging_send_buf(state->msg_ctx,
e->pid, MSG_SMB_CLOSE_FILE,
- (uint8 *)msg, sizeof(msg)));
+ (uint8_t *)msg, sizeof(msg)));
********************************************************************/
static NTSTATUS svcctl_access_check( struct security_descriptor *sec_desc, struct security_token *token,
********************************************************************/
static NTSTATUS svcctl_access_check( struct security_descriptor *sec_desc, struct security_token *token,
- uint32 access_desired, uint32 *access_granted )
+ uint32_t access_desired, uint32_t *access_granted )
{
if ( geteuid() == sec_initial_uid() ) {
DEBUG(5,("svcctl_access_check: using root's token\n"));
{
if ( geteuid() == sec_initial_uid() ) {
DEBUG(5,("svcctl_access_check: using root's token\n"));
struct svcctl_OpenSCManagerW *r)
{
struct security_descriptor *sec_desc;
struct svcctl_OpenSCManagerW *r)
{
struct security_descriptor *sec_desc;
- uint32 access_granted = 0;
+ uint32_t access_granted = 0;
NTSTATUS status;
/* perform access checks */
NTSTATUS status;
/* perform access checks */
struct svcctl_OpenServiceW *r)
{
struct security_descriptor *sec_desc;
struct svcctl_OpenServiceW *r)
{
struct security_descriptor *sec_desc;
- uint32 access_granted = 0;
+ uint32_t access_granted = 0;
NTSTATUS status;
const char *service = NULL;
NTSTATUS status;
const char *service = NULL;
}
*r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
}
*r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
- *r->out.services_returned = (uint32)num_services;
+ *r->out.services_returned = (uint32_t)num_services;
if (r->out.resume_handle) {
*r->out.resume_handle = 0;
}
if (r->out.resume_handle) {
*r->out.resume_handle = 0;
}
struct svcctl_QueryServiceStatusEx *r)
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
struct svcctl_QueryServiceStatusEx *r)
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
/* perform access checks */
/* perform access checks */
struct svcctl_QueryServiceConfigW *r)
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
struct svcctl_QueryServiceConfigW *r)
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
WERROR wresult;
/* perform access checks */
WERROR wresult;
/* perform access checks */
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
struct security_descriptor *sec_desc = NULL;
{
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
struct security_descriptor *sec_desc = NULL;
- uint32 required_access;
+ uint32_t required_access;
NTSTATUS status;
if ( !info || !(info->type & (SVC_HANDLE_IS_SERVICE|SVC_HANDLE_IS_SCM)) )
NTSTATUS status;
if ( !info || !(info->type & (SVC_HANDLE_IS_SERVICE|SVC_HANDLE_IS_SCM)) )
struct registry_key *key = find_regkey_by_hnd(p, r->in.handle);
WERROR err = WERR_OK;
struct security_descriptor *secdesc = NULL;
struct registry_key *key = find_regkey_by_hnd(p, r->in.handle);
WERROR err = WERR_OK;
struct security_descriptor *secdesc = NULL;
size_t len = 0;
if ( !key )
size_t len = 0;
if ( !key )