const char *hive_name, *relpath;
enum winreg_CreateAction action;
struct registry_value *value;
- static const uint32 ACCESS = REG_KEY_READ | REG_KEY_WRITE;
+ static const uint32_t ACCESS = REG_KEY_READ | REG_KEY_WRITE;
bool ret = false;
if (!elogs) {
/* tcpdump file format */
struct tcpdump_file_header {
- uint32 magic;
- uint16 major;
- uint16 minor;
+ uint32_t magic;
+ uint16_t major;
+ uint16_t minor;
int32 zone;
- uint32 sigfigs;
- uint32 snaplen;
- uint32 linktype;
+ uint32_t sigfigs;
+ uint32_t snaplen;
+ uint32_t linktype;
};
struct tcpdump_packet {
struct timeval ts;
- uint32 caplen;
- uint32 len;
+ uint32_t caplen;
+ uint32_t len;
};
typedef struct {
- uint8 ver_hdrlen;
- uint8 dscp;
- uint16 packet_length;
- uint16 identification;
- uint8 flags;
- uint8 fragment;
- uint8 ttl;
- uint8 protocol;
- uint16 hdr_checksum;
- uint32 src_addr;
- uint32 dest_addr;
+ uint8_t ver_hdrlen;
+ uint8_t dscp;
+ uint16_t packet_length;
+ uint16_t identification;
+ uint8_t flags;
+ uint8_t fragment;
+ uint8_t ttl;
+ uint8_t protocol;
+ uint16_t hdr_checksum;
+ uint32_t src_addr;
+ uint32_t dest_addr;
} hdr_ip_t;
static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 6, 0, 0x01010101, 0x02020202};
typedef struct {
- uint16 source_port;
- uint16 dest_port;
- uint32 seq_num;
- uint32 ack_num;
- uint8 hdr_length;
- uint8 flags;
- uint16 window;
- uint16 checksum;
- uint16 urg;
+ uint16_t source_port;
+ uint16_t dest_port;
+ uint32_t seq_num;
+ uint32_t ack_num;
+ uint8_t hdr_length;
+ uint8_t flags;
+ uint16_t window;
+ uint16_t checksum;
+ uint16_t urg;
} hdr_tcp_t;
static hdr_tcp_t HDR_TCP = {139, 139, 0, 0, 0x50, 0, 0, 0, 0};
}
static bool search_maxrid(struct pdb_search *search, const char *type,
- uint32 *max_rid)
+ uint32_t *max_rid)
{
struct samr_displayentry *entries;
- uint32 i, num_entries;
+ uint32_t i, num_entries;
if (search == NULL) {
d_fprintf(stderr, _("get_maxrid: Could not search %s\n"), type);
return true;
}
-static uint32 get_maxrid(void)
+static uint32_t get_maxrid(void)
{
- uint32 max_rid = 0;
+ uint32_t max_rid = 0;
if (!search_maxrid(pdb_search_users(talloc_tos(), 0), "users", &max_rid))
return 0;
static int net_maxrid(struct net_context *c, int argc, const char **argv)
{
- uint32 rid;
+ uint32_t rid;
if (argc != 0) {
d_fprintf(stderr, "%s net maxrid\n", _("Usage:"));
struct cli_state *cli_share_src;
struct cli_state *cli_share_dst;
char *cwd;
- uint16 attribute;
+ uint16_t attribute;
struct net_context *c;
}copy_clistate;
}
static ADS_STATUS ads_startup_int(struct net_context *c, bool only_own_domain,
- uint32 auth_flags, ADS_STRUCT **ads_ret)
+ uint32_t auth_flags, ADS_STRUCT **ads_ret)
{
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
const char *dn = NULL;
struct GROUP_POLICY_OBJECT *gpo_list = NULL;
struct GROUP_POLICY_OBJECT *read_list = NULL;
- uint32 uac = 0;
- uint32 flags = 0;
+ uint32_t uac = 0;
+ uint32_t flags = 0;
struct GROUP_POLICY_OBJECT *gpo;
NTSTATUS result;
struct security_token *token = NULL;
LDAPMessage *res = NULL;
TALLOC_CTX *mem_ctx;
const char *dn = NULL;
- uint32 uac = 0;
- uint32 flags = 0;
+ uint32_t uac = 0;
+ uint32_t flags = 0;
struct GROUP_POLICY_OBJECT *gpo_list;
struct security_token *token = NULL;
ADS_STATUS status;
const char *dn = NULL;
struct GROUP_POLICY_OBJECT *gpo_list;
- uint32 uac = 0;
- uint32 flags = 0;
+ uint32_t uac = 0;
+ uint32_t flags = 0;
struct security_token *token = NULL;
const char *filter = NULL;
{
ADS_STRUCT *ads;
ADS_STATUS status;
- uint32 gpo_opt = 0;
+ uint32_t gpo_opt = 0;
TALLOC_CTX *mem_ctx;
if (argc < 2 || c->display_usage) {
fstring type = "";
fstring ntcomment = "";
enum lsa_SidType sid_type = SID_NAME_DOM_GRP;
- uint32 rid = 0;
+ uint32_t rid = 0;
gid_t gid;
int i;
GROUP_MAP *map;
const struct dom_sid *domain_sid,
const struct dom_sid *member)
{
- uint32 *alias_rids;
+ uint32_t *alias_rids;
size_t i, num_alias_rids;
alias_rids = NULL;
/* The following definitions come from utils/net_rpc_service.c */
-const char *svc_status_string( uint32 state );
+const char *svc_status_string( uint32_t state );
int net_rpc_service(struct net_context *c, int argc, const char **argv);
/* The following definitions come from utils/net_rpc_sh_acct.c */
/***************************************************************************
list info on an open file
***************************************************************************/
-static void file_fn(const char * pPath, const char * pUser, uint16 perms,
- uint16 locks, uint32 id)
+static void file_fn(const char * pPath, const char * pUser, uint16_t perms,
+ uint16_t 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)
+static void one_file_fn(const char *pPath, const char *pUser, uint16_t perms,
+ uint16_t locks, uint32_t id)
{
d_printf(_("File ID %d\n"
"User name %s\n"
return net_share_usage(c, 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("%-12s %-8.8s %-50s\n",
share_name, net_share_type_str(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("%s\n", share_name);
return -1;
}
-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)
+static void list_sessions_func(char *wsname, char *username, uint16_t conns,
+ uint16_t opens, uint16_t users, uint32_t sess_time,
+ uint32_t idle_time, uint32 user_flags, char *clitype)
{
int hrs = idle_time / 3600;
int min = (idle_time / 60) % 60;
}
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)
+ uint16_t conns, uint16_t opens, uint16 users,
+ uint32_t sess_time, uint32 idle_time,
+ uint32_t user_flags, const char *clitype)
{
int ihrs = idle_time / 3600;
int imin = (idle_time / 60) % 60;
shrs, smin, ssec, ihrs, imin, isec);
}
-static void display_conns_func(uint16 conn_id, uint16 conn_type, uint16 opens,
- uint16 users, uint32 conn_time,
+static void display_conns_func(uint16_t conn_id, uint16_t conn_type, uint16 opens,
+ uint16_t users, uint32_t conn_time,
const char *username, const char *netname)
{
d_printf("%-14.14s %-8.8s %5d\n",
/****************************************************************************
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);
return -1;
}
-static void enum_queue(const char *queuename, uint16 pri, uint16 start,
- uint16 until, const char *sep, const char *pproc,
+static void enum_queue(const char *queuename, uint16_t pri, uint16_t start,
+ uint16_t until, const char *sep, const char *pproc,
const char *dest, const char *qparms,
- const char *qcomment, uint16 status, uint16 jobcount)
+ const char *qcomment, uint16_t status, uint16_t jobcount)
{
d_printf(_("%-17.17s Queue %5d jobs "),
queuename, jobcount);
}
}
-static void enum_jobs(uint16 jobid, const char *ownername,
+static void enum_jobs(uint16_t jobid, const char *ownername,
const char *notifyname, const char *datatype,
- const char *jparms, uint16 pos, uint16 status,
+ const char *jparms, uint16_t pos, uint16_t status,
const char *jstatus, unsigned int submitted, unsigned int jobsize,
const char *comment)
{
* split given path into hive and remaining path and open the hive key
*/
static WERROR open_hive(TALLOC_CTX *ctx, const char *path,
- uint32 desired_access,
+ uint32_t desired_access,
struct registry_key **hive,
char **subkeyname)
{
}
static WERROR open_key(TALLOC_CTX *ctx, const char *path,
- uint32 desired_access,
+ uint32_t desired_access,
struct registry_key **key)
{
WERROR werr;
break;
}
case REG_MULTI_SZ: {
- uint32 j;
+ uint32_t j;
const char **a;
if (!pull_reg_multi_sz(talloc_tos(), &valvalue->data, &a)) {
struct policy_handle connect_pol, domain_pol, user_pol;
NTSTATUS status, result;
struct dom_sid sid;
- uint32 rid;
+ uint32_t rid;
enum lsa_SidType type;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
NTSTATUS status, result;
const char *username;
const char *oldval = "unknown";
- uint32 oldflags, newflags;
+ uint32_t oldflags, newflags;
bool newval;
union samr_UserInfo *info = NULL;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
- uint32 group_rid;
+ uint32_t group_rid;
struct policy_handle group_pol;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
- uint32 alias_rid;
+ uint32_t alias_rid;
struct policy_handle alias_pol;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
- uint32 group_rid;
+ uint32_t group_rid;
struct policy_handle group_pol;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
- uint32 alias_rid;
+ uint32_t alias_rid;
struct policy_handle alias_pol;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
- uint32 start_idx=0, max_entries=250, num_entries, i, loop_count = 0;
+ uint32_t start_idx=0, max_entries=250, num_entries, i, loop_count = 0;
struct samr_SamArray *groups = NULL;
bool global = false;
bool local = false;
const char *domain_name,
const struct dom_sid *domain_sid,
struct policy_handle *domain_pol,
- uint32 rid)
+ uint32_t rid)
{
NTSTATUS result, status;
struct policy_handle group_pol;
- uint32 num_members, *group_rids;
+ uint32_t num_members, *group_rids;
int i;
struct samr_RidAttrArray *rids = NULL;
struct lsa_Strings names;
struct cli_state *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_pol,
- uint32 rid)
+ uint32_t rid)
{
NTSTATUS result, status;
struct rpc_pipe_client *lsa_pipe;
struct policy_handle alias_pol, lsa_pol;
- uint32 num_members;
+ uint32_t num_members;
struct dom_sid *alias_sids;
char **domains;
char **names;
NET_API_STATUS status;
char *sharename;
char *path;
- uint32 type = STYPE_DISKTREE; /* only allow disk shares to be added */
- uint32 num_users=0, perms=0;
+ uint32_t type = STYPE_DISKTREE; /* only allow disk shares to be added */
+ uint32_t num_users=0, perms=0;
char *password=NULL; /* don't allow a share password */
struct SHARE_INFO_2 i2;
uint32_t parm_error = 0;
static WERROR get_share_info(struct net_context *c,
struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
- uint32 level,
+ uint32_t level,
int argc,
const char **argv,
struct srvsvc_NetShareInfoCtr *info_ctr)
}
static bool check_share_sanity(struct net_context *c, struct cli_state *cli,
- const char *netname, uint32 type)
+ const char *netname, uint32_t type)
{
/* only support disk shares */
if (! ( type == STYPE_DISKTREE || type == (STYPE_DISKTREE | STYPE_HIDDEN)) ) {
WERROR result;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct srvsvc_NetShareInfoCtr ctr_src;
- uint32 i;
+ uint32_t i;
struct rpc_pipe_client *srvsvc_pipe = NULL;
struct cli_state *cli_dst = NULL;
- uint32 level = 502; /* includes secdesc */
+ uint32_t level = 502; /* includes secdesc */
uint32_t parm_error = 0;
struct dcerpc_binding_handle *b;
WERROR result;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct srvsvc_NetShareInfoCtr ctr_src;
- uint32 i;
- uint32 level = 502;
+ uint32_t i;
+ uint32_t level = 502;
struct copy_clistate cp_clistate;
bool got_src_share = false;
bool got_dst_share = false;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct srvsvc_NetShareInfoCtr ctr_src;
union srvsvc_NetShareInfo info;
- uint32 i;
+ uint32_t i;
struct rpc_pipe_client *srvsvc_pipe = NULL;
struct cli_state *cli_dst = NULL;
- uint32 level = 502; /* includes secdesc */
+ uint32_t level = 502; /* includes secdesc */
uint32_t parm_error = 0;
struct dcerpc_binding_handle *b;
struct full_alias {
struct dom_sid sid;
- uint32 num_members;
+ uint32_t num_members;
struct dom_sid *members;
};
struct policy_handle *connect_pol,
const struct dom_sid *domain_sid)
{
- uint32 start_idx, max_entries, num_entries, i;
+ uint32_t start_idx, max_entries, num_entries, i;
struct samr_SamArray *groups = NULL;
NTSTATUS result, status;
struct policy_handle domain_pol;
union srvsvc_NetShareInfo info;
WERROR result;
NTSTATUS status;
- uint16 cnum;
+ uint16_t cnum;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
status = dcerpc_srvsvc_NetShareGetInfo(b, mem_ctx,
}
for (i=0; i<num_tokens; i++) {
- uint32 acc_granted;
+ uint32_t acc_granted;
if (share_sd != NULL) {
status = se_access_check(share_sd, &tokens[i].token,
static int rpc_file_user(struct net_context *c, int argc, const char **argv)
{
NET_API_STATUS status;
- uint32 preferred_len = 0xffffffff, i;
+ uint32_t preferred_len = 0xffffffff, i;
char *username=NULL;
uint32_t total_entries = 0;
uint32_t entries_read = 0;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
WERROR result;
const char *msg = N_("This machine will be shutdown shortly");
- uint32 timeout = 20;
+ uint32_t timeout = 20;
struct lsa_StringLarge msg_string;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
const char **argv)
{
const char *msg = N_("This machine will be shutdown shortly");
- uint32 timeout = 20;
+ uint32_t timeout = 20;
struct lsa_StringLarge msg_string;
NTSTATUS result;
WERROR werr;
NTSTATUS status, result;
char *acct_name;
struct lsa_String lsa_acct_name;
- uint32 acb_info;
- uint32 acct_flags=0;
- uint32 user_rid;
+ uint32_t acb_info;
+ uint32_t acct_flags=0;
+ uint32_t user_rid;
uint32_t access_granted = 0;
union samr_UserInfo info;
unsigned int orig_timeout;
switch(value->type) {
case REG_DWORD:
- if (value->data.length == sizeof(uint32)) {
+ if (value->data.length == sizeof(uint32_t)) {
d_printf(_("\t[%s:%s]: REG_DWORD: 0x%08x\n"), subkey,
name, IVAL(value->data.data,0));
} else {
}
static bool reg_hive_key(TALLOC_CTX *ctx, const char *fullname,
- uint32 *reg_type, const char **key_name)
+ uint32_t *reg_type, const char **key_name)
{
WERROR werr;
char *hivename = NULL;
static NTSTATUS registry_openkey(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *pipe_hnd,
- const char *name, uint32 access_mask,
+ const char *name, uint32_t access_mask,
struct policy_handle *hive_hnd,
struct policy_handle *key_hnd)
{
- uint32 hive;
+ uint32_t hive;
NTSTATUS status;
WERROR werr;
struct winreg_String key;
static NTSTATUS registry_enumkeys(TALLOC_CTX *ctx,
struct rpc_pipe_client *pipe_hnd,
struct policy_handle *key_hnd,
- uint32 *pnum_keys, char ***pnames,
+ uint32_t *pnum_keys, char ***pnames,
char ***pclasses, NTTIME ***pmodtimes)
{
TALLOC_CTX *mem_ctx;
NTSTATUS status;
WERROR werr;
- uint32 num_subkeys, max_subkeylen, max_classlen;
- uint32 num_values, max_valnamelen, max_valbufsize;
- uint32 i;
+ uint32_t num_subkeys, max_subkeylen, max_classlen;
+ uint32_t num_values, max_valnamelen, max_valbufsize;
+ uint32_t i;
NTTIME last_changed_time;
- uint32 secdescsize;
+ uint32_t secdescsize;
struct winreg_String classname;
char **names, **classes;
NTTIME **modtimes;
static NTSTATUS registry_enumvalues(TALLOC_CTX *ctx,
struct rpc_pipe_client *pipe_hnd,
struct policy_handle *key_hnd,
- uint32 *pnum_values, char ***pvalnames,
+ uint32_t *pnum_values, char ***pvalnames,
struct registry_value ***pvalues)
{
TALLOC_CTX *mem_ctx;
NTSTATUS status;
WERROR werr;
- uint32 num_subkeys, max_subkeylen, max_classlen;
- uint32 num_values, max_valnamelen, max_valbufsize;
- uint32 i;
+ uint32_t num_subkeys, max_subkeylen, max_classlen;
+ uint32_t num_values, max_valnamelen, max_valbufsize;
+ uint32_t i;
NTTIME last_changed_time;
- uint32 secdescsize;
+ uint32_t secdescsize;
struct winreg_String classname;
struct registry_value **values;
char **names;
for (i=0; i<num_values; i++) {
enum winreg_Type type = REG_NONE;
- uint8 *data = NULL;
- uint32 data_size;
- uint32 value_length;
+ uint8_t *data = NULL;
+ uint32_t data_size;
+ uint32_t value_length;
char n;
struct winreg_ValNameBuf name_buf;
name_buf.size = max_valnamelen + 2;
data_size = max_valbufsize;
- data = (uint8 *)TALLOC(mem_ctx, data_size);
+ data = (uint8_t *)TALLOC(mem_ctx, data_size);
value_length = 0;
status = dcerpc_winreg_EnumValue(b, mem_ctx, key_hnd,
static NTSTATUS registry_enumvalues2(TALLOC_CTX *ctx,
struct rpc_pipe_client *pipe_hnd,
struct policy_handle *key_hnd,
- uint32 *pnum_values, char ***pvalnames,
+ uint32_t *pnum_values, char ***pvalnames,
struct regval_blob ***pvalues)
{
TALLOC_CTX *mem_ctx;
NTSTATUS status;
WERROR werr;
- uint32 num_subkeys, max_subkeylen, max_classlen;
- uint32 num_values, max_valnamelen, max_valbufsize;
- uint32 i;
+ uint32_t num_subkeys, max_subkeylen, max_classlen;
+ uint32_t num_values, max_valnamelen, max_valbufsize;
+ uint32_t i;
NTTIME last_changed_time;
- uint32 secdescsize;
+ uint32_t secdescsize;
struct winreg_String classname;
struct regval_blob **values;
char **names;
for (i=0; i<num_values; i++) {
enum winreg_Type type = REG_NONE;
- uint8 *data = NULL;
- uint32 data_size;
- uint32 value_length;
+ uint8_t *data = NULL;
+ uint32_t data_size;
+ uint32_t value_length;
char n;
struct winreg_ValNameBuf name_buf;
name_buf.size = max_valnamelen + 2;
data_size = max_valbufsize;
- data = (uint8 *)TALLOC(mem_ctx, data_size);
+ data = (uint8_t *)TALLOC(mem_ctx, data_size);
value_length = 0;
status = dcerpc_winreg_EnumValue(b, mem_ctx, key_hnd,
int argc,
const char **argv )
{
- uint32 hive;
+ uint32_t hive;
struct policy_handle hive_hnd, key_hnd;
struct winreg_String key, keyclass;
enum winreg_CreateAction action;
int argc,
const char **argv )
{
- uint32 hive;
+ uint32_t hive;
struct policy_handle hive_hnd;
struct winreg_String key;
NTSTATUS status;
struct policy_handle pol_hive, pol_key;
NTSTATUS status;
WERROR werr;
- uint32 num_subkeys = 0;
- uint32 num_values = 0;
+ uint32_t num_subkeys = 0;
+ uint32_t num_values = 0;
char **names = NULL, **classes = NULL;
NTTIME **modtimes = NULL;
- uint32 i;
+ uint32_t i;
struct registry_value **values = NULL;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
{
int i, j;
const char *data_str = NULL;
- uint32 data_size, data;
+ uint32_t data_size, data;
DATA_BLOB blob;
if ( !nk->values )
const char* name)
{
NTSTATUS status;
- uint32 num_subkeys = 0;
- uint32 num_values = 0;
+ uint32_t num_subkeys = 0;
+ uint32_t num_values = 0;
char **names = NULL, **classes = NULL;
NTTIME **modtimes = NULL;
struct regval_blob **values = NULL;
- uint32 i;
+ uint32_t i;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
TALLOC_CTX* mem_ctx = talloc_new(ctx);
keyname.name = name;
if (parent == NULL) {
- uint32 hive_idx = 0;
+ uint32_t hive_idx = 0;
if (!reg_hive_key(mem_ctx, name, &hive_idx, &keyname.name)) {
werr = WERR_FOOBAR;
goto done;
keyname.name = name;
if (parent == NULL) {
- uint32 hive_idx;
+ uint32_t hive_idx;
if (!reg_hive_key(mem_ctx, name, &hive_idx, &keyname.name)) {
werr = WERR_FOOBAR;
goto done;
struct policy_handle *pol )
{
NTSTATUS status, result;
- uint32 enum_context = 0;
- uint32 pref_max_length=0x1000;
+ uint32_t enum_context = 0;
+ uint32_t pref_max_length=0x1000;
int i;
- uint16 lang_id=0;
- uint16 lang_id_sys=0;
- uint16 lang_id_desc;
+ uint16_t lang_id=0;
+ uint16_t lang_id_sys=0;
+ uint16_t lang_id_desc;
struct lsa_StringLarge *description = NULL;
struct lsa_PrivArray priv_array;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
const char *privilege)
{
NTSTATUS status, result;
- uint32 enum_context=0;
- uint32 pref_max_length=0x1000;
+ uint32_t enum_context=0;
+ uint32_t pref_max_length=0x1000;
struct lsa_SidArray sid_array;
int i;
fstring name;
struct policy_handle *pol)
{
NTSTATUS status, result;
- uint32 enum_context=0;
- uint32 pref_max_length=0x1000;
+ uint32_t enum_context=0;
+ uint32_t pref_max_length=0x1000;
struct lsa_SidArray sid_array;
int i;
fstring name;
fstring privname;
struct lsa_String lsa_name;
struct lsa_StringLarge *description = NULL;
- uint16 lang_id = 0;
- uint16 lang_id_sys = 0;
- uint16 lang_id_desc;
+ uint16_t lang_id = 0;
+ uint16_t lang_id_sys = 0;
+ uint16_t lang_id_desc;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
status = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
#include "../librpc/gen_ndr/ndr_svcctl_c.h"
struct svc_state_msg {
- uint32 flag;
+ uint32_t flag;
const char *message;
};
/********************************************************************
********************************************************************/
-const char *svc_status_string( uint32 state )
+const char *svc_status_string( uint32_t state )
{
fstring msg;
int i;
TALLOC_CTX *mem_ctx,
struct policy_handle *hSCM,
const char *service,
- uint32 *state )
+ uint32_t *state )
{
struct policy_handle hService;
struct SERVICE_STATUS service_status;
TALLOC_CTX *mem_ctx,
struct policy_handle *hSCM,
const char *service,
- uint32 watch_state,
- uint32 *final_state )
+ uint32_t watch_state,
+ uint32_t *final_state )
{
- uint32 i;
- uint32 state = 0;
+ uint32_t i;
+ uint32_t state = 0;
WERROR result = WERR_GENERAL_FAILURE;
TALLOC_CTX *mem_ctx,
struct policy_handle *hSCM,
const char *service,
- uint32 control,
- uint32 watch_state )
+ uint32_t control,
+ uint32_t watch_state )
{
struct policy_handle hService;
WERROR result = WERR_GENERAL_FAILURE;
NTSTATUS status;
struct SERVICE_STATUS service_status;
- uint32 state = 0;
+ uint32_t state = 0;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
/* Open the Service */
struct policy_handle hSCM, hService;
WERROR result = WERR_GENERAL_FAILURE;
NTSTATUS status;
- uint32 state = 0;
+ uint32_t state = 0;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
if (argc != 1 ) {
static int net_sam_set_userflag(struct net_context *c, int argc,
const char **argv, const char *field,
- uint16 flag)
+ uint16_t flag)
{
struct samu *sam_acct = NULL;
struct dom_sid sid;
static int net_sam_policy_set(struct net_context *c, int argc, const char **argv)
{
const char *account_policy = NULL;
- uint32 value = 0;
- uint32 old_value = 0;
+ uint32_t value = 0;
+ uint32_t old_value = 0;
enum pdb_policy_type field;
char *endptr;
static int net_sam_policy_show(struct net_context *c, int argc, const char **argv)
{
const char *account_policy = NULL;
- uint32 old_value;
+ uint32_t old_value;
enum pdb_policy_type field;
if (argc != 1 || c->display_usage) {
static NTSTATUS map_unix_group(const struct group *grp, GROUP_MAP *map)
{
const char *dom, *name;
- uint32 rid;
+ uint32_t rid;
if (pdb_getgrgid(map, grp->gr_gid)) {
return NT_STATUS_GROUP_EXISTS;
const char **argv)
{
NTSTATUS status;
- uint32 rid;
+ uint32_t rid;
if (argc != 1 || c->display_usage) {
d_fprintf(stderr, "%s\n%s",
static int net_sam_createlocalgroup(struct net_context *c, int argc, const char **argv)
{
NTSTATUS status;
- uint32 rid;
+ uint32_t rid;
if (argc != 1 || c->display_usage) {
d_fprintf(stderr, "%s\n%s",
static int net_sam_createbuiltingroup(struct net_context *c, int argc, const char **argv)
{
NTSTATUS status;
- uint32 rid;
+ uint32_t rid;
enum lsa_SidType type;
fstring groupname;
struct dom_sid sid;
const DATA_BLOB *challenge,
const DATA_BLOB *lm_response,
const DATA_BLOB *nt_response,
- uint32 flags,
- uint32 extra_logon_parameters,
- uint8 lm_key[8],
- uint8 user_session_key[16],
+ uint32_t flags,
+ uint32_t extra_logon_parameters,
+ uint8_t lm_key[8],
+ uint8_t user_session_key[16],
char **error_string,
char **unix_name)
{
static const char zeros[16] = { 0, };
NTSTATUS nt_status;
char *error_string = NULL;
- uint8 lm_key[8];
- uint8 user_sess_key[16];
+ uint8_t lm_key[8];
+ uint8_t user_sess_key[16];
char *unix_name = NULL;
nt_status = contact_winbind_auth_crap(user_info->client.account_name, user_info->client.domain_name,
char *error_string = NULL;
uchar lm_key[8];
uchar user_session_key[16];
- uint32 flags = 0;
+ uint32_t flags = 0;
if (full_username && !username) {
fstring fstr_user;
static bool check_auth_crap(void)
{
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
char lm_key[8];
char user_session_key[16];
char *hex_lm_key;
char *hex_user_session_key;
char *error_string;
- static uint8 zeros[16];
+ static uint8_t zeros[16];
x_setbuf(x_stdout, NULL);
{
bool pass = True;
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
DATA_BLOB lm_response = data_blob(NULL, 24);
DATA_BLOB nt_response = data_blob(NULL, 24);
DATA_BLOB session_key = data_blob(NULL, 16);
{
bool pass = True;
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
uchar lm_key[8];
{
bool pass = True;
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
DATA_BLOB session_key = data_blob(NULL, 16);
- uint8 lm_key[8];
- uint8 lm_hash[16];
- uint8 user_session_key[16];
- uint8 nt_hash[16];
+ uint8_t lm_key[8];
+ uint8_t lm_hash[16];
+ uint8_t user_session_key[16];
+ uint8_t nt_hash[16];
DATA_BLOB chall = get_challenge();
char *error_string;
{
bool pass = True;
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
DATA_BLOB ntlmv2_response = data_blob_null;
DATA_BLOB lmv2_response = data_blob_null;
DATA_BLOB ntlmv2_session_key = data_blob_null;
static bool test_plaintext(enum ntlm_break break_which)
{
NTSTATUS nt_status;
- uint32 flags = 0;
+ uint32_t flags = 0;
DATA_BLOB nt_response = data_blob_null;
DATA_BLOB lm_response = data_blob_null;
char *password;
const DATA_BLOB *challenge,
const DATA_BLOB *lm_response,
const DATA_BLOB *nt_response,
- uint32 flags,
- uint32 extra_logon_parameters,
- uint8 lm_key[8],
- uint8 user_session_key[16],
+ uint32_t flags,
+ uint32_t extra_logon_parameters,
+ uint8_t lm_key[8],
+ uint8_t user_session_key[16],
char **error_string,
char **unix_name);
lm_passwd,
nt_passwd,
pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN),
- (uint32)convert_time_t_to_uint32_t(pdb_get_pass_last_set_time(sam_pwent)));
+ (uint32_t)convert_time_t_to_uint32_t(pdb_get_pass_last_set_time(sam_pwent)));
} else {
uid = nametouid(pdb_get_username(sam_pwent));
printf ("%s:%lu:%s\n", pdb_get_username(sam_pwent), (unsigned long)uid,
static int add_user = False;
static int delete_user = False;
static int modify_user = False;
- uint32 setparms, checkparms;
+ uint32_t setparms, checkparms;
int opt;
static char *full_name = NULL;
static char *acct_desc = NULL;
WERROR reg_openkey_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *parent,
const char *name, struct samba3_registry_key *key);
WERROR reg_enumvalue_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *key,
- uint32 idx, char **name, uint32_t *type,
+ uint32_t idx, char **name, uint32_t *type,
DATA_BLOB *data);
WERROR reg_queryvalue_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *key,
const char *name, uint32_t *type, DATA_BLOB *data);
WERROR reg_enumkey_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *key,
- uint32 idx, char **name, NTTIME *last_write_time);
+ uint32_t idx, char **name, NTTIME *last_write_time);
WERROR reg_createkey_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *parent,
const char *subkeypath,
struct samba3_registry_key *pkey);
}
WERROR reg_enumvalue_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *key,
- uint32 idx, char **name, uint32_t *type,
+ uint32_t idx, char **name, uint32_t *type,
DATA_BLOB *data)
{
struct registry_value *val = NULL;
}
WERROR reg_enumkey_wrap(TALLOC_CTX *ctx, struct samba3_registry_key *key,
- uint32 idx, char **name, NTTIME *last_write_time)
+ uint32_t idx, char **name, NTTIME *last_write_time)
{
return reg_enumkey(ctx, key->key, idx, name, last_write_time);
}
static void sort_acl(struct security_acl *the_acl)
{
- uint32 i;
+ uint32_t i;
if (!the_acl) return;
TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
struct security_descriptor *sd = NULL;
struct security_descriptor *old = NULL;
size_t sd_size = 0;
- uint32 i, j;
+ uint32_t i, j;
if (mode != SMB_ACL_SET && mode != SMB_SD_DELETE) {
if (!(old = get_share_security( mem_ctx, sharename, &sd_size )) ) {
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (security_ace_equal(&sd->dacl->aces[i],
&old->dacl->aces[j])) {
- uint32 k;
+ uint32_t k;
for (k=j; k<old->dacl->num_aces-1;k++) {
old->dacl->aces[k] = old->dacl->aces[k+1];
}
struct dom_sid *sid)
{
union lsa_PolicyInformation *info = NULL;
- uint16 orig_cnum = cli_state_get_tid(cli);
+ uint16_t orig_cnum = cli_state_get_tid(cli);
struct rpc_pipe_client *rpc_pipe = NULL;
struct policy_handle handle;
NTSTATUS status, result;
/*****************************************************
get fileinfo for filename
*******************************************************/
-static uint16 get_fileinfo(struct cli_state *cli, const char *filename)
+static uint16_t get_fileinfo(struct cli_state *cli, const char *filename)
{
uint16_t fnum = (uint16_t)-1;
- uint16 mode = 0;
+ uint16_t mode = 0;
NTSTATUS status;
/* The desired access below is the only one I could find that works
static void sort_acl(struct security_acl *the_acl)
{
- uint32 i;
+ uint32_t i;
if (!the_acl) return;
TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
char *the_acl, enum acl_mode mode, bool numeric)
{
struct security_descriptor *sd, *old;
- uint32 i, j;
+ uint32_t i, j;
size_t sd_size;
int result = EXIT_OK;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (security_ace_equal(&sd->dacl->aces[i],
&old->dacl->aces[j])) {
- uint32 k;
+ uint32_t k;
for (k=j; k<old->dacl->num_aces-1;k++) {
old->dacl->aces[k] = old->dacl->aces[k+1];
}
const char *type)
{
struct security_descriptor *old,*sd;
- uint32 oldattr;
+ uint32_t oldattr;
size_t sd_size;
int result = EXIT_OK;
struct smb_name_list {
struct smb_name_list *prev, *next;
char *name, *comment;
- uint32 server_type;
+ uint32_t server_type;
};
static struct smb_name_list *workgroups, *servers, *shares;
DLIST_REMOVE(list, list);
}
-static void add_name(const char *machine_name, uint32 server_type,
+static void add_name(const char *machine_name, uint32_t server_type,
const char *comment, void *state)
{
struct smb_name_list **name_list = (struct smb_name_list **)state;
}
static bool get_rpc_shares(struct cli_state *cli,
- void (*fn)(const char *, uint32, const char *, void *),
+ void (*fn)(const char *, uint32_t, const char *, void *),
void *state)
{
NTSTATUS status;