summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-22 15:07:43 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-22 07:35:17 +0200
commit1acf548eb75c9641e4e2c07167b42bc4380f9158 (patch)
tree818c0c6fcd266e754c678381ae0a43a84d307ed4 /source3/winbindd
parentfc9b2987611d7535b92288b26b09db19a0e2d78e (diff)
downloadsamba-1acf548eb75c9641e4e2c07167b42bc4380f9158.tar.gz
samba-1acf548eb75c9641e4e2c07167b42bc4380f9158.tar.bz2
samba-1acf548eb75c9641e4e2c07167b42bc4380f9158.zip
dbwrap: remove get_flags().
The flags returned were TDB-specific: this was only used for detecting the endianness of obsolete databases (the conversion code was put in in 2003, with reference to Samba 2.3). It's easier to remove it than to translate the NTDB flags to TDB flags, and it's a really weird thing to ask for anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_tdb.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index d3e1d2b64b..cc930fffb7 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -146,31 +146,16 @@ static int convert_fn(struct db_record *rec, void *private_data)
static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
{
int32 vers;
- bool bigendianheader;
struct convert_fn_state s;
NTSTATUS status;
- /* If we are bigendian, tdb is bigendian if NOT converted. */
- union {
- uint16 large;
- unsigned char small[2];
- } u;
- u.large = 0x0102;
- if (u.small[0] == 0x01)
- bigendianheader = !(dbwrap_get_flags(db) & TDB_CONVERT);
- else {
- assert(u.small[0] == 0x02);
- bigendianheader = (dbwrap_get_flags(db) & TDB_CONVERT);
- }
- DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n"));
-
status = dbwrap_fetch_int32_bystring(db, "IDMAP_VERSION", &vers);
if (!NT_STATUS_IS_OK(status)) {
vers = -1;
}
- if (((vers == -1) && bigendianheader) || (IREV(vers) == IDMAP_VERSION)) {
- /* Arrggghh ! Bytereversed or old big-endian - make order independent ! */
+ if (IREV(vers) == IDMAP_VERSION) {
+ /* Arrggghh ! Bytereversed - make order independent ! */
/*
* high and low records were created on a
* big endian machine and will need byte-reversing.