summaryrefslogtreecommitdiffstats
path: root/source/lib/util_unistr.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix from TAKAHASHI Motonobu <monyo@samba.gr.jp> for multibyte conversionJeremy Allison2001-06-121-30/+16
| | | | | problems. Jeremy.
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-2/+2
| | | | Jeremy.
* AS/U on a sparc now joins and authenticates against a Samba PDC !Jeremy Allison2001-03-151-69/+1
| | | | Jeremy.
* Fixed reading of strings from big-endian RPC clients.Jeremy Allison2001-03-131-0/+68
| | | | Jeremy.
* make ascii_to_unistr always use little-endian. This fn is never usedAndrew Tridgell2001-02-211-2/+5
| | | | | | except in my code so I know this is safe. otherwise unicode client lib doesn't work on big-endian hosts
* initial client side unicode support (needed for netapp filer)Andrew Tridgell2001-02-201-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.
* Removed uninitialised variable.Jeremy Allison2000-12-201-1/+0
| | | | Jeremy.
* A couple more UMR fixes.Jeremy Allison2000-12-181-2/+2
| | | | Jeremy.
* Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosingJeremy Allison2000-12-151-5/+5
| | | | | | | function. lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised memory reads. Jeremy.
* lib/util_unistr.c:Jean-François Micouleau2000-12-151-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes. rpc_parse/parse_misc.c: rpc_parse/parse_prs.c: rewrote of BUFFER5 handling to NOT byteswap when it was already in network byte order. rpc_parse/parse_samr.c: cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2 bytes. rpc_server/srv_lsa.c: UNISTR2 strings need to be NULL terminated to pleased W2K. rpc_server/srv_spoolss_nt.c: use snprintf instead of safe_strcpy as we want the string truncated at 32 chars. That should fix SUN and SGI box not able to act as printserver and the problem with joining from a W2K wks. J.F.
* Use lp_codepagedir() instead of CODEPAGEDIR when loading the unicode map.Tim Potter2000-12-011-2/+3
| | | | Found by Joseph Cheek <joseph@cheek.com>
* Fixed nasty size wrong bug spotted by the eagle eyes ofJeremy Allison2000-10-101-1/+1
| | | | | JF :-). Jeremy.
* Adding Herb's compile warning fixes to HEAD.Jeremy Allison2000-10-041-4/+4
| | | | Jeremy.
* utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison2000-10-031-0/+14
| | | | | mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy.
* fixed unistr_to_ascii to deal with NULL src stringsGerald Carter2000-08-121-14/+14
| | | | jerry
* Deal will NULL UNISTR in unistr_to_asciiGerald Carter2000-08-101-13/+21
| | | | jerry
* More rpcclient merge issues:Gerald Carter2000-07-071-0/+46
| | | | | | | | | | | | * fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry
* lib/util_unistr.c: Off-by-one fix for dos_PutUniStr from John Reilly ↵Jeremy Allison2000-06-231-1/+1
| | | | | | | jreilly@hp.com. Memory leak fix for new sec_ctx code (sorry Tim :-). Jeremy.
* lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison2000-06-221-48/+3
| | | | | | | | | Removed unistr_to_ascii() as it was never used. printing/nt_printing.c: Removed "DUMMY.XX" files. rpc_server/srv_spoolss_nt.c: Use dos_PutUniCode() instead of ascii_to_unistr(). Attempted to fix the "return value" size code based on J.F's comments. This needs looking at. Jeremy.
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-1/+1
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* unistr_to_dos not unistr_to_asciiLuke Leighton2000-05-271-0/+22
|
* Added unicode_to_dos_char() function to address converting single UNICODEJeremy Allison2000-05-121-0/+22
| | | | | characters to one or more DOS codepage characters. Jeremy.
* lib/util_unistr.c:Jeremy Allison2000-05-101-11/+15
| | | | | | | | | | libsmb/clilist.c: rpc_server/srv_spoolss_nt.c: smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion. msdfs/msdfs.c: Removed stub unistr_to_dos. libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and don't add any security. Jeremy.
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-301-23/+16
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy.
* use macros for table boundariesAndrew Tridgell2000-04-151-6/+9
|
* a quick hack to reduce the size of the unicode map table headers fromAndrew Tridgell2000-04-151-9/+39
| | | | | | | 3MB to 250k. I split the table into 3 sections, after noticing that 5/6 of the table was empty.
* added a cheap and nasty skip_unibuf() fn to allow easier merging fromAndrew Tridgell2000-04-111-0/+10
| | | | | | TNG out unicode string handling functions need a lot of work
* changed the definition of dos_PutUniCodeAndrew Tridgell2000-03-271-4/+9
| | | | | | | | | the previous definition could result is us overflowing a buffer. The null termination was always added yet the size returned did not include the null termination. the new function takes a BOOL null_terminate, and always returns the total number of bytes consumed by the string.
* Correctly convert from little-endian UNICODE to dos_codepage when doingJeremy Allison2000-03-221-0/+2
| | | | | secure file create. Jeremy.
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-221-51/+14
| | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy.
* Hum, I should remove my gloves when I'm in front of an xterm :)Jean-François Micouleau2000-02-071-2/+2
| | | | | | fixed a stupid bug in unistr2_to_ascii that I introduced fixed getprinterdata()
* Jeremy can you check lib/util_unistr.c for codepages support ?Jean-François Micouleau2000-02-071-0/+97
| | | | | | | I added 2 UNICODE <-> ASCII functions which _don't_ honor codepage support. J.F.
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-3/+3
| | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy.
* Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.Jeremy Allison1999-12-291-37/+875
| | | | Jeremy.
* Fixed range checking in unicode to multibyte function. Oops.Jeremy Allison1999-12-231-9/+15
| | | | Jeremy.
* Added wtoupper/wtolower.Jeremy Allison1999-12-231-0/+19
| | | | Jeremy.
* Samba now includes a full ucs2 upper to lower case (and vica versa) map table.Jeremy Allison1999-12-231-0/+56
| | | | Jeremy.
* include/includes.h: Trimmed down unicode directory entry to be POSIX complient.Jeremy Allison1999-12-221-0/+14
| | | | | | lib/system.c: Trimmed down unicode directory entry to be POSIX complient. lib/util_unistr.c: Added wstrdup(). Jeremy.
* Ok - we now have the following functions for UNICODE support :Jeremy Allison1999-12-221-0/+127
| | | | | | | | | | | | | | | | | unicode_to_unix() unix_to_unicode() unicode_to_dos() dos_to_unicode() wstrlen() safe_wstrcpy() safe_wstrcat() wstrcmp() wstrncmp() wstrstr() wstrchr() wstrrchr() wstrtok() Jeremy.
* Added new unicode functions - not used yet, but are the basis for theJeremy Allison1999-12-211-1/+209
| | | | | internal unicode conversion of Samba. Jeremy.
* Unicode conversion fix in Japanese environment from Motonobu TAKAHASHI.Jeremy Allison1999-12-131-2/+2
| | | | Jeremy.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-194/+445
|
* samuserset <username> -p password. YESSSSS :)Luke Leighton1999-11-041-6/+16
| | | | you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no).
* had to move unistr2_dup(), unistr2_free() and unistr2_copy() intoLuke Leighton1999-11-031-0/+34
| | | | util_unistr.c in order to get bin/testparm to compile.
* NetServerTransportEnum parsing, client-side and rpcclient "srvtransports" added.Luke Leighton1999-10-301-0/+23
|
* - typecast malloc / Realloc issues.Luke Leighton1999-10-251-8/+8
| | | | - signed / unsigned issues.
* - added rudimentary CAP_UNICODE support because i thought it was part ofLuke Leighton1999-10-071-2/+3
| | | | | | | | | | | | | | | | | a problem i was having. - added rudimentary CAP_STATUS32 support for same reason. - added hard-coded, copy-the-same-data-from-over-the-wire version of CAP_EXTENDED_SECURITY, which is a security-blob to encapsulate GSSAPI which encodes SPNEGO which is used to negotiate Kerberos or NTLMSSP. i have implemented NTLMSSP which negotiates NTLMv1 or NTLMv2 and 40-bit or 128-bit etc. i have implemented NTLMv1 / 40-bit. *whew*.
* Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. AMatthew Chapman1999-04-081-2/+3
| | | | | BUFFER2 is really a "unibuf" in my terminology and we should treat it as such.
* Always null-terminate strings.Matthew Chapman1999-02-151-16/+33
|