static bool samu_correct(struct samu *s1, struct samu *s2)
{
bool ret = True;
- uint32 s1_len, s2_len;
+ uint32_t s1_len, s2_len;
const char *s1_buf, *s2_buf;
- const uint8 *d1_buf, *d2_buf;
+ const uint8_t *d1_buf, *d2_buf;
const struct dom_sid *s1_sid, *s2_sid;
/* Check Unix username */
struct timeval tv;
bool error = False;
struct passwd *pwd;
- uint8 *buf;
- uint32 expire, min_age, history;
+ uint8_t *buf;
+ uint32_t expire, min_age, history;
struct pdb_methods *pdb;
poptContext pc;
static const char *backend = NULL;
pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &history);
if (history * PW_HISTORY_ENTRY_LEN < NT_HASH_LEN) {
- buf = (uint8 *)TALLOC(ctx, NT_HASH_LEN);
+ buf = (uint8_t *)TALLOC(ctx, NT_HASH_LEN);
} else {
- buf = (uint8 *)TALLOC(ctx, history * PW_HISTORY_ENTRY_LEN);
+ buf = (uint8_t *)TALLOC(ctx, history * PW_HISTORY_ENTRY_LEN);
}
/* Generate some random hashes */
GetTimeOfDay(&tv);
srand(tv.tv_usec);
for (i = 0; i < NT_HASH_LEN; i++) {
- buf[i] = (uint8) rand();
+ buf[i] = (uint8_t) rand();
}
pdb_set_nt_passwd(out, buf, PDB_SET);
for (i = 0; i < LM_HASH_LEN; i++) {
- buf[i] = (uint8) rand();
+ buf[i] = (uint8_t) rand();
}
pdb_set_lanman_passwd(out, buf, PDB_SET);
for (i = 0; i < history * PW_HISTORY_ENTRY_LEN; i++) {
- buf[i] = (uint8) rand();
+ buf[i] = (uint8_t) rand();
}
pdb_set_pw_history(out, buf, history, PDB_SET);
pdb_get_account_policy(PDB_POLICY_MIN_PASSWORD_AGE, &min_age);
pdb_set_pass_last_set_time(out, time(NULL), PDB_SET);
- if (min_age == (uint32)-1) {
+ if (min_age == (uint32_t)-1) {
pdb_set_pass_can_change_time(out, 0, PDB_SET);
} else {
pdb_set_pass_can_change_time(out, time(NULL)+min_age, PDB_SET);
static bool force_cli_encryption(struct cli_state *c,
const char *sharename)
{
- uint16 major, minor;
- uint32 caplow, caphigh;
+ uint16_t major, minor;
+ uint32_t caplow, caphigh;
NTSTATUS status;
if (!SERVER_HAS_UNIX_CIFS(c)) {
return true;
}
-bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
+bool torture_cli_session_setup2(struct cli_state *cli, uint16_t *new_vuid)
{
uint16_t old_vuid = cli_state_get_uid(cli);
size_t passlen = strlen(password);
/* check if the server produced the expected dos or nt error code */
static bool check_both_error(int line, NTSTATUS status,
- uint8 eclass, uint32 ecode, NTSTATUS nterr)
+ uint8_t eclass, uint32_t ecode, NTSTATUS nterr)
{
if (NT_STATUS_IS_DOS(status)) {
- uint8 cclass;
- uint32 num;
+ uint8_t cclass;
+ uint32_t num;
/* Check DOS error */
cclass = NT_STATUS_DOS_CLASS(status);
/* check if the server produced the expected error code */
static bool check_error(int line, NTSTATUS status,
- uint8 eclass, uint32 ecode, NTSTATUS nterr)
+ uint8_t eclass, uint32_t ecode, NTSTATUS nterr)
{
if (NT_STATUS_IS_DOS(status)) {
- uint8 cclass;
- uint32 num;
+ uint8_t cclass;
+ uint32_t num;
/* Check DOS error */
}
-static bool wait_lock(struct cli_state *c, int fnum, uint32 offset, uint32 len)
+static bool wait_lock(struct cli_state *c, int fnum, uint32_t offset, uint32_t len)
{
NTSTATUS status;
NTSTATUS status = NT_STATUS_OK;
srandom(1);
- for (i = 0; i < sizeof(buf); i += sizeof(uint32))
+ for (i = 0; i < sizeof(buf); i += sizeof(uint32_t))
{
SIVAL(buf, i, sys_random());
}
{
static struct cli_state *cli;
const char *fname = "\\tcontest.tmp";
- uint16 fnum1;
- uint16 cnum1, cnum2, cnum3;
- uint16 vuid1, vuid2;
+ uint16_t fnum1;
+ uint16_t cnum1, cnum2, cnum3;
+ uint16_t vuid1, vuid2;
char buf[4];
bool ret = True;
NTSTATUS status;
static bool run_tcon2_test(int dummy)
{
static struct cli_state *cli;
- uint16 cnum, max_xmit;
+ uint16_t cnum, max_xmit;
char *service;
NTSTATUS status;
const char *fname = "\\lockt3.lck";
uint16_t fnum1, fnum2;
int i;
- uint32 offset;
+ uint32_t offset;
bool correct = True;
NTSTATUS status;
-#define NEXT_OFFSET offset += (~(uint32)0) / torture_numops
+#define NEXT_OFFSET offset += (~(uint32_t)0) / torture_numops
if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
return False;
static bool run_fdsesstest(int dummy)
{
struct cli_state *cli;
- uint16 new_vuid;
- uint16 saved_vuid;
- uint16 new_cnum;
- uint16 saved_cnum;
+ uint16_t new_vuid;
+ uint16_t saved_vuid;
+ uint16_t new_cnum;
+ uint16_t saved_cnum;
const char *fname = "\\fdsess.tst";
const char *fname1 = "\\fdsess1.tst";
uint16_t fnum1;
-static void browse_callback(const char *sname, uint32 stype,
+static void browse_callback(const char *sname, uint32_t stype,
const char *comment, void *state)
{
printf("\t%20.20s %08x %s\n", sname, stype, comment);
static NTSTATUS new_trans(struct cli_state *pcli, int fnum, int level)
{
uint8_t *buf = NULL;
- uint32 len;
+ uint32_t len;
NTSTATUS status;
status = cli_qfileinfo(talloc_tos(), pcli, fnum, level, 0,
nt_errstr(status));
} else {
printf("qfileinfo: level %d, len = %u\n", level, len);
- dump_data(0, (uint8 *)buf, len);
+ dump_data(0, (uint8_t *)buf, len);
printf("\n");
}
TALLOC_FREE(buf);
NTSTATUS torture_setup_unix_extensions(struct cli_state *cli)
{
- uint16 major, minor;
- uint32 caplow, caphigh;
+ uint16_t major, minor;
+ uint32_t caplow, caphigh;
NTSTATUS status;
if (!SERVER_HAS_UNIX_CIFS(cli)) {
}
-static uint32 open_attrs_table[] = {
+static uint32_t open_attrs_table[] = {
FILE_ATTRIBUTE_NORMAL,
FILE_ATTRIBUTE_ARCHIVE,
FILE_ATTRIBUTE_READONLY,
struct trunc_open_results {
unsigned int num;
- uint32 init_attr;
- uint32 trunc_attr;
- uint32 result_attr;
+ uint32_t init_attr;
+ uint32_t trunc_attr;
+ uint32_t result_attr;
};
static struct trunc_open_results attr_results[] = {
const char *fname = "\\openattr.file";
uint16_t fnum1;
bool correct = True;
- uint16 attr;
+ uint16_t attr;
unsigned int i, j, k, l;
NTSTATUS status;
smbXcli_conn_set_sockopt(cli1->conn, sockops);
- for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32); i++) {
+ for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32_t); i++) {
cli_setatr(cli1, fname, 0, 0);
cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
return False;
}
- for (j = 0; j < sizeof(open_attrs_table)/sizeof(uint32); j++) {
+ for (j = 0; j < sizeof(open_attrs_table)/sizeof(uint32_t); j++) {
status = cli_ntcreate(cli1, fname, 0,
FILE_READ_DATA|FILE_WRITE_DATA,
open_attrs_table[j],
for (device=0;device<0x100;device++) {
printf("ioctl test with device = 0x%x\n", device);
for (function=0;function<0x100;function++) {
- uint32 code = (device<<16) | function;
+ uint32_t code = (device<<16) | function;
status = cli_raw_ioctl(cli, fnum, code, &blob);
static struct cli_state *c_nt;
NTSTATUS status;
- uint32 error;
+ uint32_t error;
- uint32 errnum;
- uint8 errclass;
+ uint32_t errnum;
+ uint8_t errclass;
NTSTATUS nt_status;