summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-03-22 15:30:43 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-03-23 12:49:39 +1100
commit1923b78209aaa2aa926dedd19e6c97fb449c48c8 (patch)
tree534acb7efe0910616511dd645b86a4b7cd5422a7 /source3/lib/util_sock.c
parentcd4306b01e4097b76777a9a85cc226e8b0e8f613 (diff)
downloadsamba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.tar.gz
samba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.tar.bz2
samba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.zip
s3-lib Remove the clobber_region() code.
This code wrote to the full buffer in fstrcpy(), pstrcpy() and other fixed-length string manipulation functions. The hope of this code was to find out at run time if we were mixing up pstring and fstring etc, and to record where this came from. It has a runtime performance impact (particularly if compiled with --enable-developer). It is being removed because of the complexity it adds, and the distinct lack of bugs that this complexity has been credited in finding. The macro-based compile-time checking of string sizes remains. Andrew Bartlett
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 3c97495099..eea153ad91 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1380,10 +1380,6 @@ const char *get_peer_name(int fd, bool force_lookup)
}
}
- /* can't pass the same source and dest strings in when you
- use --enable-developer or the clobber_region() call will
- get you */
-
strlcpy(tmp_name, name_buf, sizeof(tmp_name));
alpha_strcpy(name_buf, tmp_name, "_-.", sizeof(name_buf));
if (strstr(name_buf,"..")) {