summaryrefslogtreecommitdiff
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
commitba4d334b822248d8ab929c9568533431603d967e (patch)
tree674d2c6c89d5840ac1f02ab71fa1291e87378f2a
parentb826e8c8980d26e932da55384f109f0fe6a124c7 (diff)
downloadsamba-ba4d334b822248d8ab929c9568533431603d967e.tar.gz
More printf fixes - size_t is long on some architectures.
-rw-r--r--source/auth/auth_sam.c8
-rw-r--r--source/auth/auth_util.c6
-rw-r--r--source/lib/charcnv.c2
-rw-r--r--source/lib/util_file.c2
-rw-r--r--source/lib/util_str.c2
-rw-r--r--source/libsmb/cliconnect.c2
-rw-r--r--source/libsmb/ntlmssp.c2
-rw-r--r--source/passdb/passdb.c2
-rw-r--r--source/printing/notify.c4
-rw-r--r--source/rpc_parse/parse_prs.c4
-rw-r--r--source/rpc_server/srv_samr_nt.c2
-rw-r--r--source/rpc_server/srv_spoolss_nt.c10
-rw-r--r--source/smbd/close.c2
-rw-r--r--source/smbd/sesssetup.c2
-rw-r--r--source/smbd/utmp.c2
15 files changed, 26 insertions, 26 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c
index 012696f46a9..4c120de9ae8 100644
--- a/source/auth/auth_sam.c
+++ b/source/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/source/auth/auth_util.c b/source/auth/auth_util.c
index 8e1b420b473..d4d08e2273a 100644
--- a/source/auth/auth_util.c
+++ b/source/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/source/lib/charcnv.c b/source/lib/charcnv.c
index 4e9c2c15923..7910099cd83 100644
--- a/source/lib/charcnv.c
+++ b/source/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/source/lib/util_file.c b/source/lib/util_file.c
index 02acbd4d7e1..5e9732ce527 100644
--- a/source/lib/util_file.c
+++ b/source/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/source/lib/util_str.c b/source/lib/util_str.c
index 7bf43de5f33..dca1d195934 100644
--- a/source/lib/util_str.c
+++ b/source/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/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 2188db2a624..71e80b5dbec 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/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/source/libsmb/ntlmssp.c b/source/libsmb/ntlmssp.c
index 66dc6e08eb8..175e952f86a 100644
--- a/source/libsmb/ntlmssp.c
+++ b/source/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/source/passdb/passdb.c b/source/passdb/passdb.c
index 966875785cd..1abd431c7b4 100644
--- a/source/passdb/passdb.c
+++ b/source/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/source/printing/notify.c b/source/printing/notify.c
index 479d883134b..68e54daab69 100644
--- a/source/printing/notify.c
+++ b/source/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/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c
index efd4914c66b..25c44c9da9b 100644
--- a/source/rpc_parse/parse_prs.c
+++ b/source/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/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 99970197c7d..d7238463f69 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/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/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index c7fab32957e..a33179d0548 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/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/source/smbd/close.c b/source/smbd/close.c
index 1be13270bab..c2db901ea70 100644
--- a/source/smbd/close.c
+++ b/source/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/source/smbd/sesssetup.c b/source/smbd/sesssetup.c
index 689059a3ca7..8e02f659513 100644
--- a/source/smbd/sesssetup.c
+++ b/source/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/source/smbd/utmp.c b/source/smbd/utmp.c
index 9833a11f2d0..aaf081a21e8 100644
--- a/source/smbd/utmp.c
+++ b/source/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;
}