summaryrefslogtreecommitdiffstats
path: root/source3/lib/util_str.c
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:lib/util_str: add strlen_m_ext() that takes input and output charsetMichael Adam2010-11-031-13/+55
| | | | | | | The function calculates the number of units (8 or 16-bit, depending on the destination charset), that would be needed to convert the input string which is expected to be in in src_charset encoding to the dst_charset (which should be a unicode charset).
* s3:lib/util_str: clarify the comment header for strlen_m().Michael Adam2010-11-031-4/+6
|
* Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder ↵Jeremy Allison2010-09-091-0/+3
| | | | | | <andreas.moroder@gmx.net>". Jeremy.
* s3: Move sanitize_username to lib/util_str.cVolker Lendecke2010-04-111-0/+8
|
* s3: Slightly simplify logic in conv_str_sizeVolker Lendecke2010-03-281-29/+33
|
* s3: Fix indentation in conv_str_sizeVolker Lendecke2010-03-281-2/+2
|
* Revert 918b5a7e057bd91289ec06b3ef8d95da43a50ede. This codeJeremy Allison2009-09-241-6/+6
| | | | | should *not* return const. Jeremy.
* s3:util_str "str_list_make_v3" - introduce also here the "const" resultMatthias Dieter Wallnöfer2009-09-241-9/+9
| | | | I did this to match with the default util strlist library.
* Replace short-lived NULL talloc contexts with talloc_tos().Jeremy Allison2009-07-161-17/+17
| | | | Jeremy.
* Fix our base64 implementation for blobs of length 4....Volker Lendecke2009-07-101-1/+1
| | | | | The additional length check bit us exactly at 4, removing it. The torture test survives valgrind up to 2000 bytes :-)
* Make sid_binstring & friends take a talloc contextVolker Lendecke2009-05-281-3/+4
|
* Re-import the v3-3 version of str_list_make().Volker Lendecke2009-04-301-7/+59
| | | | | | | | | | | | | | The merged version behaves differently: "Domain Users" is parsed into two values, as it does not look at quotes. Samba3 users depend on the ability do say for example valid users = "domain users" which would not work anymore with the merged version. Thanks to Björn Jacke for testing this! Volker
* Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett2009-04-141-46/+46
| | | | | | | | | | | | This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
* Move next_token_talloc() to top-level.Jelmer Vernooij2009-03-011-112/+0
|
* Move 128 bytes from the data to the text segmentVolker Lendecke2008-12-141-1/+1
|
* Add wrapper str_list_make_v3() to replace the old S3 behavior ofJeremy Allison2008-11-061-0/+16
| | | | | | | | str_list_make(). From Dan Sledz <dan.sledz@isilon.com>: In samba 3.2 passing NULL or an empty string returned NULL. In master, it now returns a list of length 1 with the first string set to NULL (an empty list). Jeremy.
* Move more functions out of util_str.c into the shared util.c.Jelmer Vernooij2008-10-191-229/+0
|
* Rename hex_encode to hex_encode_talloc,for consistency with samba 4 and heimdal.Jelmer Vernooij2008-10-181-1/+1
|
* Use str_list_equal() rather than str_list_compare().Jelmer Vernooij2008-10-181-23/+0
|
* Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij2008-10-141-7/+3
|
* Use common strlist implementation in Samba 3 and Samba 4.Jelmer Vernooij2008-10-121-107/+0
|
* Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid ↵Jeremy Allison2008-08-211-2/+3
| | | | | | | <Douglas_E_Wegscheid@whirlpool.com>. Jeremy. (This used to be commit 1295bb9787dde69b4be4acee7b66eb782afe9c42)
* talloc_string_sub2: Don't return NULL if src is empty.Karolin Seeger2008-07-251-1/+1
| | | | | | | | | | | | | | | | This fixes BUG #5635. Finished print jobs were not removed from the $PRINTER.tdb file if "printing=cups". In print_queue_update, talloc_string_sub2 is used to assemble the "lprm command". In the case of using "printing=cups", the default "lprm command" is an empty string. talloc_string_sub2 is called with this empty string and returns NULL which leads to exiting print_queue_update without doing the actual print queue update. Signed-off by Michael Adam <obnox@samba.org> (This used to be commit 03d66554d1bbd9d6c72a3dd5203e5305343c76b8)
* Fix a segfault in base64_encode_data_blobVolker Lendecke2008-07-101-1/+3
| | | | | We did not allocate enough memory for the \0 and a = at the end (This used to be commit ea110de1dc6257b78631b7d83b7bbb728180c1a1)
* util_str: add talloc_asprintf_strlower_m().Günther Deschner2008-06-041-0/+17
| | | | | Guenther (This used to be commit 7f8b0b4d151fa4d07758b6fd7b47b0b7c07dda17)
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-25/+27
| | | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure. (This used to be commit 6b189dabc562d86dcaa685419d0cb6ea276f100d)
* Fix bug 5375Volker Lendecke2008-04-071-3/+4
| | | | | Thanks to Moskvin for testing (This used to be commit d3c31aa36c451f0a19496cd33c0b055b466e6b09)
* Fix some warningsVolker Lendecke2008-02-251-16/+14
| | | | | warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result (This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
* Fix some typos.Karolin Seeger2008-02-081-1/+1
| | | | | Karolin (This used to be commit 2bec0a1fb7857e6fb8ec15e5f597b2d4125f105b)
* str_list_free is not needed anymoreVolker Lendecke2008-02-041-17/+1
| | | | (This used to be commit feddc1447d585fd108d22a36bccc576fa81197ef)
* Always pass a TALLOC_CTX to str_list_make and str_list_copyVolker Lendecke2008-02-041-10/+3
| | | | (This used to be commit e2c9fc4cf5f0ff725330fa44f53782db65fca37e)
* Simplify str_list_xxxVolker Lendecke2008-02-041-111/+47
| | | | (This used to be commit d471dd4adb79d480c89436b2ed98f9ec6812aaa0)
* util_str: Don't return memory from talloc_tos(), use mem_ctx instead.Kai Blin2008-01-191-3/+3
| | | | (This used to be commit ab0ee6e9a6a9eee317228f0c2bde254ad9a59b85)
* Fixup hot paths - add macro for toupper (c < 0x80).Jeremy Allison2008-01-091-5/+16
| | | | | | This now matches 3.0.x on my micro-tests. Jeremy. (This used to be commit 329b924cba8225002ca40db26c45b31d141a0925)
* Remove next_token_nr_talloc and its associated globalVolker Lendecke2007-12-211-77/+0
| | | | | | | Only client.c and clitar.c used this, I think they should carry the static themselves. Also move the a bit funny routine toktocliplist to clitar.c, the only place where it is used. (This used to be commit 86d9412611fd99c21e15c71d30a3f95e35d8535b)
* Remove next_token - all uses must now be next_token_talloc.Jeremy Allison2007-12-071-94/+16
| | | | | | No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
* Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison2007-12-071-27/+0
| | | | | | | Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy (This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
* Remove pstrings completely except for smbctool (what does this do ?).Jeremy Allison2007-12-071-16/+1
| | | | | | Don't build this for now. Jeremy. (This used to be commit 46b67fd82c795d1a34a1efca9e409c0f3fa4f3a2)
* Remove some globalsVolker Lendecke2007-12-051-23/+50
| | | | (This used to be commit 31d0a846db08d845e6cdfd85def4ac1c34031e02)
* Ok, down to just the client/*.c code now.Jeremy Allison2007-12-041-5/+0
| | | | | Jeremy. (This used to be commit 7d3959f81a5439800b813ef052382e67424c90cd)
* Remove tok pstring from util_str.cJeremy Allison2007-12-041-2/+8
| | | | | | Do we even make rpctorture anymore ? Jeremy. (This used to be commit fecc3cc45af6145fad9a0570e6cae8422bd2443d)
* Make strhex_to_str clear on string limits. Remove pstring from web/*.cJeremy Allison2007-12-031-5/+9
| | | | | Jeremy. (This used to be commit f9c8d62389f8cb47837e5360209936176537df13)
* Fix restart after length count.Jeremy Allison2007-11-301-1/+6
| | | | | Jeremy. (This used to be commit fa8115f32bfd37f75c284ff0f6906dbc2af0f40c)
* Add talloc versions of all the next_token() functions.Jeremy Allison2007-11-301-3/+102
| | | | | | Now I can really start removing fixed length strings... Jeremy. (This used to be commit 0ae61e26547e594e94037d4474a008221e5df8cf)
* Remove more pstring. Unify talloc_sub functions to makeJeremy Allison2007-11-191-89/+41
| | | | | | | them a better match for replacing string_sub. Remove more unused code. Jeremy. (This used to be commit ae7885711f504f1442335f09088cbe149a7e00f9)
* Remove smbldap_get_single_pstring() and all pstringsJeremy Allison2007-11-141-4/+22
| | | | | | | from pdb_ldap.c. I don't have an LDAP passdb setup here, so I'm going to need some help on testing this. Jeremy. (This used to be commit 00760451b6c2b65f3a8a9187789ca4f270b622a2)
* Remove all pstrings from smbd/chgpasswd.c.Jeremy Allison2007-11-121-20/+44
| | | | | Jeremy. (This used to be commit eaf14c701b08e9eff5b94bf57af68cb29142d7fc)
* Make base64_encode_data_blob return a talloced stringVolker Lendecke2007-11-091-1/+2
| | | | (This used to be commit 5f205ab48d8ac3b7af573ea0be1ce095ab835448)
* Remove unnecessary codeVolker Lendecke2007-11-051-6/+1
| | | | | SAFE_FREE checks for NULL anyway, and SMB_STRDUP panics on failure (This used to be commit 4cdebda39b9b1790fc5c7df3dc81bfb46b047ad7)
* Fix bug in writing names into gencacheJeremy Allison2007-10-251-3/+4
| | | | | | | | | as well as 2 typos where AF_INET6 was mistypes as AF_INET. JERRY YOU NEED THESE FIXES. Fixes smbclient -L localhost -U% Bugs reported by Kukks (thanks kukks). Jeremy. (This used to be commit f109f82622ca30ae2360e8300152e90b9587ffd8)