summaryrefslogtreecommitdiff
path: root/source3/libsmb/clistr.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-07s3:libsmb: remove unused clistr_push_fn()Stefan Metzmacher1-26/+0
metze
2011-07-07s3:libsmb: remove unused clistr_pull_fn()Stefan Metzmacher1-12/+0
metze
2011-05-21s3: Remove clistr_align_outVolker Lendecke1-5/+0
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat May 21 23:31:12 CEST 2011 on sn-devel-104
2011-05-06s3-libsmb: move protos to libsmb/proto.hGünther Deschner1-0/+1
Guenther
2011-03-25lib: remove unused pieces of string_wrappers.hAndrew Tridgell1-7/+7
2011-03-23s3-safe_str: Futher simplify the macros by removing indirectionAndrew Bartlett1-13/+13
Now that we don't need to pass in the function name and string, another level of indirection can be safely removed, and the operation of these macros made much clearer. Andrew Bartlett
2011-03-23s3-lib Remove the clobber_region() code.Andrew Bartlett1-19/+8
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
2010-08-05s3: Remove a pointless wrapper functionVolker Lendecke1-5/+0
2010-08-05s3: Explicitly pass flags2 to clistr_pull_tallocVolker Lendecke1-3/+4
Required to eventually make cli_list async
2010-01-29Fix a really interesting problem found by Volker's conversion of ↵Jeremy Allison1-3/+3
sessionsetup SPNEGO to asynchronous code. Normally clistr_push_fn() can depend upon cli->outbuf being initialized by negprot and sessionsetup packets, and cli->outbuf[smb_flgs2] being correctly set with FLAGS2_UNICODE_STRINGS when cli_setup_packet() is called. When all the sessionsetups are async, then cli_setup_packet() is never called, the async code uses cli_setup_packet_buf() - which initializes the allocated async buffer, not the cli->outbuf one. So the first time clistr_push_fn() is called is from libsmb/clidfs.c:cli_dfs_get_referral(), just after the connection and tconX. In this case cli->outbuf has never been initialized, and cli->outbuf[smb_flgs2] = 0 so the DFS query pushes ASCII on the wire, which is not what we want :-). Remove the dependency on cli->outbuf[smb_flgs2] in clistr_push_fn(), and fake up a SVAL(cli->outbuf, smb_flg2) value using cli_ucs2(cli) function instead, which has been initialized. We only care about the FLAGS2_UNICODE_STRINGS bit anyway. I don't think this is an issue for 3.5.0 as the sessionsetup is still synchronous there, but Volker PLEASE CHECK ! Jeremy.
2009-04-14Solve some of the conflict between Samba3 and Samba4 push_stringAndrew Bartlett1-11/+13
This renames push_string in Samba3 into push_string_base and push_string_check for the two different use cases. This should allow push_string to be imported from Samba4, using it's calling conventions.
2009-01-26Decouple clistr_pull from struct cli_state->inbufVolker Lendecke1-6/+6
2007-12-06Remove pstrings from client/client.c by doing a large rewrite.Jeremy Allison1-8/+35
Mostly compiles.... Jeremy. (This used to be commit c87f3eba9aa52f4ab25d77e2167262bf5c43b1a6)
2007-10-10r24133: Explicitly pass flags2 down to push_string_fnVolker Lendecke1-3/+11
This needs a bit closer review, it also touches the client libs (This used to be commit 824eb26738d64af1798d319d339582cf047521f0)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The nextVolker Lendecke1-1/+3
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 836782b07bf133e9b2598c4a089f1c810e4c7754)
2007-10-10r17333: Some C++ warningsVolker Lendecke1-2/+2
(This used to be commit be9aaffdaccae06c8c035eaf31862e34b7cfbe38)
2003-04-14Whitespace syncup.Tim Potter1-1/+1
(This used to be commit 93101a93dabe2dd7a6420e90acf82e0e08dce572)
2003-03-22(merge from HEAD)Andrew Bartlett1-0/+1
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 c91e76bddbe1244ddc8d12b092eba875834029ac)
2003-03-18Merge in the developer string options from HEAD. We need to ensure 3.0Jeremy Allison1-7/+21
is as stable as possible in the string department and some pain now will help later :-). Jeremy. (This used to be commit 86e3eddac698d90f4666b8492b4603a4efbbd67b)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-07-04The big character set handling changeover!Andrew Tridgell1-127/+6
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-07-02Insure caught the fact that PTRDIFFs were being done between two unrelatedJeremy Allison1-4/+16
pointers. Jeremy. (This used to be commit 15c64199cb29e2fca6ee7353673dbb3f962e0e24)
2001-06-21Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually doesAndrew Tridgell1-8/+13
send unaligned unicode strings sometimes! Fixed our handling of the workgroup name tacked on the end of the NT1 negprot response (a unaligned unicode) fixed a couple of places where we should be using the message_end fns instead of pre-calculated buffer lengths (This used to be commit 86613493a9b2e56523153486931d0bf8d39beb7a)
2001-06-21Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,Jeremy Allison1-2/+4
Samba Users Group Japan, ensure that we don't use dos_to_unix(xx,True), but always use dos_to_unix(xx,False) to prevent overwriting. Jeremy. (This used to be commit 244aec8ea623fec828add3ab09c5003bf32bd5c7)
2001-05-07Fixed a compiler warning. Still more const warnings though. )-:Tim Potter1-1/+1
(This used to be commit a345b477a22f6261613d21d079b1632a9409c914)
2001-03-18fixed some compilation errors with IRIX ccAndrew Tridgell1-2/+2
(This used to be commit e430ded56e9c15a462a171e6350f1eddefa8dd11)
2001-03-16added STR_ASCII support to clistr_pull()Andrew Tridgell1-2/+3
(This used to be commit 797293811ef0a79eecc460c471135c89090f8c06)
2001-03-14simpler clistr interface which handles individual packets havingAndrew Tridgell1-45/+7
unicode bit set differently to capabilities (This used to be commit 34a0821e087810381996f5ff6cf3b4d7b9bb53a0)
2001-03-10to use the same macros in the client and server rename the CLISTR_Andrew Tridgell1-28/+28
macros to STR_ (This used to be commit 95c9e4e0ba8f37f565aaf136f41eb76489441ff7)
2001-02-26made some LANMAN1 wildcard progressAndrew Tridgell1-3/+4
it now handles -M LANMAN1 -f '.x' -m '?x' nicely (This used to be commit e7ccb9be6da9b1426eb136b4a0a1171232471768)
2001-02-26fixed a bug in non-terminated unicode strings with clistr_pull()Andrew Tridgell1-1/+1
(This used to be commit 339bcfd05d3260a123ccf3c06429da6bfe621f74)
2001-02-21converted the last couple of functions in libsmb to be unicodeAndrew Tridgell1-4/+4
the whole of libsmb should now do unicode where appropriate (This used to be commit ac7529d2b69826f8214d5632c31778cc87216653)
2001-02-21the unicode conversion of our client code is complete enough to beAndrew Tridgell1-8/+5
enabled by default you can disable it by setting the environment variable CLI_FORCE_ASCII (This used to be commit 4d59c08c5e6f54c0d6ced7650750cb987e77b6c9)
2001-02-21added support for a CLISTR_ASCII flag so we can use a uniformAndrew Tridgell1-4/+5
interface for ascii-only fields (This used to be commit cdf0316610803e6743936b29f232b32f9ec81422)
2001-02-20yipee! client unicode now works well with ntAndrew Tridgell1-3/+4
(This used to be commit 5b2ef8a1b914265c6072c968d2dad7d26c2aeffc)
2001-02-20converted cli_list()Andrew Tridgell1-1/+2
(This used to be commit bdce09b77807c80281c1e169b7c4813c9238fbe3)
2001-02-20pipe opening now works with unicodeAndrew Tridgell1-1/+22
(This used to be commit ba3ce3404e1cd2e9da3ba1708f6fc8a12c085ef2)
2001-02-20initial client side unicode support (needed for netapp filer)Andrew Tridgell1-0/+161
I've currently got this code disabled by default as it is incomplete. You enable it by setting a USE_UNICODE environment variable. Once the support is complete this check will be removed and the CAP_UNICODE capability bit will be the sole determination of whether the client library code uses unicode right now I have converted session_setup and tconx. I will do more fns over the next few days. see clistr.c for the new client side string interface. Luckily it tends to make the code smaller and neater while adding unicode support. (This used to be commit e1a04e621f1c28d8e6e543d43741ca0272e2237f)