1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

Change uint_t to unsigned int in source4

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Matt Kraai 2010-01-05 09:42:54 -08:00 committed by Stefan Metzmacher
parent a47b6ebb30
commit d8071e7ed7
61 changed files with 290 additions and 290 deletions

View File

@ -72,9 +72,9 @@ struct smbclient_context {
/* timing globals */ /* timing globals */
static uint64_t get_total_size = 0; static uint64_t get_total_size = 0;
static uint_t get_total_time_ms = 0; static unsigned int get_total_time_ms = 0;
static uint64_t put_total_size = 0; static uint64_t put_total_size = 0;
static uint_t put_total_time_ms = 0; static unsigned int put_total_time_ms = 0;
/* Unfortunately, there is no way to pass the a context to the completion function as an argument */ /* Unfortunately, there is no way to pass the a context to the completion function as an argument */
static struct smbclient_context *rl_ctx; static struct smbclient_context *rl_ctx;

View File

@ -208,9 +208,9 @@ int samdb_search_count(struct ldb_context *sam_ldb,
/* /*
search the sam for a single integer attribute in exactly 1 record search the sam for a single integer attribute in exactly 1 record
*/ */
uint_t samdb_search_uint(struct ldb_context *sam_ldb, unsigned int samdb_search_uint(struct ldb_context *sam_ldb,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
uint_t default_value, unsigned int default_value,
struct ldb_dn *basedn, struct ldb_dn *basedn,
const char *attr_name, const char *attr_name,
const char *format, ...) _PRINTF_ATTRIBUTE(6,7) const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
@ -314,7 +314,7 @@ int samdb_search_string_multiple(struct ldb_context *sam_ldb,
/* /*
pull a uint from a result set. pull a uint from a result set.
*/ */
uint_t samdb_result_uint(const struct ldb_message *msg, const char *attr, uint_t default_value) unsigned int samdb_result_uint(const struct ldb_message *msg, const char *attr, unsigned int default_value)
{ {
return ldb_msg_find_attr_as_uint(msg, attr, default_value); return ldb_msg_find_attr_as_uint(msg, attr, default_value);
} }
@ -557,10 +557,10 @@ struct samr_Password *samdb_result_hash(TALLOC_CTX *mem_ctx, const struct ldb_me
/* /*
pull an array of samr_Password structutres from a result set. pull an array of samr_Password structutres from a result set.
*/ */
uint_t samdb_result_hashes(TALLOC_CTX *mem_ctx, const struct ldb_message *msg, unsigned int samdb_result_hashes(TALLOC_CTX *mem_ctx, const struct ldb_message *msg,
const char *attr, struct samr_Password **hashes) const char *attr, struct samr_Password **hashes)
{ {
uint_t count, i; unsigned int count, i;
const struct ldb_val *val = ldb_msg_find_ldb_val(msg, attr); const struct ldb_val *val = ldb_msg_find_ldb_val(msg, attr);
*hashes = NULL; *hashes = NULL;
@ -846,10 +846,10 @@ int samdb_msg_add_int(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct l
} }
/* /*
add a uint_t element to a message add a unsigned int element to a message
*/ */
int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
const char *attr_name, uint_t v) const char *attr_name, unsigned int v)
{ {
return samdb_msg_add_int(sam_ldb, mem_ctx, msg, attr_name, (int)v); return samdb_msg_add_int(sam_ldb, mem_ctx, msg, attr_name, (int)v);
} }
@ -892,7 +892,7 @@ int samdb_msg_add_hash(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct
add a samr_Password array to a message add a samr_Password array to a message
*/ */
int samdb_msg_add_hashes(TALLOC_CTX *mem_ctx, struct ldb_message *msg, int samdb_msg_add_hashes(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
const char *attr_name, struct samr_Password *hashes, uint_t count) const char *attr_name, struct samr_Password *hashes, unsigned int count)
{ {
struct ldb_val val; struct ldb_val val;
int i; int i;

View File

@ -84,8 +84,8 @@ struct ph_context {
struct domain_data { struct domain_data {
bool store_cleartext; bool store_cleartext;
uint_t pwdProperties; unsigned int pwdProperties;
uint_t pwdHistoryLength; unsigned int pwdHistoryLength;
const char *netbios_domain; const char *netbios_domain;
const char *dns_domain; const char *dns_domain;
const char *realm; const char *realm;

View File

@ -98,7 +98,7 @@ static void ping_message(struct messaging_context *msg, void *private_data,
uint32_t msg_type, struct server_id src, DATA_BLOB *data) uint32_t msg_type, struct server_id src, DATA_BLOB *data)
{ {
DEBUG(1,("INFO: Received PING message from server %u.%u [%.*s]\n", DEBUG(1,("INFO: Received PING message from server %u.%u [%.*s]\n",
(uint_t)src.node, (uint_t)src.id, (int)data->length, (unsigned int)src.node, (unsigned int)src.id, (int)data->length,
data->data?(const char *)data->data:"")); data->data?(const char *)data->data:""));
messaging_send(msg, src, MSG_PONG, data); messaging_send(msg, src, MSG_PONG, data);
} }

View File

@ -55,7 +55,7 @@ static NTSTATUS smbcli_link_internal(struct smbcli_tree *tree,
****************************************************************************/ ****************************************************************************/
uint32_t unix_perms_to_wire(mode_t perms) uint32_t unix_perms_to_wire(mode_t perms)
{ {
uint_t ret = 0; unsigned int ret = 0;
ret |= ((perms & S_IXOTH) ? UNIX_X_OTH : 0); ret |= ((perms & S_IXOTH) ? UNIX_X_OTH : 0);
ret |= ((perms & S_IWOTH) ? UNIX_W_OTH : 0); ret |= ((perms & S_IWOTH) ? UNIX_W_OTH : 0);
@ -271,8 +271,8 @@ int smbcli_open(struct smbcli_tree *tree, const char *fname, int flags,
int share_mode) int share_mode)
{ {
union smb_open open_parms; union smb_open open_parms;
uint_t openfn=0; unsigned int openfn=0;
uint_t accessmode=0; unsigned int accessmode=0;
TALLOC_CTX *mem_ctx; TALLOC_CTX *mem_ctx;
NTSTATUS status; NTSTATUS status;

View File

@ -185,7 +185,7 @@ union smb_mkdir {
enum smb_mkdir_level level; enum smb_mkdir_level level;
struct { struct {
const char *path; const char *path;
uint_t num_eas; unsigned int num_eas;
struct ea_struct *eas; struct ea_struct *eas;
} in; } in;
} t2mkdir; } t2mkdir;
@ -488,7 +488,7 @@ union smb_fileinfo {
struct { struct {
uint32_t attrib; uint32_t attrib;
uint32_t ea_size; uint32_t ea_size;
uint_t num_eas; unsigned int num_eas;
struct ea_struct { struct ea_struct {
uint8_t flags; uint8_t flags;
struct smb_wire_string name; struct smb_wire_string name;
@ -516,7 +516,7 @@ union smb_fileinfo {
uint32_t mode; uint32_t mode;
uint32_t alignment_requirement; uint32_t alignment_requirement;
uint32_t reparse_tag; uint32_t reparse_tag;
uint_t num_streams; unsigned int num_streams;
struct stream_struct { struct stream_struct {
uint64_t size; uint64_t size;
uint64_t alloc_size; uint64_t alloc_size;
@ -578,14 +578,14 @@ union smb_fileinfo {
enum smb_fileinfo_level level; enum smb_fileinfo_level level;
struct { struct {
union smb_handle_or_path file; union smb_handle_or_path file;
uint_t num_names; unsigned int num_names;
struct ea_name { struct ea_name {
struct smb_wire_string name; struct smb_wire_string name;
} *ea_names; } *ea_names;
} in; } in;
struct smb_ea_list { struct smb_ea_list {
uint_t num_eas; unsigned int num_eas;
struct ea_struct *eas; struct ea_struct *eas;
} out; } out;
} ea_list; } ea_list;
@ -732,7 +732,7 @@ union smb_fileinfo {
union smb_handle_or_path file; union smb_handle_or_path file;
} in; } in;
struct stream_information { struct stream_information {
uint_t num_streams; unsigned int num_streams;
struct stream_struct *streams; struct stream_struct *streams;
} out; } out;
} stream_info; } stream_info;
@ -993,7 +993,7 @@ union smb_setfileinfo {
enum smb_setfileinfo_level level; enum smb_setfileinfo_level level;
struct { struct {
union smb_handle_or_path file; union smb_handle_or_path file;
uint_t num_eas; unsigned int num_eas;
struct ea_struct *eas; struct ea_struct *eas;
} in; } in;
} ea_set; } ea_set;
@ -1474,7 +1474,7 @@ union smb_open {
uint32_t size; uint32_t size;
uint32_t timeout; uint32_t timeout;
const char *fname; const char *fname;
uint_t num_eas; unsigned int num_eas;
struct ea_struct *eas; struct ea_struct *eas;
} in; } in;
struct { struct {
@ -2484,7 +2484,7 @@ union smb_search_first {
const char *pattern; const char *pattern;
/* the ea names are only used for RAW_SEARCH_EA_LIST */ /* the ea names are only used for RAW_SEARCH_EA_LIST */
uint_t num_names; unsigned int num_names;
struct ea_name *ea_names; struct ea_name *ea_names;
} in; } in;
struct { struct {
@ -2568,7 +2568,7 @@ union smb_search_next {
const char *last_name; const char *last_name;
/* the ea names are only used for RAW_SEARCH_EA_LIST */ /* the ea names are only used for RAW_SEARCH_EA_LIST */
uint_t num_names; unsigned int num_names;
struct ea_name *ea_names; struct ea_name *ea_names;
} in; } in;
struct { struct {

View File

@ -63,9 +63,9 @@ struct smbcli_negotiate {
int server_zone; int server_zone;
time_t server_time; time_t server_time;
uint_t readbraw_supported:1; unsigned int readbraw_supported:1;
uint_t writebraw_supported:1; unsigned int writebraw_supported:1;
uint_t lockread_supported:1; unsigned int lockread_supported:1;
char *server_domain; char *server_domain;
}; };
@ -93,11 +93,11 @@ struct smbcli_socket {
client library client library
*/ */
struct smbcli_options { struct smbcli_options {
uint_t use_oplocks:1; unsigned int use_oplocks:1;
uint_t use_level2_oplocks:1; unsigned int use_level2_oplocks:1;
uint_t use_spnego:1; unsigned int use_spnego:1;
uint_t unicode:1; unsigned int unicode:1;
uint_t ntstatus_support:1; unsigned int ntstatus_support:1;
int max_protocol; int max_protocol;
uint32_t max_xmit; uint32_t max_xmit;
uint16_t max_mux; uint16_t max_mux;
@ -122,7 +122,7 @@ struct smbcli_transport {
/* is a readbraw pending? we need to handle that case /* is a readbraw pending? we need to handle that case
specially on receiving packets */ specially on receiving packets */
uint_t readbraw_pending:1; unsigned int readbraw_pending:1;
/* an idle function - if this is defined then it will be /* an idle function - if this is defined then it will be
called once every period microseconds while we are waiting called once every period microseconds while we are waiting
@ -130,7 +130,7 @@ struct smbcli_transport {
struct { struct {
void (*func)(struct smbcli_transport *, void *); void (*func)(struct smbcli_transport *, void *);
void *private_data; void *private_data;
uint_t period; unsigned int period;
} idle; } idle;
/* the error fields from the last message */ /* the error fields from the last message */
@ -143,7 +143,7 @@ struct smbcli_transport {
SOCKET_READ_ERROR, SOCKET_READ_ERROR,
SOCKET_WRITE_ERROR, SOCKET_WRITE_ERROR,
SOCKET_READ_BAD_SIG} socket_error; SOCKET_READ_BAD_SIG} socket_error;
uint_t nbt_error; unsigned int nbt_error;
} e; } e;
} error; } error;
@ -193,9 +193,9 @@ struct smbcli_session {
struct gensec_security *gensec; struct gensec_security *gensec;
struct smbcli_session_options { struct smbcli_session_options {
uint_t lanman_auth:1; unsigned int lanman_auth:1;
uint_t ntlmv2_auth:1; unsigned int ntlmv2_auth:1;
uint_t plaintext_auth:1; unsigned int plaintext_auth:1;
} options; } options;
const char *os; const char *os;
@ -256,18 +256,18 @@ struct smbcli_request {
NTSTATUS status; NTSTATUS status;
/* the sequence number of this packet - used for signing */ /* the sequence number of this packet - used for signing */
uint_t seq_num; unsigned int seq_num;
/* list of ntcancel request for this requests */ /* list of ntcancel request for this requests */
struct smbcli_request *ntcancel; struct smbcli_request *ntcancel;
/* set if this is a one-way request, meaning we are not /* set if this is a one-way request, meaning we are not
expecting a reply from the server. */ expecting a reply from the server. */
uint_t one_way_request:1; unsigned int one_way_request:1;
/* set this when the request should only increment the signing /* set this when the request should only increment the signing
counter by one */ counter by one */
uint_t sign_single_increment:1; unsigned int sign_single_increment:1;
/* the caller wants to do the signing check */ /* the caller wants to do the signing check */
bool sign_caller_checks; bool sign_caller_checks;

View File

@ -26,9 +26,9 @@
This assumes the names are strict ascii, which should be a This assumes the names are strict ascii, which should be a
reasonable assumption reasonable assumption
*/ */
size_t ea_list_size(uint_t num_eas, struct ea_struct *eas) size_t ea_list_size(unsigned int num_eas, struct ea_struct *eas)
{ {
uint_t total = 4; unsigned int total = 4;
int i; int i;
for (i=0;i<num_eas;i++) { for (i=0;i<num_eas;i++) {
total += 4 + strlen(eas[i].name.s)+1 + eas[i].value.length; total += 4 + strlen(eas[i].name.s)+1 + eas[i].value.length;
@ -39,9 +39,9 @@ size_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
/* /*
work out how many bytes on the wire a ea name list will consume. work out how many bytes on the wire a ea name list will consume.
*/ */
static uint_t ea_name_list_size(uint_t num_names, struct ea_name *eas) static unsigned int ea_name_list_size(unsigned int num_names, struct ea_name *eas)
{ {
uint_t total = 4; unsigned int total = 4;
int i; int i;
for (i=0;i<num_names;i++) { for (i=0;i<num_names;i++) {
total += 1 + strlen(eas[i].name.s) + 1; total += 1 + strlen(eas[i].name.s) + 1;
@ -54,12 +54,12 @@ static uint_t ea_name_list_size(uint_t num_names, struct ea_name *eas)
This assumes the names are strict ascii, which should be a This assumes the names are strict ascii, which should be a
reasonable assumption reasonable assumption
*/ */
size_t ea_list_size_chained(uint_t num_eas, struct ea_struct *eas, unsigned alignment) size_t ea_list_size_chained(unsigned int num_eas, struct ea_struct *eas, unsigned alignment)
{ {
uint_t total = 0; unsigned int total = 0;
int i; int i;
for (i=0;i<num_eas;i++) { for (i=0;i<num_eas;i++) {
uint_t len = 8 + strlen(eas[i].name.s)+1 + eas[i].value.length; unsigned int len = 8 + strlen(eas[i].name.s)+1 + eas[i].value.length;
len = (len + (alignment-1)) & ~(alignment-1); len = (len + (alignment-1)) & ~(alignment-1);
total += len; total += len;
} }
@ -70,7 +70,7 @@ size_t ea_list_size_chained(uint_t num_eas, struct ea_struct *eas, unsigned alig
put a ea_list into a pre-allocated buffer - buffer must be at least put a ea_list into a pre-allocated buffer - buffer must be at least
of size ea_list_size() of size ea_list_size()
*/ */
void ea_put_list(uint8_t *data, uint_t num_eas, struct ea_struct *eas) void ea_put_list(uint8_t *data, unsigned int num_eas, struct ea_struct *eas)
{ {
int i; int i;
uint32_t ea_size; uint32_t ea_size;
@ -81,7 +81,7 @@ void ea_put_list(uint8_t *data, uint_t num_eas, struct ea_struct *eas)
data += 4; data += 4;
for (i=0;i<num_eas;i++) { for (i=0;i<num_eas;i++) {
uint_t nlen = strlen(eas[i].name.s); unsigned int nlen = strlen(eas[i].name.s);
SCVAL(data, 0, eas[i].flags); SCVAL(data, 0, eas[i].flags);
SCVAL(data, 1, nlen); SCVAL(data, 1, nlen);
SSVAL(data, 2, eas[i].value.length); SSVAL(data, 2, eas[i].value.length);
@ -96,15 +96,15 @@ void ea_put_list(uint8_t *data, uint_t num_eas, struct ea_struct *eas)
put a chained ea_list into a pre-allocated buffer - buffer must be put a chained ea_list into a pre-allocated buffer - buffer must be
at least of size ea_list_size() at least of size ea_list_size()
*/ */
void ea_put_list_chained(uint8_t *data, uint_t num_eas, struct ea_struct *eas, void ea_put_list_chained(uint8_t *data, unsigned int num_eas, struct ea_struct *eas,
unsigned alignment) unsigned alignment)
{ {
int i; int i;
for (i=0;i<num_eas;i++) { for (i=0;i<num_eas;i++) {
uint_t nlen = strlen(eas[i].name.s); unsigned int nlen = strlen(eas[i].name.s);
uint32_t len = 8+nlen+1+eas[i].value.length; uint32_t len = 8+nlen+1+eas[i].value.length;
uint_t pad = ((len + (alignment-1)) & ~(alignment-1)) - len; unsigned int pad = ((len + (alignment-1)) & ~(alignment-1)) - len;
if (i == num_eas-1) { if (i == num_eas-1) {
SIVAL(data, 0, 0); SIVAL(data, 0, 0);
} else { } else {
@ -124,7 +124,7 @@ void ea_put_list_chained(uint8_t *data, uint_t num_eas, struct ea_struct *eas,
/* /*
pull a ea_struct from a buffer. Return the number of bytes consumed pull a ea_struct from a buffer. Return the number of bytes consumed
*/ */
uint_t ea_pull_struct(const DATA_BLOB *blob, unsigned int ea_pull_struct(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
struct ea_struct *ea) struct ea_struct *ea)
{ {
@ -164,7 +164,7 @@ uint_t ea_pull_struct(const DATA_BLOB *blob,
*/ */
NTSTATUS ea_pull_list(const DATA_BLOB *blob, NTSTATUS ea_pull_list(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
uint_t *num_eas, struct ea_struct **eas) unsigned int *num_eas, struct ea_struct **eas)
{ {
int n; int n;
uint32_t ea_size, ofs; uint32_t ea_size, ofs;
@ -184,7 +184,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
*eas = NULL; *eas = NULL;
while (ofs < ea_size) { while (ofs < ea_size) {
uint_t len; unsigned int len;
DATA_BLOB blob2; DATA_BLOB blob2;
blob2.data = blob->data + ofs; blob2.data = blob->data + ofs;
@ -213,7 +213,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
*/ */
NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob, NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
uint_t *num_eas, struct ea_struct **eas) unsigned int *num_eas, struct ea_struct **eas)
{ {
int n; int n;
uint32_t ofs; uint32_t ofs;
@ -228,7 +228,7 @@ NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
*eas = NULL; *eas = NULL;
while (ofs < blob->length) { while (ofs < blob->length) {
uint_t len; unsigned int len;
DATA_BLOB blob2; DATA_BLOB blob2;
uint32_t next_ofs = IVAL(blob->data, ofs); uint32_t next_ofs = IVAL(blob->data, ofs);
@ -261,7 +261,7 @@ NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
/* /*
pull a ea_name from a buffer. Return the number of bytes consumed pull a ea_name from a buffer. Return the number of bytes consumed
*/ */
static uint_t ea_pull_name(const DATA_BLOB *blob, static unsigned int ea_pull_name(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
struct ea_name *ea) struct ea_name *ea)
{ {
@ -289,7 +289,7 @@ static uint_t ea_pull_name(const DATA_BLOB *blob,
*/ */
NTSTATUS ea_pull_name_list(const DATA_BLOB *blob, NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx, TALLOC_CTX *mem_ctx,
uint_t *num_names, struct ea_name **ea_names) unsigned int *num_names, struct ea_name **ea_names)
{ {
int n; int n;
uint32_t ea_size, ofs; uint32_t ea_size, ofs;
@ -309,7 +309,7 @@ NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
*ea_names = NULL; *ea_names = NULL;
while (ofs < ea_size) { while (ofs < ea_size) {
uint_t len; unsigned int len;
DATA_BLOB blob2; DATA_BLOB blob2;
blob2.data = blob->data + ofs; blob2.data = blob->data + ofs;
@ -337,7 +337,7 @@ NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
put a ea_name list into a data blob put a ea_name list into a data blob
*/ */
bool ea_push_name_list(TALLOC_CTX *mem_ctx, bool ea_push_name_list(TALLOC_CTX *mem_ctx,
DATA_BLOB *data, uint_t num_names, struct ea_name *eas) DATA_BLOB *data, unsigned int num_names, struct ea_name *eas)
{ {
int i; int i;
uint32_t ea_size; uint32_t ea_size;
@ -354,7 +354,7 @@ bool ea_push_name_list(TALLOC_CTX *mem_ctx,
off = 4; off = 4;
for (i=0;i<num_names;i++) { for (i=0;i<num_names;i++) {
uint_t nlen = strlen(eas[i].name.s); unsigned int nlen = strlen(eas[i].name.s);
SCVAL(data->data, off, nlen); SCVAL(data->data, off, nlen);
memcpy(data->data+off+1, eas[i].name.s, nlen+1); memcpy(data->data+off+1, eas[i].name.s, nlen+1);
off += 1+nlen+1; off += 1+nlen+1;

View File

@ -918,8 +918,8 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
case RAW_LOCK_LOCKX: { case RAW_LOCK_LOCKX: {
struct smb_lock_entry *lockp; struct smb_lock_entry *lockp;
uint_t lck_size = (parms->lockx.in.mode & LOCKING_ANDX_LARGE_FILES)? 20 : 10; unsigned int lck_size = (parms->lockx.in.mode & LOCKING_ANDX_LARGE_FILES)? 20 : 10;
uint_t lock_count = parms->lockx.in.ulock_cnt + parms->lockx.in.lock_cnt; unsigned int lock_count = parms->lockx.in.ulock_cnt + parms->lockx.in.lock_cnt;
int i; int i;
SETUP_REQUEST(SMBlockingX, 8, lck_size * lock_count); SETUP_REQUEST(SMBlockingX, 8, lck_size * lock_count);

View File

@ -47,7 +47,7 @@ NTSTATUS smbcli_parse_stream_info(DATA_BLOB blob, TALLOC_CTX *mem_ctx,
io->streams = NULL; io->streams = NULL;
while (blob.length - ofs >= 24) { while (blob.length - ofs >= 24) {
uint_t n = io->num_streams; unsigned int n = io->num_streams;
uint32_t nlen, len; uint32_t nlen, len;
bool ret; bool ret;
void *vstr; void *vstr;

View File

@ -119,7 +119,7 @@ struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *tran
setup a SMB packet at transport level setup a SMB packet at transport level
*/ */
struct smbcli_request *smbcli_request_setup_transport(struct smbcli_transport *transport, struct smbcli_request *smbcli_request_setup_transport(struct smbcli_transport *transport,
uint8_t command, uint_t wct, uint_t buflen) uint8_t command, unsigned int wct, unsigned int buflen)
{ {
struct smbcli_request *req; struct smbcli_request *req;
@ -167,7 +167,7 @@ struct smbcli_request *smbcli_request_setup_transport(struct smbcli_transport *t
way. This interface is used before a session is setup. way. This interface is used before a session is setup.
*/ */
struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *session, struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *session,
uint8_t command, uint_t wct, size_t buflen) uint8_t command, unsigned int wct, size_t buflen)
{ {
struct smbcli_request *req; struct smbcli_request *req;
@ -190,7 +190,7 @@ struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *sessi
*/ */
struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree, struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree,
uint8_t command, uint8_t command,
uint_t wct, uint_t buflen) unsigned int wct, unsigned int buflen)
{ {
struct smbcli_request *req; struct smbcli_request *req;
@ -211,7 +211,7 @@ struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree,
To cope with this req->out.ptr is supplied. This will be updated to To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call point at the same offset into the packet as before this call
*/ */
static void smbcli_req_grow_allocation(struct smbcli_request *req, uint_t new_size) static void smbcli_req_grow_allocation(struct smbcli_request *req, unsigned int new_size)
{ {
int delta; int delta;
uint8_t *buf2; uint8_t *buf2;
@ -252,7 +252,7 @@ static void smbcli_req_grow_allocation(struct smbcli_request *req, uint_t new_si
To cope with this req->out.ptr is supplied. This will be updated to To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call point at the same offset into the packet as before this call
*/ */
static void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size) static void smbcli_req_grow_data(struct smbcli_request *req, unsigned int new_size)
{ {
int delta; int delta;
@ -274,9 +274,9 @@ static void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size)
*/ */
NTSTATUS smbcli_chained_request_setup(struct smbcli_request *req, NTSTATUS smbcli_chained_request_setup(struct smbcli_request *req,
uint8_t command, uint8_t command,
uint_t wct, size_t buflen) unsigned int wct, size_t buflen)
{ {
uint_t new_size = 1 + (wct*2) + 2 + buflen; unsigned int new_size = 1 + (wct*2) + 2 + buflen;
SSVAL(req->out.vwv, VWV(0), command); SSVAL(req->out.vwv, VWV(0), command);
SSVAL(req->out.vwv, VWV(1), req->out.size - NBT_HDR_SIZE); SSVAL(req->out.vwv, VWV(1), req->out.size - NBT_HDR_SIZE);
@ -371,7 +371,7 @@ bool smbcli_request_receive(struct smbcli_request *req)
handle oplock break requests from the server - return true if the request was handle oplock break requests from the server - return true if the request was
an oplock break an oplock break
*/ */
bool smbcli_handle_oplock_break(struct smbcli_transport *transport, uint_t len, const uint8_t *hdr, const uint8_t *vwv) bool smbcli_handle_oplock_break(struct smbcli_transport *transport, unsigned int len, const uint8_t *hdr, const uint8_t *vwv)
{ {
/* we must be very fussy about what we consider an oplock break to avoid /* we must be very fussy about what we consider an oplock break to avoid
matching readbraw replies */ matching readbraw replies */
@ -416,7 +416,7 @@ bool smbcli_request_is_error(struct smbcli_request *req)
return the number of bytes added to the packet return the number of bytes added to the packet
*/ */
size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, uint_t flags) size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, unsigned int flags)
{ {
size_t len; size_t len;
@ -448,7 +448,7 @@ size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, uin
this is used in places where the non-terminated string byte length is this is used in places where the non-terminated string byte length is
placed in the packet as a separate field placed in the packet as a separate field
*/ */
size_t smbcli_req_append_string_len(struct smbcli_request *req, const char *str, uint_t flags, int *len) size_t smbcli_req_append_string_len(struct smbcli_request *req, const char *str, unsigned int flags, int *len)
{ {
int diff = 0; int diff = 0;
size_t ret; size_t ret;
@ -489,7 +489,7 @@ size_t smbcli_req_append_string_len(struct smbcli_request *req, const char *str,
if dest_len is -1 then no limit applies if dest_len is -1 then no limit applies
*/ */
size_t smbcli_req_append_ascii4(struct smbcli_request *req, const char *str, uint_t flags) size_t smbcli_req_append_ascii4(struct smbcli_request *req, const char *str, unsigned int flags)
{ {
size_t size; size_t size;
smbcli_req_append_bytes(req, (const uint8_t *)"\4", 1); smbcli_req_append_bytes(req, (const uint8_t *)"\4", 1);
@ -555,7 +555,7 @@ size_t smbcli_req_append_var_block(struct smbcli_request *req, const uint8_t *by
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
static size_t smbcli_req_pull_ucs2(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx, static size_t smbcli_req_pull_ucs2(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
char **dest, const uint8_t *src, int byte_len, uint_t flags) char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2, alignment=0; int src_len, src_len2, alignment=0;
bool ret; bool ret;
@ -609,7 +609,7 @@ static size_t smbcli_req_pull_ucs2(struct request_bufinfo *bufinfo, TALLOC_CTX *
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
size_t smbcli_req_pull_ascii(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx, size_t smbcli_req_pull_ascii(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
char **dest, const uint8_t *src, int byte_len, uint_t flags) char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2; int src_len, src_len2;
bool ret; bool ret;
@ -653,7 +653,7 @@ size_t smbcli_req_pull_ascii(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ct
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
size_t smbcli_req_pull_string(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx, size_t smbcli_req_pull_string(struct request_bufinfo *bufinfo, TALLOC_CTX *mem_ctx,
char **dest, const uint8_t *src, int byte_len, uint_t flags) char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
if (!(flags & STR_ASCII) && if (!(flags & STR_ASCII) &&
(((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) { (((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) {
@ -751,7 +751,7 @@ NTTIME smbcli_pull_nttime(void *base, uint16_t offset)
*/ */
size_t smbcli_blob_pull_ucs2(TALLOC_CTX* mem_ctx, size_t smbcli_blob_pull_ucs2(TALLOC_CTX* mem_ctx,
const DATA_BLOB *blob, const char **dest, const DATA_BLOB *blob, const char **dest,
const uint8_t *src, int byte_len, uint_t flags) const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2, alignment=0; int src_len, src_len2, alignment=0;
size_t ret_size; size_t ret_size;
@ -808,7 +808,7 @@ size_t smbcli_blob_pull_ucs2(TALLOC_CTX* mem_ctx,
*/ */
static size_t smbcli_blob_pull_ascii(TALLOC_CTX *mem_ctx, static size_t smbcli_blob_pull_ascii(TALLOC_CTX *mem_ctx,
const DATA_BLOB *blob, const char **dest, const DATA_BLOB *blob, const char **dest,
const uint8_t *src, int byte_len, uint_t flags) const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2; int src_len, src_len2;
size_t ret_size; size_t ret_size;
@ -860,7 +860,7 @@ size_t smbcli_blob_pull_string(struct smbcli_session *session,
const DATA_BLOB *blob, const DATA_BLOB *blob,
struct smb_wire_string *dest, struct smb_wire_string *dest,
uint16_t len_offset, uint16_t str_offset, uint16_t len_offset, uint16_t str_offset,
uint_t flags) unsigned int flags)
{ {
int extra; int extra;
dest->s = NULL; dest->s = NULL;
@ -927,7 +927,7 @@ size_t smbcli_blob_pull_unix_string(struct smbcli_session *session,
DATA_BLOB *blob, DATA_BLOB *blob,
const char **dest, const char **dest,
uint16_t str_offset, uint16_t str_offset,
uint_t flags) unsigned int flags)
{ {
int extra = 0; int extra = 0;
*dest = NULL; *dest = NULL;
@ -961,7 +961,7 @@ size_t smbcli_blob_pull_unix_string(struct smbcli_session *session,
*/ */
size_t smbcli_blob_append_string(struct smbcli_session *session, size_t smbcli_blob_append_string(struct smbcli_session *session,
TALLOC_CTX *mem_ctx, DATA_BLOB *blob, TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
const char *str, uint_t flags) const char *str, unsigned int flags)
{ {
size_t max_len; size_t max_len;
int len; int len;

View File

@ -333,10 +333,10 @@ NTSTATUS smb_raw_search_common(TALLOC_CTX *mem_ctx,
enum smb_search_data_level level, enum smb_search_data_level level,
const DATA_BLOB *blob, const DATA_BLOB *blob,
union smb_search_data *data, union smb_search_data *data,
uint_t *next_ofs, unsigned int *next_ofs,
uint_t str_flags) unsigned int str_flags)
{ {
uint_t len, blen; unsigned int len, blen;
if (blob->length < 4) { if (blob->length < 4) {
return NT_STATUS_INFO_LENGTH_MISMATCH; return NT_STATUS_INFO_LENGTH_MISMATCH;
@ -487,7 +487,7 @@ static int parse_trans2_search(struct smbcli_tree *tree,
DATA_BLOB *blob, DATA_BLOB *blob,
union smb_search_data *data) union smb_search_data *data)
{ {
uint_t len, ofs; unsigned int len, ofs;
uint32_t ea_size; uint32_t ea_size;
DATA_BLOB eablob; DATA_BLOB eablob;
NTSTATUS status; NTSTATUS status;
@ -656,7 +656,7 @@ static int parse_trans2_search(struct smbcli_tree *tree,
case RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO: case RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO:
case RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO: case RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO:
case RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO: { case RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO: {
uint_t str_flags = STR_UNICODE; unsigned int str_flags = STR_UNICODE;
if (!(tree->session->transport->negotiate.capabilities & CAP_UNICODE)) { if (!(tree->session->transport->negotiate.capabilities & CAP_UNICODE)) {
str_flags = STR_ASCII; str_flags = STR_ASCII;
} }
@ -694,7 +694,7 @@ static NTSTATUS smb_raw_t2search_backend(struct smbcli_tree *tree,
for (i=0; i < count; i++) { for (i=0; i < count; i++) {
union smb_search_data search_data; union smb_search_data search_data;
uint_t len; unsigned int len;
len = parse_trans2_search(tree, mem_ctx, level, flags, &blob2, &search_data); len = parse_trans2_search(tree, mem_ctx, level, flags, &blob2, &search_data);
if (len == -1) { if (len == -1) {

View File

@ -33,7 +33,7 @@ bool smb_raw_setfileinfo_passthru(TALLOC_CTX *mem_ctx,
union smb_setfileinfo *parms, union smb_setfileinfo *parms,
DATA_BLOB *blob) DATA_BLOB *blob)
{ {
uint_t len; unsigned int len;
#define NEED_BLOB(n) do { \ #define NEED_BLOB(n) do { \
*blob = data_blob_talloc(mem_ctx, NULL, n); \ *blob = data_blob_talloc(mem_ctx, NULL, n); \

View File

@ -29,7 +29,7 @@
check out of bounds for incoming data check out of bounds for incoming data
*/ */
static bool raw_trans_oob(struct smbcli_request *req, static bool raw_trans_oob(struct smbcli_request *req,
uint_t offset, uint_t count) unsigned int offset, unsigned int count)
{ {
uint8_t *ptr; uint8_t *ptr;

View File

@ -58,7 +58,7 @@ struct smb_request_buffer {
/* the command words and command word count. vwv points /* the command words and command word count. vwv points
into the raw buffer */ into the raw buffer */
uint8_t *vwv; uint8_t *vwv;
uint_t wct; unsigned int wct;
/* the data buffer and size. data points into the raw buffer */ /* the data buffer and size. data points into the raw buffer */
uint8_t *data; uint8_t *data;

View File

@ -132,7 +132,7 @@ void sign_outgoing_message(struct smb_request_buffer *out, DATA_BLOB *mac_key, u
Uncomment this to test if the remote server actually verifies signitures...*/ Uncomment this to test if the remote server actually verifies signitures...*/
} }
bool check_signed_incoming_message(struct smb_request_buffer *in, DATA_BLOB *mac_key, uint_t seq_num) bool check_signed_incoming_message(struct smb_request_buffer *in, DATA_BLOB *mac_key, unsigned int seq_num)
{ {
bool good; bool good;
uint8_t calc_md5_mac[16]; uint8_t calc_md5_mac[16];

View File

@ -231,7 +231,7 @@ void security_token_debug_privileges(int dbg_lev, const struct security_token *t
if (token->privilege_mask) { if (token->privilege_mask) {
int i = 0; int i = 0;
uint_t privilege; unsigned int privilege;
for (privilege = 1; privilege <= 64; privilege++) { for (privilege = 1; privilege <= 64; privilege++) {
uint64_t mask = sec_privilege_mask(privilege); uint64_t mask = sec_privilege_mask(privilege);

View File

@ -95,14 +95,14 @@ NTSTATUS smb2_find(struct smb2_tree *tree, TALLOC_CTX *mem_ctx,
smb_search_data structures smb_search_data structures
*/ */
NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx,
uint8_t level, uint_t *count, uint8_t level, unsigned int *count,
union smb_search_data **io) union smb_search_data **io)
{ {
struct smb2_find f; struct smb2_find f;
NTSTATUS status; NTSTATUS status;
DATA_BLOB b; DATA_BLOB b;
enum smb_search_data_level smb_level; enum smb_search_data_level smb_level;
uint_t next_ofs=0; unsigned int next_ofs=0;
switch (level) { switch (level) {
case SMB2_FIND_DIRECTORY_INFO: case SMB2_FIND_DIRECTORY_INFO:
@ -171,7 +171,7 @@ NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx,
*/ */
NTSTATUS smb2_find_level(struct smb2_tree *tree, TALLOC_CTX *mem_ctx, NTSTATUS smb2_find_level(struct smb2_tree *tree, TALLOC_CTX *mem_ctx,
struct smb2_find *f, struct smb2_find *f,
uint_t *count, union smb_search_data **io) unsigned int *count, union smb_search_data **io)
{ {
struct smb2_request *req; struct smb2_request *req;

View File

@ -103,7 +103,7 @@ struct smb2_transport {
struct { struct {
void (*func)(struct smb2_transport *, void *); void (*func)(struct smb2_transport *, void *);
void *private_data; void *private_data;
uint_t period; unsigned int period;
} idle; } idle;
struct { struct {

View File

@ -109,7 +109,7 @@ int smb2_deltree(struct smb2_tree *tree, const char *dname)
{ {
NTSTATUS status; NTSTATUS status;
uint32_t total_deleted = 0; uint32_t total_deleted = 0;
uint_t count, i; unsigned int count, i;
union smb_search_data *list; union smb_search_data *list;
TALLOC_CTX *tmp_ctx = talloc_new(tree); TALLOC_CTX *tmp_ctx = talloc_new(tree);
struct smb2_find f; struct smb2_find f;

View File

@ -831,7 +831,7 @@ static void dcerpc_request_recv_data(struct dcerpc_connection *c,
DATA_BLOB *raw_packet, struct ncacn_packet *pkt) DATA_BLOB *raw_packet, struct ncacn_packet *pkt)
{ {
struct rpc_request *req; struct rpc_request *req;
uint_t length; unsigned int length;
NTSTATUS status = NT_STATUS_OK; NTSTATUS status = NT_STATUS_OK;
/* /*
@ -1442,7 +1442,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
NTSTATUS status; NTSTATUS status;
DATA_BLOB response; DATA_BLOB response;
struct ndr_pull *pull; struct ndr_pull *pull;
uint_t flags; unsigned int flags;
TALLOC_CTX *mem_ctx = req->ndr.mem_ctx; TALLOC_CTX *mem_ctx = req->ndr.mem_ctx;
void *r = req->ndr.struct_ptr; void *r = req->ndr.struct_ptr;
uint32_t opnum = req->ndr.opnum; uint32_t opnum = req->ndr.opnum;

View File

@ -66,7 +66,7 @@ struct cifspsx_dir *cifspsx_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request
struct cifspsx_dir *dir; struct cifspsx_dir *dir;
DIR *odir; DIR *odir;
struct dirent *dent; struct dirent *dent;
uint_t allocated = 0; unsigned int allocated = 0;
char *low_mask; char *low_mask;
dir = talloc(mem_ctx, struct cifspsx_dir); dir = talloc(mem_ctx, struct cifspsx_dir);
@ -93,7 +93,7 @@ struct cifspsx_dir *cifspsx_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request
if (!odir) { return NULL; } if (!odir) { return NULL; }
while ((dent = readdir(odir))) { while ((dent = readdir(odir))) {
uint_t i = dir->count; unsigned int i = dir->count;
char *full_name; char *full_name;
char *low_name; char *low_name;

View File

@ -864,7 +864,7 @@ static NTSTATUS cifspsx_search_first(struct ntvfs_module_context *ntvfs,
struct cifspsx_private *p = ntvfs->private_data; struct cifspsx_private *p = ntvfs->private_data;
struct search_state *search; struct search_state *search;
union smb_search_data file; union smb_search_data file;
uint_t max_count; unsigned int max_count;
if (io->generic.level != RAW_SEARCH_TRANS2) { if (io->generic.level != RAW_SEARCH_TRANS2) {
return NT_STATUS_NOT_SUPPORTED; return NT_STATUS_NOT_SUPPORTED;
@ -938,7 +938,7 @@ static NTSTATUS cifspsx_search_next(struct ntvfs_module_context *ntvfs,
struct cifspsx_private *p = ntvfs->private_data; struct cifspsx_private *p = ntvfs->private_data;
struct search_state *search; struct search_state *search;
union smb_search_data file; union smb_search_data file;
uint_t max_count; unsigned int max_count;
if (io->generic.level != RAW_SEARCH_TRANS2) { if (io->generic.level != RAW_SEARCH_TRANS2) {
return NT_STATUS_NOT_SUPPORTED; return NT_STATUS_NOT_SUPPORTED;

View File

@ -148,7 +148,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
time_t write_time = 0; time_t write_time = 0;
uint32_t set_size = 0; uint32_t set_size = 0;
union smb_setfileinfo *sf; union smb_setfileinfo *sf;
uint_t state; unsigned int state;
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
return status; return status;
@ -579,7 +579,7 @@ static NTSTATUS ntvfs_map_fsinfo_finish(struct ntvfs_module_context *ntvfs,
case RAW_QFS_DSKATTR: { case RAW_QFS_DSKATTR: {
/* map from generic to DSKATTR */ /* map from generic to DSKATTR */
uint_t bpunit = 64; unsigned int bpunit = 64;
/* we need to scale the sizes to fit */ /* we need to scale the sizes to fit */
for (bpunit=64; bpunit<0x10000; bpunit *= 2) { for (bpunit=64; bpunit<0x10000; bpunit *= 2) {
@ -1187,7 +1187,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
{ {
union smb_lock *lck; union smb_lock *lck;
union smb_close *cl; union smb_close *cl;
uint_t state; unsigned int state;
if (NT_STATUS_IS_ERR(status)) { if (NT_STATUS_IS_ERR(status)) {
return status; return status;
@ -1381,7 +1381,7 @@ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
union smb_read *rd2; union smb_read *rd2;
union smb_lock *lck; union smb_lock *lck;
NTSTATUS status; NTSTATUS status;
uint_t state; unsigned int state;
rd2 = talloc(req, union smb_read); rd2 = talloc(req, union smb_read);
if (rd2 == NULL) { if (rd2 == NULL) {

View File

@ -53,7 +53,7 @@ static uint32_t dos_mode_from_stat(struct pvfs_state *pvfs, struct stat *st)
fill in the dos file attributes for a file fill in the dos file attributes for a file
*/ */
NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name, NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name,
uint_t flags, int fd) unsigned int flags, int fd)
{ {
NTSTATUS status; NTSTATUS status;
DATA_BLOB lkey; DATA_BLOB lkey;

View File

@ -88,7 +88,7 @@ NTSTATUS pvfs_fsinfo(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
struct pvfs_state); struct pvfs_state);
uint64_t blocks_free, blocks_total; uint64_t blocks_free, blocks_total;
uint_t bpunit; unsigned int bpunit;
struct stat st; struct stat st;
const uint16_t block_size = 512; const uint16_t block_size = 512;

View File

@ -76,7 +76,7 @@ static uint32_t pvfs_fileinfo_access(union smb_fileinfo *info)
*/ */
NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
struct pvfs_filename *name, int fd, struct pvfs_filename *name, int fd,
uint_t num_names, unsigned int num_names,
struct ea_name *names, struct ea_name *names,
struct smb_ea_list *eas) struct smb_ea_list *eas)
{ {

View File

@ -59,7 +59,7 @@ static int component_compare(struct pvfs_state *pvfs, const char *comp, const ch
*/ */
static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs,
struct pvfs_filename *name, struct pvfs_filename *name,
uint_t flags) unsigned int flags)
{ {
/* break into a series of components */ /* break into a series of components */
int num_components; int num_components;
@ -256,7 +256,7 @@ static NTSTATUS parse_stream_name(struct smb_iconv_convenience *ic,
errors are returned if the filename is illegal given the flags errors are returned if the filename is illegal given the flags
*/ */
static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name, static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
uint_t flags, struct pvfs_filename *name) unsigned int flags, struct pvfs_filename *name)
{ {
char *ret, *p, *p_start; char *ret, *p, *p_start;
struct smb_iconv_convenience *ic = NULL; struct smb_iconv_convenience *ic = NULL;
@ -389,7 +389,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
*/ */
static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
struct smb_iconv_convenience *iconv_convenience, struct smb_iconv_convenience *iconv_convenience,
const char **fname, uint_t flags) const char **fname, unsigned int flags)
{ {
codepoint_t c; codepoint_t c;
size_t c_size, len; size_t c_size, len;
@ -511,7 +511,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs,
struct ntvfs_request *req, struct ntvfs_request *req,
const char *cifs_name, const char *cifs_name,
uint_t flags, struct pvfs_filename **name) unsigned int flags, struct pvfs_filename **name)
{ {
NTSTATUS status; NTSTATUS status;
@ -610,7 +610,7 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs,
*/ */
NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
const char *unix_dir, const char *fname, const char *unix_dir, const char *fname,
uint_t flags, struct pvfs_filename **name) unsigned int flags, struct pvfs_filename **name)
{ {
NTSTATUS status; NTSTATUS status;
@ -647,7 +647,7 @@ NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
to update the pvfs_filename stat information, and by pvfs_open() to update the pvfs_filename stat information, and by pvfs_open()
*/ */
NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd, NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd,
struct pvfs_filename *name, uint_t flags) struct pvfs_filename *name, unsigned int flags)
{ {
dev_t device = (dev_t)0; dev_t device = (dev_t)0;
ino_t inode = 0; ino_t inode = 0;

View File

@ -232,10 +232,10 @@ static NTSTATUS fill_search_info(struct pvfs_state *pvfs,
the search fill loop the search fill loop
*/ */
static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
uint_t max_count, unsigned int max_count,
struct pvfs_search_state *search, struct pvfs_search_state *search,
enum smb_search_data_level level, enum smb_search_data_level level,
uint_t *reply_count, unsigned int *reply_count,
void *search_private, void *search_private,
bool (*callback)(void *, const union smb_search_data *)) bool (*callback)(void *, const union smb_search_data *))
{ {
@ -323,7 +323,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
struct pvfs_state); struct pvfs_state);
struct pvfs_search_state *search; struct pvfs_search_state *search;
uint_t reply_count; unsigned int reply_count;
uint16_t search_attrib; uint16_t search_attrib;
const char *pattern; const char *pattern;
NTSTATUS status; NTSTATUS status;
@ -415,7 +415,7 @@ static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs,
void *p; void *p;
struct pvfs_search_state *search; struct pvfs_search_state *search;
struct pvfs_dir *dir; struct pvfs_dir *dir;
uint_t reply_count, max_count; unsigned int reply_count, max_count;
uint16_t handle; uint16_t handle;
NTSTATUS status; NTSTATUS status;
@ -467,7 +467,7 @@ static NTSTATUS pvfs_search_first_trans2(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
struct pvfs_state); struct pvfs_state);
struct pvfs_search_state *search; struct pvfs_search_state *search;
uint_t reply_count; unsigned int reply_count;
uint16_t search_attrib, max_count; uint16_t search_attrib, max_count;
const char *pattern; const char *pattern;
NTSTATUS status; NTSTATUS status;
@ -565,7 +565,7 @@ static NTSTATUS pvfs_search_next_trans2(struct ntvfs_module_context *ntvfs,
void *p; void *p;
struct pvfs_search_state *search; struct pvfs_search_state *search;
struct pvfs_dir *dir; struct pvfs_dir *dir;
uint_t reply_count; unsigned int reply_count;
uint16_t handle; uint16_t handle;
NTSTATUS status; NTSTATUS status;
@ -629,7 +629,7 @@ static NTSTATUS pvfs_search_first_smb2(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
struct pvfs_state); struct pvfs_state);
struct pvfs_search_state *search; struct pvfs_search_state *search;
uint_t reply_count; unsigned int reply_count;
uint16_t max_count; uint16_t max_count;
const char *pattern; const char *pattern;
NTSTATUS status; NTSTATUS status;
@ -732,7 +732,7 @@ static NTSTATUS pvfs_search_next_smb2(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
struct pvfs_state); struct pvfs_state);
struct pvfs_search_state *search; struct pvfs_search_state *search;
uint_t reply_count; unsigned int reply_count;
uint16_t max_count; uint16_t max_count;
NTSTATUS status; NTSTATUS status;
struct pvfs_file *f; struct pvfs_file *f;

View File

@ -40,7 +40,7 @@ struct pvfs_state {
struct GUID *base_fs_uuid; struct GUID *base_fs_uuid;
const char *share_name; const char *share_name;
uint_t flags; unsigned int flags;
struct pvfs_mangle_context *mangle_ctx; struct pvfs_mangle_context *mangle_ctx;
@ -54,13 +54,13 @@ struct pvfs_state {
struct pvfs_wait *wait_list; struct pvfs_wait *wait_list;
/* the sharing violation timeout (nsecs) */ /* the sharing violation timeout (nsecs) */
uint_t sharing_violation_delay; unsigned int sharing_violation_delay;
/* the oplock break timeout (secs) */ /* the oplock break timeout (secs) */
uint_t oplock_break_timeout; unsigned int oplock_break_timeout;
/* the write time update delay (nsecs) */ /* the write time update delay (nsecs) */
uint_t writetime_delay; unsigned int writetime_delay;
/* filesystem attributes (see FS_ATTR_*) */ /* filesystem attributes (see FS_ATTR_*) */
uint32_t fs_attribs; uint32_t fs_attribs;
@ -84,7 +84,7 @@ struct pvfs_state {
struct pvfs_search_state *list; struct pvfs_search_state *list;
/* how long to keep inactive searches around for */ /* how long to keep inactive searches around for */
uint_t inactivity_time; unsigned int inactivity_time;
} search; } search;
/* used to accelerate acl mapping */ /* used to accelerate acl mapping */
@ -223,7 +223,7 @@ struct pvfs_search_state {
uint16_t must_attrib; uint16_t must_attrib;
struct pvfs_dir *dir; struct pvfs_dir *dir;
time_t last_used; time_t last_used;
uint_t num_ea_names; unsigned int num_ea_names;
struct ea_name *ea_names; struct ea_name *ea_names;
struct tevent_timer *te; struct tevent_timer *te;
}; };

View File

@ -63,7 +63,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request *req,
struct svfs_dir *dir; struct svfs_dir *dir;
DIR *odir; DIR *odir;
struct dirent *dent; struct dirent *dent;
uint_t allocated = 0; unsigned int allocated = 0;
char *low_mask; char *low_mask;
dir = talloc(mem_ctx, struct svfs_dir); dir = talloc(mem_ctx, struct svfs_dir);
@ -90,7 +90,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request *req,
if (!odir) { return NULL; } if (!odir) { return NULL; }
while ((dent = readdir(odir))) { while ((dent = readdir(odir))) {
uint_t i = dir->count; unsigned int i = dir->count;
char *full_name; char *full_name;
char *low_name; char *low_name;

View File

@ -861,7 +861,7 @@ static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
struct svfs_private *p = ntvfs->private_data; struct svfs_private *p = ntvfs->private_data;
struct search_state *search; struct search_state *search;
union smb_search_data file; union smb_search_data file;
uint_t max_count; unsigned int max_count;
if (io->generic.level != RAW_SEARCH_TRANS2) { if (io->generic.level != RAW_SEARCH_TRANS2) {
return NT_STATUS_NOT_SUPPORTED; return NT_STATUS_NOT_SUPPORTED;
@ -935,7 +935,7 @@ static NTSTATUS svfs_search_next(struct ntvfs_module_context *ntvfs,
struct svfs_private *p = ntvfs->private_data; struct svfs_private *p = ntvfs->private_data;
struct search_state *search; struct search_state *search;
union smb_search_data file; union smb_search_data file;
uint_t max_count; unsigned int max_count;
if (io->generic.level != RAW_SEARCH_TRANS2) { if (io->generic.level != RAW_SEARCH_TRANS2) {
return NT_STATUS_NOT_SUPPORTED; return NT_STATUS_NOT_SUPPORTED;

View File

@ -721,7 +721,7 @@ static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs,
struct cvfs_private *p = ntvfs->private_data; struct cvfs_private *p = ntvfs->private_data;
struct smb2_find f; struct smb2_find f;
enum smb_search_data_level smb2_level; enum smb_search_data_level smb2_level;
uint_t count, i; unsigned int count, i;
union smb_search_data *data; union smb_search_data *data;
NTSTATUS status; NTSTATUS status;

View File

@ -40,7 +40,7 @@ struct unixuid_private {
struct unix_sec_ctx { struct unix_sec_ctx {
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
uint_t ngroups; unsigned int ngroups;
gid_t *groups; gid_t *groups;
}; };

View File

@ -173,7 +173,7 @@ size_t smbsrv_blob_push_string(TALLOC_CTX *mem_ctx,
NTSTATUS smbsrv_blob_append_string(TALLOC_CTX *mem_ctx, NTSTATUS smbsrv_blob_append_string(TALLOC_CTX *mem_ctx,
DATA_BLOB *blob, DATA_BLOB *blob,
const char *str, const char *str,
uint_t len_offset, unsigned int len_offset,
int default_flags, int default_flags,
int flags) int flags)
{ {
@ -197,7 +197,7 @@ NTSTATUS smbsrv_push_passthru_fsinfo(TALLOC_CTX *mem_ctx,
union smb_fsinfo *fsinfo, union smb_fsinfo *fsinfo,
int default_str_flags) int default_str_flags)
{ {
uint_t i; unsigned int i;
DATA_BLOB guid_blob; DATA_BLOB guid_blob;
switch (level) { switch (level) {
@ -302,7 +302,7 @@ NTSTATUS smbsrv_push_passthru_fileinfo(TALLOC_CTX *mem_ctx,
union smb_fileinfo *st, union smb_fileinfo *st,
int default_str_flags) int default_str_flags)
{ {
uint_t i; unsigned int i;
size_t list_size; size_t list_size;
switch (level) { switch (level) {
@ -650,7 +650,7 @@ NTSTATUS smbsrv_push_passthru_search(TALLOC_CTX *mem_ctx,
int default_str_flags) int default_str_flags)
{ {
uint8_t *data; uint8_t *data;
uint_t ofs = blob->length; unsigned int ofs = blob->length;
switch (level) { switch (level) {
case RAW_SEARCH_DATA_DIRECTORY_INFO: case RAW_SEARCH_DATA_DIRECTORY_INFO:

View File

@ -527,7 +527,7 @@ static void reply_nttrans_send(struct ntvfs_request *ntvfs)
the negotiated buffer size */ the negotiated buffer size */
do { do {
uint32_t this_data, this_param, max_bytes; uint32_t this_data, this_param, max_bytes;
uint_t align1 = 1, align2 = (params_left ? 2 : 0); unsigned int align1 = 1, align2 = (params_left ? 2 : 0);
struct smbsrv_request *this_req; struct smbsrv_request *this_req;
max_bytes = req_max_data(req) - (align1 + align2); max_bytes = req_max_data(req) - (align1 + align2);

View File

@ -1380,7 +1380,7 @@ static void reply_printqueue_send(struct ntvfs_request *ntvfs)
struct smbsrv_request *req; struct smbsrv_request *req;
union smb_lpq *lpq; union smb_lpq *lpq;
int i, maxcount; int i, maxcount;
const uint_t el_size = 28; const unsigned int el_size = 28;
SMBSRV_CHECK_ASYNC_STATUS(lpq,union smb_lpq); SMBSRV_CHECK_ASYNC_STATUS(lpq,union smb_lpq);
@ -1647,8 +1647,8 @@ static void reply_lockingX_send(struct ntvfs_request *ntvfs)
void smbsrv_reply_lockingX(struct smbsrv_request *req) void smbsrv_reply_lockingX(struct smbsrv_request *req)
{ {
union smb_lock *lck; union smb_lock *lck;
uint_t total_locks, i; unsigned int total_locks, i;
uint_t lck_size; unsigned int lck_size;
uint8_t *p; uint8_t *p;
/* parse request */ /* parse request */

View File

@ -76,7 +76,7 @@ struct smbsrv_request *smbsrv_init_request(struct smbsrv_connection *smb_conn)
/* /*
setup a chained reply in req->out with the given word count and initial data buffer size. setup a chained reply in req->out with the given word count and initial data buffer size.
*/ */
static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen) static void req_setup_chain_reply(struct smbsrv_request *req, unsigned int wct, unsigned int buflen)
{ {
uint32_t chain_base_size = req->out.size; uint32_t chain_base_size = req->out.size;
@ -110,7 +110,7 @@ static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t
the caller will then fill in the command words and data before calling req_send_reply() to the caller will then fill in the command words and data before calling req_send_reply() to
send the reply on its way send the reply on its way
*/ */
void smbsrv_setup_reply(struct smbsrv_request *req, uint_t wct, size_t buflen) void smbsrv_setup_reply(struct smbsrv_request *req, unsigned int wct, size_t buflen)
{ {
uint16_t flags2; uint16_t flags2;
@ -233,7 +233,7 @@ int req_max_data(struct smbsrv_request *req)
To cope with this req->out.ptr is supplied. This will be updated to To cope with this req->out.ptr is supplied. This will be updated to
point at the same offset into the packet as before this call point at the same offset into the packet as before this call
*/ */
static void req_grow_allocation(struct smbsrv_request *req, uint_t new_size) static void req_grow_allocation(struct smbsrv_request *req, unsigned int new_size)
{ {
int delta; int delta;
uint8_t *buf2; uint8_t *buf2;
@ -399,7 +399,7 @@ void smbsrv_send_error(struct smbsrv_request *req, NTSTATUS status)
size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str, int dest_len, size_t flags) size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str, int dest_len, size_t flags)
{ {
size_t len; size_t len;
uint_t grow_size; unsigned int grow_size;
uint8_t *buf0; uint8_t *buf0;
const int max_bytes_per_char = 3; const int max_bytes_per_char = 3;
@ -478,7 +478,7 @@ size_t req_append_var_block(struct smbsrv_request *req,
on failure zero is returned and *dest is set to NULL, otherwise the number on failure zero is returned and *dest is set to NULL, otherwise the number
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
static size_t req_pull_ucs2(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, uint_t flags) static size_t req_pull_ucs2(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2, alignment=0; int src_len, src_len2, alignment=0;
bool ret; bool ret;
@ -536,7 +536,7 @@ static size_t req_pull_ucs2(struct request_bufinfo *bufinfo, const char **dest,
on failure zero is returned and *dest is set to NULL, otherwise the number on failure zero is returned and *dest is set to NULL, otherwise the number
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
static size_t req_pull_ascii(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, uint_t flags) static size_t req_pull_ascii(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
int src_len, src_len2; int src_len, src_len2;
bool ret; bool ret;
@ -585,7 +585,7 @@ static size_t req_pull_ascii(struct request_bufinfo *bufinfo, const char **dest,
on failure zero is returned and *dest is set to NULL, otherwise the number on failure zero is returned and *dest is set to NULL, otherwise the number
of bytes consumed in the packet is returned of bytes consumed in the packet is returned
*/ */
size_t req_pull_string(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, uint_t flags) size_t req_pull_string(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, unsigned int flags)
{ {
if (!(flags & STR_ASCII) && if (!(flags & STR_ASCII) &&
(((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) { (((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) {
@ -605,7 +605,7 @@ size_t req_pull_string(struct request_bufinfo *bufinfo, const char **dest, const
on failure *dest is set to the zero length string. This seems to on failure *dest is set to the zero length string. This seems to
match win2000 behaviour match win2000 behaviour
*/ */
size_t req_pull_ascii4(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, uint_t flags) size_t req_pull_ascii4(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, unsigned int flags)
{ {
ssize_t ret; ssize_t ret;
@ -667,7 +667,7 @@ bool req_data_oob(struct request_bufinfo *bufinfo, const uint8_t *ptr, uint32_t
/* /*
pull an open file handle from a packet, taking account of the chained_fnum pull an open file handle from a packet, taking account of the chained_fnum
*/ */
static uint16_t req_fnum(struct smbsrv_request *req, const uint8_t *base, uint_t offset) static uint16_t req_fnum(struct smbsrv_request *req, const uint8_t *base, unsigned int offset)
{ {
if (req->chained_fnum != -1) { if (req->chained_fnum != -1) {
return req->chained_fnum; return req->chained_fnum;
@ -675,7 +675,7 @@ static uint16_t req_fnum(struct smbsrv_request *req, const uint8_t *base, uint_t
return SVAL(base, offset); return SVAL(base, offset);
} }
struct ntvfs_handle *smbsrv_pull_fnum(struct smbsrv_request *req, const uint8_t *base, uint_t offset) struct ntvfs_handle *smbsrv_pull_fnum(struct smbsrv_request *req, const uint8_t *base, unsigned int offset)
{ {
struct smbsrv_handle *handle; struct smbsrv_handle *handle;
uint16_t fnum = req_fnum(req, base, offset); uint16_t fnum = req_fnum(req, base, offset);
@ -699,7 +699,7 @@ struct ntvfs_handle *smbsrv_pull_fnum(struct smbsrv_request *req, const uint8_t
return handle->ntvfs; return handle->ntvfs;
} }
void smbsrv_push_fnum(uint8_t *base, uint_t offset, struct ntvfs_handle *ntvfs) void smbsrv_push_fnum(uint8_t *base, unsigned int offset, struct ntvfs_handle *ntvfs)
{ {
struct smbsrv_handle *handle = talloc_get_type(ntvfs->frontend_data.private_data, struct smbsrv_handle *handle = talloc_get_type(ntvfs->frontend_data.private_data,
struct smbsrv_handle); struct smbsrv_handle);

View File

@ -706,7 +706,7 @@ static NTSTATUS find_fill_info(struct find_state *state,
struct smbsrv_request *req = state->op->req; struct smbsrv_request *req = state->op->req;
struct smb_trans2 *trans = state->op->trans; struct smb_trans2 *trans = state->op->trans;
uint8_t *data; uint8_t *data;
uint_t ofs = trans->out.data.length; unsigned int ofs = trans->out.data.length;
uint32_t ea_size; uint32_t ea_size;
switch (state->data_level) { switch (state->data_level) {
@ -802,7 +802,7 @@ static bool find_callback(void *private_data, const union smb_search_data *file)
{ {
struct find_state *state = talloc_get_type(private_data, struct find_state); struct find_state *state = talloc_get_type(private_data, struct find_state);
struct smb_trans2 *trans = state->op->trans; struct smb_trans2 *trans = state->op->trans;
uint_t old_length; unsigned int old_length;
old_length = trans->out.data.length; old_length = trans->out.data.length;
@ -1116,7 +1116,7 @@ static void reply_trans_send(struct ntvfs_request *ntvfs)
the negotiated buffer size */ the negotiated buffer size */
do { do {
uint16_t this_data, this_param, max_bytes; uint16_t this_data, this_param, max_bytes;
uint_t align1 = 1, align2 = (params_left ? 2 : 0); unsigned int align1 = 1, align2 = (params_left ? 2 : 0);
struct smbsrv_request *this_req; struct smbsrv_request *this_req;
max_bytes = req_max_data(req) - (align1 + align2); max_bytes = req_max_data(req) - (align1 + align2);

View File

@ -84,7 +84,7 @@ static NTSTATUS smb2srv_send_oplock_break(void *p, struct ntvfs_handle *h, uint8
return NT_STATUS_OK; return NT_STATUS_OK;
} }
struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint8_t *base, uint_t offset) struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint8_t *base, unsigned int offset)
{ {
struct smbsrv_tcon *tcon; struct smbsrv_tcon *tcon;
struct smbsrv_handle *handle; struct smbsrv_handle *handle;
@ -160,7 +160,7 @@ struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint
return handle->ntvfs; return handle->ntvfs;
} }
void smb2srv_push_handle(uint8_t *base, uint_t offset, struct ntvfs_handle *ntvfs) void smb2srv_push_handle(uint8_t *base, unsigned int offset, struct ntvfs_handle *ntvfs)
{ {
struct smbsrv_handle *handle = talloc_get_type(ntvfs->frontend_data.private_data, struct smbsrv_handle *handle = talloc_get_type(ntvfs->frontend_data.private_data,
struct smbsrv_handle); struct smbsrv_handle);

View File

@ -49,7 +49,7 @@ static const uint32_t open_attrs_table[] = {
}; };
struct trunc_open_results { struct trunc_open_results {
uint_t num; unsigned int num;
uint32_t init_attr; uint32_t init_attr;
uint32_t trunc_attr; uint32_t trunc_attr;
uint32_t result_attr; uint32_t result_attr;
@ -91,7 +91,7 @@ bool torture_openattrtest(struct torture_context *tctx,
const char *fname = "\\openattr.file"; const char *fname = "\\openattr.file";
int fnum1; int fnum1;
uint16_t attr; uint16_t attr;
uint_t i, j, k, l; unsigned int i, j, k, l;
int failures = 0; int failures = 0;
for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32_t); i++) { for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32_t); i++) {
@ -163,7 +163,7 @@ bool torture_openattrtest(struct torture_context *tctx,
torture_comment(tctx, "[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n", torture_comment(tctx, "[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n",
k, open_attrs_table[i], k, open_attrs_table[i],
open_attrs_table[j], open_attrs_table[j],
(uint_t)attr, (unsigned int)attr,
attr_results[l].result_attr); attr_results[l].result_attr);
CHECK_MAX_FAILURES(error_exit); CHECK_MAX_FAILURES(error_exit);
} }

View File

@ -568,7 +568,7 @@ static bool rw_torture2(struct torture_context *tctx,
for (i=0;i<torture_numops;i++) for (i=0;i<torture_numops;i++)
{ {
size_t buf_size = ((uint_t)random()%(sizeof(buf)-1))+ 1; size_t buf_size = ((unsigned int)random()%(sizeof(buf)-1))+ 1;
if (i % 10 == 0) { if (i % 10 == 0) {
if (torture_setting_bool(tctx, "progress", true)) { if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%d\r", i); fflush(stdout); torture_comment(tctx, "%d\r", i); fflush(stdout);

View File

@ -1399,7 +1399,7 @@ static const struct {
}; };
static void progress_bar(struct torture_context *tctx, uint_t i, uint_t total) static void progress_bar(struct torture_context *tctx, unsigned int i, unsigned int total)
{ {
if (torture_setting_bool(tctx, "progress", true)) { if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%5d/%5d\r", i, total); torture_comment(tctx, "%5d/%5d\r", i, total);
@ -2279,8 +2279,8 @@ static bool createx_test_file(struct torture_context *tctx,
/* TODO When redirecting stdout to a file, the progress bar really screws up /* TODO When redirecting stdout to a file, the progress bar really screws up
* the output. Could use a switch "--noprogress", or direct the progress bar to * the output. Could use a switch "--noprogress", or direct the progress bar to
* stderr? No other solution? */ * stderr? No other solution? */
static void createx_progress_bar(struct torture_context *tctx, uint_t i, static void createx_progress_bar(struct torture_context *tctx, unsigned int i,
uint_t total, uint_t skipped) unsigned int total, unsigned int skipped)
{ {
if (torture_setting_bool(tctx, "progress", true)) { if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%5d/%5d (%d skipped)\r", i, total, torture_comment(tctx, "%5d/%5d (%d skipped)\r", i, total,

View File

@ -42,7 +42,7 @@ static bool torture_locktest1(struct torture_context *tctx,
const char *fname = BASEDIR "\\lockt1.lck"; const char *fname = BASEDIR "\\lockt1.lck";
int fnum1, fnum2, fnum3; int fnum1, fnum2, fnum3;
time_t t1, t2; time_t t1, t2;
uint_t lock_timeout; unsigned int lock_timeout;
if (!torture_setup_dir(cli1, BASEDIR)) { if (!torture_setup_dir(cli1, BASEDIR)) {
return false; return false;
@ -120,7 +120,7 @@ static bool torture_locktest1(struct torture_context *tctx,
"error: This server appears not to support timed lock requests"); "error: This server appears not to support timed lock requests");
} }
torture_comment(tctx, "server slept for %u seconds for a %u second timeout\n", torture_comment(tctx, "server slept for %u seconds for a %u second timeout\n",
(uint_t)(t2-t1), lock_timeout); (unsigned int)(t2-t1), lock_timeout);
torture_assert_ntstatus_ok(tctx, smbcli_close(cli1->tree, fnum2), torture_assert_ntstatus_ok(tctx, smbcli_close(cli1->tree, fnum2),
talloc_asprintf(tctx, "close1 failed (%s)", smbcli_errstr(cli1->tree))); talloc_asprintf(tctx, "close1 failed (%s)", smbcli_errstr(cli1->tree)));

View File

@ -29,7 +29,7 @@ static TDB_CONTEXT *tdb;
#define NAME_LENGTH 20 #define NAME_LENGTH 20
static uint_t total, collisions, failures; static unsigned int total, collisions, failures;
static bool test_one(struct torture_context *tctx ,struct smbcli_state *cli, static bool test_one(struct torture_context *tctx ,struct smbcli_state *cli,
const char *name) const char *name)
@ -114,8 +114,8 @@ static bool test_one(struct torture_context *tctx ,struct smbcli_state *cli,
static char *gen_name(TALLOC_CTX *mem_ctx) static char *gen_name(TALLOC_CTX *mem_ctx)
{ {
const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~..."; const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~...";
uint_t max_idx = strlen(chars); unsigned int max_idx = strlen(chars);
uint_t len; unsigned int len;
int i; int i;
char *p; char *p;
char *name; char *name;

View File

@ -68,7 +68,7 @@ static bool rw_torture(struct torture_context *tctx, struct smbcli_state *c)
generate_random_buffer(buf, sizeof(buf)); generate_random_buffer(buf, sizeof(buf));
for (i=0;i<torture_numops;i++) { for (i=0;i<torture_numops;i++) {
uint_t n = (uint_t)random()%10; unsigned int n = (unsigned int)random()%10;
if (i % 10 == 0) { if (i % 10 == 0) {
if (torture_setting_bool(tctx, "progress", true)) { if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%d\r", i); torture_comment(tctx, "%d\r", i);

View File

@ -48,9 +48,9 @@ static struct gentest_options {
int analyze; int analyze;
int analyze_always; int analyze_always;
int analyze_continuous; int analyze_continuous;
uint_t max_open_handles; unsigned int max_open_handles;
uint_t seed; unsigned int seed;
uint_t numops; unsigned int numops;
int use_oplocks; int use_oplocks;
char **ignore_patterns; char **ignore_patterns;
const char *seeds_file; const char *seeds_file;
@ -67,12 +67,12 @@ static struct gentest_options {
/* mapping between open handles on the server and local handles */ /* mapping between open handles on the server and local handles */
static struct { static struct {
bool active; bool active;
uint_t instance; unsigned int instance;
struct smb2_handle smb2_handle[NSERVERS]; /* SMB2 */ struct smb2_handle smb2_handle[NSERVERS]; /* SMB2 */
uint16_t smb_handle[NSERVERS]; /* SMB */ uint16_t smb_handle[NSERVERS]; /* SMB */
const char *name; const char *name;
} *open_handles; } *open_handles;
static uint_t num_open_handles; static unsigned int num_open_handles;
/* state information for the servers. We open NINSTANCES connections to /* state information for the servers. We open NINSTANCES connections to
each server */ each server */
@ -86,7 +86,7 @@ static struct {
/* the seeds and flags for each operation */ /* the seeds and flags for each operation */
static struct { static struct {
uint_t seed; unsigned int seed;
bool disabled; bool disabled;
} *op_parms; } *op_parms;
@ -111,9 +111,9 @@ static struct {
/* info relevant to the current operation */ /* info relevant to the current operation */
static struct { static struct {
const char *name; const char *name;
uint_t seed; unsigned int seed;
NTSTATUS status; NTSTATUS status;
uint_t opnum; unsigned int opnum;
TALLOC_CTX *mem_ctx; TALLOC_CTX *mem_ctx;
const char *mismatch; const char *mismatch;
} current_op; } current_op;
@ -277,9 +277,9 @@ static bool connect_servers(struct tevent_context *ev,
/* /*
work out the time skew between the servers - be conservative work out the time skew between the servers - be conservative
*/ */
static uint_t time_skew(void) static unsigned int time_skew(void)
{ {
uint_t ret; unsigned int ret;
if (options.smb2) { if (options.smb2) {
ret = labs(servers[0].smb2_tree[0]->session->transport->negotiate.system_time - ret = labs(servers[0].smb2_tree[0]->session->transport->negotiate.system_time -
servers[1].smb2_tree[0]->session->transport->negotiate.system_time); servers[1].smb2_tree[0]->session->transport->negotiate.system_time);
@ -299,9 +299,9 @@ static bool smb2_handle_equal(const struct smb2_handle *h1, const struct smb2_ha
/* /*
turn a server handle into a local handle turn a server handle into a local handle
*/ */
static uint_t fnum_to_handle_smb2(int server, int instance, struct smb2_handle server_handle) static unsigned int fnum_to_handle_smb2(int server, int instance, struct smb2_handle server_handle)
{ {
uint_t i; unsigned int i;
for (i=0;i<options.max_open_handles;i++) { for (i=0;i<options.max_open_handles;i++) {
if (!open_handles[i].active || if (!open_handles[i].active ||
instance != open_handles[i].instance) continue; instance != open_handles[i].instance) continue;
@ -317,9 +317,9 @@ static uint_t fnum_to_handle_smb2(int server, int instance, struct smb2_handle s
/* /*
turn a server handle into a local handle turn a server handle into a local handle
*/ */
static uint_t fnum_to_handle_smb(int server, int instance, uint16_t server_handle) static unsigned int fnum_to_handle_smb(int server, int instance, uint16_t server_handle)
{ {
uint_t i; unsigned int i;
for (i=0;i<options.max_open_handles;i++) { for (i=0;i<options.max_open_handles;i++) {
if (!open_handles[i].active || if (!open_handles[i].active ||
instance != open_handles[i].instance) continue; instance != open_handles[i].instance) continue;
@ -450,7 +450,7 @@ static void gen_remove_handle_smb(int instance, uint16_t handles[NSERVERS])
/* /*
return true with 'chance' probability as a percentage return true with 'chance' probability as a percentage
*/ */
static bool gen_chance(uint_t chance) static bool gen_chance(unsigned int chance)
{ {
return ((random() % 100) <= chance); return ((random() % 100) <= chance);
} }
@ -511,7 +511,7 @@ static uint16_t gen_fnum_close(int instance)
*/ */
static int gen_int_range(uint64_t min, uint64_t max) static int gen_int_range(uint64_t min, uint64_t max)
{ {
uint_t r = random(); unsigned int r = random();
return min + (r % (1+max-min)); return min + (r % (1+max-min));
} }
@ -640,9 +640,9 @@ static uint32_t gen_bits_levels(int nlevels, ...)
/* /*
generate a bitmask generate a bitmask
*/ */
static uint32_t gen_bits_mask(uint_t mask) static uint32_t gen_bits_mask(unsigned int mask)
{ {
uint_t ret = random(); unsigned int ret = random();
return ret & mask; return ret & mask;
} }
@ -869,9 +869,9 @@ static NTTIME gen_timewarp(void)
/* /*
generate a file allocation size generate a file allocation size
*/ */
static uint_t gen_alloc_size(void) static unsigned int gen_alloc_size(void)
{ {
uint_t ret; unsigned int ret;
if (gen_chance(30)) return 0; if (gen_chance(30)) return 0;

View File

@ -33,9 +33,9 @@ static int showall;
static int analyze; static int analyze;
static int hide_unlock_fails; static int hide_unlock_fails;
static int use_oplocks; static int use_oplocks;
static uint_t lock_range = 100; static unsigned int lock_range = 100;
static uint_t lock_base = 0; static unsigned int lock_base = 0;
static uint_t min_length = 0; static unsigned int min_length = 0;
static int exact_error_codes; static int exact_error_codes;
static int zero_zero; static int zero_zero;
@ -216,8 +216,8 @@ static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
int fnum[NSERVERS][NCONNECTIONS][NFILES], int fnum[NSERVERS][NCONNECTIONS][NFILES],
struct record *rec) struct record *rec)
{ {
uint_t conn = rec->conn; unsigned int conn = rec->conn;
uint_t f = rec->f; unsigned int f = rec->f;
uint64_t start = rec->start; uint64_t start = rec->start;
uint64_t len = rec->len; uint64_t len = rec->len;
enum brl_type op = rec->lock_type; enum brl_type op = rec->lock_type;
@ -426,7 +426,7 @@ static int test_locks(struct tevent_context *ev,
#endif #endif
recorded[n].conn = random() % NCONNECTIONS; recorded[n].conn = random() % NCONNECTIONS;
recorded[n].f = random() % NFILES; recorded[n].f = random() % NFILES;
recorded[n].start = lock_base + ((uint_t)random() % (lock_range-1)); recorded[n].start = lock_base + ((unsigned int)random() % (lock_range-1));
recorded[n].len = min_length + recorded[n].len = min_length +
random() % (lock_range-(recorded[n].start-lock_base)); random() % (lock_range-(recorded[n].start-lock_base));
recorded[n].start *= RANGE_MULTIPLE; recorded[n].start *= RANGE_MULTIPLE;

View File

@ -55,7 +55,7 @@ static bool use_oplocks;
struct record { struct record {
char r1, r2; char r1, r2;
char conn, f, fstype; char conn, f, fstype;
uint_t start, len; unsigned int start, len;
char needed; char needed;
}; };
@ -95,7 +95,7 @@ static bool try_close(struct smbcli_state *c, int fstype, int fd)
} }
static bool try_lock(struct smbcli_state *c, int fstype, static bool try_lock(struct smbcli_state *c, int fstype,
int fd, uint_t start, uint_t len, int fd, unsigned int start, unsigned int len,
enum brl_type op) enum brl_type op)
{ {
struct flock lock; struct flock lock;
@ -117,7 +117,7 @@ static bool try_lock(struct smbcli_state *c, int fstype,
} }
static bool try_unlock(struct smbcli_state *c, int fstype, static bool try_unlock(struct smbcli_state *c, int fstype,
int fd, uint_t start, uint_t len) int fd, unsigned int start, unsigned int len)
{ {
struct flock lock; struct flock lock;
@ -228,13 +228,13 @@ static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES],
struct record *rec) struct record *rec)
{ {
uint_t conn = rec->conn; unsigned int conn = rec->conn;
uint_t f = rec->f; unsigned int f = rec->f;
uint_t fstype = rec->fstype; unsigned int fstype = rec->fstype;
uint_t start = rec->start; unsigned int start = rec->start;
uint_t len = rec->len; unsigned int len = rec->len;
uint_t r1 = rec->r1; unsigned int r1 = rec->r1;
uint_t r2 = rec->r2; unsigned int r2 = rec->r2;
enum brl_type op; enum brl_type op;
int server; int server;
bool ret[NSERVERS]; bool ret[NSERVERS];
@ -384,7 +384,7 @@ static void test_locks(TALLOC_CTX *mem_ctx, char *share1, char *share2,
recorded[n].conn = random() % NCONNECTIONS; recorded[n].conn = random() % NCONNECTIONS;
recorded[n].fstype = random() % NUMFSTYPES; recorded[n].fstype = random() % NUMFSTYPES;
recorded[n].f = random() % NFILES; recorded[n].f = random() % NFILES;
recorded[n].start = LOCKBASE + ((uint_t)random() % (LOCKRANGE-1)); recorded[n].start = LOCKBASE + ((unsigned int)random() % (LOCKRANGE-1));
recorded[n].len = 1 + recorded[n].len = 1 +
random() % (LOCKRANGE-(recorded[n].start-LOCKBASE)); random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
recorded[n].start *= RANGE_MULTIPLE; recorded[n].start *= RANGE_MULTIPLE;

View File

@ -46,8 +46,8 @@ struct lock_info {
struct createx_params { struct createx_params {
char *fname; char *fname;
uint_t create_options; unsigned int create_options;
uint_t create_disposition; unsigned int create_disposition;
int handle; int handle;
}; };
@ -72,8 +72,8 @@ static struct {
static bool nb_do_createx(struct ftable *f, static bool nb_do_createx(struct ftable *f,
const char *fname, const char *fname,
uint_t create_options, unsigned int create_options,
uint_t create_disposition, unsigned int create_disposition,
int handle, int handle,
NTSTATUS status, NTSTATUS status,
bool retry); bool retry);
@ -82,8 +82,8 @@ static bool nb_do_lockx(bool relock, int handle, off_t offset, int size, NTSTATU
static void nb_set_createx_params(struct ftable *f, static void nb_set_createx_params(struct ftable *f,
const char *fname, const char *fname,
uint_t create_options, unsigned int create_options,
uint_t create_disposition, unsigned int create_disposition,
int handle) int handle)
{ {
struct createx_params *cp = &f->cp; struct createx_params *cp = &f->cp;
@ -455,8 +455,8 @@ bool nb_unlink(const char *fname, int attr, NTSTATUS status, bool retry)
static bool nb_do_createx(struct ftable *f, static bool nb_do_createx(struct ftable *f,
const char *fname, const char *fname,
uint_t create_options, unsigned int create_options,
uint_t create_disposition, unsigned int create_disposition,
int handle, int handle,
NTSTATUS status, NTSTATUS status,
bool retry) bool retry)
@ -465,7 +465,7 @@ static bool nb_do_createx(struct ftable *f,
uint32_t desired_access; uint32_t desired_access;
NTSTATUS ret; NTSTATUS ret;
TALLOC_CTX *mem_ctx; TALLOC_CTX *mem_ctx;
uint_t flags = 0; unsigned int flags = 0;
mem_ctx = talloc_init("raw_open"); mem_ctx = talloc_init("raw_open");
@ -531,7 +531,7 @@ static bool nb_do_createx(struct ftable *f,
} }
bool nb_createx(const char *fname, bool nb_createx(const char *fname,
uint_t create_options, uint_t create_disposition, int handle, unsigned int create_options, unsigned int create_disposition, int handle,
NTSTATUS status) NTSTATUS status)
{ {
return nb_do_createx(NULL, fname, create_options, create_disposition, handle, status, false); return nb_do_createx(NULL, fname, create_options, create_disposition, handle, status, false);
@ -664,7 +664,7 @@ bool nb_lockx(int handle, off_t offset, int size, NTSTATUS status)
return nb_do_lockx(false, handle, offset, size, status); return nb_do_lockx(false, handle, offset, size, status);
} }
bool nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status) bool nb_unlockx(int handle, unsigned int offset, int size, NTSTATUS status)
{ {
union smb_lock io; union smb_lock io;
int i; int i;

View File

@ -29,10 +29,10 @@
static struct { static struct {
const char *name; const char *name;
enum smb_fileinfo_level level; enum smb_fileinfo_level level;
uint_t only_paths:1; unsigned int only_paths:1;
uint_t only_handles:1; unsigned int only_handles:1;
uint32_t capability_mask; uint32_t capability_mask;
uint_t expected_ipc_access_denied:1; unsigned int expected_ipc_access_denied:1;
NTSTATUS expected_ipc_fnum_status; NTSTATUS expected_ipc_fnum_status;
NTSTATUS fnum_status, fname_status; NTSTATUS fnum_status, fname_status;
union smb_fileinfo fnum_finfo, fname_finfo; union smb_fileinfo fnum_finfo, fname_finfo;
@ -182,8 +182,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
/* local macros to make the code below more readable */ /* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \ #define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \ printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
#n1, #v1, (uint_t)s1->n1.out.v1, \ #n1, #v1, (unsigned int)s1->n1.out.v1, \
#n2, #v2, (uint_t)s2->n2.out.v2, \ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
ret = false; \ ret = false; \
}} while(0) }} while(0)
@ -211,8 +211,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \ #define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \ printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \ #n1, #v1, \
(uint_t)s1->n1.out.v1, \ (unsigned int)s1->n1.out.v1, \
(uint_t)s1->n1.out.v1, \ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
ret = false; \ ret = false; \
}} while(0) }} while(0)
@ -529,21 +529,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \ s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \ if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) handle %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \ printf("(%d) handle %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
(uint_t)s1->stype.out.tfield, \ (unsigned int)s1->stype.out.tfield, \
(uint_t)correct_size); \ (unsigned int)correct_size); \
ret = false; \ ret = false; \
} \ } \
s1 = fname_find(is_ipc, sname); \ s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \ if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) path %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \ printf("(%d) path %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
(uint_t)s1->stype.out.tfield, \ (unsigned int)s1->stype.out.tfield, \
(uint_t)correct_size); \ (unsigned int)correct_size); \
ret = false; \ ret = false; \
}} while (0) }} while (0)
s1 = fnum_find("STANDARD_INFO"); s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.size; correct_size = s1->standard_info.out.size;
torture_comment(torture, "size: %u\n", (uint_t)correct_size); torture_comment(torture, "size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTR", getattr, size); SIZE_CHECK("GETATTR", getattr, size);
SIZE_CHECK("GETATTRE", getattre, size); SIZE_CHECK("GETATTRE", getattre, size);
@ -564,7 +564,7 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find("STANDARD_INFO"); s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.alloc_size; correct_size = s1->standard_info.out.alloc_size;
torture_comment(torture, "alloc_size: %u\n", (uint_t)correct_size); torture_comment(torture, "alloc_size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTRE", getattre, alloc_size); SIZE_CHECK("GETATTRE", getattre, alloc_size);
SIZE_CHECK("STANDARD", standard, alloc_size); SIZE_CHECK("STANDARD", standard, alloc_size);
@ -583,21 +583,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \ s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \ if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) handle %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \ printf("(%d) handle %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
(uint_t)s1->stype.out.tfield, \ (unsigned int)s1->stype.out.tfield, \
(uint_t)correct_attrib); \ (unsigned int)correct_attrib); \
ret = false; \ ret = false; \
} \ } \
s1 = fname_find(is_ipc, sname); \ s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \ if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) path %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \ printf("(%d) path %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
(uint_t)s1->stype.out.tfield, \ (unsigned int)s1->stype.out.tfield, \
(uint_t)correct_attrib); \ (unsigned int)correct_attrib); \
ret = false; \ ret = false; \
}} while (0) }} while (0)
s1 = fnum_find("BASIC_INFO"); s1 = fnum_find("BASIC_INFO");
correct_attrib = s1->basic_info.out.attrib; correct_attrib = s1->basic_info.out.attrib;
torture_comment(torture, "attrib: 0x%x\n", (uint_t)correct_attrib); torture_comment(torture, "attrib: 0x%x\n", (unsigned int)correct_attrib);
ATTRIB_CHECK("GETATTR", getattr, attrib); ATTRIB_CHECK("GETATTR", getattr, attrib);
if (!is_ipc) { if (!is_ipc) {
@ -825,13 +825,13 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
if (s1 && s1->stype.out.tfield != 0) { \ if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) handle %s/%s unknown != 0 (0x%x)\n", __LINE__, \ printf("(%d) handle %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \ #stype, #tfield, \
(uint_t)s1->stype.out.tfield); \ (unsigned int)s1->stype.out.tfield); \
} \ } \
s1 = fname_find(is_ipc, sname); \ s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != 0) { \ if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) path %s/%s unknown != 0 (0x%x)\n", __LINE__, \ printf("(%d) path %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \ #stype, #tfield, \
(uint_t)s1->stype.out.tfield); \ (unsigned int)s1->stype.out.tfield); \
}} while (0) }} while (0)
#endif #endif
/* now get a bit fancier .... */ /* now get a bit fancier .... */

View File

@ -69,16 +69,16 @@ static union smb_fsinfo *find(const char *name)
/* local macros to make the code below more readable */ /* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \ #define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \ printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
#n1, #v1, (uint_t)s1->n1.out.v1, \ #n1, #v1, (unsigned int)s1->n1.out.v1, \
#n2, #v2, (uint_t)s2->n2.out.v2, \ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
ret = false; \ ret = false; \
}} while(0) }} while(0)
#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (abs((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \ #define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (abs((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \ printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
#n1, #v1, (uint_t)s1->n1.out.v1, \ #n1, #v1, (unsigned int)s1->n1.out.v1, \
#n2, #v2, (uint_t)s2->n2.out.v2, \ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
ret = false; \ ret = false; \
}} while(0) }} while(0)
@ -105,8 +105,8 @@ static union smb_fsinfo *find(const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \ #define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \ printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \ #n1, #v1, \
(uint_t)s1->n1.out.v1, \ (unsigned int)s1->n1.out.v1, \
(uint_t)s1->n1.out.v1, \ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \ __FILE__, __LINE__); \
ret = false; \ ret = false; \
}} while(0) }} while(0)

View File

@ -52,7 +52,7 @@
/* /*
setup a random buffer based on a seed setup a random buffer based on a seed
*/ */
static void setup_buffer(uint8_t *buf, uint_t seed, int len) static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{ {
int i; int i;
srandom(seed); srandom(seed);
@ -62,7 +62,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/* /*
check a random buffer based on a seed check a random buffer based on a seed
*/ */
static bool check_buffer(uint8_t *buf, uint_t seed, int len, int line) static bool check_buffer(uint8_t *buf, unsigned int seed, int len, int line)
{ {
int i; int i;
srandom(seed); srandom(seed);
@ -90,7 +90,7 @@ static bool test_read(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA"; const char *test_data = "TEST DATA";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize); buf = talloc_zero_array(tctx, uint8_t, maxsize);
@ -222,7 +222,7 @@ static bool test_lockread(struct torture_context *tctx,
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA"; const char *test_data = "TEST DATA";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
if (!cli->transport->negotiate.lockread_supported) { if (!cli->transport->negotiate.lockread_supported) {
printf("Server does not support lockread - skipping\n"); printf("Server does not support lockread - skipping\n");
@ -372,7 +372,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA"; const char *test_data = "TEST DATA";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize); buf = talloc_zero_array(tctx, uint8_t, maxsize);
@ -655,7 +655,7 @@ static bool test_readbraw(struct torture_context *tctx,
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA"; const char *test_data = "TEST DATA";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
if (!cli->transport->negotiate.readbraw_supported) { if (!cli->transport->negotiate.readbraw_supported) {
printf("Server does not support readbraw - skipping\n"); printf("Server does not support readbraw - skipping\n");

View File

@ -162,8 +162,8 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum) static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{ {
union smb_open open_parms; union smb_open open_parms;
uint_t openfn=0; unsigned int openfn=0;
uint_t accessmode=0; unsigned int accessmode=0;
TALLOC_CTX *mem_ctx; TALLOC_CTX *mem_ctx;
NTSTATUS status; NTSTATUS status;
@ -225,8 +225,8 @@ static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int
static NTSTATUS raw_smbcli_t2open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum) static NTSTATUS raw_smbcli_t2open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{ {
union smb_open io; union smb_open io;
uint_t openfn=0; unsigned int openfn=0;
uint_t accessmode=0; unsigned int accessmode=0;
TALLOC_CTX *mem_ctx; TALLOC_CTX *mem_ctx;
NTSTATUS status; NTSTATUS status;

View File

@ -144,7 +144,7 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \ if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \ printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \ call_name, #stype, #field, \
(uint_t)value, (uint_t)finfo2.stype.out.field); \ (unsigned int)value, (unsigned int)finfo2.stype.out.field); \
dump_all_info(torture, &finfo1); \ dump_all_info(torture, &finfo1); \
ret = false; \ ret = false; \
}} while (0) }} while (0)
@ -154,8 +154,8 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \ if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \ printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \ call_name, #stype, #field, \
(uint_t)value, \ (unsigned int)value, \
(uint_t)nt_time_to_unix(finfo2.stype.out.field)); \ (unsigned int)nt_time_to_unix(finfo2.stype.out.field)); \
printf("\t%s", timestring(torture, value)); \ printf("\t%s", timestring(torture, value)); \
printf("\t%s\n", nt_time_string(torture, finfo2.stype.out.field)); \ printf("\t%s\n", nt_time_string(torture, finfo2.stype.out.field)); \
dump_all_info(torture, &finfo1); \ dump_all_info(torture, &finfo1); \

View File

@ -66,7 +66,7 @@
/* /*
setup a random buffer based on a seed setup a random buffer based on a seed
*/ */
static void setup_buffer(uint8_t *buf, uint_t seed, int len) static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{ {
int i; int i;
srandom(seed); srandom(seed);
@ -76,7 +76,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/* /*
check a random buffer based on a seed check a random buffer based on a seed
*/ */
static bool check_buffer(uint8_t *buf, uint_t seed, int len, const char *location) static bool check_buffer(uint8_t *buf, unsigned int seed, int len, const char *location)
{ {
int i; int i;
srandom(seed); srandom(seed);
@ -104,7 +104,7 @@ static bool test_write(struct torture_context *tctx,
uint8_t *buf; uint8_t *buf;
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
union smb_fileinfo finfo; union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize); buf = talloc_zero_array(tctx, uint8_t, maxsize);
@ -232,7 +232,7 @@ static bool test_writex(struct torture_context *tctx,
uint8_t *buf; uint8_t *buf;
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
union smb_fileinfo finfo; union smb_fileinfo finfo;
int max_bits=63; int max_bits=63;
@ -420,7 +420,7 @@ static bool test_writeunlock(struct torture_context *tctx,
uint8_t *buf; uint8_t *buf;
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
union smb_fileinfo finfo; union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize); buf = talloc_zero_array(tctx, uint8_t, maxsize);
@ -568,7 +568,7 @@ static bool test_writeclose(struct torture_context *tctx,
uint8_t *buf; uint8_t *buf;
const int maxsize = 90000; const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt"; const char *fname = BASEDIR "\\test.txt";
uint_t seed = time(NULL); unsigned int seed = time(NULL);
union smb_fileinfo finfo; union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize); buf = talloc_zero_array(tctx, uint8_t, maxsize);

View File

@ -268,19 +268,19 @@ static bool test_sleep(struct torture_context *tctx,
talloc_asprintf(tctx, "TestSleep(%d) failed", i)); talloc_asprintf(tctx, "TestSleep(%d) failed", i));
torture_assert(tctx, r[i].out.result == r[i].in.seconds, torture_assert(tctx, r[i].out.result == r[i].in.seconds,
talloc_asprintf(tctx, "Failed - Asked to sleep for %u seconds (server replied with %u seconds and the reply takes only %u seconds)", talloc_asprintf(tctx, "Failed - Asked to sleep for %u seconds (server replied with %u seconds and the reply takes only %u seconds)",
r[i].out.result, r[i].in.seconds, (uint_t)diff[i].tv_sec)); r[i].out.result, r[i].in.seconds, (unsigned int)diff[i].tv_sec));
torture_assert(tctx, r[i].out.result <= rounded_tdiff, torture_assert(tctx, r[i].out.result <= rounded_tdiff,
talloc_asprintf(tctx, "Failed - Slept for %u seconds (but reply takes only %u.%06u seconds)", talloc_asprintf(tctx, "Failed - Slept for %u seconds (but reply takes only %u.%06u seconds)",
r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec)); r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec));
if (r[i].out.result+1 == rounded_tdiff) { if (r[i].out.result+1 == rounded_tdiff) {
torture_comment(tctx, "Slept for %u seconds (but reply takes %u.%06u seconds - busy server?)\n", torture_comment(tctx, "Slept for %u seconds (but reply takes %u.%06u seconds - busy server?)\n",
r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec); r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
} else if (r[i].out.result == rounded_tdiff) { } else if (r[i].out.result == rounded_tdiff) {
torture_comment(tctx, "Slept for %u seconds (reply takes %u.%06u seconds - ok)\n", torture_comment(tctx, "Slept for %u seconds (reply takes %u.%06u seconds - ok)\n",
r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec); r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
} else { } else {
torture_comment(tctx, "(Failed) - Not async - Slept for %u seconds (but reply takes %u.%06u seconds)", torture_comment(tctx, "(Failed) - Not async - Slept for %u seconds (but reply takes %u.%06u seconds)",
r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec); r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
/* TODO: let the test fail here, when we support async rpc on ncacn_np */ /* TODO: let the test fail here, when we support async rpc on ncacn_np */
} }
} }

View File

@ -1219,8 +1219,8 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
const int LOCAL = 0; const int LOCAL = 0;
const int GLOBAL = 1; const int GLOBAL = 1;
secname[LOCAL] = talloc_asprintf(tctx, "torturesecret-%u", (uint_t)random()); secname[LOCAL] = talloc_asprintf(tctx, "torturesecret-%u", (unsigned int)random());
secname[GLOBAL] = talloc_asprintf(tctx, "G$torturesecret-%u", (uint_t)random()); secname[GLOBAL] = talloc_asprintf(tctx, "G$torturesecret-%u", (unsigned int)random());
for (i=0; i< 2; i++) { for (i=0; i< 2; i++) {
torture_comment(tctx, "\nTesting CreateSecret of %s\n", secname[i]); torture_comment(tctx, "\nTesting CreateSecret of %s\n", secname[i]);

View File

@ -52,7 +52,7 @@ static bool test_CreateSecret_basic(struct dcerpc_pipe *p,
char *secret2; char *secret2;
char *secname; char *secname;
secname = talloc_asprintf(tctx, "torturesecret-%u", (uint_t)random()); secname = talloc_asprintf(tctx, "torturesecret-%u", (unsigned int)random());
torture_comment(tctx, "Testing CreateSecret of %s\n", secname); torture_comment(tctx, "Testing CreateSecret of %s\n", secname);

View File

@ -108,7 +108,7 @@ static bool test_find(struct torture_context *tctx,
struct file_elem files[NFILES] = {}; struct file_elem files[NFILES] = {};
NTSTATUS status; NTSTATUS status;
bool ret = true; bool ret = true;
uint_t count; unsigned int count;
int i, j, file_count = 0; int i, j, file_count = 0;
status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h); status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h);
@ -193,7 +193,7 @@ static bool test_fixed(struct torture_context *tctx,
struct file_elem files[NFILES] = {}; struct file_elem files[NFILES] = {};
NTSTATUS status; NTSTATUS status;
bool ret = true; bool ret = true;
uint_t count; unsigned int count;
int i; int i;
status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h); status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h);
@ -360,7 +360,7 @@ static union smb_search_data *find(const char *name)
static bool fill_level_data(TALLOC_CTX *mem_ctx, static bool fill_level_data(TALLOC_CTX *mem_ctx,
union smb_search_data *data, union smb_search_data *data,
union smb_search_data *d, union smb_search_data *d,
uint_t count, unsigned int count,
uint8_t level, uint8_t level,
enum smb_search_data_level data_level) enum smb_search_data_level data_level)
{ {
@ -385,7 +385,7 @@ NTSTATUS torture_single_file_search(struct smb2_tree *tree,
enum smb_search_data_level data_level, enum smb_search_data_level data_level,
int idx, int idx,
union smb_search_data *d, union smb_search_data *d,
uint_t *count, unsigned int *count,
struct smb2_handle *h) struct smb2_handle *h)
{ {
struct smb2_find f; struct smb2_find f;
@ -416,7 +416,7 @@ static bool test_one_file(struct torture_context *tctx,
const char *fname = "torture_search.txt"; const char *fname = "torture_search.txt";
NTSTATUS status; NTSTATUS status;
int i; int i;
uint_t count; unsigned int count;
union smb_fileinfo all_info2, alt_info, internal_info; union smb_fileinfo all_info2, alt_info, internal_info;
union smb_search_data *s; union smb_search_data *s;
union smb_search_data d; union smb_search_data d;
@ -671,7 +671,7 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree *tree,
{ {
struct smb2_find f; struct smb2_find f;
bool ret = true; bool ret = true;
uint_t count = 0; unsigned int count = 0;
union smb_search_data *d; union smb_search_data *d;
NTSTATUS status; NTSTATUS status;
struct multiple_result *result = (struct multiple_result *)data; struct multiple_result *result = (struct multiple_result *)data;
@ -895,7 +895,7 @@ static bool test_modify_search(struct torture_context *tctx,
NTSTATUS status; NTSTATUS status;
bool ret = true; bool ret = true;
int i; int i;
uint_t count; unsigned int count;
smb2_deltree(tree, DNAME); smb2_deltree(tree, DNAME);

View File

@ -117,7 +117,7 @@ bool torture_smb2_setinfo(struct torture_context *tctx)
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \ if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \
torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \ torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \ call_name, #stype, #field, \
(uint_t)value, (uint_t)finfo2.stype.out.field); \ (unsigned int)value, (unsigned int)finfo2.stype.out.field); \
torture_smb2_all_info(tree, handle); \ torture_smb2_all_info(tree, handle); \
ret = false; \ ret = false; \
goto done; \ goto done; \
@ -128,8 +128,8 @@ bool torture_smb2_setinfo(struct torture_context *tctx)
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \ if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \
torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \ torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \ call_name, #stype, #field, \
(uint_t)value, \ (unsigned int)value, \
(uint_t)nt_time_to_unix(finfo2.stype.out.field)); \ (unsigned int)nt_time_to_unix(finfo2.stype.out.field)); \
torture_warning(tctx, "\t%s", timestring(tctx, value)); \ torture_warning(tctx, "\t%s", timestring(tctx, value)); \
torture_warning(tctx, "\t%s\n", nt_time_string(tctx, finfo2.stype.out.field)); \ torture_warning(tctx, "\t%s\n", nt_time_string(tctx, finfo2.stype.out.field)); \
torture_smb2_all_info(tree, handle); \ torture_smb2_all_info(tree, handle); \