Age | Commit message (Collapse) | Author | Files | Lines |
|
(This used to be commit 264d5dfe9fe97db0b69d7cd04086ad8ed9f78e74)
|
|
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
|
|
Jeremy.
(This used to be commit 331c0d6216e1a1607a49ed7eb4078e10138ec16a)
|
|
security descriptor gets deleted as well.
Guenther
(This used to be commit d140d68537225b6a6a99be3d9b09354e3f6ad8c9)
|
|
The point is doing the following associations:
- non discardable state data (all TDB files that may need to be backed
up) go to statedir
- shared data (codepage stuff) go to codepagedir
The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.
The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)
|
|
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
|
|
(This used to be commit 142b80bf1542f212dff66a3661c13f3f6845067f)
|
|
I got annoyed by the fsync calls clobbering my harddrive when smbd started up
for debugging.
... things you do on a plane without internet
(This used to be commit e0927a7cbf4b806bcc93ad4af9552bc91292e78b)
|
|
Guenther
(This used to be commit 43ca04918a5a1b2379083dc624b346ceb8476a38)
|
|
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
|
|
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
(This used to be commit 7885b68bb5df0ebe290feca0e74b4a20ef59e718)
|
|
The global options are stored as values in the subkey "global"
of the SMBCONF registry key.
The activation is accomplished in smb.conf though a new special
semantic of the "include" parameter: "include = registry" triggers
the processing of the registry global options exactly at the
position of the include statement. Options read from the registry
take the same precedence as parameters loaded from a file via
include. Need to reload the registry globals is detected by
watching the tdb sequence number.
Registry shares are automatically activated when the registry
globals are processed.
So a "registry only" configuration can be realized by an
smb.conf that looks as follows:
================================
[global]
include = registry
================================
The global options and registry shares can be conveniently
edited with the "net conf" utility.
Caveat:
A possible pitfall consists in using "include = registry"
together with the "lock directory" directive in the registry.
This problem will be addressed in the next time.
Note on the code:
Processing of the registry options is accomplished by a function
process_registry_globals() in loadparm.c The current version is
only an interim solution: It is handcoded instead of using the
infrastructure of reg_api.c. The reason for this is that using
reg_api still has too large linker dependencies, bloating virtually
all targets by PASSDB_OBJ, SMBLDAP_OBJ, GROUPDB_OBJ and LDB stuff.
A version of process_registry_globals that uses reg_api is
included but commented out. The goal is to eventually refactor
and restructure the registry code so that one can use the reg_api
to access only the registry tdb and not link all the dynamic
backends with all their linking implications.
(This used to be commit 24b0cbcb3741dd14b04728448a85cc04a057e7d0)
|
|
(To be used in other place in subsequent commit.)
Michael
(This used to be commit 6fd71140499e30b8fd0f083301512db7b8c2f236)
|
|
This eliminates the need of maintaining reg_db's own
reference counter for the tdb. Maybe as a next step...
Michael
(This used to be commit 31d64767fc8a73be1f6b81e2712d687897f812a0)
|
|
Add a function to retrieve the registry db sequence number.
This is in preparation of loadparm integration of registry global
smb.conf options: this will allow to detect changes in order to trigger reload.
Michael
(This used to be commit ebe2ea8f22bfe0855beee087af771c690db443c1)
|
|
Sorry for the noise...
Michael
(This used to be commit c7d004dec4822c0d8e5c7fd6519850f906c7bb1a)
|
|
(This used to be commit beed87550786052891969f6014088c17a5d77157)
|
|
(This used to be commit 03dbdb561a16a6e3dbd99ee29aac598457873002)
|
|
Michael
(This used to be commit df30f8d5c2999590aabe1e87f92fbdbafa7052aa)
|
|
and fix all compiler warnings in the users
metze
(This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
|
|
to avoid creating the TDB_DATA struct from strings "by hand"
metze
(This used to be commit 1a0599d7aadef651e4d5b88b59c95e8a118dfa5e)
|
|
metze
(This used to be commit 71c3880e8924c57dcd60573d628b8eb29cee6055)
|
|
subsystems. See the comment in the diff.
Volker
(This used to be commit 92fdb1193de8e7c857603e4fcd4a92b9a0a0f3bd)
|
|
registry
stuff. Revert the last change.
This needs better fixing.
Volker
(This used to be commit ad1e00430bf5c4130023d30e9c8266ecdc640d2b)
|
|
Initializing the reg_db now uses reg_createkey and reg_setvalue.
Volker
(This used to be commit cab5ccbbe484795f13531726d68b978073262e33)
|
|
(This used to be commit 6cab254c49e07b11c170511ec613f0f33914c3e6)
|
|
(This used to be commit 5ec737922041b723b9e60c08049ace5fa2fa5dec)
|
|
(This used to be commit ff4123c8f2e07e282800c166a4e00b1015ddd45c)
|
|
pop up
again if the key is re-created.
Volker
(This used to be commit f722f3341f65f8737c10eb59048c1263a58afd44)
|
|
(This used to be commit 6639f8c1190419e183d92ed0322e1026375717e6)
|
|
(This used to be commit be9aaffdaccae06c8c035eaf31862e34b7cfbe38)
|
|
(This used to be commit c0d9114706345c6bc1fa392bbf9ee81b146cba85)
|
|
(This used to be commit 1b247ff2ed380f5b7d28917d74d6ef5609330a45)
|
|
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)
|
|
* 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)
|
|
* \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)
|
|
(This used to be commit ef7e0d70c68976766c01e1212e2b8f48f6895f98)
|
|
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)
|
|
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)
|
|
(This used to be commit 5d592691e4d4f1cd47bd062633a54d7892548ee7)
|
|
(This used to be commit e9427912a763b0e4bb47724f835b91c2252105e8)
|
|
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)
|
|
* use SAMBA_PRINTER_PORT_NAME in registry values for builtin printer
port
(This used to be commit 63bc03536b6d0622005448f0f7be2739e06a432a)
|
|
* 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)
|
|
* 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)
|
|
(still not completely back to the read functionality
we previously had but the cleanup is progressing)
(This used to be commit 04431372a698433b4936392047228908a64ff382)
|
|
* 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)
|
|
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)
|
|
to a thin layer in fetch_reg_values(). Not entirely efficient
seeing as the the dynamic value paths are stored in an unsorted
array but it is one strequal() per path. If this was really big
it should be worked into the reghook_cache().
(This used to be commit 63b81ad3cb484090a181fbd13e04922a5c17e7d9)
|