1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s3-dbwrap: Make dbwrap_fallback_wipe private

This commit is contained in:
Volker Lendecke 2011-12-08 14:01:27 +01:00
parent d9e5368fcc
commit 4856033410
3 changed files with 4 additions and 8 deletions

View File

@ -90,7 +90,7 @@ static int delete_record(struct db_record *rec, void *data)
* Fallback wipe ipmlementation using traverse and delete if no genuine
* wipe operation is provided
*/
int dbwrap_fallback_wipe(struct db_context *db)
static int dbwrap_fallback_wipe(struct db_context *db)
{
NTSTATUS status = dbwrap_trans_traverse(db, &delete_record, NULL);
return NT_STATUS_IS_OK(status) ? 0 : -1;
@ -240,6 +240,9 @@ int dbwrap_parse_record(struct db_context *db, TDB_DATA key,
int dbwrap_wipe(struct db_context *db)
{
if (db->wipe == NULL) {
return dbwrap_fallback_wipe(db);
}
return db->wipe(db);
}

View File

@ -109,10 +109,5 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
result = db_open_tdb(mem_ctx, name, hash_size,
tdb_flags, open_flags, mode);
}
if ((result != NULL) && (result->wipe == NULL)) {
result->wipe = dbwrap_fallback_wipe;
}
return result;
}

View File

@ -59,7 +59,5 @@ struct db_context {
bool persistent;
};
int dbwrap_fallback_wipe(struct db_context *db);
#endif /* __DBWRAP_PRIVATE_H__ */