summaryrefslogtreecommitdiffstats
path: root/source/lib/util_str.c
Commit message (Collapse)AuthorAgeFilesLines
* Small 'const' updates ahead of some AuthRewrite merging.Andrew Bartlett2001-10-311-1/+1
|
* switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell2001-10-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-2/+1
|
* formatting fixesAndrew Tridgell2001-07-061-7/+7
|
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-11/+11
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-627/+181
| | | | | | | 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.
* Replaced memcpy() with memmove() to make safe_strcpy() safe for overlappingTim Potter2001-06-291-1/+1
| | | | source and destination.
* Added other_safe_chars to alpha_strcpy(). Needs testing but is a betterJeremy Allison2001-06-231-4/+8
| | | | | fix for the problem. Jeremy.
* next_token() was supposed to be a reentrant replacement for strtok(),Andrew Tridgell2001-06-211-57/+72
| | | | | | | | | 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
* Needs to be >=, not just >.Jeremy Allison2001-05-101-1/+1
| | | | Jeremy.
* Fix for problem with "" string in trim_string(). Pointed out by Ben Winslow ↵Jeremy Allison2001-05-101-3/+5
| | | | | | <rain@bluecherry.net>. Jeremy.
* Preliminary merge of winbind into HEAD. Note that this compiles and linksTim Potter2001-05-071-21/+0
| | | | but I haven't actually run it yet so it probably doesn't work. (-:
* Added Darwin guess.Jeremy Allison2001-04-151-88/+93
| | | | | | lib/util_str.c: Excellent patch from Kenichi Okuyama <okuyamak@dd.iij4u.or.jp> to speed up trim_string handling ! Jeremy.
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | Jeremy.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/Makefile.in - changes to ctags and etags rules that somehow got lost along the way. source/include/proto.h - make proto source/smbd/sec_ctx.c source/smbd/password.c - merge debugs for debugging user groups and NT token stuff. source/lib/util_str.c - capitalise domain name returned from parse_domain_user() source/nsswitch/wb_client.c - fix broken conditional in debug statement. source/include/rpc_secdes.h source/include/rpc_spoolss.h source/printing/nt_printing.c source/lib/util_seaccess.c - fix printer permission bugs related to ACE masks for printers. This adds mapping of generic access rights to object specific rights for NT printers. Still need to work out whether or not to ignore ACEs with certain flags set, though. See comments in util_seaccess.c:check_ace() for details. source/printing/nt_printing.c source/printing/printing.c - use PRINTER_ACCESS_ADMINISTER instead of JOB_ACCESS_ADMINISTER until we sort out printer/printjob permission stuff.
* needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter2000-08-291-0/+30
| | | | | | | | and made it non-static --jerry
* Merged parse_domain_user() from TNG.Tim Potter2000-06-141-0/+20
|
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-23/+51
| | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy.
* make string_init() staticAndrew Tridgell2000-01-161-1/+1
| | | | use string_set() instead, to avoid the bug Richard discovered
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-129/+152
|
* modified domain_client_validate to take trust account name / type. thisLuke Leighton1999-11-201-1/+33
| | | | | | | | | | is to pass DOMAIN_NAME$ and SEC_CHAN_DOMAIN instead of WKSTA_NAME$ and SEC_CHAN_WKSTA. modified check_domain_security to determine if domain name is own domain, and to use wksta trust account if so, otherwise check "trusting domains" parameter and use inter-domain trust account if so, otherwise return False.
* - typecast malloc / Realloc issues.Luke Leighton1999-10-251-1/+1
| | | | - signed / unsigned issues.
* - added rudimentary CAP_UNICODE support because i thought it was part ofLuke Leighton1999-10-071-1/+1
| | | | | | | | | | | | | | | | | 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*.
* allow safe_strcpy() to pass 0 for max length of string, resulting in noLuke Leighton1999-07-081-0/+5
| | | | effect.
* Same infinite loop bug as I fixed in SAMBA_2_0, but I just spent halfMatthew Chapman1999-03-231-4/+4
| | | | an hour tracking it down in HEAD so I'm going to commit it here as well.
* bitmap to stringsLuke Leighton1999-02-161-0/+70
|
* Makefile.in: Added maintainer mode fixes.Jeremy Allison1998-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | aclocal.m4: Added AC_LIBTESTFUNC. configure.in: Fixed -lsecurity -lsec problems. client.c: dos_ fixes. groupdb/aliasunix.c: Dead code removal. include/includes.h: Added default PRINTCAP_NAME. lib/genrand.c: dos_ fixes. lib/replace.c: Added strtoul. lib/system.c: dos_ fixes. lib/util.c: dos_ fixes. lib/util_sid.c: Signed/unsigned fixes. lib/util_str.c: removed bad const. locking/locking_slow.c: dos_ fixes. printing/printing.c: dos_ fixes. rpc_server/srv_samr.c: Dead code removal. rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN ! smbd/dir.c: dos_ fixes. smbd/open.c: dos_ fixes. smbd/oplock.c: dos_ fixes. smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes. Jeremy.
* unused variable removedLuke Leighton1998-11-231-1/+1
|
* replace ' with _ as wellAndrew Tridgell1998-11-231-1/+2
|
* changed string_sub() to replace " ; and ` in the inserted string with _Andrew Tridgell1998-11-231-19/+52
| | | | use all_string_sub() if you don't want this.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-35/+35
| | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy.
* largely rewrote smbpasswd so that the code is understandable. ThisAndrew Tridgell1998-11-121-4/+4
| | | | | | | | | | | | | should allow us to call a function in swat rather than piping to smbpasswd. while doing this I also fixed quite a few "const char *" versus "char *" issues that cropped up while using const to track down bugs in the code. This led to changes in several generic functions. The smbpasswd changes should be correct but they have not been extensively tested. At least if I have introduced bugs then we should be able to fix them more easily than before.
* changed syntax of registry commands so keys can start with HKLM or HKU.Luke Leighton1998-11-111-0/+31
| | | | sorted lookupsids command
* rpcclient registry commands.Luke Leighton1998-11-101-0/+50
|
* split string and unicode string routines into these files.Luke Leighton1998-11-051-0/+976
these are *not* going to be added into the Makefile.in yet so they still also exist in util.c.