summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
AgeCommit message (Collapse)AuthorFilesLines
2003-05-28Merge of rpcstr_pull() termination fixes from 3.0Tim Potter1-1/+4
(This used to be commit d41705dec6bed752acfe3210c73a949101dc23f6)
2003-04-23Merge case handling table changes from 3.0 to HEAD.Andrew Bartlett1-10/+8
(This used to be commit 263407e132dcb1f7fc85cded9842e60918f8ef4b)
2003-04-08Merge from 3_0: Build a lookup table of valid DOS characters justMartin Pool1-0/+48
once, when init_iconv is first called. Use this in check_dos_char rather than doing the conversion every time. Much faster. (This used to be commit e8f1399323745a93ba9df97553effcf2d7629850)
2003-02-26init_valid_table: Fix a memory leak that would lose theMartin Pool1-8/+15
dynamically-created valid table every time the configuration was reloaded. (This used to be commit e42b237d980461caf2dd2a8f82c17bf674facb7d)
2003-02-21Doxygen janitorMartin Pool1-3/+10
(This used to be commit 367997562998adb3f80602596c770d9ac319065b)
2003-01-29Return 0 instead of crashing when a NULL source string is passedTim Potter1-0/+1
to rpcstr_pull() (This used to be commit b9c4cc119588d6a564f0aaf12fd2ef867a42aeb8)
2002-11-08patches from UrbanGerald Carter1-0/+2
(This used to be commit da269a73edb7f637b1e1f8b3dafe677f46f66f85)
2002-10-21reverted an incorrect fix. What I was trying to do was fix a problemAndrew Tridgell1-1/+1
with filenames with spaces in mangle_hash.c but the real problem is that mangle_hash.c assumes that the set of valid characters for 8.3 names is the same as the set of valid characters for long names. Thats an invalid assumption, with space being the obvious example. (This used to be commit e0065f4db4a1cfae03a3bb86e5cfea9c45dfa1c3)
2002-10-21a space is a standard valid character in a filenameAndrew Tridgell1-1/+1
(This used to be commit 0db79d4a379a502362c230a9019d5d71f5af8e0e)
2002-08-22added a useful unistr2 display functionAndrew Tridgell1-0/+10
(This used to be commit f4581133649b5208d8f91c4995ef60579e04b6f6)
2002-04-14Partly based on the work by mimir (Rafal SzczesniakAndrew Bartlett1-0/+41
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly enumerate its trusted domains - by exaimining the keys in the secrets.tdb file. This patch has been tested with both NT4 and rpcclient/wbinfo, and adds some extra functionality to talloc and rpc_parse to allow it to deal with already unicode strings. Finally, this cleans up some const warnings that were in net_rpc.c by pushing another dash of const into the rpc client code. Andrew Bartlett (This used to be commit 0bdd94cb992b40942aaf2e5e0efd2868b4686296)
2002-03-26OpenPrinter() merge from 2.2Gerald Carter1-0/+32
(This used to be commit 619397cc90549d4602ecddc25ee50eb247c913ee)
2002-03-21must use native endian index when creating default valid.dat table so itHerb Lewis1-2/+2
is the same on big and little endian systems. (This used to be commit 6fa09ee88143882abcc51de05002261db767d775)
2002-03-06fixed the upper/lower case table generation on big-endian machinesHerb Lewis1-9/+26
(tridge, using Herbs console) (This used to be commit e5d80779a384c9a806fc545032330f760d8c11cb)
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-12-20fixed warnings on irix and crash bug on big endian machinesAndrew Tridgell1-1/+5
(This used to be commit cc6c263993eaf0715f231fc80ca7e6e65694548b)
2001-12-20much better auto-init of valid_table[]. This should just about removeAndrew Tridgell1-7/+43
the need for valid.dat (This used to be commit 0cfd0a5e543181b1384f7afee93fbaf3ccb2b999)
2001-12-20mark '.' as a valid characterAndrew Tridgell1-1/+1
(This used to be commit 85f04fa61dffb15bc034dd756ee75b997a36d892)
2001-12-01The beginnings of alternative backends for winbinddAndrew Tridgell1-0/+17
This just splits off the dispinfo call behind a methods structure. I'll split off a few more functions soon, then we will be ready for LDAP replacement methods (This used to be commit 0216b0fca115c903ec31ed21427a83c62077dc95)
2001-11-29fixed typoAndrew Tridgell1-1/+1
(This used to be commit 624cb28271289aa697f23c32f7b5159f6fcbb51d)
2001-11-29fixed toupper_w() and friends on big-endianAndrew Tridgell1-6/+6
this fixes the core dumps on sparc (This used to be commit e6004062a508b1fe6dd7f93d8a933da9916598f8)
2001-11-292nd attempt at fixing lame char tables on big endian machinesAndrew Tridgell1-6/+6
(This used to be commit 80841f5763b3ab03a82ab0a18a9126d89ffed2d5)
2001-11-29fixed lame char tables on big endian machinesAndrew Tridgell1-5/+5
(This used to be commit 568425709d11b2eed86643d18973542d0504d5ca)
2001-11-18fixed some bugs.Simo Sorce1-9/+5
(This used to be commit 37edaeddce09193450b18b1b85aa41960cb39741)
2001-11-12some bugfix and new functions,Simo Sorce1-3/+42
modified mangle.c to use mosltly acnv_????() functions. this should make also build farm happy (This used to be commit 8bb5cb27c2012b8967482255d48a1b48d3acd9db)
2001-11-10fixed, moved and added some functionsSimo Sorce1-93/+112
note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c (This used to be commit 64dde3b64fc091cda95fc4ed145595b5d79b2e01)
2001-11-04Added missing strchr_wa.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 16c5d279b97250ceb84ee6de6e5e801350c816c4)
2001-11-04a big one:Simo Sorce1-23/+182
- old mangle code has gone, the new one based on tdb seem resonably ok probably the valid.dat table need to be updated to treat wild chars as invalid ones (work ok without it) - a LOT of new string manipulation function for unicode, they are somewhat tested but a review would not be bad - some new function I will need for the new unix_convert function I'm writing, this will be renamed filename_convert and use only unicode strings. - charconv, I attached a comment, if someone wnat to look if I'm right or just was hacking to late in the night to make a sane one :) of course any bug is my responsibility an will be pleased to see patches if you find any. :-) Simo. (This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
2001-11-04remove {} from default valid char listAndrew Tridgell1-1/+1
(This used to be commit 5dd3c7b3fb8aac7fb3a256ae40c882fb8983537f)
2001-10-09old fixes I forgot to commitSimo Sorce1-5/+5
(This used to be commit 7895593929f443c6a256d2a13035aee11bed3dbf)
2001-10-07fixed lame valid tableAndrew Tridgell1-2/+2
(This used to be commit 67017619afed8fe10abd65d54538348d3ea92b9f)
2001-10-03fixed basic ucs2 operation on big endian boxes. Still a bit more toAndrew Tridgell1-5/+5
do, but at least you can connect now. (This used to be commit 211aeffa1a770716f798fd6ba12ab29a95555526)
2001-10-03switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell1-69/+70
for unicode strings. The new method relies on 3 files that are mmap'd at startup to provide the mapping tables. The upcase.dat and lowcase.dat tables should be the same on all systems. The valid.dat table says what characters are valid in 8.3 names, and differs between systems. I'm committing the japanese valid.dat here, in future we need some way of automatically installing and choosing a appropriate table. This commit also adds my mini tdb based gettext replacement in intl/lang_tdb.c. I have not enabled this yet and have not removed the old gettext code as the new code is still being looked at by Monyo. Right now the code assumes that the upcase.dat, lowcase.dat and valid.dat files are installed in the Samba lib directory. That is not a good choice, but I'll leave them there until we work out the new install directory structure for Samba 3.0. simo - please look at the isvalid_w() function and think about using it in your new mangling code. That should be the final step to correctly passing the chargen test code from monyo. (This used to be commit 1c221994f118dd542a158b2db51e07d04d0e9314)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-3/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-30make strupper() and strlower() not modify the string if it doesn'tAndrew Tridgell1-4/+14
need modifying that makes constant strings OK (This used to be commit 57196635d9b7edfcbfe1708dd22308ab30c02240)
2001-09-25- the inactive core of the new mangling code that use tdbSimo Sorce1-0/+107
- some more utils for unicode string manipulation (This used to be commit 4ade36446e7dee1c3828d8c822f047c6e891a644)
2001-08-24fixes big endian unistring problems. Need to check that it didn'tHerb Lewis1-2/+9
break little-endian machines. (This used to be commit 0f08e79030419b778c1229712c98b839faaf734f)
2001-07-20It looks like the rpc client code in libsmb hasn't been converted to theTim Potter1-0/+10
new internal string stuff. The main problem is that some unicode strings are null terminated and some aren't. There's no rhyme or reason to it - some pipes have 99% of the strings terminated and some have 99% unterminated. To avoid having to actually know the termination policy, I propose a set of functions that take a UNISTR2* and use the length contained there. Added rpcstr_pull_unistr2_string() function to convert a unicode string of dubious termination to a fstring. (This used to be commit e5b62b4961769e45bc377be6180ca61ef5f6c22e)
2001-07-18removed some unnecessary codeAndrew Tridgell1-10/+0
(This used to be commit 1436c9f424abbac2752e952172ddbdf15ec73f91)
2001-07-06fixed strrchr_mAndrew Tridgell1-4/+3
(This used to be commit f4359b5f7ff891d7fcb5772b589756376ae5d412)
2001-07-04unicode string length is twice longer ;-)Jean-François Micouleau1-1/+1
(This used to be commit d39d8429d1cb8a976022ae92a1ce551f7d876aff)
2001-07-04The big character set handling changeover!Andrew Tridgell1-1573/+71
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-06-23Added other_safe_chars to alpha_strcpy(). Needs testing but is a betterJeremy Allison1-2/+6
fix for the problem. Jeremy. (This used to be commit e059fffd03a1382fb2b7059b6de369d9fc765a17)
2001-06-21next_token() was supposed to be a reentrant replacement for strtok(),Andrew Tridgell1-150/+0
but the code suffered from bitrot and is not now reentrant. That means we can get bizarre behaviour i've fixed this by making next_token() reentrant and creating a next_token_nr() that is a small non-reentrant wrapper for those lumps of code (mostly smbclient) that have come to rely on the non-reentrant behaviour (This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
2001-06-12Fix from TAKAHASHI Motonobu <monyo@samba.gr.jp> for multibyte conversionJeremy Allison1-30/+16
problems. Jeremy. (This used to be commit 24eea8a309ff0151277b9537a5c00321041e70d3)
2001-04-08Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-03-15AS/U on a sparc now joins and authenticates against a Samba PDC !Jeremy Allison1-69/+1
Jeremy. (This used to be commit 28a0bc5f5710aa732db662caa38f9da2138b5db2)
2001-03-13Fixed reading of strings from big-endian RPC clients.Jeremy Allison1-0/+68
Jeremy. (This used to be commit e7ecb9410ff2e4fcd33bca9f82e14c060590942a)
2001-02-21make ascii_to_unistr always use little-endian. This fn is never usedAndrew Tridgell1-2/+5
except in my code so I know this is safe. otherwise unicode client lib doesn't work on big-endian hosts (This used to be commit 18ede716d10de1ac774cca82b4b8ff5ea1a9650d)
2001-02-20initial client side unicode support (needed for netapp filer)Andrew Tridgell1-1/+1
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)