summaryrefslogtreecommitdiffstats
path: root/source/lib/util_str.c
Commit message (Collapse)AuthorAgeFilesLines
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23518: Remove the silly assumption that string_replace requires a pstring.Volker Lendecke2007-06-161-18/+42
| | | | | | | | Jeremy, I am always very confused about the different length arguments in convert_string and friends. Can you take a look at the change in string_replace and verify it's ok? Thanks! While at it, remove the pstring limit for strhasupper and strhaslower.
* r23356: We missed to add the 'c' character to the list of valid ones forSimo Sorce2007-06-051-1/+1
| | | | | | | | shell escaping. I hate this kind of bugs more than how Jeremy hates off by ones :( Simo.
* r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branchesGerald Carter2007-05-141-0/+163
|
* r22045: As Volker noticed, skip_string's last argument isJeremy Allison2007-04-021-15/+11
| | | | | redundent. Remove it. Jeremy.
* r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,Jeremy Allison2007-03-301-4/+32
| | | | | but I've no option. Jeremy.
* r20208: Change sprintf_append() never to use malloc,Jeremy Allison2006-12-161-15/+3
| | | | | | but always use a talloc context. Thanks to simo for pointing this out. Jeremy.
* r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison2006-12-091-1/+3
| | | | | | | | | | | | | we never mix malloc and talloc'ed contexts in the add_XX_to_array() and add_XX_to_array_unique() calls. Ensure that these calls always return False on out of memory, True otherwise and always check them. Ensure that the relevent parts of the conn struct and the nt_user_tokens are TALLOC_DESTROYED not SAFE_FREE'd. James - this should fix your crash bug in both branches. Jeremy.
* r19810: more merge work....does not compile currently. Working on smbd mergeGerald Carter2006-11-211-5/+6
|
* r19806: merge time.c changesGerald Carter2006-11-201-55/+230
|
* r17866: Fix possible null deref - found by Stanford checker.Jeremy Allison2006-08-281-1/+1
| | | | Jeremy.
* r17862: Fix possible NULL deref (like rev 17861) found by theJeremy Allison2006-08-281-1/+3
| | | | | Stanford group. Jeremy.
* r16674: After removing each individual post-3.0.23rc3 change:Gerald Carter2006-06-291-0/+3
| | | | | | | | | | | | | | This pulls is what I considered safe fixes from SAMBA_3_0. This boiled down to either Klocwork fixes or obvious compiler warning fixes. I did not include any changes to fnuction signatures not the version change to the passdb API. Also pulled in the 3 nmbd fixes requested by Jeremy and the wildcard delete fix. This code will sit for a few days in the cooker and then become 3.0.23 if nothing blows up. I don't care how many more compile warning fixes people throw into SAMBA_3_0.
* r16418: Pull in more Klocwork fixes (up to r16415)Gerald Carter2006-06-201-2/+8
|
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-1/+17
|
* r15003: patch based on code from Arkady Glabek <aglabek@centeris.com> to ↵Gerald Carter2006-04-081-9/+3
| | | | ensure that global memory is freed when unloading pam_winbind.so (needs more testing on non-linux platforms)
* r13975: Re-fix Coverity #156 - I had left the hidden arg. inconsistentJeremy Allison2006-03-071-1/+2
| | | | | between Realloc and realloc_array. Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r13622: Allow to rename machine accounts in a Samba Domain. This still uses theGünther Deschner2006-02-221-3/+8
| | | | | | | "rename user script" to do the rename of the posix machine account (this might be changed later). Fixes #2331. Guenther
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-5/+5
| | | | macro which sets the freed pointer to NULL.
* r13393: Do not initialize the lp_svcctl_list() value since it is handledGerald Carter2006-02-081-0/+3
| | | | | | internally in services_db.c now. This prevents internal services from being listed twice (one internal and one external) when no 'svcctl list' parameter is explcitly set in smb.conf
* r13316: Let the carnage begin....Gerald Carter2006-02-031-12/+87
| | | | Sync with trunk as off r13315
* r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")Jeremy Allison2005-12-271-8/+8
| | | | | | and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy.
* r12313: Introduce yet another copy of the string_sub function:Volker Lendecke2005-12-181-1/+73
| | | | | | | | | | talloc_string_sub. Someone with time on his hands could convert all the callers of all_string_sub to this. realloc_string_sub is *only* called from within substitute.c, it could be moved there I think. Volker
* r9282: Whitespace.Jeremy Allison2005-08-121-10/+10
| | | | Jeremy.
* r9271: Fix problems with german umlauts - strcmp_w was broken (needs to ↵Jeremy Allison2005-08-121-5/+5
| | | | | | | always re-call macro on termination). Fix all other cases where this was also occurring. Jeremy.
* r9201: Ouch.... :-(Volker Lendecke2005-08-071-1/+1
|
* r9198: Convert hex_encode and strhex_to_data_blob to take a talloc context.Volker Lendecke2005-08-071-5/+11
| | | | Volker
* r8686: Revert %LOGONSERVER%-substitution. The substition is done on the client,Günther Deschner2005-07-211-3/+12
| | | | | | | | | | | not on the server. We now preserve this windows variable (important for vampired setups) and correctly substitute only the "%L"s in strings like: "%LOGONSERVER% %L %lOgOnSeRvEr% %L". Guenther
* r8506: BUG 2853: don't strip out characters like '$' from printer namesGerald Carter2005-07-151-3/+12
| | | | when substituting for the lpq command.
* r8189: commit vampire ldif patch, mostly from Don Watson ↵Jim McDonough2005-07-061-0/+27
| | | | | | | | | | (dwatson@us.ibm.com). Yes, that's my copyright...that's just how we have to do things at big blue. Adds subcommand to vampire to allow data to be put into an ldif file instead of actually writing to the passdb. See "net rpc help vampire" for usage info. This should be added to docs as well.
* r7415: * big change -- volker's new async winbindd from trunkGerald Carter2005-06-081-0/+66
|
* r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter2005-05-311-11/+11
| | | | version to 3.0.20pre1
* r6149: Fixes bugs #2498 and 2484.Derrell Lipman2005-03-311-11/+11
| | | | | | | | | | | | | | | | | | 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.
* r6014: rather large change set....Gerald Carter2005-03-231-0/+14
| | | | | | | | | | | | | | pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon).
* r5961: final round of compiler warning fixes based on feedback from Jason MaderGerald Carter2005-03-221-1/+1
|
* r5956: more compile warngin fixes from the Mr. MaderGerald Carter2005-03-221-3/+3
|
* r5954: Fix some compiler warnings and add missing exclude-block in "net rpcGünther Deschner2005-03-221-1/+1
| | | | | | share migrate" (found by Lars Mueller <lmuelle@suse.de>). Guenther
* r5953: more compiler cleanups; moved SID_LIST from smb.h to privileges.c to ↵Gerald Carter2005-03-221-1/+1
| | | | cleanup the name space
* r5158: BUG 2263: patch from Timur Bakeyev <timur@com.bat.ru> to guard ↵Gerald Carter2005-02-011-4/+10
| | | | base64_encode_data_blob() against empty blobs
* r5066: A couple of small fixes from James Peach @ SGI.Jeremy Allison2005-01-281-2/+2
| | | | Jeremy.
* r4746: add server support for lsa_enum_acct_rights(); last checkin for the nightGerald Carter2005-01-151-0/+16
|
* r4334: Fix for bugid #2186 - from Buck Huppmann <buckh@pobox.com>Jeremy Allison2004-12-221-0/+8
| | | | | to prevent uninitialized creds being freed. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-19/+19
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2605: Fix stupid typo in back-port of Samba4 fix.Jeremy Allison2004-09-241-1/+1
| | | | Jeremy.
* r2578: Pick up optimisation from Samba4 - thanks tridge !Jeremy Allison2004-09-241-0/+12
| | | | | | | | - I recently found out that charaters below 0x3F are guaranteed not to occur as secondary bytes in any multi-byte character set. This allows for a very simple optimisation in strchr_m() and strrchr_m(). It might be a good idea to pick this up for Samba3. Jeremy.
* r2361: Fix the appalling toktocliplist() fn. Bug found by Luis Benvenutto.Jeremy Allison2004-09-151-5/+8
| | | | Jeremy.
* r2175: Fix for #1546 from fumiya@samba.gr.jp. Preserve errno in MB ↵Jeremy Allison2004-09-011-0/+6
| | | | | | strupper_m/strlower_m. Jeremy.
* r2111: Fix memleak with valid names.Jeremy Allison2004-08-301-0/+1
| | | | Jeremy.