1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
samba-mirror/source3/smbd
Andrew Bartlett 3b5bc93e9d String handling parinoia fixes.
This patch enables the compile-time checking of strings assable by means of
sizeof().  (Original code had the configure check reversed).

This is extended to all safe_strcpy() users, push_string and pull_string,
as well as the cli and srv derivitives.  There is an attempt to cap strings
at the end of the cli buffer, and clobber_region() of the speified length
(when not -1 :-).

Becouse of the way they are declared, the 'overmalloc a string' users of
safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips
some of the checks).

This whole ball of mud worked fine, until I pulled out my 'fix' for our
statcache.  When jeremy fixes that, we should be able to get back to testing
this stuff.

This patch also includes a 'marker' of the last caller to clobber_region (ie,
the function that called pstrcpy() that called clobber_region) to assist in
debugging problems that may have smashed the stack.  This is printed at
smb_panic() time.  (Original idea and patch by metze).

It also removes some unsused functions, and #if 0's some others that are
unused but probably should be used in the near future.

For now, this patch gives us some confidence on one class of trivial parsing
error in our code.

Andrew Bartlett
(This used to be commit 31f4827acc)
2003-03-15 07:14:55 +00:00
..
.cvsignore add *.po32 to ignore list 2001-12-12 16:04:37 +00:00
blocking.c Fix to allow blocking lock notification to be done rapidly (no wait 2003-02-27 00:43:23 +00:00
build_options.c BIG patch... 2003-01-02 09:07:17 +00:00
change_trust_pw.c change_trust_account_password() must always use the PDC for rpc 2002-12-04 20:13:29 +00:00
chgpasswd.c Removed level 0 DEBUG leftover from testing. 2003-01-15 22:15:07 +00:00
close.c Fix delete on close semantics to match W2K. I (think:-) I understand it now :-). 2003-02-11 02:24:45 +00:00
conn.c Non-error connection numbers are always positive 2003-02-01 06:24:07 +00:00
connection.c BIG patch... 2003-01-02 09:07:17 +00:00
dfree.c Removed version number from file header. 2002-01-30 06:08:46 +00:00
dir.c don't forget the NULL 2003-02-27 23:52:37 +00:00
dosmode.c More signed/unsigned fixes (yes, I run with funny compiler options) and 2003-02-22 12:22:06 +00:00
error.c Fix to correctly return NT_STATUS_DELETE_PENDING. 2002-11-05 21:46:33 +00:00
fileio.c The element in fsp->print_job should be a RAP jobid, not a uint32 RPC 2002-12-05 03:59:56 +00:00
filename.c make sure we don't run over the end of 'name' in unix_convert() 2003-02-07 04:01:36 +00:00
files.c Fix for systems that allow more than 65536 open files per process. 2002-10-22 22:17:06 +00:00
ipc.c We use unsigned now, so use %u. 2003-03-11 20:57:41 +00:00
lanman.c Progress on CR 601 2003-02-25 20:51:23 +00:00
mangle_hash2.c More signed/unsigned fixes (yes, I run with funny compiler options) and 2003-02-22 12:22:06 +00:00
mangle_hash.c small merges from SAMBA_3_0; mostly typos, renames, etc... 2003-01-15 18:31:46 +00:00
mangle_map.c Ensure we count the length correctly in mangle_map. 2003-03-12 19:08:01 +00:00
mangle.c BIG patch... 2003-01-02 09:07:17 +00:00
message.c Address the string_sub problem by changing len = 0 to mean "no expand". 2002-07-02 06:34:27 +00:00
negprot.c more off-by-one safe_strcpy() 2003-03-06 08:24:39 +00:00
noquotas.c Removed version number from file header. 2002-01-30 06:08:46 +00:00
notify_hash.c Removed version number from file header. 2002-01-30 06:08:46 +00:00
notify_kernel.c Ensure we do not pass uninitialised data to the kernel. (Picked up by 2003-01-13 08:09:32 +00:00
notify.c Added "kernel change notify" boolean to allow easier valgrind testing. 2002-12-12 02:01:53 +00:00
nttrans.c Fix typo in earlier fix, caught by Ranjit @ HP. 2003-03-08 01:16:30 +00:00
open.c Correctly return access denied on share mode deny when we can't open the 2003-02-12 01:12:33 +00:00
oplock_irix.c Merge of receive_local_message fix from 2.2.5. 2002-05-22 01:04:58 +00:00
oplock_linux.c Ensure we do not pass uninitialised data to the kernel. (Picked up by 2003-01-13 08:09:32 +00:00
oplock.c Fix for interesting resource constraint condition. When all opens are 2003-01-30 01:42:08 +00:00
password.c This patch fixes one of my longest-standing pet hates with Samba :-). 2003-02-17 12:27:34 +00:00
pipes.c make sure we don't walk past the end of the current SMB buffer when 2002-04-16 06:15:28 +00:00
posix_acls.c Missed parentheses around complex logic. 2003-03-07 19:46:51 +00:00
process.c Fix to allow blocking lock notification to be done rapidly (no wait 2003-02-27 00:43:23 +00:00
quotas.c Fix up zero termination. Spotted by Sebastian Krahmer <krahmer@suse.de>. 2003-03-11 18:10:36 +00:00
reply.c Found by my new checking code (yet to be commited): 2003-03-15 06:34:32 +00:00
sec_ctx.c Move to common user token debugging, and ensure we always print both the 2002-09-25 09:34:43 +00:00
server.c Make sure that the 'remote' machine name can only be set once. For some weird 2003-03-08 10:22:50 +00:00
service.c Fix logfile formatting, we were missing a "\n" 2003-02-19 11:30:09 +00:00
session.c Make 'remote_machine' private to lib/substitute.c, and fix all the user to use 2002-08-11 02:30:35 +00:00
sesssetup.c fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before dereferencing 2003-03-14 23:11:19 +00:00
statcache.c String handling parinoia fixes. 2003-03-15 07:14:55 +00:00
trans2.c Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out. 2003-03-07 23:34:55 +00:00
uid.c Fix inspired by Stefan (metze) Metzmacher - cache the sidtype also. 2003-02-19 22:30:57 +00:00
utmp.c BIG patch... 2003-01-02 09:07:17 +00:00
vfs-wrap.c Actually use sendfile if selected. 2002-09-17 19:48:19 +00:00
vfs.c Clean up the VFS module loading logic by making the parameter an P_LIST, 2003-03-15 06:41:31 +00:00