| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
In tdb_wrap_log(), in on occurrence of "debug_level = 0"
instead of "debuglevel = 0" caused me segfaults when
accessing DEBUGLEVEL (which is defined as "*debug_level"...)
Michael
(cherry picked from commit d9bd894c2ec4faf87e8ff96e27c7e2b8175f9387)
|
|
|
|
|
|
|
| |
It has been replaced by tdb_wipe_all().
Michael
(cherry picked from commit cdde2e4eaca51d51f036ad99d55df7bfd6535b03)
|
|
|
|
|
|
|
| |
Users of these are currently being written...
Michael
(cherry picked from commit 1c51bec5318bad085c09931aa7e8f72f41d103fe)
|
|
|
|
|
| |
Michael
(cherry picked from commit abf02a5a142c55d9e0053d319c867e4fcc3e6c30)
|
|
|
|
|
|
|
|
| |
Replace all callers of traverse with this tdb_traverse_delete_fn() and
don't export tdb_traverse_delete_fn() anymore.
Michael
(cherry picked from commit d4be4e30cd8c3bdc303da30e42280f892a45a8c9)
|
|
|
|
|
| |
Michael
(cherry picked from commit b42cf3fc69414270be9d0f430f2e95a72894f00e)
|
|
|
|
| |
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
|
|
|
|
|
|
|
|
| |
Just a small commit to get a handle on this git thingy. This patch
fixes some missing calls to va_end() to match various calls to va_start()
and VA_COPY().
Tim.
|
|
|
|
|
|
| |
than expect a pstring space to put data into.
Fix the (few) callers.
Jeremy.
|
|
|
|
|
|
|
|
| |
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.
|
|
|
|
|
|
|
| |
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
|
|
|
|
|
|
| |
Return error instead.
Michael
|
|
|
|
|
|
|
|
|
|
|
| |
A new wrapper tdb_validate_open() takes a filename an opens and closes
the tdb before and after calling tdb_validate() respectively.
winbindd_validata_cache_nobackup() now dynamically calls one of
the above functions depending on whether the cache tdb has already
been opened or not.
Michael
|
|
|
|
|
|
| |
(This is more safely used with casts from int to uint8, e.g.)
Michael
|
|
|
|
|
| |
I had only tested with "net getlocalsid". posix_locking_init() calls this
with a NULL name...
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to set the default hashsize for any tdb. I would
like to remove the "open files database hash size" in favor of this one.
I'll check that removal in with the next commit, please complain/revert
if it's not ok.
Volker
|
|
|
|
|
|
|
|
|
| |
If restoring a backup fails due to lack of space, remove the
corrupt tdb previously moved away to "name.corrupt", and retry.
If restoring still fails, move the backup in place instead of
copying it.
Michael
|
| |
|
|
|
|
| |
Michael
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- call tdb_validate on the given tdb.
- if validation is successful, create a backup
return 0 (success) even if the backup fails.
- if validation fails:
- move tdb to name.corrupt (don't exit if this fails)
- look for a valid backup
- if a valid backup is found, restore it, else return -1 (failure)
if restoring succeeds, return 0 (success), else -1 (failure)
Summing up:
If 0 is returned, there is a valid tdb at the given location:
either the original one ore one restrored from a backup.
If -1 is returned, there is no valid tdb at the given location:
Either there is no file at all, or the original file is still
in place (if moving it away failed).
Michael
|
| |
|
|
|
|
|
|
|
|
| |
functions did not do so but returned an error. (This is the case when
error occurred deeper than at the level of the content checking done by
the per entry validate_fn.)
Michael
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a wrapper around tdb_validate, that does backup handling:
* if the given tdb is valid, a backup is created (name.bak)
* if the tdb is invalid, if a valid bakup is found (validated
with the same validation function) under the name "name.bak"
the orignal tdb is moved to name.corrupt and the backup
is restored.
For the backup handling, a variant of the backup_tdb function
from lib/tdb/tools/tdbbackup.c is included in lib/util_tdb.c.
The copy function for the traverse action eliminates the need
to maintain a global success state by using a struct wrapping
the target tdb and a success flag as the private data.
Michael
|
|
|
|
|
|
| |
at a lower debug level.
Michael
|
|
|
|
|
|
| |
amount as in source code formatting...)
Michael
|
|
|
|
|
|
|
|
| |
from the validating child process down to the parent though the
pipe. All the parent evaluates is the overall success, so the exit
status should do.
Michael
|
| |
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
to the caller (winbindd_validate_cache in this case).
Next, there will be a backup handling for the tdb files.
Michael
|
|
|
|
| |
Michael
|
|
|
|
| |
Michael
|
|
|
|
|
|
|
|
| |
back to winbindd_cache.c. The generic mechanism
should open the cache tdb readonly and with default
flags.
Michael
|
|
|
|
|
|
|
| |
code into a generic tdb validation code.
In lib/util_tdb.c for a start.
Michael
|
|
|
|
| |
failed expression in SMB_ASSERT.
|
|
|
|
| |
this in your tree.
|
| |
|
|
|
|
|
|
| |
and fix all compiler warnings in the users
metze
|
|
|
|
| |
metze
|
|
|
|
|
|
|
|
|
| |
from a string
(the current string_tdb_data() creates a non-terminates tdb key from a string!)
- pass TDB_DATA instead of const char *, size_t len to some functions
metze
|
| |
|
|
|
|
|
|
|
|
| |
messaging wrapper
and tdb_wrap_open.
Volker
|
| |
|
| |
|
|
see discussion on samba-technical
|