summaryrefslogtreecommitdiffstats
path: root/source3/lib/iconv.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix various build warningsZach Loafman2008-07-221-1/+1
| | | | | | This fixes various build warnings on our platform. I'm sure I haven't caught them all, but it's a start. (This used to be commit 6b73f259cb67d9dda9127907d706f9244a871fa3)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-2/+2
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23572: Ensure we obey Unicode consortium restrictions. CodeJeremy Allison2007-10-101-15/+22
| | | | | | based on patch from MORIYAMA Masayuki <moriyama@miraclelinux.com>. Jeremy. (This used to be commit 0f10d2ed312115998d5ce1dc88a8d9207c9e4959)
* r20133: get rid of defined but not used warning - static function only usedHerb Lewis2007-10-101-5/+2
| | | | | inside the #ifdef HAVE_NATIVE_ICONV (This used to be commit 43ab1d2ba5eb24fc22f8d53c650bf39e95fb133b)
* r15283: Oh yeah. The build farm doesn't do much with head. OK, here is the ↵Paul Green2007-10-101-0/+2
| | | | | | patch to SAMBA_3_0 to declare prototypes for the initialization functions. These are the same changes I just made to head. --paulg (This used to be commit 17774387ad879b6a72dd1cf406326318add31b04)
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2007-10-101-8/+8
| | | | | | x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
* r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter2007-10-101-1/+1
| | | | | | version to 3.0.20pre1 (This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
* r6149: Fixes bugs #2498 and 2484.Derrell Lipman2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | 1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-4/+4
| | | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
* r2231: Fix iconv.c to use the Samba-supplied uint8 type not the uint8_t ↵Paul Green2007-10-101-4/+4
| | | | | | type, which does not exist on all platforms. (This used to be commit acc793ead7e61f1eb87864b676d26f5791367228)
* r2163: converted samba3 to use the new utf-16 aware iconv code. Also changedAndrew Tridgell2007-10-101-64/+208
| | | | | | | iconv to recognise UCS-2LE and UTF-16LE as synonyms, which means this change should be more robust when applied in trees that treat UCS-2LE or UTF-16LE as correct. (This used to be commit 92c9fcaec4299ddc16f9d6568a695b1fe161be33)
* r2114: Shameless theft of iconv commit from Samba4 to keep the two libs more ↵Jeremy Allison2007-10-101-24/+55
| | | | | | | | | in sync :-). try to cope with a wider range of UTF-16 characters when we are using an external libiconv library. Jeremy. (This used to be commit 5d04cd6804f6fc3b556e7c3b53fa0d7af39797c1)
* r938: on an error save the original errno before calling iconv to resetHerb Lewis2007-10-101-1/+5
| | | | | the conversion state (This used to be commit 4a5a122b3a85c653bbf458342400f3b8a69dc615)
* Make more functions static, and remove duplication in the use of functionsAndrew Bartlett2004-02-081-1/+1
| | | | | | | | | | in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c (These should perhaps be pulled back out to smbpasswd.c, but that can occour later). Andrew Bartlett (This used to be commit fcdc5efb1e245c8fa95cd031f67ec56093b9056e)
* Working on #830. Cope with bad conversions better - don't just memcpy butJeremy Allison2004-02-041-1/+0
| | | | | | | | try a crap conversion instead. Next this needs to be done to the convert_alloc function. Actually fixes some valgrind warnings as well - cool ! Jeremy. (This used to be commit 6a7919f2544a689840fe46f3c58ed66f69aca65a)
* Fix #558 -- support ISO-8859-1 internally. Makes Solaris users a bit happierAlexander Bokovoy2003-12-101-0/+28
| | | | (This used to be commit ba95fe56d2db8243191d5dd6b75c6b65e0f5fbe9)
* Put strcasecmp/strncasecmp on the banned list (except for needed callsJeremy Allison2003-10-221-0/+6
| | | | | | | in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit d7e35dfb9283d560d0ed2ab231f36ed92767dace)
* iconv isn't const safe. Neither should smb_iconv be.Jeremy Allison2003-09-271-1/+1
| | | | | Jeremy. (This used to be commit 238bb74c16417140d85a304890b97e04df389ae9)
* Alias charset 646 internally as it is same as ASCII. Should solve Solaris ↵Alexander Bokovoy2003-09-151-0/+1
| | | | | | problems where ASCII was not detected and 646.so were requested through dynamic loading (This used to be commit c248cd4784ac0f8f16813de36d293ab6bf1d259b)
* Undo 'Fix compiler warning'. It didn't work because the value of inbuf ↵Tim Potter2003-07-141-21/+11
| | | | | | | | | | changes so we end up freeing a pointer we didn't mallocate. Also, calling strdup() in a frequently called function just to clear up a const compiler warning seems inelegant and inefficient. (This used to be commit a0da5ae1198082d0cf18707ed2cf05f728b00d0b)
* Fix compiler warning.Rafal Szczesniak2003-07-131-11/+21
| | | | (This used to be commit 3a71b4873034b3fe9dc7b23a95e56c865e857507)
* Use NTSTATUS as return value for smb_register_*() functions and init_module()Jelmer Vernooij2003-04-281-7/+8
| | | | | function. Patch by metze with some minor modifications. (This used to be commit bc4b51bcb2daa7271c884cb83bf8bdba6d3a9b6d)
* Get rid of module_path_get_name() and use the find backend functionJelmer Vernooij2003-04-241-10/+5
| | | | | to find duplicates (This used to be commit 871cad7e9ac38e6f8e4391fcb2894d91300cbe94)
* Add support for the new modules system to lib/iconv.c (merge from HEAD)Jelmer Vernooij2003-04-161-151/+130
| | | | (This used to be commit 64a357017a897d1920c06fc19453470ee517470d)
* Patch from Michael Steffens. In his own words :Jeremy Allison2003-03-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------- I think there are basically two problem: 1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, and SMB_ACL_OTHER. The function ensure_canon_entry_valid() is prepared for that, but tries to "guess" values from group or other permissions, respectively, otherwise falling back to minimum r-- for the owner. Even if the owner had full permissions before setting ACL. This is the problem with W2k clients. 2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs. This is ok in a take-ownership situation, but must fail if the file is to be given away. This is the problem with XP clients, trying to transfer ownership of the original file to the temp file. The problem with NT4 clients (no ACEs are transferred to the temp file, thus are lost after moving the temp file to the original name) is a client problem. It simply doesn't attempt to. I have played around with that using posic_acls.c from 3.0 merged into 2.2. As a result I can now present two patches, one for each branch. They basically modify: 1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER as "preserve current value" instead of attempting to build one ourself. The original code is still in, but only as fallback in case current values can't be retrieved. 2. Rearrange set_nt_acl() such that chown is only done before setting ACLs if there is either no change of owning user, or change of owning user is towards the current user. Otherwise chown is done after setting ACLs. It now seems to produce reasonable results. (Well, as far as it can. If NT4 doesn't even try to transfer ACEs, only deliberate use of named default ACEs and/or "force group" or the crystal ball can help :) ------------------------------------------------------------------------- Jeremy. (This used to be commit 1d3b8c528bebfa1971d1affe454a03453335786e)
* Doxygen merge from headMartin Pool2003-02-271-5/+6
| | | | (This used to be commit 38fa2898967f607a17fd7fbd324f2940a05fb551)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* much better auto-init of valid_table[]. This should just about removeAndrew Tridgell2001-12-201-1/+7
| | | | | the need for valid.dat (This used to be commit 0cfd0a5e543181b1384f7afee93fbaf3ccb2b999)
* get rid of compiler warnings (casts and delete unused variables)Herb Lewis2001-10-231-2/+2
| | | | (This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)
* Add a few const statements to various odd bits of the tree. (Fixes someAndrew Bartlett2001-09-291-1/+1
| | | | | warnings) (This used to be commit b648cc669d16eb40b477c8dc51efeab485a15de5)
* allow all ucs2 chars in utf8, rather than mapping some to a singleAndrew Tridgell2001-09-251-10/+1
| | | | | char like libiconv does (This used to be commit e13e8b190c70136cb2c3588bdcf7328a7f61d152)
* move to SAFE_FREE()Simo Sorce2001-09-171-2/+2
| | | | (This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
* added "display charset" option in smb.conf, along with d_printf()Andrew Tridgell2001-09-071-2/+2
| | | | | | | | | | which should now be used instead of DEBUG(0) or printf() for interactive messages I have only converted client.c to use d_printf(), and the code hasn't had much testing yet. Eventually we want all interactive code to use d_printf(), plus SWAT (This used to be commit 266d8e67669adb329f25676c4bc4d4c50f223428)
* changed the iconv interface to go via ucs2 for all conversions. ThisAndrew Tridgell2001-07-221-71/+186
| | | | | | | fixes some problems wih some character sets and allows for using internal charsets in conjunction with ionv charsets this makes us slower but more correct. speed will come later. (This used to be commit 594f84b4e39182dcf344c02dc0185376a2726395)
* switch from UCS2 to UCS-2LEAndrew Tridgell2001-07-221-15/+1
| | | | (This used to be commit e236a3e29e4af24b20ec6af357ce67abf82b4528)
* fixed a silly bug in the internal UTF8 implementationAndrew Tridgell2001-07-061-1/+14
| | | | (This used to be commit 95a9a1814f1a1ac07c316cc920c7493a86d5a09b)
* added some comments and removed an unnecessary checkAndrew Tridgell2001-07-061-3/+2
| | | | (This used to be commit 25c4b3f19315bdef57041da79c12271b72015701)
* optimised the 7 bit case for utf8 conversionAndrew Tridgell2001-07-051-4/+4
| | | | (This used to be commit 0c61e54f152eca6b7607fcce9ea512bc60a19060)
* make sure we reset the shift state on error for charsets like SJISAndrew Tridgell2001-07-051-1/+10
| | | | (This used to be commit 42648a7aada48220fdfaf6acfe95b9614122f1da)
* added builtin support for UTF8Andrew Tridgell2001-07-041-1/+115
| | | | (This used to be commit 76d83e7f704cf016308dccaad9bc42d57db97686)
* more portability fixesAndrew Tridgell2001-07-041-4/+2
| | | | (This used to be commit bf818268516cfbebcdeacbb0528395e9bbb8e442)
* portability fixesAndrew Tridgell2001-07-041-4/+9
| | | | (This used to be commit 7a5c24c219d8b19f2c3cd11fdde3ebcede0646a2)
* got rid of __FUNCTION__ debugAndrew Tridgell2001-07-041-2/+2
| | | | (This used to be commit 815ca752744c2ae93390445f4bb6532d396bbc59)
* The big character set handling changeover!Andrew Tridgell2001-07-041-0/+346
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)