{
struct cdbdata *cdbus;
- cdb_begin_transaction();
cdb_rewind(CDB_USERSUPP);
while (cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
sizeof(struct usersupp) : cdbus->len));
cdb_free(cdbus);
if (usbuf->usernum == number) {
- cdb_end_transaction();
+ cdb_close_cursor(CDB_USERSUPP);
return (0);
}
}
- cdb_end_transaction();
return (-1);
}
/* There are unvalidated users. Traverse the usersupp database,
* and return the first user we find that needs validation.
*/
- cdb_begin_transaction();
cdb_rewind(CDB_USERSUPP);
while (cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
memset(&usbuf, 0, sizeof(struct usersupp));
if ((usbuf.flags & US_NEEDVALID)
&& (usbuf.axlevel > 0)) {
cprintf("%d %s\n", MORE_DATA, usbuf.fullname);
- cdb_end_transaction();
+ cdb_close_cursor(CDB_USERSUPP);
return;
}
}
- cdb_end_transaction();
/* If we get to this point, there are no more unvalidated users.
* Therefore we clear the "users need validation" flag.