summaryrefslogtreecommitdiff
path: root/source3/registry
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r14768: Fix potential null deref coverity bugs #255, #256.Jeremy Allison1-17/+25
Jeremy. (This used to be commit a40c7a0cd888dcee3cac1a41602863f54c51ef17)
2007-10-10r14766: Fix possible NULL deref. Coverity #254.Jeremy Allison1-8/+9
Jeremy. (This used to be commit e2e2d8b939dd425a97b36102c6a541e3cf6236ad)
2007-10-10r14247: Fix Coverity bug # 136Volker Lendecke1-1/+3
(This used to be commit 1b247ff2ed380f5b7d28917d74d6ef5609330a45)
2007-10-10r13978: Here is why it's essential to use SAFE_FREE instead of free.Jeremy Allison1-6/+6
If we use free(data.dptr) and then the subsequent tdb_open fails in _reg_perfcount_get_counter_data() then data.dptr is left as a non-zero pointer that has been freed. This would cause it to be reused later on. Coverity bug #162. Jeremy. (This used to be commit 053efc20981e0280c6af0ebb9e17cea07da85fe8)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison3-40/+20
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. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r12002: patch from marcin to allow for the creation of a File value in the ↵Gerald Carter1-0/+8
eventlog registry keys so that file properties can be displayed (This used to be commit 270fef5175559ba6345bb2c3e264c527a6a084c5)
2007-10-10r11860: BUG 3156: don't use find_service() when explicitly looking for a ↵Gerald Carter1-1/+10
printer as the username map might get in the way (This used to be commit 46bf28c81c27dfdc412318a83bf565211a58a47d)
2007-10-10r11579: syncing up perf counter code cfrom trunkGerald Carter2-41/+174
(This used to be commit 59c00924b67aa3d37a933731a56d03963ec7f1b5)
2007-10-10r11227: patch from brian moran to fix typo in eventlog message file registry ↵Gerald Carter1-3/+3
value name (This used to be commit 34c3fd77b320d4fe5e0f1452aa09ea5ec2797494)
2007-10-10r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2-3/+3
x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
2007-10-10r11136: patches from Brian Moran for eventlogadm utilityGerald Carter2-24/+19
(This used to be commit 47b626a8f72629fd1bbabf35b68e24d202df2555)
2007-10-10r11123: * patches from Brian Moran for creating new eventlogGerald Carter2-10/+198
source keys * my patches to get registry utility functions linking with eventlogadm tool (This used to be commit 24e7663086f5d15c7e3fd8069667169b91d1acda)
2007-10-10r11073: safety checks on pointers to prevent crashing when converting ↵Gerald Carter1-1/+7
REG_MULTI_SZ (This used to be commit db8d85aa1ec5c486f061f97627b6b18a0e17cd34)
2007-10-10r11072: add routines for converting REG_MULTI_SZ to and from char**Gerald Carter1-0/+104
(This used to be commit e858eed813b5a9a8d57262142c5bbde2951b5590)
2007-10-10r10819: merging a couple of fixes from trunkGerald Carter2-6/+82
* only keep the registry,tdb file open when we have an open key handle * tpot's setup.py fix * removing files that no longer exist in trunk and copying some that were missing in 3.0 (This used to be commit 6c6bf6ca5fd430a7a20bf20ed08050328660e570)
2007-10-10r10781: merging eventlog and svcctl code from trunkGerald Carter2-160/+121
(This used to be commit f10aa9fb84bfac4f1a22b74d63999668700ffaac)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter9-297/+1648
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r10012: fix build breakage caused by forgotten commit in local treeGerald Carter1-1/+1
(This used to be commit 8c819cd0c670acfe7be2ecd927ef8de6fa5226f2)
2007-10-10r9965: Fix some typo'sJelmer Vernooij1-4/+4
(This used to be commit d30356b9ad90ad33dc93028829954632ab774c74)
2007-10-10r9914: key ordering in hash list is case insensitiveGerald Carter1-1/+1
(This used to be commit 18d05431831c88f6302a55fe23f51951987f2cb0)
2007-10-10r9895: fix typo in registry pathGerald Carter1-1/+1
(This used to be commit ef7e0d70c68976766c01e1212e2b8f48f6895f98)
2007-10-10r9894: Add new registry key expected by Windows XP clients.Gerald Carter1-9/+15
HKLM\\SYSTEM\\CurrentControlSet\\Control\\Termininal Server\\DefaultUserConfiguration Apparently this started showing up after the winreg-write support was added in 3.0.20rc1 or so. Also modifed init_registry_data() to always run and add the required keys. Initial values however are only written if they don't already exist. This makes it easier to add new keys without having to rev the tdb version number (which is really unnecessary in this case). Portions of patch reviewed by Thomas Bork on the general samba ml. (This used to be commit b12a05b23782cfcb93fb4811807ef388de97c95c)
2007-10-10r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to useGerald Carter4-128/+116
the new talloc() features: Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d since the methods use the object pointer as the talloc context for internal private data. There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy() pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the object. Also had to convert the printer_info_2->NT_PRINTER_DATA field to be talloc()'d as well. This is just a stop on the road to cleaning up the printer memory management. (This used to be commit ef721333ab9639cb5346067497e99fbd0d4425dd)
2007-10-10r9657: fix final issue with regf sk_records; profiles now successfully rewritesGerald Carter1-6/+12
Win2k and WinXP user profile security descriptors. (This used to be commit 3a3bf4ddb702647b48baf9073c4fca0e1e16a194)
2007-10-10r9656: fix bug in sk record list with next offsetsGerald Carter1-2/+2
(This used to be commit c588c2ee69fa72089e9c0aed6881a76f4e490d86)
2007-10-10r9486: ensure that the registry hash records are sorted by original subkey ↵Gerald Carter1-3/+4
name and not the 4 character hash key (This used to be commit 8d347561919ded19b1e7096aceb119c66f461c61)
2007-10-10r9278: Remove unused variable. Bugzilla #2983.Tim Potter1-2/+1
(This used to be commit 5d592691e4d4f1cd47bd062633a54d7892548ee7)
2007-10-10r9115: using #define for reg paths rather than typing the stringGerald Carter1-4/+10
(This used to be commit e9427912a763b0e4bb47724f835b91c2252105e8)
2007-10-10r9086: * fix invalid read in parse_spoolss when writing a devmode toGerald Carter1-1/+6
the wire * fix dup_a_regval() when size is 0 * ensure we pass a pstring to unlink_internals (fixes delete_driver code) (This used to be commit 353e63ff421c564a1b7c7cfe95982f31c871a227)
2007-10-10r8607: BUG 2900 more compiler warningsGerald Carter1-9/+10
(This used to be commit ed93cc50e1064dc5a3145d97555715b0b2915db4)
2007-10-10r8606: BUG 2899: fix compiler warning in regfio routineGerald Carter1-1/+1
(This used to be commit d6b1f695a0baf2042ce121702cdcbbf59e94bd94)
2007-10-10r8604: BUG 2890: fix unitialized variable reported by Jason Mader ↵Gerald Carter1-0/+1
<jason@ncac.gwu.edu> (This used to be commit 9f8344e31d3628338b434ee3e530b7f7322e6fe1)
2007-10-10r8501: * disable printer handle object cache (was mostly usedGerald Carter1-2/+2
for NT4 clients enumerating printer data on slow CPUs) * fix pinter and secdesc record upgrade to normalize the key (rev'd printer tdb version) * fixed problem that was normalizing the printername name field in general, this should fix the issues upgrading print servers from 3.0.14a to 3.0.20 (This used to be commit d07179de2f2a6eb1d13d0e25ac10de1a21475559)
2007-10-10r8327: * don't use unitialized variablesGerald Carter1-3/+2
(This used to be commit bd878197954cf4d259dfd01f2d4cb4a663b34121)
2007-10-10r8325: * punt....don't normalize the printer name in the RegCreateKey().Gerald Carter1-3/+1
Print Migrator now works as long as the addprinter command can handle the name (This used to be commit 61f14cdcbd3b183caf6172d5b60b0888fc4363f7)
2007-10-10r8324: * initial cut at creating printers via the registry APIGerald Carter1-5/+40
Need to add delete_key support (This used to be commit 9a27f7181adca10f60c47d342a51dec34321e12b)
2007-10-10r8323: * convert RegSetValue() calls immediately beneath the printerGerald Carter1-9/+23
key to PRINTER_INFO_2 fields. (This used to be commit fadda2f240eb3c8eb08198c702a93e23b14f0fcc)
2007-10-10r8322: * get RegSetValue() working for printer subkey valuesGerald Carter1-3/+169
(not immediate values below the <printer name> key yet. (This used to be commit a872ea5f0e29f7b585574a56b52a5eb44cb92278)
2007-10-10r8152: * remove commented out structureGerald Carter1-2/+2
* use SAMBA_PRINTER_PORT_NAME in registry values for builtin printer port (This used to be commit 63bc03536b6d0622005448f0f7be2739e06a432a)
2007-10-10r8089: successfully delete printer subkeys via the registry....now for valuesGerald Carter1-1/+19
(This used to be commit d3427960b0676c506c639b582a2544dc58990c9e)
2007-10-10r8066: * had to modify the printer data storage slightly in ntprinters.tdbGerald Carter1-19/+60
when packing values. It is a compatible change though and will not require a tdb version upgrade * Can successfully create new printer subkeys via winreg that are immediately available via spoolss calls. Still cannot delete keys yet though. That comes next. (This used to be commit 00bce2b3bb78a44842a258b1737076281297d247)
2007-10-10r8064: * add the REG_XXX error codes to the pretty error messagesGerald Carter2-41/+72
* more work on the store_values() functions for the Printers key * add Control\Print\Monitors key to list for reg_db (This used to be commit 89f17b41cee633838b8cbd0d1bf8119a4b8d707e)
2007-10-10r8061: * mostly cleanup and refactoring for better readabilityGerald Carter2-313/+304
* move to registry.tdb for port listing (at least via the winreg ops) If no one opposes on the samba list, we'll move to a registry lookup for enumerating ports rather than the 'enumports command'. This means that there is a bit of a disconnect between EnumPorts() and RegEnumKey('hklm\software\microsoft\windows nt\currentversion\ports'). (This used to be commit 6f654c5741e98abf00c010c5dd38038092c0f7a3)
2007-10-10r8027: driver information is now back via winregGerald Carter1-2/+7
(This used to be commit f0a1c6b9cec28d5b4aa8a1a2f9b34d1f13113a6c)
2007-10-10r8026: * more fixes to the printing registry interfaceGerald Carter2-313/+200
(still not completely back to the read functionality we previously had but the cleanup is progressing) (This used to be commit 04431372a698433b4936392047228908a64ff382)
2007-10-10r8022: * implement default actions rather than having to define functionsGerald Carter1-398/+338
for every fetch/store callback (some keys should never have a value) (This used to be commit 7466351dd059b75c29bc0d2977c6c9d318a14dc6)
2007-10-10r8008: * start adding logic for restricting subkey pathsGerald Carter1-69/+56
e.g. 'hklm\software\microsoft\windows nt\currentversion\ports' should have no subkeys. Return an error if a client tries to open a path below here (This used to be commit 7a2ecb1aec2b84e6bc326be4a1191fb54526c430)
2007-10-10r8007: * cleanup unused structure from reg_objects.hGerald Carter3-166/+359
* make regdb_store_XXX() and regdb_fetch_XXX() functions non-static * use case sensitive string lookups in reg_dynamic.c since the keys have already been normalized * move to new design for making printing related data available via the winreg pipe (with the intent of allowing writes) (This used to be commit 28c7293ee9e68b913faf8d74d63f73e09087169b)
2007-10-10r7997: Pointers don't kill people, people with pointers kill people...Gerald Carter1-5/+1
"Honest office! It was a mistake! I thought the safety lock was on!" * Fix problem setting registry values in in-memory objects I now have printmig.exe successfully creating all of the printer registry keys (in the tdb backend) which means that the top level semantics are correct. (This used to be commit 52899551070ddb8f185d53bd125ae06c192ef7b0)
2007-10-10r7995: * privileges are local except when they're *not*Gerald Carter4-41/+41
printmig.exe assumes that the LUID of the SeBackupPrivlege on the target server matches the LUID of the privilege on the local client. Even though an LUID is never guaranteed to be the same across reboots. How *awful*! My cat could write better code! (more on my cat later....) * Set the privelege LUID in the global PRIVS[] array * Rename RegCreateKey() to RegCreateKeyEx() to better match MSDN * Rename the unknown field in RegCreateKeyEx() to disposition (guess according to MSDN) * Add the capability to define REG_TDB_ONLY for using the reg_db.c functions and stress the RegXXX() rpc functions. (This used to be commit 0d6352da4800aabc04dfd7c65a6afe6af7cd2d4b)