1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Ralph Wuerthner
a70e9db0f3 s3:smbd: convert srvstr_pull_req_talloc() into a function
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-10 00:13:45 +02:00
Volker Lendecke
af7cf4f992 Remove some direct inbuf references by adding smbreq_bufrem 2008-11-02 09:22:40 +01:00
Volker Lendecke
a31fab8156 Simplify params of srvstr_pull_buf_talloc()
Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc()
to srvstr_pull_req()
2008-11-02 09:22:40 +01:00
Volker Lendecke
334d590b5e The non-talloc versions of srvstr_pull are not longer needed 2008-11-01 23:26:21 +01:00
Jeremy Allison
e8dc2ea03d r23858: Added srvstr_pull_buf_talloc() and srvstr_pull_talloc()
calls and converted reply_tcon and reply_tconX to use
them - to show the boilerplate usage (valgrind tested).
In conjunction with Volker's srvstr_get_path_talloc()
work this should allow us to start eliminating all
pstrings/fstrings out of the main path processing
code.
I'll watch the build farm tonight...
Jeremy.
(This used to be commit b4eff3f680)
2007-10-10 12:28:35 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
fcda5b5896 r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next
checkin will pull this up to srvstr_get_path. At that point we can get more
independent of the inbuf, the base_ptr in pull_string will only be used
to satisfy UCS2 alignment constraints.
(This used to be commit 836782b07b)
2007-10-10 12:23:49 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Andrew Bartlett
1f499a79f5 (merge from HEAD)
Small clenaup patches:
 - safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

 - connection.c - use safe_strcpy()
Andrew Bartlett
(This used to be commit c91e76bddb)
2003-03-22 13:47:42 +00:00
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