}
d_fprintf(stderr, _("dumping id mapping from %s\n"), dbfile);
- db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDONLY, 0);
+ db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDONLY, 0,
+ DBWRAP_LOCK_ORDER_1);
if (db == NULL) {
d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"),
dbfile, strerror(errno));
input = stdin;
}
- db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644);
+ db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644,
+ DBWRAP_LOCK_ORDER_1);
if (db == NULL) {
d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"),
dbfile, strerror(errno));
break;
}
} else if (sscanf(line, "USER HWM %lu", &idval) == 1) {
- status = dbwrap_store_int32(db, "USER HWM", idval);
+ status = dbwrap_store_int32_bystring(
+ db, "USER HWM", idval);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr,
_("Could not store USER HWM: %s\n"),
break;
}
} else if (sscanf(line, "GROUP HWM %lu", &idval) == 1) {
- status = dbwrap_store_int32(db, "GROUP HWM", idval);
+ status = dbwrap_store_int32_bystring(
+ db, "GROUP HWM", idval);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr,
_("Could not store GROUP HWM: %s\n"),
}
d_fprintf(stderr, _("deleting id mapping from %s\n"), dbfile);
- db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR, 0);
+ db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR, 0,
+ DBWRAP_LOCK_ORDER_1);
if (db == NULL) {
d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"),
dbfile, strerror(errno));
}
if (!(db = db_open(mem_ctx, argv[0], 0, TDB_DEFAULT,
- O_RDWR|O_CREAT, 0600))) {
+ O_RDWR|O_CREAT, 0600,
+ DBWRAP_LOCK_ORDER_1))) {
d_fprintf(stderr, _("db_open failed: %s\n"), strerror(errno));
goto fail;
}