summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 16:24:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:15 -0500
commitf9d8f8843dc0ab8c9d59abde7222e0f118b86b5d (patch)
tree8c6360be102dee63e893526ac7128e9cd52d362c /source4/utils
parent59e739a2f9f4b10f5f6184ef397f034d09959f26 (diff)
downloadsamba-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/utils')
-rw-r--r--source4/utils/net.c10
-rw-r--r--source4/utils/net_ads_cldap.c10
-rw-r--r--source4/utils/net_rap.c20
-rw-r--r--source4/utils/net_rpc.c34
-rw-r--r--source4/utils/net_rpc_join.c12
-rw-r--r--source4/utils/net_rpc_samsync.c28
6 files changed, 57 insertions, 57 deletions
diff --git a/source4/utils/net.c b/source4/utils/net.c
index 5c78d4d5a7..ce874d2efd 100644
--- a/source4/utils/net.c
+++ b/source4/utils/net.c
@@ -390,10 +390,10 @@ static int net_getdomainsid(int argc, const char **argv)
return 0;
}
-static uint32 get_maxrid(void)
+static uint32_t get_maxrid(void)
{
SAM_ACCOUNT *pwd = NULL;
- uint32 max_rid = 0;
+ uint32_t max_rid = 0;
GROUP_MAP *map = NULL;
int num_entries = 0;
int i;
@@ -405,7 +405,7 @@ static uint32 get_maxrid(void)
for (; (NT_STATUS_IS_OK(pdb_init_sam(&pwd)))
&& pdb_getsampwent(pwd) == True; pwd=NULL) {
- uint32 rid;
+ uint32_t rid;
if (!sid_peek_rid(pdb_get_user_sid(pwd), &rid)) {
DEBUG(0, ("can't get RID for user '%s'\n",
@@ -429,7 +429,7 @@ static uint32 get_maxrid(void)
return max_rid;
for (i = 0; i < num_entries; i++) {
- uint32 rid;
+ uint32_t rid;
if (!sid_peek_check_rid(get_global_sam_sid(), &map[i].sid,
&rid)) {
@@ -451,7 +451,7 @@ static uint32 get_maxrid(void)
static int net_maxrid(int argc, const char **argv)
{
- uint32 rid;
+ uint32_t rid;
if (argc != 0) {
DEBUG(0, ("usage: net initrid\n"));
diff --git a/source4/utils/net_ads_cldap.c b/source4/utils/net_ads_cldap.c
index 132238533d..fd3ded8e82 100644
--- a/source4/utils/net_ads_cldap.c
+++ b/source4/utils/net_ads_cldap.c
@@ -25,14 +25,14 @@
#ifdef HAVE_ADS
struct netlogon_string {
- uint32 comp_len;
+ uint32_t comp_len;
char **component;
uint8 extra_flag;
};
struct cldap_netlogon_reply {
- uint32 type;
- uint32 flags;
+ uint32_t type;
+ uint32_t flags;
GUID guid;
struct netlogon_string forest;
@@ -47,7 +47,7 @@ struct cldap_netlogon_reply {
struct netlogon_string unk0;
- uint32 version;
+ uint32_t version;
uint16 lmnt_token;
uint16 lm20_token;
};
@@ -160,7 +160,7 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
ASN1_DATA data;
DATA_BLOB blob;
DATA_BLOB os1, os2, os3;
- uint32 i1;
+ uint32_t i1;
char *p;
blob = data_blob(NULL, 8192);
diff --git a/source4/utils/net_rap.c b/source4/utils/net_rap.c
index 8f3dd53fa6..3f6543629b 100644
--- a/source4/utils/net_rap.c
+++ b/source4/utils/net_rap.c
@@ -57,14 +57,14 @@ int net_rap_file_usage(int argc, const char **argv)
list info on an open file
***************************************************************************/
static void file_fn(const char * pPath, const char * pUser, uint16 perms,
- uint16 locks, uint32 id)
+ uint16 locks, uint32_t id)
{
d_printf("%-7.1d %-20.20s 0x%-4.2x %-6.1d %s\n",
id, pUser, perms, locks, pPath);
}
static void one_file_fn(const char *pPath, const char *pUser, uint16 perms,
- uint16 locks, uint32 id)
+ uint16 locks, uint32_t id)
{
d_printf("File ID %d\n"\
"User name %s\n"\
@@ -150,14 +150,14 @@ int net_rap_share_usage(int argc, const char **argv)
return net_help_share(argc, argv);
}
-static void long_share_fn(const char *share_name, uint32 type,
+static void long_share_fn(const char *share_name, uint32_t type,
const char *comment, void *state)
{
d_printf("%-12.12s %-8.8s %-50.50s\n",
share_name, share_type[type], comment);
}
-static void share_fn(const char *share_name, uint32 type,
+static void share_fn(const char *share_name, uint32_t type,
const char *comment, void *state)
{
d_printf("%-12.12s\n", share_name);
@@ -266,8 +266,8 @@ int net_rap_session_usage(int argc, const char **argv)
}
static void list_sessions_func(char *wsname, char *username, uint16 conns,
- uint16 opens, uint16 users, uint32 sess_time,
- uint32 idle_time, uint32 user_flags, char *clitype)
+ uint16 opens, uint16 users, uint32_t sess_time,
+ uint32_t idle_time, uint32_t user_flags, char *clitype)
{
int hrs = idle_time / 3600;
int min = (idle_time / 60) % 60;
@@ -279,8 +279,8 @@ static void list_sessions_func(char *wsname, char *username, uint16 conns,
static void display_session_func(const char *wsname, const char *username,
uint16 conns, uint16 opens, uint16 users,
- uint32 sess_time, uint32 idle_time,
- uint32 user_flags, const char *clitype)
+ uint32_t sess_time, uint32_t idle_time,
+ uint32_t user_flags, const char *clitype)
{
int ihrs = idle_time / 3600;
int imin = (idle_time / 60) % 60;
@@ -300,7 +300,7 @@ static void display_session_func(const char *wsname, const char *username,
}
static void display_conns_func(uint16 conn_id, uint16 conn_type, uint16 opens,
- uint16 users, uint32 conn_time,
+ uint16 users, uint32_t conn_time,
const char *username, const char *netname)
{
d_printf("%-14.14s %-8.8s %5d\n",
@@ -382,7 +382,7 @@ int net_rap_session(int argc, const char **argv)
/****************************************************************************
list a server name
****************************************************************************/
-static void display_server_func(const char *name, uint32 m,
+static void display_server_func(const char *name, uint32_t m,
const char *comment, void * reserved)
{
d_printf("\t%-16.16s %s\n", name, comment);
diff --git a/source4/utils/net_rpc.c b/source4/utils/net_rpc.c
index 89ee34ac01..b4b11b4904 100644
--- a/source4/utils/net_rpc.c
+++ b/source4/utils/net_rpc.c
@@ -53,7 +53,7 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli)
DOM_SID *domain_sid;
POLICY_HND pol;
NTSTATUS result = NT_STATUS_OK;
- uint32 info_class = 5;
+ uint32_t info_class = 5;
fstring domain_name;
TALLOC_CTX *mem_ctx;
@@ -489,7 +489,7 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid, struct cli_sta
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
const char *acct_name;
uint16 acb_info;
- uint32 unknown, user_rid;
+ uint32_t unknown, user_rid;
if (argc != 1) {
d_printf("User must be specified\n");
@@ -603,8 +603,8 @@ static NTSTATUS rpc_user_del_internals(const DOM_SID *domain_sid,
/* Get handle on user */
{
- uint32 *user_rids, num_rids, *name_types;
- uint32 flags = 0x000003e8; /* Unknown */
+ uint32_t *user_rids, num_rids, *name_types;
+ uint32_t flags = 0x000003e8; /* Unknown */
result = cli_samr_lookup_names(cli, mem_ctx, &domain_pol,
flags, 1, &argv[0],
@@ -677,8 +677,8 @@ rpc_user_info_internals(const DOM_SID *domain_sid, struct cli_state *cli,
{
POLICY_HND connect_pol, domain_pol, user_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 *rids, num_rids, *name_types, num_names;
- uint32 flags = 0x000003e8; /* Unknown */
+ uint32_t *rids, num_rids, *name_types, num_names;
+ uint32_t flags = 0x000003e8; /* Unknown */
int i;
char **names;
DOM_GID *user_gids;
@@ -719,7 +719,7 @@ rpc_user_info_internals(const DOM_SID *domain_sid, struct cli_state *cli,
/* Look up rids */
- rids = (uint32 *)talloc(mem_ctx, sizeof(uint32) * num_rids);
+ rids = (uint32_t *)talloc(mem_ctx, sizeof(uint32_t) * num_rids);
for (i = 0; i < num_rids; i++)
rids[i] = user_gids[i].g_rid;
@@ -779,7 +779,7 @@ rpc_user_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
{
POLICY_HND connect_pol, domain_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 start_idx=0, num_entries, i, loop_count = 0;
+ uint32_t start_idx=0, num_entries, i, loop_count = 0;
SAM_DISPINFO_CTR ctr;
SAM_DISPINFO_1 info1;
@@ -809,7 +809,7 @@ rpc_user_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
"\n-----------------------------\n");
do {
fstring user, desc;
- uint32 max_entries, max_size;
+ uint32_t max_entries, max_size;
get_query_dispinfo_params(
loop_count, &max_entries, &max_size);
@@ -900,7 +900,7 @@ rpc_group_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
{
POLICY_HND connect_pol, domain_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 start_idx=0, max_entries=250, num_entries, i;
+ uint32_t start_idx=0, max_entries=250, num_entries, i;
struct acct_info *groups;
DOM_SID global_sid_Builtin;
@@ -1043,8 +1043,8 @@ rpc_share_add_internals(const DOM_SID *domain_sid, struct cli_state *cli,
WERROR result;
char *sharename=talloc_strdup(mem_ctx, argv[0]);
char *path;
- uint32 type=0; /* only allow disk shares to be added */
- uint32 num_users=0, perms=0;
+ uint32_t type=0; /* only allow disk shares to be added */
+ uint32_t num_users=0, perms=0;
char *password=NULL; /* don't allow a share password */
path = strchr(sharename, '=');
@@ -1160,7 +1160,7 @@ rpc_share_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
SRV_SHARE_INFO_CTR ctr;
WERROR result;
ENUM_HND hnd;
- uint32 preferred_len = 0xffffffff, i;
+ uint32_t preferred_len = 0xffffffff, i;
init_enum_hnd(&hnd, 0);
@@ -1300,7 +1300,7 @@ rpc_file_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
SRV_FILE_INFO_CTR ctr;
WERROR result;
ENUM_HND hnd;
- uint32 preferred_len = 0xffffffff, i;
+ uint32_t preferred_len = 0xffffffff, i;
const char *username=NULL;
init_enum_hnd(&hnd, 0);
@@ -1450,7 +1450,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
const char *msg = "This machine will be shutdown shortly";
- uint32 timeout = 20;
+ uint32_t timeout = 20;
#if 0
poptContext pc;
int rc;
@@ -1537,7 +1537,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
char *acct_name;
uint16 acb_info;
- uint32 unknown, user_rid;
+ uint32_t unknown, user_rid;
if (argc != 1) {
d_printf("Usage: net rpc trustdom add <domain_name>\n");
@@ -1885,7 +1885,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
/* trusting domains listing variables */
POLICY_HND domain_hnd;
char **trusting_dom_names;
- uint32 *trusting_dom_rids;
+ uint32_t *trusting_dom_rids;
/*
* Listing trusted domains (stored in secrets.tdb, if local)
diff --git a/source4/utils/net_rpc_join.c b/source4/utils/net_rpc_join.c
index 4f82d0b800..d790584269 100644
--- a/source4/utils/net_rpc_join.c
+++ b/source4/utils/net_rpc_join.c
@@ -47,9 +47,9 @@ int net_rpc_join_ok(const char *domain)
struct cli_state *cli;
uchar stored_md4_trust_password[16];
int retval = 1;
- uint32 channel;
+ uint32_t channel;
NTSTATUS result;
- uint32 neg_flags = 0x000001ff;
+ uint32_t neg_flags = 0x000001ff;
/* Connect to remote machine */
if (!(cli = net_make_ipc_connection(NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC))) {
@@ -108,13 +108,13 @@ int net_rpc_join_newstyle(int argc, const char **argv)
struct cli_state *cli;
TALLOC_CTX *mem_ctx;
- uint32 acb_info;
+ uint32_t acb_info;
/* rpc variables */
POLICY_HND lsa_pol, sam_pol, domain_pol, user_pol;
DOM_SID domain_sid;
- uint32 user_rid;
+ uint32_t user_rid;
/* Password stuff */
@@ -131,8 +131,8 @@ int net_rpc_join_newstyle(int argc, const char **argv)
NTSTATUS result;
int retval = 1;
fstring domain;
- uint32 num_rids, *name_types, *user_rids;
- uint32 flags = 0x3e8;
+ uint32_t num_rids, *name_types, *user_rids;
+ uint32_t flags = 0x3e8;
char *acct_name;
const char *const_acct_name;
diff --git a/source4/utils/net_rpc_samsync.c b/source4/utils/net_rpc_samsync.c
index 7d5c8681ad..1a733b3ab7 100644
--- a/source4/utils/net_rpc_samsync.c
+++ b/source4/utils/net_rpc_samsync.c
@@ -26,7 +26,7 @@
extern DOM_SID global_sid_Builtin;
-static void display_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *g)
+static void display_group_mem_info(uint32_t rid, SAM_GROUP_MEM_INFO *g)
{
int i;
d_printf("Group mem %u: ", rid);
@@ -36,13 +36,13 @@ static void display_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *g)
d_printf("\n");
}
-static void display_alias_info(uint32 rid, SAM_ALIAS_INFO *a)
+static void display_alias_info(uint32_t rid, SAM_ALIAS_INFO *a)
{
d_printf("Alias '%s' ", unistr2_static(&a->uni_als_name));
d_printf("desc='%s' rid=%u\n", unistr2_static(&a->uni_als_desc), a->als_rid);
}
-static void display_alias_mem(uint32 rid, SAM_ALIAS_MEM_INFO *a)
+static void display_alias_mem(uint32_t rid, SAM_ALIAS_MEM_INFO *a)
{
int i;
d_printf("Alias rid %u: ", rid);
@@ -52,7 +52,7 @@ static void display_alias_mem(uint32 rid, SAM_ALIAS_MEM_INFO *a)
d_printf("\n");
}
-static void display_account_info(uint32 rid, SAM_ACCOUNT_INFO *a)
+static void display_account_info(uint32_t rid, SAM_ACCOUNT_INFO *a)
{
fstring hex_nt_passwd, hex_lm_passwd;
uchar lm_passwd[16], nt_passwd[16];
@@ -84,7 +84,7 @@ static void display_domain_info(SAM_DOMAIN_INFO *a)
d_printf("Domain name: %s\n", unistr2_static(&a->uni_dom_name));
}
-static void display_group_info(uint32 rid, SAM_GROUP_INFO *a)
+static void display_group_info(uint32_t rid, SAM_GROUP_INFO *a)
{
d_printf("Group '%s' ", unistr2_static(&a->uni_grp_name));
d_printf("desc='%s', rid=%u\n", unistr2_static(&a->uni_grp_desc), rid);
@@ -126,7 +126,7 @@ static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret
TALLOC_CTX *mem_ctx;
SAM_DELTA_HDR *hdr_deltas;
SAM_DELTA_CTR *deltas;
- uint32 num_deltas;
+ uint32_t num_deltas;
if (!(mem_ctx = talloc_init("dump_database"))) {
return;
@@ -155,7 +155,7 @@ int rpc_samdump(int argc, const char **argv)
struct cli_state *cli = NULL;
uchar trust_password[16];
DOM_CRED ret_creds;
- uint32 neg_flags = 0x000001ff;
+ uint32_t neg_flags = 0x000001ff;
ZERO_STRUCT(ret_creds);
@@ -278,7 +278,7 @@ sam_account_from_delta(SAM_ACCOUNT *account, SAM_ACCOUNT_INFO *delta)
}
static NTSTATUS
-fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta)
+fetch_account_info(uint32_t rid, SAM_ACCOUNT_INFO *delta)
{
NTSTATUS nt_ret;
fstring account;
@@ -357,7 +357,7 @@ fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta)
}
static NTSTATUS
-fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta)
+fetch_group_info(uint32_t rid, SAM_GROUP_INFO *delta)
{
fstring name;
fstring comment;
@@ -413,7 +413,7 @@ fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta)
}
static NTSTATUS
-fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta)
+fetch_group_mem_info(uint32_t rid, SAM_GROUP_MEM_INFO *delta)
{
int i;
TALLOC_CTX *t = NULL;
@@ -536,7 +536,7 @@ fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta)
return NT_STATUS_OK;
}
-static NTSTATUS fetch_alias_info(uint32 rid, SAM_ALIAS_INFO *delta,
+static NTSTATUS fetch_alias_info(uint32_t rid, SAM_ALIAS_INFO *delta,
DOM_SID dom_sid)
{
fstring name;
@@ -597,7 +597,7 @@ static NTSTATUS fetch_alias_info(uint32 rid, SAM_ALIAS_INFO *delta,
}
static NTSTATUS
-fetch_alias_mem(uint32 rid, SAM_ALIAS_MEM_INFO *delta, DOM_SID dom_sid)
+fetch_alias_mem(uint32_t rid, SAM_ALIAS_MEM_INFO *delta, DOM_SID dom_sid)
{
return NT_STATUS_OK;
@@ -644,7 +644,7 @@ fetch_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds,
TALLOC_CTX *mem_ctx;
SAM_DELTA_HDR *hdr_deltas;
SAM_DELTA_CTR *deltas;
- uint32 num_deltas;
+ uint32_t num_deltas;
if (!(mem_ctx = talloc_init("fetch_database"))) {
return;
@@ -675,7 +675,7 @@ int rpc_vampire(int argc, const char **argv)
struct cli_state *cli = NULL;
uchar trust_password[16];
DOM_CRED ret_creds;
- uint32 neg_flags = 0x000001ff;
+ uint32_t neg_flags = 0x000001ff;
DOM_SID dom_sid;
ZERO_STRUCT(ret_creds);