summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-14s3-lib Remove very unused (#if 0) strncpynAndrew Bartlett1-25/+0
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Apr 14 06:27:31 CEST 2011 on sn-devel-104
2011-04-14s3-lib Remove unused string_appendAndrew Bartlett1-22/+0
2011-04-14s3-lib Move unix_strlower and unix_strupper to their only users.Andrew Bartlett1-0/+41
2011-04-14s3-lib Remove unused str_ascii_charnum()Andrew Bartlett1-18/+0
2011-04-14s3-lib Move strisnormal to it's only user in mangle_hash.cAndrew Bartlett1-13/+0
2011-04-13lib/util: Make string_replace from s3 commonAndrew Bartlett1-43/+0
The s4 implementation didn't do multibyte strings, so was only good for '/' which is known to be safe in all multibyte charsets. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util Move simple string routines into common code.Andrew Bartlett1-49/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-03-30lib/util Move base64 functions into lib/util/base64.cAndrew Bartlett1-115/+0
Andrew Bartlett
2011-03-29=?UTF-8?q?alpha=5Fstrcpy()=20is=20a=20utility=20function=20which=20reportedly:David Disseldorp1-3/+9
=20Strips=20out=20all=20but=20'a-Z0-9'=20and=20the=20character=20in=20other=5Fsafe=5Fchars=20and =20replaces=20with=20'=5F'. =20This=20statement=20does=20not=20currently=20hold=20true=20in=20all=20cases=20(e.g.=20src=20=3D =20"=D0=A2=D0=90=D0=9D=D0=A6=D0=95=D0=92=D0=90=D0=A2=D0=AC").?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
2011-03-23lib/util: Merge basic string length and comparison functionsAndrew Bartlett1-292/+0
These functions now use the codepoints for more accurate string handling and now form common code. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
2011-03-23s3-lib prepare Samba3 to use common codepoint based string functionsAndrew Bartlett1-108/+82
This patch changes the source3 util_str.c functions so that the next patch just contains the move into common code, without code changes. Andrew Bartlett
2011-03-23s3-safe_str: Futher simplify the macros by removing indirectionAndrew Bartlett1-5/+5
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-48/+15
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
2011-03-15s3: Remove some unused codeVolker Lendecke1-41/+0
2011-02-18charset Remove use of {isupper,islower,toupper,tolower}_w functionsAndrew Bartlett1-2/+2
These now call the common _m functions that consider UTF16 code points. This removes the code which will make up a 'lame' table in memory, as this can just as correctly be handled by running the algorithm at runtime (which is to call toupper() and tolower() on characters < 128). When used, a top level waf build will always locate the correct table - in the build tree or outside - due to relinking the installed binary. Andrew Bartlett
2011-02-09Fix up some buildfarm warnings.Jeremy Allison1-1/+1
2011-02-03s3:lib: allow_trailing_dollar should only allow '$'Stefan Metzmacher1-12/+12
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Feb 3 00:33:48 CET 2011 on sn-devel-104
2010-11-10Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when ↵Jeremy Allison1-0/+4
adding new share via MMC Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
2010-11-03s3:util_str: add strlen_m_ext_term() - variant of strlen_m_ext() counting ↵Michael Adam1-0/+9
terminator
2010-11-03s3:lib/util_str: add strlen_m_ext() that takes input and output charsetMichael Adam1-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).
2010-11-03s3:lib/util_str: clarify the comment header for strlen_m().Michael Adam1-4/+6
2010-09-09Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder ↵Jeremy Allison1-0/+3
<andreas.moroder@gmx.net>". Jeremy.
2010-04-11s3: Move sanitize_username to lib/util_str.cVolker Lendecke1-0/+8
2010-03-28s3: Slightly simplify logic in conv_str_sizeVolker Lendecke1-29/+33
2010-03-28s3: Fix indentation in conv_str_sizeVolker Lendecke1-2/+2
2009-09-24Revert 918b5a7e057bd91289ec06b3ef8d95da43a50ede. This codeJeremy Allison1-6/+6
should *not* return const. Jeremy.
2009-09-24s3:util_str "str_list_make_v3" - introduce also here the "const" resultMatthias Dieter Wallnöfer1-9/+9
I did this to match with the default util strlist library.
2009-07-16Replace short-lived NULL talloc contexts with talloc_tos().Jeremy Allison1-17/+17
Jeremy.
2009-07-10Fix our base64 implementation for blobs of length 4....Volker Lendecke1-1/+1
The additional length check bit us exactly at 4, removing it. The torture test survives valgrind up to 2000 bytes :-)
2009-05-28Make sid_binstring & friends take a talloc contextVolker Lendecke1-3/+4
2009-04-30Re-import the v3-3 version of str_list_make().Volker Lendecke1-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
2009-04-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett1-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
2009-03-01Move next_token_talloc() to top-level.Jelmer Vernooij1-112/+0
2008-12-14Move 128 bytes from the data to the text segmentVolker Lendecke1-1/+1
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)