--- samba-3.0.4/source/utils/#ntlm_auth.c~ 2004-05-10 15:56:37.000000000 -0400 +++ samba-3.0.4/source/utils/ntlm_auth.c 2004-05-10 15:56:37.000000000 -0400 @@ -473,6 +473,7 @@ { NTSTATUS status; if ( (opt_username == NULL) || (opt_domain == NULL) ) { + status = NT_STATUS_UNSUCCESSFUL; DEBUG(1, ("Need username and domain for NTLMSSP\n")); return status; } --- samba-3.0.20/source/utils/#ntlm_auth.c~ 2005-08-24 14:59:04.000000000 -0400 +++ samba-3.0.20/source/utils/ntlm_auth.c 2005-08-24 14:59:04.000000000 -0400 @@ -858,6 +858,7 @@ return; } + status = NT_STATUS_UNSUCCESSFUL; if (strcmp(request.negTokenInit.mechTypes[0], OID_NTLMSSP) == 0) { if ( request.negTokenInit.mechToken.data == NULL ) { --- samba-3.0.20/source/lib/gencache.c 2005-02-25 12:59:31.000000000 -0500 +++ samba-3.0.20-save/source/lib/gencache.c 2005-08-23 12:21:23.000000000 -0400 @@ -251,11 +251,17 @@ char* entry_buf = SMB_STRNDUP(databuf.dptr, databuf.dsize); char *v; time_t t; + unsigned u; + int status; v = SMB_MALLOC(databuf.dsize - TIMEOUT_LEN); SAFE_FREE(databuf.dptr); - sscanf(entry_buf, CACHE_DATA_FMT, (int*)&t, v); + status = sscanf(entry_buf, CACHE_DATA_FMT, &u, v); + if ( status != 2 ) { + DEBUG(0, ("gencache_get: Invalid return %d from sscanf\n", status )); + } + t = u; SAFE_FREE(entry_buf); DEBUG(10, ("Returning %s cache entry: key = %s, value = %s, " @@ -307,6 +313,8 @@ TDB_DATA databuf; char *keystr = NULL, *valstr = NULL, *entry = NULL; time_t timeout = 0; + int status; + unsigned u; /* fail completely if get null pointers passed */ SMB_ASSERT(fn && keystr_pattern); @@ -335,7 +343,11 @@ entry = SMB_STRNDUP(databuf.dptr, databuf.dsize); SAFE_FREE(databuf.dptr); valstr = SMB_MALLOC(databuf.dsize - TIMEOUT_LEN); - sscanf(entry, CACHE_DATA_FMT, (int*)(&timeout), valstr); + status = sscanf(entry, CACHE_DATA_FMT, &u, valstr); + if ( status != 2 ) { + DEBUG(0,("gencache_iterate: invalid return from sscanf %d\n",status)); + } + timeout = u; DEBUG(10, ("Calling function with arguments (key = %s, value = %s, timeout = %s)\n", keystr, valstr, ctime(&timeout))); diff -r -u samba-3.0.20/source/lib/smbrun.c samba-3.0.20-save/source/lib/smbrun.c --- samba-3.0.20/source/lib/smbrun.c 2005-02-25 12:59:32.000000000 -0500 +++ samba-3.0.20-save/source/lib/smbrun.c 2005-08-23 12:13:25.000000000 -0400 @@ -225,10 +225,16 @@ */ int status = 0; pid_t wpid; + size_t towrite; + ssize_t wrote; close(ifd[0]); /* send the secret */ - write(ifd[1], secret, strlen(secret)); + towrite = strlen(secret); + wrote = write(ifd[1], secret, towrite); + if ( wrote != towrite ) { + DEBUG(0,("smbrunsecret: wrote %ld of %lu bytes\n",(long)wrote,(unsigned long)towrite)); + } fsync(ifd[1]); close(ifd[1]); diff -r -u samba-3.0.20/source/nsswitch/winbindd_cm.c samba-3.0.20-save/source/nsswitch/winbindd_cm.c --- samba-3.0.20/source/nsswitch/winbindd_cm.c 2005-07-28 09:19:44.000000000 -0400 +++ samba-3.0.20-save/source/nsswitch/winbindd_cm.c 2005-08-24 10:57:51.000000000 -0400 @@ -721,7 +721,7 @@ for (retries = 0; retries < 3; retries++) { int fd = -1; - BOOL retry; + BOOL retry = False; result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; diff -r -u samba-3.0.20/source/param/loadparm.c samba-3.0.20-save/source/param/loadparm.c --- samba-3.0.20/source/param/loadparm.c 2005-08-24 11:01:56.000000000 -0400 +++ samba-3.0.20-save/source/param/loadparm.c 2005-08-22 16:46:06.000000000 -0400 @@ -3347,7 +3347,10 @@ break; case P_OCTAL: - sscanf(pszParmValue, "%o", (int *)parm_ptr); + i = sscanf(pszParmValue, "%o", (int *)parm_ptr); + if ( i != 1 ) { + DEBUG ( 0, ("Invalid octal number %s\n", pszParmName )); + } break; case P_LIST: diff -r -u samba-3.0.20/source/passdb/pdb_ldap.c samba-3.0.20-save/source/passdb/pdb_ldap.c --- samba-3.0.20/source/passdb/pdb_ldap.c 2005-07-28 09:19:48.000000000 -0400 +++ samba-3.0.20-save/source/passdb/pdb_ldap.c 2005-08-23 11:55:45.000000000 -0400 @@ -694,8 +694,8 @@ if (ldap_state->is_nds_ldap) { char *user_dn; - int pwd_len; - char clear_text_pw[512]; + size_t pwd_len; + unsigned char clear_text_pw[512]; /* Make call to Novell eDirectory ldap extension to get clear text password. NOTE: This will only work if we have an SSL connection to eDirectory. */ diff -r -u samba-3.0.20/source/passdb/pdb_nds.c samba-3.0.20-save/source/passdb/pdb_nds.c --- samba-3.0.20/source/passdb/pdb_nds.c 2005-07-28 09:19:48.000000000 -0400 +++ samba-3.0.20-save/source/passdb/pdb_nds.c 2005-08-23 11:58:59.000000000 -0400 @@ -550,7 +550,7 @@ LDAP *ld, char *objectDN, size_t *pwdSize, /* in bytes */ - char *pwd ) + unsigned char *pwd ) { int err = 0; @@ -663,8 +663,8 @@ int pdb_nds_get_password( struct smbldap_state *ldap_state, char *object_dn, - int *pwd_len, - char *pwd ) + size_t *pwd_len, + unsigned char *pwd ) { LDAP *ld = ldap_state->ldap_struct; int rc = -1; diff -r -u samba-3.0.20/source/passdb/pdb_smbpasswd.c samba-3.0.20-save/source/passdb/pdb_smbpasswd.c --- samba-3.0.20/source/passdb/pdb_smbpasswd.c 2005-02-25 12:59:35.000000000 -0500 +++ samba-3.0.20-save/source/passdb/pdb_smbpasswd.c 2005-08-23 12:03:44.000000000 -0400 @@ -313,10 +313,11 @@ unsigned char *smbpwd = smbpasswd_state->smbpwd; unsigned char *smbntpwd = smbpasswd_state->smbntpwd; char linebuf[256]; - unsigned char c; + int c; unsigned char *p; long uidval; size_t linebuf_len; + char *status; if(fp == NULL) { DEBUG(0,("getsmbfilepwent: Bad password file pointer.\n")); @@ -329,11 +330,12 @@ /* * Scan the file, a line at a time and check if the name matches. */ - while (!feof(fp)) { + status = linebuf; + while (status && !feof(fp)) { linebuf[0] = '\0'; - fgets(linebuf, 256, fp); - if (ferror(fp)) { + status = fgets(linebuf, 256, fp); + if (status == NULL && ferror(fp)) { return NULL; } @@ -689,9 +691,10 @@ /* Static buffers we will return. */ pstring user_name; + char *status; char linebuf[256]; char readbuf[1024]; - unsigned char c; + int c; fstring ascii_p16; fstring encode_bits; unsigned char *p = NULL; @@ -738,13 +741,14 @@ /* * Scan the file, a line at a time and check if the name matches. */ - while (!feof(fp)) { + status = linebuf; + while (status && !feof(fp)) { pwd_seekpos = sys_ftell(fp); linebuf[0] = '\0'; - fgets(linebuf, sizeof(linebuf), fp); - if (ferror(fp)) { + status = fgets(linebuf, sizeof(linebuf), fp); + if (status == NULL && ferror(fp)) { pw_file_unlock(lockfd, &smbpasswd_state->pw_file_lock_depth); fclose(fp); return False; diff -r -u samba-3.0.20/source/rpc_parse/parse_prs.c samba-3.0.20-save/source/rpc_parse/parse_prs.c --- samba-3.0.20/source/rpc_parse/parse_prs.c 2005-07-28 09:19:48.000000000 -0400 +++ samba-3.0.20-save/source/rpc_parse/parse_prs.c 2005-08-22 16:56:38.000000000 -0400 @@ -52,6 +52,7 @@ { int fd, i; pstring fname; + ssize_t sz; if (DEBUGLEVEL < 50) return; for (i=1;i<100;i++) { if (v != -1) { @@ -63,9 +64,13 @@ if (fd != -1 || errno != EEXIST) break; } if (fd != -1) { - write(fd, ps->data_p + from_off, to_off - from_off); - close(fd); - DEBUG(0,("created %s\n", fname)); + sz = write(fd, ps->data_p + from_off, to_off - from_off); + i = close(fd); + if ( sz != to_off - from_off || i != 0 ) { + DEBUG(0,("Error writing/closing %s: %ld!=%ld %d\n", fname, sz, to_off - from_off, i )); + } else { + DEBUG(0,("created %s\n", fname)); + } } } --- samba-3.0.20/source/rpc_server/srv_samr_nt.c.warnings 2005-09-08 11:10:21.000000000 -0400 +++ samba-3.0.20/source/rpc_server/srv_samr_nt.c 2005-09-08 17:57:31.000000000 -0400 @@ -1797,7 +1797,7 @@ time_t u_lock_duration, u_reset_time; NTTIME nt_lock_duration, nt_reset_time; uint32 lockout; - + unsigned int ui_logout; time_t u_logout; NTTIME nt_logout; @@ -1864,7 +1864,8 @@ num_users, num_groups, num_aliases, nt_logout, server_role); break; case 0x03: - account_policy_get(AP_TIME_TO_LOGOUT, (unsigned int *)&u_logout); + account_policy_get(AP_TIME_TO_LOGOUT, &ui_logout); + u_logout = ui_logout; unix_to_nt_time_abs(&nt_logout, u_logout); init_unk_info3(&ctr->info.inf3, nt_logout); --- samba-3.0.20/source/rpc_server/srv_spoolss_nt.c.warnings 2005-08-19 13:16:27.000000000 -0400 +++ samba-3.0.20/source/rpc_server/srv_spoolss_nt.c 2005-09-08 17:59:28.000000000 -0400 @@ -2072,7 +2072,10 @@ /* this should not have failed---if it did, report to client */ if ( !W_ERROR_IS_OK(status_win2k) ) + { + status = status_win2k; goto done; + } } } --- samba-3.0.20/source/smbd/message.c.warnings 2005-02-25 12:59:26.000000000 -0500 +++ samba-3.0.20/source/smbd/message.c 2005-09-09 10:57:34.000000000 -0400 @@ -43,6 +43,7 @@ int fd; char *msg; int len; + ssize_t sz; if (! (*lp_msg_command())) { @@ -70,14 +71,20 @@ if (msgbuf[i] == '\r' && i < (msgpos-1) && msgbuf[i+1] == '\n') { i++; continue; } - write(fd, &msgbuf[i++], 1); + sz = write(fd, &msgbuf[i++], 1); + if ( sz != 1 ) { + DEBUG(0,("Write error to fd %d: %ld(%d)\n",fd, (long)sz, errno )); + } } } else { for (i = 0; i < len;) { if (msg[i] == '\r' && i < (len-1) && msg[i+1] == '\n') { i++; continue; } - write(fd, &msg[i++],1); + sz = write(fd, &msg[i++],1); + if ( sz != 1 ) { + DEBUG(0,("Write error to fd %d: %ld(%d)\n",fd, (long)sz, errno )); + } } SAFE_FREE(msg); } --- samba-3.0.20/source/smbd/sesssetup.c 2005-08-07 19:09:53.000000000 -0400 +++ samba-3.0.20-save/source/smbd/sesssetup.c 2005-08-22 16:47:49.000000000 -0400 @@ -660,7 +660,7 @@ return ret; } - if (strncmp(blob1.data, "NTLMSSP", 7) == 0) { + if (strncmp((char *)(blob1.data), "NTLMSSP", 7) == 0) { DATA_BLOB chal; NTSTATUS nt_status; if (!vuser->auth_ntlmssp_state) { --- samba-3.0.20/source/include/#spnego.h~ 2005-08-24 14:57:38.000000000 -0400 +++ samba-3.0.20/source/include/spnego.h 2005-08-24 14:57:38.000000000 -0400 @@ -43,7 +43,7 @@ } negResult_t; typedef struct spnego_negTokenInit { - char **mechTypes; + const char **mechTypes; int reqFlags; DATA_BLOB mechToken; DATA_BLOB mechListMIC; --- samba-3.0.20/source/lib/#privileges.c~ 2005-08-24 14:00:53.000000000 -0400 +++ samba-3.0.20/source/lib/privileges.c 2005-08-24 14:00:53.000000000 -0400 @@ -399,6 +399,7 @@ int i; priv_luid.attr = 0; + priv_luid.luid.low = ~0; priv_luid.luid.high = 0; for ( i=0; !se_priv_equal(&privs[i].se_priv, &se_priv_end); i++ ) { --- samba-3.0.20/source/libsmb/#samlogon_cache.c~ 2005-08-24 14:08:06.000000000 -0400 +++ samba-3.0.20/source/libsmb/samlogon_cache.c 2005-08-24 14:08:06.000000000 -0400 @@ -117,6 +117,7 @@ BOOL result = False; DOM_SID user_sid; time_t t = time(NULL); + uint32 u; if (!netsamlogon_cache_init()) { @@ -143,8 +144,8 @@ /* Prepare data */ prs_init( &ps,MAX_PDU_FRAG_LEN , mem_ctx, MARSHALL); - - if ( !prs_uint32( "timestamp", &ps, 0, (uint32*)&t ) ) + u = t; + if ( !prs_uint32( "timestamp", &ps, 0, &u ) ) return False; if ( net_io_user_info3("", user, &ps, 0, 3) ) --- samba-3.0.20/source/libsmb/#smbencrypt.c~ 2005-08-24 14:16:22.000000000 -0400 +++ samba-3.0.20/source/libsmb/smbencrypt.c 2005-08-24 14:16:22.000000000 -0400 @@ -485,7 +485,7 @@ encode a password buffer with a unicode password. The buffer is filled with random data to make it harder to attack. ************************************************************/ -BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags) +BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags) { uchar new_pw[512]; size_t new_pw_len; @@ -496,7 +496,7 @@ memcpy(&buffer[512 - new_pw_len], new_pw, new_pw_len); - generate_random_buffer((unsigned char *)buffer, 512 - new_pw_len); + generate_random_buffer(buffer, 512 - new_pw_len); /* * The length of the new password is in the last 4 bytes of --- samba-3.0.20/source/pam_smbpass/#pam_smb_auth.c~ 2005-08-24 15:05:57.000000000 -0400 +++ samba-3.0.20/source/pam_smbpass/pam_smb_auth.c 2005-08-24 15:05:57.000000000 -0400 @@ -84,6 +84,11 @@ pam_sm_setcred(). */ ret_data = SMB_MALLOC_P(int); + /* we need to do this before we call AUTH_RETURN */ + /* Getting into places that might use LDAP -- protect the app + from a SIGPIPE it's not expecting */ + oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN); + /* get the username */ retval = pam_get_user( pamh, &name, "Username: " ); if ( retval != PAM_SUCCESS ) { @@ -96,10 +101,6 @@ _log_err( LOG_DEBUG, "username [%s] obtained", name ); } - /* Getting into places that might use LDAP -- protect the app - from a SIGPIPE it's not expecting */ - oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN); - if (!initialize_password_db(True)) { _log_err( LOG_ALERT, "Cannot access samba password database" ); retval = PAM_AUTHINFO_UNAVAIL; --- samba-3.0.20/source/printing/#printing.c~ 2005-08-24 14:06:49.000000000 -0400 +++ samba-3.0.20/source/printing/printing.c 2005-08-24 14:06:49.000000000 -0400 @@ -91,7 +91,7 @@ if (rap_jobid == 0) rap_jobid = ++next_rap_jobid; SSVAL(buf,0,rap_jobid); - data.dptr = buf; + data.dptr = (char *)buf; data.dsize = sizeof(rap_jobid); tdb_store(rap_tdb, key, data, TDB_REPLACE); tdb_store(rap_tdb, data, key, TDB_REPLACE); @@ -112,7 +112,7 @@ return False; SSVAL(buf,0,rap_jobid); - key.dptr = buf; + key.dptr = (char *)buf; key.dsize = sizeof(rap_jobid); data = tdb_fetch(rap_tdb, key); if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) ) @@ -164,7 +164,7 @@ rap_jobid = SVAL(data.dptr, 0); SAFE_FREE(data.dptr); SSVAL(buf,0,rap_jobid); - data.dptr=buf; + data.dptr=(char *)buf; data.dsize = sizeof(rap_jobid); tdb_delete(rap_tdb, key); tdb_delete(rap_tdb, data); @@ -1018,6 +1018,7 @@ || (time_now - last_qscan_time) >= lp_lpqcachetime() || last_qscan_time > (time_now + MAX_CACHE_VALID_TIME)) { + uint32 u; time_t msg_pending_time; DEBUG(4, ("print_cache_expired: cache expired for queue %s " @@ -1033,8 +1034,8 @@ snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename); if ( check_pending - && tdb_fetch_uint32( pdb->tdb, key, (uint32*)&msg_pending_time ) - && msg_pending_time > 0 + && tdb_fetch_uint32( pdb->tdb, key, &u ) + && (msg_pending_time=u) > 0 && msg_pending_time <= time_now && (time_now - msg_pending_time) < 60 ) { --- samba-3.0.20/source/rpc_client/#cli_netlogon.c~ 2005-08-24 14:17:34.000000000 -0400 +++ samba-3.0.20/source/rpc_client/cli_netlogon.c 2005-08-24 14:17:34.000000000 -0400 @@ -892,7 +892,7 @@ DOM_CRED new_clnt_cred; NET_Q_SRV_PWSET q_s; uint16 sec_chan_type = 2; - NTSTATUS nt_status; + NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; gen_next_creds( cli, &new_clnt_cred); --- samba-3.0.20/source/rpc_client/#cli_pipe.c~ 2005-08-24 14:18:34.000000000 -0400 +++ samba-3.0.20/source/rpc_client/cli_pipe.c 2005-08-24 14:18:34.000000000 -0400 @@ -320,7 +320,8 @@ nt_status = ntlmssp_check_packet(cli->ntlmssp_pipe_state, (const unsigned char *)reply_data, data_len, &sig); - } + } else + nt_status = NT_STATUS_UNSUCCESSFUL; data_blob_free(&sig); --- samba-3.0.20/source/rpc_parse/#parse_samr.c~ 2005-08-24 14:11:55.000000000 -0400 +++ samba-3.0.20/source/rpc_parse/parse_samr.c 2005-08-24 14:11:55.000000000 -0400 @@ -7038,9 +7038,9 @@ void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER * q_u, const char *dest_host, const char *user_name, - const char nt_newpass[516], + const uchar nt_newpass[516], const uchar nt_oldhash[16], - const char lm_newpass[516], + const uchar lm_newpass[516], const uchar lm_oldhash[16]) { DEBUG(5, ("init_samr_q_chgpasswd_user\n")); --- samba-3.0.20/source/utils/#net_rpc.c~ 2005-08-24 14:52:06.000000000 -0400 +++ samba-3.0.20/source/utils/net_rpc.c 2005-08-24 14:52:06.000000000 -0400 @@ -3036,7 +3036,7 @@ BOOL copy_top_level_perms(struct copy_clistate *cp_clistate, const char *sharename) { - NTSTATUS nt_status; + NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; switch (net_mode_share) { case NET_MODE_SHARE_MIGRATE: --- samba-3.0.20/source/client/#mount.cifs.c~ 2005-08-24 16:33:18.000000000 -0400 +++ samba-3.0.20/source/client/mount.cifs.c 2005-08-24 16:33:18.000000000 -0400 @@ -694,7 +694,7 @@ int length = strnlen(unc_name,1024); char * share; char * ipaddress_string = NULL; - struct hostent * host_entry; + struct hostent * host_entry = NULL; struct in_addr server_ipaddr; if(length > 1023) { --- samba-3.0.20/source/smbd/#process.c~ 2005-08-24 17:28:15.000000000 -0400 +++ samba-3.0.20/source/smbd/process.c 2005-08-24 17:28:15.000000000 -0400 @@ -1302,7 +1302,7 @@ Check if services need reloading. ****************************************************************************/ -void check_reload(int t) +void check_reload(time_t t) { static pid_t mypid = 0; static time_t last_smb_conf_reload_time = 0; --- samba-3.0.20/source/smbd/#close.c~ 2005-08-31 21:05:54.000000000 -0400 +++ samba-3.0.20/source/smbd/close.c 2005-08-31 21:05:55.000000000 -0400 @@ -149,7 +149,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) { share_mode_entry *share_entry = NULL; - size_t share_entry_count = 0; + ssize_t share_entry_count = 0; BOOL delete_file = False; connection_struct *conn = fsp->conn; int saved_errno = 0; @@ -199,8 +199,8 @@ share_entry_count = del_share_mode(fsp, &share_entry, &delete_file); - DEBUG(10,("close_normal_file: share_entry_count = %lu for file %s\n", - (unsigned long)share_entry_count, fsp->fsp_name )); + DEBUG(10,("close_normal_file: share_entry_count = %ld for file %s\n", + (long)share_entry_count, fsp->fsp_name )); if (share_entry_count != 0) { /* We're not the last ones -- don't delete */ --- samba-3.0.20/source/smbd/#blocking.c~ 2005-08-31 21:14:30.000000000 -0400 +++ samba-3.0.20/source/smbd/blocking.c 2005-08-31 21:14:34.000000000 -0400 @@ -351,8 +351,8 @@ SSVAL(p,0,nread); p += 2; set_message_end(outbuf, p+nread); - DEBUG(3, ( "process_lockread file = %s, fnum=%d num=%d nread=%d\n", - fsp->fsp_name, fsp->fnum, (int)numtoread, (int)nread ) ); + DEBUG(3, ( "process_lockread file = %s, fnum=%d num=%lu nread=%ld\n", + fsp->fsp_name, fsp->fnum, (unsigned long)numtoread, (long)nread ) ); send_blocking_reply(outbuf,outsize); return True; --- samba-3.0.20/source/smbd/#mangle_hash2.c~ 2005-08-31 21:16:21.000000000 -0400 +++ samba-3.0.20/source/smbd/mangle_hash2.c 2005-08-31 21:16:21.000000000 -0400 @@ -212,7 +212,7 @@ { unsigned int i; - M_DEBUG(10,("is_mangled_component %s (len %u) ?\n", name, (unsigned int)len)); + M_DEBUG(10,("is_mangled_component %s (len %lu) ?\n", name, (unsigned long)len)); /* check the length */ if (len > 12 || len < 8) @@ -250,7 +250,7 @@ } } - M_DEBUG(10,("is_mangled_component %s (len %u) -> yes\n", name, (unsigned int)len)); + M_DEBUG(10,("is_mangled_component %s (len %lu) -> yes\n", name, (unsigned long)len)); return True; } --- samba-3.0.20/source/smbd/#nttrans.c~ 2005-08-31 21:24:22.000000000 -0400 +++ samba-3.0.20/source/smbd/nttrans.c 2005-08-31 21:24:27.000000000 -0400 @@ -1989,7 +1989,7 @@ return(UNIXERROR(ERRDOS,ERRnoaccess)); } - DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %d.\n",(int)sd_size)); + DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %lu.\n",(unsigned long)sd_size)); SIVAL(params,0,(uint32)sd_size); --- samba-3.0.20/source/smbd/#reply.c~ 2005-08-31 21:30:37.000000000 -0400 +++ samba-3.0.20/source/smbd/reply.c 2005-08-31 21:30:45.000000000 -0400 @@ -2298,8 +2298,8 @@ nread = 0; #endif - DEBUG( 3, ( "readbraw fnum=%d start=%.0f max=%d min=%d nread=%d\n", fsp->fnum, (double)startpos, - (int)maxcount, (int)mincount, (int)nread ) ); + DEBUG( 3, ( "readbraw fnum=%d start=%.0f max=%lu min=%lu nread=%lu\n", fsp->fnum, (double)startpos, + (unsigned long)maxcount, (unsigned long)mincount, (unsigned long)nread ) ); send_file_readbraw(conn, fsp, startpos, nread, mincount, outbuf, out_buffsize); --- samba-3.0.20/source/libsmb/#spnego.c~ 2005-08-24 16:29:57.000000000 -0400 +++ samba-3.0.20/source/libsmb/spnego.c 2005-08-24 16:29:57.000000000 -0400 @@ -42,11 +42,11 @@ asn1_start_tag(asn1, ASN1_CONTEXT(0)); asn1_start_tag(asn1, ASN1_SEQUENCE(0)); - token->mechTypes = SMB_MALLOC_P(char *); + token->mechTypes = SMB_MALLOC_P(const char *); for (i = 0; !asn1->has_error && 0 < asn1_tag_remaining(asn1); i++) { token->mechTypes = - SMB_REALLOC_ARRAY(token->mechTypes, char *, i + 2); + SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2); asn1_read_OID(asn1, &token->mechTypes[i]); } token->mechTypes[i] = NULL;