/* Caller must pad to right boundary */
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",
- output_token.length, length, sig_length, length + sig_length));
+ DEBUG(1, ("gensec_gssapi_seal_packet: GSS Wrap length [%ld] does not match caller length [%ld] plus sig size [%ld] = [%ld]\n",
+ (long)output_token.length, (long)length, (long)sig_length, (long)(length + sig_length)));
return NT_STATUS_INTERNAL_ERROR;
}
/* Caller must pad to right boundary */
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",
- output_token.length, length, sig_length, length + sig_length));
+ DEBUG(1, ("gensec_gssapi_sign_packet: GSS Wrap length [%ld] does not match caller length [%ld] plus sig size [%ld] = [%ld]\n",
+ (long)output_token.length, (long)length, (long)sig_length, (long)(length + sig_length)));
return NT_STATUS_INTERNAL_ERROR;
}
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 *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);
}
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 *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 status;
}
- DEBUG(2, ("Successfully connected to OXID %llx\n", oxid));
+ DEBUG(2, ("Successfully connected to OXID %llx\n", (long long)oxid));
*pp = p;
talloc_free(tmp_ctx);
if (pc->packet_size > pc->num_read) {
/* the caller made an error */
- DEBUG(0,("Invalid packet_size %u greater than num_read %u\n",
- pc->packet_size, pc->num_read));
+ DEBUG(0,("Invalid packet_size %lu greater than num_read %lu\n",
+ (long)pc->packet_size, (long)pc->num_read));
packet_error(pc, NT_STATUS_INVALID_PARAMETER);
return;
}
if (!req) {
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;
}
}
}
- 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);
/* if this request has an async handler then call that to
_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);
/* check if the transport is dead */
if (ret != 0) goto failed;
ret = ldb_msg_add_empty(msg, "maxVersion", LDB_FLAG_MOD_REPLACE);
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;
ret = ldb_modify(wins_db, msg);
ret |= ldb_msg_add_fmt(msg, "isStatic", "%u", rec->is_static);
ret |= ldb_msg_add_string(msg, "expireTime",
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_empty(msg, "address", 0);
for (i=0;rec->addresses[i];i++) {
}
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");
return NT_STATUS_OK;
}
tdif = usec_time_diff(&tv, &tv_start);
tdif /= 1000;
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
- tdif,
+ (long long)tdif,
fname,
denystr(denytable1[i].deny1),
openstr(denytable1[i].mode1),
tdif = usec_time_diff(&tv, &tv_start);
tdif /= 1000;
printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n",
- tdif,
+ (long long)tdif,
fname,
denystr(denytable2[i].deny1),
openstr(denytable2[i].mode1),
#define CHECK_VALUE_UINT64(v, correct) do { \
if ((v) != (correct)) { \
printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
- __location__, #v, v, correct); \
+ __location__, #v, (long long)v, (long long)correct); \
ret = False; \
goto done; \
}} while (0)
printf("%s\n", nbt_name_string(mem_ctx, &name->name));
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",
name->raw_flags, name->owner);
for (i=0;i<name->num_addresses;i++) {
struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
printf("%s max_version=%6llu min_version=%6llu type=%d\n",
partner->address,
- partner->max_version,
- partner->min_version,
+ (long long)partner->max_version,
+ (long long)partner->min_version,
partner->type);
pull_names.in.assoc_ctx = associate.out.assoc_ctx;
if (r.in.level == 5) {
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
- r.in.req.req5.highwatermark.tmp_highest_usn,
- r.in.req.req5.highwatermark.highest_usn));
+ (long long)r.in.req.req5.highwatermark.tmp_highest_usn,
+ (long long)r.in.req.req5.highwatermark.highest_usn));
}
if (r.in.level == 8) {
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
- r.in.req.req8.highwatermark.tmp_highest_usn,
- r.in.req.req8.highwatermark.highest_usn));
+ (long long)r.in.req.req8.highwatermark.tmp_highest_usn,
+ (long long)r.in.req.req8.highwatermark.highest_usn));
}
status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.pipe, ctx, &r);
if (out_level == 1) {
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
- ctr1->new_highwatermark.tmp_highest_usn,
- ctr1->new_highwatermark.highest_usn));
+ (long long)ctr1->new_highwatermark.tmp_highest_usn,
+ (long long)ctr1->new_highwatermark.highest_usn));
test_analyse_objects(ctx, ctr1->first_object);
if (out_level == 6) {
DEBUG(0,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
- ctr6->new_highwatermark.tmp_highest_usn,
- ctr6->new_highwatermark.highest_usn));
+ (long long)ctr6->new_highwatermark.tmp_highest_usn,
+ (long long)ctr6->new_highwatermark.highest_usn));
test_analyse_objects(ctx, ctr6->first_object);
#define TEST_UINT64_EQUAL(i1, i2) do {\
if (i1 != i2) {\
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;\
} \
} while (0)
printf("\tsequence_nums[%d/%s]=%llu\n",
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++) {
q[levels[i]].in.domain_handle = samsync_state->domain_handle[database_id];
printf("\tsequence_nums[%d/PRIVS]=%llu\n",
database_id,
- samsync_state->seq_num[database_id]);
+ (long long)samsync_state->seq_num[database_id]);
return True;
}
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("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
- printf("alloc_size = %lld\n", io.out.alloc_size);
- printf("size = %lld\n", io.out.size);
+ printf("alloc_size = %lld\n", (long long)io.out.alloc_size);
+ printf("size = %lld\n", (long long)io.out.size);
printf("file_attr = 0x%x\n", io.out.file_attr);
}
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("change_time = %s\n", nt_time_string(tmp_ctx, io.out.change_time));
- printf("alloc_size = %lld\n", io.out.alloc_size);
- printf("size = %lld\n", io.out.size);
+ printf("alloc_size = %lld\n", (long long)io.out.alloc_size);
+ printf("size = %lld\n", (long long)io.out.size);
printf("file_attr = 0x%x\n", io.out.file_attr);
printf("handle = %016llx%016llx\n",
- io.out.handle.data[0],
- io.out.handle.data[1]);
+ (long long)io.out.handle.data[0],
+ (long long)io.out.handle.data[1]);
}
talloc_free(tmp_ctx);
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
- printf("file level 0x%04x is %d bytes - %s\n",
- io.in.level, io.out.blob.length, nt_errstr(status));
+ printf("file level 0x%04x is %ld bytes - %s\n",
+ io.in.level, (long)io.out.blob.length, nt_errstr(status));
dump_data(1, io.out.blob.data, io.out.blob.length);
}
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
- printf("dir level 0x%04x is %d bytes - %s\n",
- io.in.level, io.out.blob.length, nt_errstr(status));
+ printf("dir level 0x%04x is %ld bytes - %s\n",
+ io.in.level, (long)io.out.blob.length, nt_errstr(status));
dump_data(1, io.out.blob.data, io.out.blob.length);
}
}
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
- printf("find level 0x%04x is %d bytes - %s\n",
- io.in.level, io.out.blob.length, nt_errstr(status));
+ printf("find level 0x%04x is %ld bytes - %s\n",
+ io.in.level, (long)io.out.blob.length, nt_errstr(status));
dump_data(1, io.out.blob.data, io.out.blob.length);
}
}
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("\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("\tsize: %llu\n", (uint64_t)io.all_info2.out.size);
+ d_printf("\talloc_size: %llu\n", (long long)io.all_info2.out.alloc_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("\tdelete_pending: %u\n", io.all_info2.out.delete_pending);
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("\taccess_mask: 0x%08x\n", io.all_info2.out.access_mask);
- d_printf("\tposition: 0x%llx\n", io.all_info2.out.position);
- d_printf("\tmode: 0x%llx\n", io.all_info2.out.mode);
+ d_printf("\tposition: 0x%llx\n", (long long)io.all_info2.out.position);
+ d_printf("\tmode: 0x%llx\n", (long long)io.all_info2.out.mode);
/* short name, if any */
io.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
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("\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("\tsize: %llu\n", (uint64_t)finfo->all_info.out.size);
+ d_printf("\talloc_size: %llu\n", (long long)finfo->all_info.out.alloc_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("\tdelete_pending: %u\n", finfo->all_info.out.delete_pending);
d_printf("\tdirectory: %u\n", finfo->all_info.out.directory);
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->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));
for (i=0; i < names_io->out.num_names; i++) {
"(versionID>=%llu)(versionID<=%llu))",
owner->owner.address,
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);
ret = ldb_search(service->wins_db, NULL, LDB_SCOPE_SUBTREE, filter, NULL, &res);
if (ret != LDB_SUCCESS) return NT_STATUS_INTERNAL_DB_CORRUPTION;
talloc_steal(call, res);
if (res->count == 0) {
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));
return NT_STATUS_OK;
}
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",
- 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));
reply_out->num_names = res->count;
if (!NT_STATUS_IS_OK(status)) {
DEBUG(2,("Failed to parse incoming WINS-Replication packet - %s\n",
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);
goto failed;
}
wreplconn->partial_read = 0;
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);
}