summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-07-24 23:46:27 +0000
committerTim Potter <tpot@samba.org>2003-07-24 23:46:27 +0000
commit77373f1f8e3b2f61e9bbcd9fadfb83257d390cf2 (patch)
tree868eab178760cb8f28489cde34e1328b3f9dfbca /source3
parent60097e0d8d3db07eecf1773d74f8376ea4059b05 (diff)
downloadsamba-77373f1f8e3b2f61e9bbcd9fadfb83257d390cf2.tar.gz
samba-77373f1f8e3b2f61e9bbcd9fadfb83257d390cf2.tar.bz2
samba-77373f1f8e3b2f61e9bbcd9fadfb83257d390cf2.zip
More printf fixes - size_t is long on some architectures.
(This used to be commit ba4d334b822248d8ab929c9568533431603d967e)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_sam.c8
-rw-r--r--source3/auth/auth_util.c6
-rw-r--r--source3/lib/charcnv.c2
-rw-r--r--source3/lib/util_file.c2
-rw-r--r--source3/lib/util_str.c2
-rw-r--r--source3/libsmb/cliconnect.c2
-rw-r--r--source3/libsmb/ntlmssp.c2
-rw-r--r--source3/passdb/passdb.c2
-rw-r--r--source3/printing/notify.c4
-rw-r--r--source3/rpc_parse/parse_prs.c4
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c10
-rw-r--r--source3/smbd/close.c2
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/utmp.c2
15 files changed, 26 insertions, 26 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 012696f46a..4c120de9ae 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -44,12 +44,12 @@ static BOOL smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
}
if (sec_blob->length != 8) {
- DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect challenge size (%d)\n", sec_blob->length));
+ DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect challenge size (%l)\n", sec_blob->length));
return False;
}
if (nt_response->length != 24) {
- DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect password length (%d)\n", nt_response->length));
+ DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect password length (%l)\n", nt_response->length));
return False;
}
@@ -103,7 +103,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
/* We MUST have more than 16 bytes, or the stuff below will go
crazy. No known implementation sends less than the 24 bytes
for LMv2, let alone NTLMv2. */
- DEBUG(0, ("smb_pwd_check_ntlmv2: incorrect password length (%d)\n",
+ DEBUG(0, ("smb_pwd_check_ntlmv2: incorrect password length (%l)\n",
ntv2_response->length));
return False;
}
@@ -233,7 +233,7 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
if (auth_flags & AUTH_FLAG_LM_RESP) {
if (user_info->lm_resp.length != 24) {
- DEBUG(2,("sam_password_ok: invalid LanMan password length (%d) for user %s\n",
+ DEBUG(2,("sam_password_ok: invalid LanMan password length (%l) for user %s\n",
user_info->nt_resp.length, pdb_get_username(sampass)));
}
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 8e1b420b47..d4d08e2273 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -133,7 +133,7 @@ static NTSTATUS make_user_info(auth_usersupplied_info **user_info,
*user_info = malloc(sizeof(**user_info));
if (!user_info) {
- DEBUG(0,("malloc failed for user_info (size %d)\n", sizeof(*user_info)));
+ DEBUG(0,("malloc failed for user_info (size %l)\n", sizeof(*user_info)));
return NT_STATUS_NO_MEMORY;
}
@@ -489,9 +489,9 @@ void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token)
DEBUGC(dbg_class, dbg_lev, ("NT user token of user %s\n",
sid_to_string(sid_str, &token->user_sids[0]) ));
- DEBUGADDC(dbg_class, dbg_lev, ("contains %i SIDs\n", token->num_sids));
+ DEBUGADDC(dbg_class, dbg_lev, ("contains %l SIDs\n", token->num_sids));
for (i = 0; i < token->num_sids; i++)
- DEBUGADDC(dbg_class, dbg_lev, ("SID[%3i]: %s\n", i,
+ DEBUGADDC(dbg_class, dbg_lev, ("SID[%3l]: %s\n", i,
sid_to_string(sid_str, &token->user_sids[i])));
}
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 4e9c2c1592..7910099cd8 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -190,7 +190,7 @@ size_t convert_string(charset_t from, charset_t to,
break;
case E2BIG:
reason="No more room";
- DEBUG(0, ("convert_string: Required %d, available %d\n",
+ DEBUG(0, ("convert_string: Required %l, available %l\n",
srclen, destlen));
/* we are not sure we need srclen bytes,
may be more, may be less.
diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c
index 02acbd4d7e..5e9732ce52 100644
--- a/source3/lib/util_file.c
+++ b/source3/lib/util_file.c
@@ -455,7 +455,7 @@ void *map_file(char *fname, size_t size)
p = file_load(fname, &s2);
if (!p) return NULL;
if (s2 != size) {
- DEBUG(1,("incorrect size for %s - got %d expected %d\n",
+ DEBUG(1,("incorrect size for %s - got %l expected %l\n",
fname, s2, size));
if (p) free(p);
return NULL;
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 7bf43de5f3..dca1d19593 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -1588,7 +1588,7 @@ int ipstr_list_parse(const char* ipstr_list, struct ip_service **ip_list)
count = count_chars(ipstr_list, IPSTR_LIST_CHAR) + 1;
if ( (*ip_list = (struct ip_service*)malloc(count * sizeof(struct ip_service))) == NULL ) {
- DEBUG(0,("ipstr_list_parse: malloc failed for %d entries\n", count));
+ DEBUG(0,("ipstr_list_parse: malloc failed for %l entries\n", count));
return 0;
}
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 2188db2a62..71e80b5dbe 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -630,7 +630,7 @@ static BOOL cli_session_setup_spnego(struct cli_state *cli, const char *user,
BOOL got_kerberos_mechanism = False;
DATA_BLOB blob;
- DEBUG(2,("Doing spnego session setup (blob length=%d)\n", cli->secblob.length));
+ DEBUG(2,("Doing spnego session setup (blob length=%l)\n", cli->secblob.length));
/* the server might not even do spnego */
if (cli->secblob.length <= 16) {
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 66dc6e08eb..175e952f86 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -279,7 +279,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
data_blob_free(&sess_key);
- DEBUG(3,("Got user=[%s] domain=[%s] workstation=[%s] len1=%d len2=%d\n",
+ DEBUG(3,("Got user=[%s] domain=[%s] workstation=[%s] len1=%l len2=%l\n",
ntlmssp_state->user, ntlmssp_state->domain, ntlmssp_state->workstation, ntlmssp_state->lm_resp.length, ntlmssp_state->nt_resp.length));
#if 0
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 966875785c..1abd431c7b 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -1667,7 +1667,7 @@ uint32 init_buffer_from_sam (uint8 **buf, const SAM_ACCOUNT *sampass, BOOL size_
/* check to make sure we got it correct */
if (buflen != len) {
- DEBUG(0, ("init_buffer_from_sam: somthing odd is going on here: bufflen (%d) != len (%d) in tdb_pack operations!\n",
+ DEBUG(0, ("init_buffer_from_sam: somthing odd is going on here: bufflen (%l) != len (%l) in tdb_pack operations!\n",
buflen, len));
/* error */
SAFE_FREE (*buf);
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index 479d883134..68e54daab6 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -164,7 +164,7 @@ static void print_notify_send_messages_to_printer(const char *printer, unsigned
}
}
- DEBUG(5, ("print_notify_send_messages_to_printer: sending %d print notify message%s to printer %s\n",
+ DEBUG(5, ("print_notify_send_messages_to_printer: sending %l print notify message%s to printer %s\n",
msg_count, msg_count != 1 ? "s" : "", printer));
/*
@@ -272,7 +272,7 @@ in notify_queue\n", msg->type, msg->field, msg->printer));
/* allocate a new msg structure and copy the fields */
if ( !(pnqueue->msg = (SPOOLSS_NOTIFY_MSG*)talloc(send_ctx, sizeof(SPOOLSS_NOTIFY_MSG))) ) {
- DEBUG(0,("send_spoolss_notify2_msg: talloc() of size [%d] failed!\n",
+ DEBUG(0,("send_spoolss_notify2_msg: talloc() of size [%l] failed!\n",
sizeof(SPOOLSS_NOTIFY_MSG)));
return;
}
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index efd4914c66..25c44c9da9 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1473,7 +1473,7 @@ void netsec_encode(struct netsec_auth_struct *a, int auth_flags,
{
uchar digest_final[16];
- DEBUG(10,("SCHANNEL: netsec_encode seq_num=%d data_len=%d\n", a->seq_num, data_len));
+ DEBUG(10,("SCHANNEL: netsec_encode seq_num=%d data_len=%l\n", a->seq_num, data_len));
dump_data_pw("a->sess_key:\n", a->sess_key, sizeof(a->sess_key));
RSIVAL(verf->seq_num, 0, a->seq_num);
@@ -1544,7 +1544,7 @@ BOOL netsec_decode(struct netsec_auth_struct *a, int auth_flags,
break;
}
- DEBUG(10,("SCHANNEL: netsec_decode seq_num=%d data_len=%d\n", a->seq_num, data_len));
+ DEBUG(10,("SCHANNEL: netsec_decode seq_num=%d data_len=%l\n", a->seq_num, data_len));
dump_data_pw("a->sess_key:\n", a->sess_key, sizeof(a->sess_key));
dump_data_pw("seq_num:\n", seq_num, sizeof(seq_num));
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 99970197c7..d7238463f6 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2259,7 +2259,7 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_
* now have some sainity-checking to match.
*/
- DEBUG(10,("checking account %s at pos %d for $ termination\n",account, strlen(account)-1));
+ DEBUG(10,("checking account %s at pos %l for $ termination\n",account, strlen(account)-1));
/*
* we used to have code here that made sure the acb_info flags
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index c7fab32957..a33179d054 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -478,7 +478,7 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename)
fstring sname;
BOOL found=False;
- DEBUG(4,("Setting printer name=%s (len=%d)\n", handlename, strlen(handlename)));
+ DEBUG(4,("Setting printer name=%s (len=%l)\n", handlename, strlen(handlename)));
if (Printer->printer_type==PRINTER_HANDLE_IS_PRINTSERVER) {
ZERO_STRUCT(Printer->dev.printerservername);
@@ -497,7 +497,7 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename)
aprinter=handlename;
}
- DEBUGADD(5,("searching for [%s] (len=%d)\n", aprinter, strlen(aprinter)));
+ DEBUGADD(5,("searching for [%s] (len=%l)\n", aprinter, strlen(aprinter)));
/*
* The original code allowed smbd to store a printer name that
@@ -1176,7 +1176,7 @@ static void receive_notify2_message_list(int msg_type, pid_t src, void *msg, siz
msg_count = IVAL(buf, 0);
msg_ptr = buf + 4;
- DEBUG(5, ("receive_notify2_message_list: got %d messages in list\n", msg_count));
+ DEBUG(5, ("receive_notify2_message_list: got %l messages in list\n", msg_count));
if (msg_count == 0) {
DEBUG(0,("receive_notify2_message_list: bad message format (msg_count == 0) !\n"));
@@ -5135,7 +5135,7 @@ static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, const c
else
pstrcpy( line, v );
- DEBUGADD(6,("%d:%s:%d\n", i, line, strlen(line)));
+ DEBUGADD(6,("%d:%s:%l\n", i, line, strlen(line)));
/* add one extra unit16 for the second terminating NULL */
@@ -9092,7 +9092,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
{
if ( (enum_values=talloc(p->mem_ctx, num_entries*sizeof(PRINTER_ENUM_VALUES))) == NULL )
{
- DEBUG(0,("_spoolss_enumprinterdataex: talloc() failed to allocate memory for [%d] bytes!\n",
+ DEBUG(0,("_spoolss_enumprinterdataex: talloc() failed to allocate memory for [%l] bytes!\n",
num_entries*sizeof(PRINTER_ENUM_VALUES)));
result = WERR_NOMEM;
goto done;
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 1be13270ba..c2db901ea7 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -163,7 +163,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close)
share_entry_count = del_share_mode(fsp, &share_entry);
- DEBUG(10,("close_normal_file: share_entry_count = %d for file %s\n",
+ DEBUG(10,("close_normal_file: share_entry_count = %l for file %s\n",
share_entry_count, fsp->fsp_name ));
/*
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 689059a3ca..8e02f65951 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -375,7 +375,7 @@ static int reply_spnego_negotiate(connection_struct *conn,
}
free(OIDs[i]);
}
- DEBUG(3,("Got secblob of size %d\n", secblob.length));
+ DEBUG(3,("Got secblob of size %l\n", secblob.length));
#ifdef HAVE_KRB5
if (got_kerberos && (SEC_ADS == lp_security())) {
diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c
index 9833a11f2d..aaf081a21e 100644
--- a/source3/smbd/utmp.c
+++ b/source3/smbd/utmp.c
@@ -491,7 +491,7 @@ static BOOL sys_utmp_fill(struct utmp *u,
* If size limit proves troublesome, then perhaps use "ut_id_encode()".
*/
if (strlen(id_str) > sizeof(u->ut_line)) {
- DEBUG(1,("id_str [%s] is too long for %d char utmp field\n",
+ DEBUG(1,("id_str [%s] is too long for %l char utmp field\n",
id_str, sizeof(u->ut_line)));
return False;
}