mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r11967: Fix more 64-bit warnings.
This commit is contained in:
parent
e98c28941a
commit
9c4436a124
@ -578,8 +578,8 @@ static NTSTATUS gensec_gssapi_seal_packet(struct gensec_security *gensec_securit
|
|||||||
|
|
||||||
/* Caller must pad to right boundary */
|
/* Caller must pad to right boundary */
|
||||||
if (output_token.length != (length + sig_length)) {
|
if (output_token.length != (length + sig_length)) {
|
||||||
DEBUG(1, ("gensec_gssapi_seal_packet: GSS Wrap length [%d] does not match caller length [%d] plus sig size [%d] = [%d]\n",
|
DEBUG(1, ("gensec_gssapi_seal_packet: GSS Wrap length [%ld] does not match caller length [%ld] plus sig size [%ld] = [%ld]\n",
|
||||||
output_token.length, length, sig_length, length + sig_length));
|
(long)output_token.length, (long)length, (long)sig_length, (long)(length + sig_length)));
|
||||||
return NT_STATUS_INTERNAL_ERROR;
|
return NT_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -685,8 +685,8 @@ static NTSTATUS gensec_gssapi_sign_packet(struct gensec_security *gensec_securit
|
|||||||
|
|
||||||
/* Caller must pad to right boundary */
|
/* Caller must pad to right boundary */
|
||||||
if (output_token.length != (length + sig_length)) {
|
if (output_token.length != (length + sig_length)) {
|
||||||
DEBUG(1, ("gensec_gssapi_sign_packet: GSS Wrap length [%d] does not match caller length [%d] plus sig size [%d] = [%d]\n",
|
DEBUG(1, ("gensec_gssapi_sign_packet: GSS Wrap length [%ld] does not match caller length [%ld] plus sig size [%ld] = [%ld]\n",
|
||||||
output_token.length, length, sig_length, length + sig_length));
|
(long)output_token.length, (long)length, (long)sig_length, (long)(length + sig_length)));
|
||||||
return NT_STATUS_INTERNAL_ERROR;
|
return NT_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@ int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct
|
|||||||
int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
||||||
const char *attr_name, int64_t v)
|
const char *attr_name, int64_t v)
|
||||||
{
|
{
|
||||||
const char *s = talloc_asprintf(mem_ctx, "%lld", v);
|
const char *s = talloc_asprintf(mem_ctx, "%lld", (long long)v);
|
||||||
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
|
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -810,7 +810,7 @@ int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct
|
|||||||
int samdb_msg_add_uint64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
int samdb_msg_add_uint64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
||||||
const char *attr_name, uint64_t v)
|
const char *attr_name, uint64_t v)
|
||||||
{
|
{
|
||||||
const char *s = talloc_asprintf(mem_ctx, "%llu", v);
|
const char *s = talloc_asprintf(mem_ctx, "%llu", (unsigned long long)v);
|
||||||
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
|
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(2, ("Successfully connected to OXID %llx\n", oxid));
|
DEBUG(2, ("Successfully connected to OXID %llx\n", (long long)oxid));
|
||||||
|
|
||||||
*pp = p;
|
*pp = p;
|
||||||
talloc_free(tmp_ctx);
|
talloc_free(tmp_ctx);
|
||||||
|
@ -337,8 +337,8 @@ next_partial:
|
|||||||
|
|
||||||
if (pc->packet_size > pc->num_read) {
|
if (pc->packet_size > pc->num_read) {
|
||||||
/* the caller made an error */
|
/* the caller made an error */
|
||||||
DEBUG(0,("Invalid packet_size %u greater than num_read %u\n",
|
DEBUG(0,("Invalid packet_size %lu greater than num_read %lu\n",
|
||||||
pc->packet_size, pc->num_read));
|
(long)pc->packet_size, (long)pc->num_read));
|
||||||
packet_error(pc, NT_STATUS_INVALID_PARAMETER);
|
packet_error(pc, NT_STATUS_INVALID_PARAMETER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob)
|
|||||||
|
|
||||||
if (!req) {
|
if (!req) {
|
||||||
DEBUG(1,("Discarding unmatched reply with seqnum 0x%llx op %d\n",
|
DEBUG(1,("Discarding unmatched reply with seqnum 0x%llx op %d\n",
|
||||||
seqnum, SVAL(hdr, SMB2_HDR_OPCODE)));
|
(long long)seqnum, SVAL(hdr, SMB2_HDR_OPCODE)));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(2, ("SMB2 RECV seqnum=0x%llx\n", req->seqnum));
|
DEBUG(2, ("SMB2 RECV seqnum=0x%llx\n", (long long)req->seqnum));
|
||||||
dump_data(5, req->in.body, req->in.body_size);
|
dump_data(5, req->in.body, req->in.body_size);
|
||||||
|
|
||||||
/* if this request has an async handler then call that to
|
/* if this request has an async handler then call that to
|
||||||
@ -273,7 +273,7 @@ void smb2_transport_send(struct smb2_request *req)
|
|||||||
|
|
||||||
_smb_setlen2(req->out.buffer, req->out.size - NBT_HDR_SIZE);
|
_smb_setlen2(req->out.buffer, req->out.size - NBT_HDR_SIZE);
|
||||||
|
|
||||||
DEBUG(2, ("SMB2 send seqnum=0x%llx\n", req->seqnum));
|
DEBUG(2, ("SMB2 send seqnum=0x%llx\n", (long long)req->seqnum));
|
||||||
dump_data(5, req->out.body, req->out.body_size);
|
dump_data(5, req->out.body, req->out.body_size);
|
||||||
|
|
||||||
/* check if the transport is dead */
|
/* check if the transport is dead */
|
||||||
|
@ -71,7 +71,7 @@ static uint64_t winsdb_allocate_version(struct ldb_context *wins_db)
|
|||||||
if (ret != 0) goto failed;
|
if (ret != 0) goto failed;
|
||||||
ret = ldb_msg_add_empty(msg, "maxVersion", LDB_FLAG_MOD_REPLACE);
|
ret = ldb_msg_add_empty(msg, "maxVersion", LDB_FLAG_MOD_REPLACE);
|
||||||
if (ret != 0) goto failed;
|
if (ret != 0) goto failed;
|
||||||
ret = ldb_msg_add_fmt(msg, "maxVersion", "%llu", maxVersion);
|
ret = ldb_msg_add_fmt(msg, "maxVersion", "%llu", (long long)maxVersion);
|
||||||
if (ret != 0) goto failed;
|
if (ret != 0) goto failed;
|
||||||
|
|
||||||
ret = ldb_modify(wins_db, msg);
|
ret = ldb_modify(wins_db, msg);
|
||||||
@ -539,7 +539,7 @@ struct ldb_message *winsdb_message(struct ldb_context *ldb,
|
|||||||
ret |= ldb_msg_add_fmt(msg, "isStatic", "%u", rec->is_static);
|
ret |= ldb_msg_add_fmt(msg, "isStatic", "%u", rec->is_static);
|
||||||
ret |= ldb_msg_add_string(msg, "expireTime",
|
ret |= ldb_msg_add_string(msg, "expireTime",
|
||||||
ldb_timestring(msg, rec->expire_time));
|
ldb_timestring(msg, rec->expire_time));
|
||||||
ret |= ldb_msg_add_fmt(msg, "versionID", "%llu", rec->version);
|
ret |= ldb_msg_add_fmt(msg, "versionID", "%llu", (long long)rec->version);
|
||||||
ret |= ldb_msg_add_string(msg, "winsOwner", rec->wins_owner);
|
ret |= ldb_msg_add_string(msg, "winsOwner", rec->wins_owner);
|
||||||
ret |= ldb_msg_add_empty(msg, "address", 0);
|
ret |= ldb_msg_add_empty(msg, "address", 0);
|
||||||
for (i=0;rec->addresses[i];i++) {
|
for (i=0;rec->addresses[i];i++) {
|
||||||
|
@ -44,7 +44,7 @@ static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (blob.length < (NBT_HDR_SIZE + MIN_SMB_SIZE)) {
|
if (blob.length < (NBT_HDR_SIZE + MIN_SMB_SIZE)) {
|
||||||
DEBUG(2,("Invalid SMB packet length count %d\n", blob.length));
|
DEBUG(2,("Invalid SMB packet length count %ld\n", (long)blob.length));
|
||||||
smbsrv_terminate_connection(smb_conn, "Invalid SMB packet");
|
smbsrv_terminate_connection(smb_conn, "Invalid SMB packet");
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
@ -1471,7 +1471,7 @@ BOOL torture_denytest1(void)
|
|||||||
tdif = usec_time_diff(&tv, &tv_start);
|
tdif = usec_time_diff(&tv, &tv_start);
|
||||||
tdif /= 1000;
|
tdif /= 1000;
|
||||||
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
|
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
|
||||||
tdif,
|
(long long)tdif,
|
||||||
fname,
|
fname,
|
||||||
denystr(denytable1[i].deny1),
|
denystr(denytable1[i].deny1),
|
||||||
openstr(denytable1[i].mode1),
|
openstr(denytable1[i].mode1),
|
||||||
@ -1568,7 +1568,7 @@ BOOL torture_denytest2(void)
|
|||||||
tdif = usec_time_diff(&tv, &tv_start);
|
tdif = usec_time_diff(&tv, &tv_start);
|
||||||
tdif /= 1000;
|
tdif /= 1000;
|
||||||
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
|
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
|
||||||
tdif,
|
(long long)tdif,
|
||||||
fname,
|
fname,
|
||||||
denystr(denytable2[i].deny1),
|
denystr(denytable2[i].deny1),
|
||||||
openstr(denytable2[i].mode1),
|
openstr(denytable2[i].mode1),
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#define CHECK_VALUE_UINT64(v, correct) do { \
|
#define CHECK_VALUE_UINT64(v, correct) do { \
|
||||||
if ((v) != (correct)) { \
|
if ((v) != (correct)) { \
|
||||||
printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
|
printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
|
||||||
__location__, #v, v, correct); \
|
__location__, #v, (long long)v, (long long)correct); \
|
||||||
ret = False; \
|
ret = False; \
|
||||||
goto done; \
|
goto done; \
|
||||||
}} while (0)
|
}} while (0)
|
||||||
@ -230,7 +230,7 @@ static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
|
|||||||
|
|
||||||
printf("%s\n", nbt_name_string(mem_ctx, &name->name));
|
printf("%s\n", nbt_name_string(mem_ctx, &name->name));
|
||||||
printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
|
printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
|
||||||
name->type, name->state, name->node, name->is_static, name->version_id);
|
name->type, name->state, name->node, name->is_static, (long long)name->version_id);
|
||||||
printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
|
printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
|
||||||
name->raw_flags, name->owner);
|
name->raw_flags, name->owner);
|
||||||
for (i=0;i<name->num_addresses;i++) {
|
for (i=0;i<name->num_addresses;i++) {
|
||||||
@ -296,8 +296,8 @@ static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
|
|||||||
struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
|
struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
|
||||||
printf("%s max_version=%6llu min_version=%6llu type=%d\n",
|
printf("%s max_version=%6llu min_version=%6llu type=%d\n",
|
||||||
partner->address,
|
partner->address,
|
||||||
partner->max_version,
|
(long long)partner->max_version,
|
||||||
partner->min_version,
|
(long long)partner->min_version,
|
||||||
partner->type);
|
partner->type);
|
||||||
|
|
||||||
pull_names.in.assoc_ctx = associate.out.assoc_ctx;
|
pull_names.in.assoc_ctx = associate.out.assoc_ctx;
|
||||||
|
@ -476,14 +476,14 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
|
|||||||
|
|
||||||
if (r.in.level == 5) {
|
if (r.in.level == 5) {
|
||||||
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
||||||
r.in.req.req5.highwatermark.tmp_highest_usn,
|
(long long)r.in.req.req5.highwatermark.tmp_highest_usn,
|
||||||
r.in.req.req5.highwatermark.highest_usn));
|
(long long)r.in.req.req5.highwatermark.highest_usn));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.in.level == 8) {
|
if (r.in.level == 8) {
|
||||||
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
||||||
r.in.req.req8.highwatermark.tmp_highest_usn,
|
(long long)r.in.req.req8.highwatermark.tmp_highest_usn,
|
||||||
r.in.req.req8.highwatermark.highest_usn));
|
(long long)r.in.req.req8.highwatermark.highest_usn));
|
||||||
}
|
}
|
||||||
|
|
||||||
status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.pipe, ctx, &r);
|
status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.pipe, ctx, &r);
|
||||||
@ -509,8 +509,8 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
|
|||||||
|
|
||||||
if (out_level == 1) {
|
if (out_level == 1) {
|
||||||
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
|
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
|
||||||
ctr1->new_highwatermark.tmp_highest_usn,
|
(long long)ctr1->new_highwatermark.tmp_highest_usn,
|
||||||
ctr1->new_highwatermark.highest_usn));
|
(long long)ctr1->new_highwatermark.highest_usn));
|
||||||
|
|
||||||
test_analyse_objects(ctx, ctr1->first_object);
|
test_analyse_objects(ctx, ctr1->first_object);
|
||||||
|
|
||||||
@ -532,8 +532,8 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
|
|||||||
|
|
||||||
if (out_level == 6) {
|
if (out_level == 6) {
|
||||||
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
|
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
|
||||||
ctr6->new_highwatermark.tmp_highest_usn,
|
(long long)ctr6->new_highwatermark.tmp_highest_usn,
|
||||||
ctr6->new_highwatermark.highest_usn));
|
(long long)ctr6->new_highwatermark.highest_usn));
|
||||||
|
|
||||||
test_analyse_objects(ctx, ctr6->first_object);
|
test_analyse_objects(ctx, ctr6->first_object);
|
||||||
|
|
||||||
|
@ -211,7 +211,9 @@ static struct sec_desc_buf *samsync_query_lsa_sec_desc(TALLOC_CTX *mem_ctx,
|
|||||||
#define TEST_UINT64_EQUAL(i1, i2) do {\
|
#define TEST_UINT64_EQUAL(i1, i2) do {\
|
||||||
if (i1 != i2) {\
|
if (i1 != i2) {\
|
||||||
printf("%s: uint64 mismatch: " #i1 ": 0x%016llx (%lld) != " #i2 ": 0x%016llx (%lld)\n", \
|
printf("%s: uint64 mismatch: " #i1 ": 0x%016llx (%lld) != " #i2 ": 0x%016llx (%lld)\n", \
|
||||||
__location__, i1, i1, i2, i2);\
|
__location__, \
|
||||||
|
(long long)i1, (long long)i1, \
|
||||||
|
(long long)i2, (long long)i2);\
|
||||||
ret = False;\
|
ret = False;\
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -318,7 +320,7 @@ static BOOL samsync_handle_domain(TALLOC_CTX *mem_ctx, struct samsync_state *sam
|
|||||||
|
|
||||||
printf("\tsequence_nums[%d/%s]=%llu\n",
|
printf("\tsequence_nums[%d/%s]=%llu\n",
|
||||||
database_id, domain->domain_name.string,
|
database_id, domain->domain_name.string,
|
||||||
samsync_state->seq_num[database_id]);
|
(long long)samsync_state->seq_num[database_id]);
|
||||||
|
|
||||||
for (i=0;i<ARRAY_SIZE(levels);i++) {
|
for (i=0;i<ARRAY_SIZE(levels);i++) {
|
||||||
q[levels[i]].in.domain_handle = samsync_state->domain_handle[database_id];
|
q[levels[i]].in.domain_handle = samsync_state->domain_handle[database_id];
|
||||||
@ -384,7 +386,7 @@ static BOOL samsync_handle_policy(TALLOC_CTX *mem_ctx, struct samsync_state *sam
|
|||||||
|
|
||||||
printf("\tsequence_nums[%d/PRIVS]=%llu\n",
|
printf("\tsequence_nums[%d/PRIVS]=%llu\n",
|
||||||
database_id,
|
database_id,
|
||||||
samsync_state->seq_num[database_id]);
|
(long long)samsync_state->seq_num[database_id]);
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ static NTSTATUS torture_smb2_close(struct smb2_tree *tree, struct smb2_handle ha
|
|||||||
printf("access_time = %s\n", nt_time_string(tmp_ctx, io.out.access_time));
|
printf("access_time = %s\n", nt_time_string(tmp_ctx, io.out.access_time));
|
||||||
printf("write_time = %s\n", nt_time_string(tmp_ctx, io.out.write_time));
|
printf("write_time = %s\n", nt_time_string(tmp_ctx, io.out.write_time));
|
||||||
printf("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
|
printf("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
|
||||||
printf("alloc_size = %lld\n", io.out.alloc_size);
|
printf("alloc_size = %lld\n", (long long)io.out.alloc_size);
|
||||||
printf("size = %lld\n", io.out.size);
|
printf("size = %lld\n", (long long)io.out.size);
|
||||||
printf("file_attr = 0x%x\n", io.out.file_attr);
|
printf("file_attr = 0x%x\n", io.out.file_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,12 +170,12 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree,
|
|||||||
printf("access_time = %s\n", nt_time_string(tmp_ctx, io.out.access_time));
|
printf("access_time = %s\n", nt_time_string(tmp_ctx, io.out.access_time));
|
||||||
printf("write_time = %s\n", nt_time_string(tmp_ctx, io.out.write_time));
|
printf("write_time = %s\n", nt_time_string(tmp_ctx, io.out.write_time));
|
||||||
printf("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
|
printf("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
|
||||||
printf("alloc_size = %lld\n", io.out.alloc_size);
|
printf("alloc_size = %lld\n", (long long)io.out.alloc_size);
|
||||||
printf("size = %lld\n", io.out.size);
|
printf("size = %lld\n", (long long)io.out.size);
|
||||||
printf("file_attr = 0x%x\n", io.out.file_attr);
|
printf("file_attr = 0x%x\n", io.out.file_attr);
|
||||||
printf("handle = %016llx%016llx\n",
|
printf("handle = %016llx%016llx\n",
|
||||||
io.out.handle.data[0],
|
(long long)io.out.handle.data[0],
|
||||||
io.out.handle.data[1]);
|
(long long)io.out.handle.data[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
talloc_free(tmp_ctx);
|
talloc_free(tmp_ctx);
|
||||||
|
@ -78,8 +78,8 @@ BOOL torture_smb2_getinfo_scan(void)
|
|||||||
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
||||||
printf("file level 0x%04x is %d bytes - %s\n",
|
printf("file level 0x%04x is %ld bytes - %s\n",
|
||||||
io.in.level, io.out.blob.length, nt_errstr(status));
|
io.in.level, (long)io.out.blob.length, nt_errstr(status));
|
||||||
dump_data(1, io.out.blob.data, io.out.blob.length);
|
dump_data(1, io.out.blob.data, io.out.blob.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ BOOL torture_smb2_getinfo_scan(void)
|
|||||||
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
||||||
printf("dir level 0x%04x is %d bytes - %s\n",
|
printf("dir level 0x%04x is %ld bytes - %s\n",
|
||||||
io.in.level, io.out.blob.length, nt_errstr(status));
|
io.in.level, (long)io.out.blob.length, nt_errstr(status));
|
||||||
dump_data(1, io.out.blob.data, io.out.blob.length);
|
dump_data(1, io.out.blob.data, io.out.blob.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,8 +183,8 @@ BOOL torture_smb2_find_scan(void)
|
|||||||
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
|
||||||
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
|
||||||
printf("find level 0x%04x is %d bytes - %s\n",
|
printf("find level 0x%04x is %ld bytes - %s\n",
|
||||||
io.in.level, io.out.blob.length, nt_errstr(status));
|
io.in.level, (long)io.out.blob.length, nt_errstr(status));
|
||||||
dump_data(1, io.out.blob.data, io.out.blob.length);
|
dump_data(1, io.out.blob.data, io.out.blob.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,16 +224,16 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
|
|||||||
d_printf("\tchange_time: %s\n", nt_time_string(tmp_ctx, io.all_info2.out.change_time));
|
d_printf("\tchange_time: %s\n", nt_time_string(tmp_ctx, io.all_info2.out.change_time));
|
||||||
d_printf("\tattrib: 0x%x\n", io.all_info2.out.attrib);
|
d_printf("\tattrib: 0x%x\n", io.all_info2.out.attrib);
|
||||||
d_printf("\tunknown1: 0x%x\n", io.all_info2.out.unknown1);
|
d_printf("\tunknown1: 0x%x\n", io.all_info2.out.unknown1);
|
||||||
d_printf("\talloc_size: %llu\n", (uint64_t)io.all_info2.out.alloc_size);
|
d_printf("\talloc_size: %llu\n", (long long)io.all_info2.out.alloc_size);
|
||||||
d_printf("\tsize: %llu\n", (uint64_t)io.all_info2.out.size);
|
d_printf("\tsize: %llu\n", (long long)io.all_info2.out.size);
|
||||||
d_printf("\tnlink: %u\n", io.all_info2.out.nlink);
|
d_printf("\tnlink: %u\n", io.all_info2.out.nlink);
|
||||||
d_printf("\tdelete_pending: %u\n", io.all_info2.out.delete_pending);
|
d_printf("\tdelete_pending: %u\n", io.all_info2.out.delete_pending);
|
||||||
d_printf("\tdirectory: %u\n", io.all_info2.out.directory);
|
d_printf("\tdirectory: %u\n", io.all_info2.out.directory);
|
||||||
d_printf("\tfile_id: %llu\n", io.all_info2.out.file_id);
|
d_printf("\tfile_id: %llu\n", (long long)io.all_info2.out.file_id);
|
||||||
d_printf("\tea_size: %u\n", io.all_info2.out.ea_size);
|
d_printf("\tea_size: %u\n", io.all_info2.out.ea_size);
|
||||||
d_printf("\taccess_mask: 0x%08x\n", io.all_info2.out.access_mask);
|
d_printf("\taccess_mask: 0x%08x\n", io.all_info2.out.access_mask);
|
||||||
d_printf("\tposition: 0x%llx\n", io.all_info2.out.position);
|
d_printf("\tposition: 0x%llx\n", (long long)io.all_info2.out.position);
|
||||||
d_printf("\tmode: 0x%llx\n", io.all_info2.out.mode);
|
d_printf("\tmode: 0x%llx\n", (long long)io.all_info2.out.mode);
|
||||||
|
|
||||||
/* short name, if any */
|
/* short name, if any */
|
||||||
io.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
|
io.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
|
||||||
|
@ -318,8 +318,8 @@ void dump_all_info(TALLOC_CTX *mem_ctx, union smb_fileinfo *finfo)
|
|||||||
d_printf("\twrite_time: %s\n", nt_time_string(mem_ctx, finfo->all_info.out.write_time));
|
d_printf("\twrite_time: %s\n", nt_time_string(mem_ctx, finfo->all_info.out.write_time));
|
||||||
d_printf("\tchange_time: %s\n", nt_time_string(mem_ctx, finfo->all_info.out.change_time));
|
d_printf("\tchange_time: %s\n", nt_time_string(mem_ctx, finfo->all_info.out.change_time));
|
||||||
d_printf("\tattrib: 0x%x\n", finfo->all_info.out.attrib);
|
d_printf("\tattrib: 0x%x\n", finfo->all_info.out.attrib);
|
||||||
d_printf("\talloc_size: %llu\n", (uint64_t)finfo->all_info.out.alloc_size);
|
d_printf("\talloc_size: %llu\n", (long long)finfo->all_info.out.alloc_size);
|
||||||
d_printf("\tsize: %llu\n", (uint64_t)finfo->all_info.out.size);
|
d_printf("\tsize: %llu\n", (long long)finfo->all_info.out.size);
|
||||||
d_printf("\tnlink: %u\n", finfo->all_info.out.nlink);
|
d_printf("\tnlink: %u\n", finfo->all_info.out.nlink);
|
||||||
d_printf("\tdelete_pending: %u\n", finfo->all_info.out.delete_pending);
|
d_printf("\tdelete_pending: %u\n", finfo->all_info.out.delete_pending);
|
||||||
d_printf("\tdirectory: %u\n", finfo->all_info.out.directory);
|
d_printf("\tdirectory: %u\n", finfo->all_info.out.directory);
|
||||||
|
@ -996,7 +996,8 @@ NTSTATUS wreplsrv_apply_records(struct wreplsrv_partner *partner, struct wreplsr
|
|||||||
|
|
||||||
DEBUG(4,("apply records count[%u]:owner[%s]:min[%llu]:max[%llu]:partner[%s]\n",
|
DEBUG(4,("apply records count[%u]:owner[%s]:min[%llu]:max[%llu]:partner[%s]\n",
|
||||||
names_io->out.num_names, names_io->in.owner.address,
|
names_io->out.num_names, names_io->in.owner.address,
|
||||||
names_io->in.owner.min_version, names_io->in.owner.max_version,
|
(long long)names_io->in.owner.min_version,
|
||||||
|
(long long)names_io->in.owner.max_version,
|
||||||
partner->address));
|
partner->address));
|
||||||
|
|
||||||
for (i=0; i < names_io->out.num_names; i++) {
|
for (i=0; i < names_io->out.num_names; i++) {
|
||||||
|
@ -246,14 +246,17 @@ static NTSTATUS wreplsrv_in_send_request(struct wreplsrv_in_call *call)
|
|||||||
"(versionID>=%llu)(versionID<=%llu))",
|
"(versionID>=%llu)(versionID<=%llu))",
|
||||||
owner->owner.address,
|
owner->owner.address,
|
||||||
WREPL_STATE_ACTIVE, WREPL_STATE_TOMBSTONE,
|
WREPL_STATE_ACTIVE, WREPL_STATE_TOMBSTONE,
|
||||||
owner_in->min_version, owner_in->max_version);
|
(long long)owner_in->min_version,
|
||||||
|
(long long)owner_in->max_version);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(filter);
|
NT_STATUS_HAVE_NO_MEMORY(filter);
|
||||||
ret = ldb_search(service->wins_db, NULL, LDB_SCOPE_SUBTREE, filter, NULL, &res);
|
ret = ldb_search(service->wins_db, NULL, LDB_SCOPE_SUBTREE, filter, NULL, &res);
|
||||||
if (ret != LDB_SUCCESS) return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
if (ret != LDB_SUCCESS) return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
talloc_steal(call, res);
|
talloc_steal(call, res);
|
||||||
if (res->count == 0) {
|
if (res->count == 0) {
|
||||||
DEBUG(2,("WINSREPL:reply [%u] records owner[%s] min[%llu] max[%llu] to partner[%s]\n",
|
DEBUG(2,("WINSREPL:reply [%u] records owner[%s] min[%llu] max[%llu] to partner[%s]\n",
|
||||||
res->count, owner_in->address, owner_in->min_version, owner_in->max_version,
|
res->count, owner_in->address,
|
||||||
|
(long long)owner_in->min_version,
|
||||||
|
(long long)owner_in->max_version,
|
||||||
call->wreplconn->partner->address));
|
call->wreplconn->partner->address));
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
@ -275,7 +278,9 @@ static NTSTATUS wreplsrv_in_send_request(struct wreplsrv_in_call *call)
|
|||||||
qsort(names, res->count, sizeof(struct wrepl_wins_name), (comparison_fn_t)wreplsrv_in_sort_wins_name);
|
qsort(names, res->count, sizeof(struct wrepl_wins_name), (comparison_fn_t)wreplsrv_in_sort_wins_name);
|
||||||
|
|
||||||
DEBUG(2,("WINSREPL:reply [%u] records owner[%s] min[%llu] max[%llu] to partner[%s]\n",
|
DEBUG(2,("WINSREPL:reply [%u] records owner[%s] min[%llu] max[%llu] to partner[%s]\n",
|
||||||
res->count, owner_in->address, owner_in->min_version, owner_in->max_version,
|
res->count, owner_in->address,
|
||||||
|
(long long)owner_in->min_version,
|
||||||
|
(long long)owner_in->max_version,
|
||||||
call->wreplconn->partner->address));
|
call->wreplconn->partner->address));
|
||||||
|
|
||||||
reply_out->num_names = res->count;
|
reply_out->num_names = res->count;
|
||||||
|
@ -155,7 +155,7 @@ static void wreplsrv_recv(struct stream_connection *conn, uint16_t flags)
|
|||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DEBUG(2,("Failed to parse incoming WINS-Replication packet - %s\n",
|
DEBUG(2,("Failed to parse incoming WINS-Replication packet - %s\n",
|
||||||
nt_errstr(status)));
|
nt_errstr(status)));
|
||||||
DEBUG(10,("packet length %u\n", wreplconn->partial.length));
|
DEBUG(10,("packet length %lu\n", (long)wreplconn->partial.length));
|
||||||
NDR_PRINT_DEBUG(wrepl_packet, &call->req_packet);
|
NDR_PRINT_DEBUG(wrepl_packet, &call->req_packet);
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ static void wreplsrv_recv(struct stream_connection *conn, uint16_t flags)
|
|||||||
wreplconn->partial_read = 0;
|
wreplconn->partial_read = 0;
|
||||||
|
|
||||||
if (DEBUGLVL(10)) {
|
if (DEBUGLVL(10)) {
|
||||||
DEBUG(10,("Received WINS-Replication packet of length %u\n", wreplconn->partial.length));
|
DEBUG(10,("Received WINS-Replication packet of length %lu\n", (long)wreplconn->partial.length));
|
||||||
NDR_PRINT_DEBUG(wrepl_packet, &call->req_packet);
|
NDR_PRINT_DEBUG(wrepl_packet, &call->req_packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user