summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-06Add wrapper str_list_make_v3() to replace the old S3 behavior ofJeremy Allison1-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.
2008-10-19Move more functions out of util_str.c into the shared util.c.Jelmer Vernooij1-229/+0
2008-10-18Rename hex_encode to hex_encode_talloc,for consistency with samba 4 and heimdal.Jelmer Vernooij1-1/+1
2008-10-18Use str_list_equal() rather than str_list_compare().Jelmer Vernooij1-23/+0
2008-10-14Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij1-7/+3
2008-10-12Use common strlist implementation in Samba 3 and Samba 4.Jelmer Vernooij1-107/+0
2008-08-21Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid ↵Jeremy Allison1-2/+3
<Douglas_E_Wegscheid@whirlpool.com>. Jeremy. (This used to be commit 1295bb9787dde69b4be4acee7b66eb782afe9c42)
2008-07-25talloc_string_sub2: Don't return NULL if src is empty.Karolin Seeger1-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)
2008-07-10Fix a segfault in base64_encode_data_blobVolker Lendecke1-1/+3
We did not allocate enough memory for the \0 and a = at the end (This used to be commit ea110de1dc6257b78631b7d83b7bbb728180c1a1)
2008-06-04util_str: add talloc_asprintf_strlower_m().Günther Deschner1-0/+17
Guenther (This used to be commit 7f8b0b4d151fa4d07758b6fd7b47b0b7c07dda17)
2008-05-20Cleanup size_t return values in callers of convert_string_allocateTim Prouty1-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)
2008-04-07Fix bug 5375Volker Lendecke1-3/+4
Thanks to Moskvin for testing (This used to be commit d3c31aa36c451f0a19496cd33c0b055b466e6b09)
2008-02-25Fix some warningsVolker Lendecke1-16/+14
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result (This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
2008-02-08Fix some typos.Karolin Seeger1-1/+1
Karolin (This used to be commit 2bec0a1fb7857e6fb8ec15e5f597b2d4125f105b)
2008-02-04str_list_free is not needed anymoreVolker Lendecke1-17/+1
(This used to be commit feddc1447d585fd108d22a36bccc576fa81197ef)
2008-02-04Always pass a TALLOC_CTX to str_list_make and str_list_copyVolker Lendecke1-10/+3
(This used to be commit e2c9fc4cf5f0ff725330fa44f53782db65fca37e)
2008-02-04Simplify str_list_xxxVolker Lendecke1-111/+47
(This used to be commit d471dd4adb79d480c89436b2ed98f9ec6812aaa0)
2008-01-19util_str: Don't return memory from talloc_tos(), use mem_ctx instead.Kai Blin1-3/+3
(This used to be commit ab0ee6e9a6a9eee317228f0c2bde254ad9a59b85)
2008-01-09Fixup hot paths - add macro for toupper (c < 0x80).Jeremy Allison1-5/+16
This now matches 3.0.x on my micro-tests. Jeremy. (This used to be commit 329b924cba8225002ca40db26c45b31d141a0925)
2007-12-21Remove next_token_nr_talloc and its associated globalVolker Lendecke1-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)
2007-12-07Remove next_token - all uses must now be next_token_talloc.Jeremy Allison1-94/+16
No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-07Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison1-27/+0
Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy (This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
2007-12-07Remove pstrings completely except for smbctool (what does this do ?).Jeremy Allison1-16/+1
Don't build this for now. Jeremy. (This used to be commit 46b67fd82c795d1a34a1efca9e409c0f3fa4f3a2)
2007-12-05Remove some globalsVolker Lendecke1-23/+50
(This used to be commit 31d0a846db08d845e6cdfd85def4ac1c34031e02)
2007-12-04Ok, down to just the client/*.c code now.Jeremy Allison1-5/+0
Jeremy. (This used to be commit 7d3959f81a5439800b813ef052382e67424c90cd)
2007-12-04Remove tok pstring from util_str.cJeremy Allison1-2/+8
Do we even make rpctorture anymore ? Jeremy. (This used to be commit fecc3cc45af6145fad9a0570e6cae8422bd2443d)
2007-12-03Make strhex_to_str clear on string limits. Remove pstring from web/*.cJeremy Allison1-5/+9
Jeremy. (This used to be commit f9c8d62389f8cb47837e5360209936176537df13)
2007-11-30Fix restart after length count.Jeremy Allison1-1/+6
Jeremy. (This used to be commit fa8115f32bfd37f75c284ff0f6906dbc2af0f40c)
2007-11-30Add talloc versions of all the next_token() functions.Jeremy Allison1-3/+102
Now I can really start removing fixed length strings... Jeremy. (This used to be commit 0ae61e26547e594e94037d4474a008221e5df8cf)
2007-11-19Remove more pstring. Unify talloc_sub functions to makeJeremy Allison1-89/+41
them a better match for replacing string_sub. Remove more unused code. Jeremy. (This used to be commit ae7885711f504f1442335f09088cbe149a7e00f9)
2007-11-14Remove smbldap_get_single_pstring() and all pstringsJeremy Allison1-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)
2007-11-12Remove all pstrings from smbd/chgpasswd.c.Jeremy Allison1-20/+44
Jeremy. (This used to be commit eaf14c701b08e9eff5b94bf57af68cb29142d7fc)
2007-11-09Make base64_encode_data_blob return a talloced stringVolker Lendecke1-1/+2
(This used to be commit 5f205ab48d8ac3b7af573ea0be1ce095ab835448)
2007-11-05Remove unnecessary codeVolker Lendecke1-6/+1
SAFE_FREE checks for NULL anyway, and SMB_STRDUP panics on failure (This used to be commit 4cdebda39b9b1790fc5c7df3dc81bfb46b047ad7)
2007-10-25Fix bug in writing names into gencacheJeremy Allison1-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)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-23/+60
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-17Reformatting fix for new coding guidelines. BOOL ->bool.Jeremy Allison1-264/+320
Jeremy. (This used to be commit 315215e20e1e470c5077122a2e250ecb3d45ce9b)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-1/+0
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25184: Fix some C++ warnings and an uninitialized variableVolker Lendecke1-1/+1
(This used to be commit b64df8a3c504ab7749c21ffb26e4771a9a0a328f)
2007-10-10r25138: More pstring elimination. Add a TALLOC_CTX parameterJeremy Allison1-3/+8
to unix_convert(). Jeremy. (This used to be commit 39c211a702e91c34c1a5a689e1b0c4530ea8a1ac)
2007-10-10r25121: Remove pstring limits from much of our string handling function.Jeremy Allison1-54/+174
Still a few left (mainly the substitute ones). Jeremy. (This used to be commit 6552e52979a7c6954faa8b2c9c0f08b3779835c4)
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-10r23518: Remove the silly assumption that string_replace requires a pstring.Volker Lendecke1-19/+44
Jeremy, I am always very confused about the different length arguments in convert_string and friends. Can you take a look at the change in string_replace and verify it's ok? Thanks! While at it, remove the pstring limit for strhasupper and strhaslower. (This used to be commit e6e5703658aeaeb0cca5d7281095e17553001d4b)
2007-10-10r23356: We missed to add the 'c' character to the list of valid ones forSimo Sorce1-1/+1
shell escaping. I hate this kind of bugs more than how Jeremy hates off by ones :( Simo. (This used to be commit 42d846ff870f93b7eaca316f04c12104330bbca8)
2007-10-10r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branchesGerald Carter1-0/+163
(This used to be commit f65214be68c1a59d9598bfb9f3b19e71cc3fa07b)
2007-10-10r22045: As Volker noticed, skip_string's last argument isJeremy Allison1-15/+11
redundent. Remove it. Jeremy. (This used to be commit 140881cfbb59ce4a699b5900efe02bf315be7bd5)
2007-10-10r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,Jeremy Allison1-4/+32
but I've no option. Jeremy. (This used to be commit c3a565081d70b209a4f9e6e8f1859bf7194a5f74)
2007-10-10r20208: Change sprintf_append() never to use malloc,Jeremy Allison1-15/+3
but always use a talloc context. Thanks to simo for pointing this out. Jeremy. (This used to be commit 437cb7c88833d7eab0e3c3dcf175860df74a7a38)
2007-10-10r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison1-1/+3
we never mix malloc and talloc'ed contexts in the add_XX_to_array() and add_XX_to_array_unique() calls. Ensure that these calls always return False on out of memory, True otherwise and always check them. Ensure that the relevent parts of the conn struct and the nt_user_tokens are TALLOC_DESTROYED not SAFE_FREE'd. James - this should fix your crash bug in both branches. Jeremy. (This used to be commit 0ffca7559e07500bd09a64b775e230d448ce5c24)