summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
AgeCommit message (Collapse)AuthorFilesLines
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)
2002-01-25minor fixesSimo Sorce1-3/+4
(This used to be commit 04f492980b73800b60dde764fdeb43f2eab79624)
2002-01-16Roll back PSTRING_SANCTIFY patch; just leave non-controversial typeMartin Pool1-2/+2
and constness changes. (This used to be commit cee0ec72746122c962e6c5278a736266a7f2c424)
2002-01-15Add constness to filenames passed to functions.Martin Pool1-0/+25
(This used to be commit 8d106dc1f4a51112516d72ae68747ca6b5b904b7)
2001-12-20fixed warnings on irix and crash bug on big endian machinesAndrew Tridgell1-2/+2
(This used to be commit cc6c263993eaf0715f231fc80ca7e6e65694548b)
2001-12-10make sid_binstring available without HAVE_ADSAndrew Tridgell1-0/+23
(This used to be commit 4a6d29768665f71b72cf48ee34ee9a9c451232f6)
2001-11-18fixed some bugs.Simo Sorce1-9/+14
(This used to be commit 37edaeddce09193450b18b1b85aa41960cb39741)
2001-11-14Removed unused variable.Tim Potter1-1/+0
(This used to be commit c8c7da237dc17d9b785bc15b9b569caeeb6d283e)
2001-11-04a big one:Simo Sorce1-5/+62
- 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-10-31Small 'const' updates ahead of some AuthRewrite merging.Andrew Bartlett1-1/+1
(This used to be commit 3b5e72bda3263c6bdf81dfface4fae4f06b71032)
2001-10-03switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell1-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. (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-17move to SAFE_FREE()Simo Sorce1-2/+1
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
2001-07-06formatting fixesAndrew Tridgell1-7/+7
(This used to be commit 67ca6cd8eb20621d3f5926e19822b479ac80cb9c)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-11/+11
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-29Replaced memcpy() with memmove() to make safe_strcpy() safe for overlappingTim Potter1-1/+1
source and destination. (This used to be commit 30411d4004ce7062e73506d228ef402b99226eee)
2001-06-23Added other_safe_chars to alpha_strcpy(). Needs testing but is a betterJeremy Allison1-4/+8
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-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 (This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
2001-05-10Needs to be >=, not just >.Jeremy Allison1-1/+1
Jeremy. (This used to be commit fa6a5bf94a3716c0554e2bcbe0eb4b0912f15604)
2001-05-10Fix for problem with "" string in trim_string(). Pointed out by Ben Winslow ↵Jeremy Allison1-3/+5
<rain@bluecherry.net>. Jeremy. (This used to be commit df2e306171f0a71af77dbaafc7ccbf78e27befb8)
2001-05-07Preliminary merge of winbind into HEAD. Note that this compiles and linksTim Potter1-21/+0
but I haven't actually run it yet so it probably doesn't work. (-: (This used to be commit 59f95416b66db6df05289bde224de29c721978e5)
2001-04-15Added Darwin guess.Jeremy Allison1-88/+93
lib/util_str.c: Excellent patch from Kenichi Okuyama <okuyamak@dd.iij4u.or.jp> to speed up trim_string handling ! Jeremy. (This used to be commit 4bb63ba615c735a298a6cbda2c87242695104978)
2001-04-08Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-01-04Changes from APPLIANCE_HEAD:David O'Neill1-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. (This used to be commit 1dba9c5cd1e6389734c648f6903abcb7c8d5b2f0)
2000-08-29needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter1-0/+30
and made it non-static --jerry (This used to be commit dfdca21bd90b9c83f195d580ec9d774f1be8f9cb)
2000-06-14Merged parse_domain_user() from TNG.Tim Potter1-0/+20
(This used to be commit f64ac9d9068901862290f7b25874156d6f0d4d73)
2000-01-26Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison1-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. (This used to be commit e5a3deba46ea2d4cb49a6c4b73edd766fe8b5a5c)
2000-01-16make string_init() staticAndrew Tridgell1-1/+1
use string_set() instead, to avoid the bug Richard discovered (This used to be commit fdcbf6b52d8373bf8f35718a9649788415c23342)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-129/+152
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-11-20modified domain_client_validate to take trust account name / type. thisLuke Leighton1-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. (This used to be commit 97ec74e1fa99d773812d2df402251fafb76b181c)
1999-10-25- typecast malloc / Realloc issues.Luke Leighton1-1/+1
- signed / unsigned issues. (This used to be commit c8fd555179314baf1672a23db34dc8ad9f2d02bf)
1999-10-07- added rudimentary CAP_UNICODE support because i thought it was part ofLuke Leighton1-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*. (This used to be commit e5b80bd2f76fda70e41e4a9007eb035dab92ed8e)
1999-07-08allow safe_strcpy() to pass 0 for max length of string, resulting in noLuke Leighton1-0/+5
effect. (This used to be commit 47e54d049a4de3c2154b1e5edc3234b88bcc065f)
1999-03-23Same infinite loop bug as I fixed in SAMBA_2_0, but I just spent halfMatthew Chapman1-4/+4
an hour tracking it down in HEAD so I'm going to commit it here as well. (This used to be commit 9a482aedb2c4eb7439e2edc092642d315d2a595b)
1999-02-16bitmap to stringsLuke Leighton1-0/+70
(This used to be commit ba5919bcaefa792bae503c7ab19d4b7bbf9bb954)
1998-11-25Makefile.in: Added maintainer mode fixes.Jeremy Allison1-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. (This used to be commit 6acb4b68f68d516e2ac3c47e500f5600d653435e)
1998-11-23unused variable removedLuke Leighton1-1/+1
(This used to be commit 16ac5c89b7417a6aa2596c5c7fbb1fa7542accfd)
1998-11-23replace ' with _ as wellAndrew Tridgell1-1/+2
(This used to be commit e93491953a2555401a372de74ac2aee0cc44cb88)
1998-11-23changed string_sub() to replace " ; and ` in the inserted string with _Andrew Tridgell1-19/+52
use all_string_sub() if you don't want this. (This used to be commit a3357ab49335106674fe7a7481cd0f146d74fbe5)
1998-11-17Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1-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. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
1998-11-12largely rewrote smbpasswd so that the code is understandable. ThisAndrew Tridgell1-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. (This used to be commit 713864dd0322ae2ae2d83e333d85be35a7eed4ec)
1998-11-11changed syntax of registry commands so keys can start with HKLM or HKU.Luke Leighton1-0/+31
sorted lookupsids command (This used to be commit 13a0ee851fe0ce9acddfe57f9aba19fc78085c39)
1998-11-10rpcclient registry commands.Luke Leighton1-0/+50
(This used to be commit 36fcb4a6e643a05d06a2a273d74318fee7f2c647)
1998-11-05split string and unicode string routines into these files.Luke Leighton1-0/+976
these are *not* going to be added into the Makefile.in yet so they still also exist in util.c. (This used to be commit 3f5feda6749dace6bc51fb0e02b16d2b72a930b8)