| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
|
|
|
|
| |
this in your tree.
|
| |
|
|
|
|
|
|
|
|
| |
change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users
metze
|
|
|
|
|
|
| |
use tdb helper functions
metze
|
|
|
|
| |
metze
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It does not matter if I screw up 3.0.25 or 3.0.26 with this, so do it rather
sooner than later.
Add the notify support that already exists in 3_0 to 3_0_25. If you want to
see this patch dissected into digestable parts, look at 3_0, revisions at
about 20800 and following.
Volker
|
| |
|
|
see discussion on samba-technical
|