char **pam_service, char **error)
{
int retval = 0;
+ int step;
sqlite3_stmt *res = NULL;
static const char *sql = "SELECT Name,Time,TTY,RemoteHost,Service FROM Lastlog2 WHERE Name = ?";
goto out_read_entry;
}
- int step = sqlite3_step(res);
+ step = sqlite3_step(res);
if (step == SQLITE_ROW) {
const unsigned char *luser = sqlite3_column_text(res, 0);
const char *pam_service, char **error)
{
int retval = 0;
+ int step;
char *err_msg = NULL;
sqlite3_stmt *res = NULL;
static const char *sql_table = "CREATE TABLE IF NOT EXISTS Lastlog2(Name TEXT PRIMARY KEY, Time INTEGER, TTY TEXT, RemoteHost TEXT, Service TEXT);";
goto out_ll2_read_entry;
}
- int step = sqlite3_step(res);
+ step = sqlite3_step(res);
if (step != SQLITE_DONE) {
retval = -1;
remove_entry(sqlite3 *db, const char *user, char **error)
{
int retval = 0;
+ int step;
sqlite3_stmt *res = NULL;
static const char *sql = "DELETE FROM Lastlog2 WHERE Name = ?";
goto out_remove_entry;
}
- int step = sqlite3_step(res);
+ step = sqlite3_step(res);
if (step != SQLITE_DONE) {
retval = -1;
sqlite3 *db;
sqlite3_stmt *res = NULL;
int retval = 0;
+ int step;
static const char *sql = "PRAGMA journal_mode;";
retval = open_database_ro(context, &db, error);
goto out;
}
- int step = sqlite3_step(res);
+ step = sqlite3_step(res);
if (step == SQLITE_ROW) {
const unsigned char *mode_str = sqlite3_column_text(res, 0);
if (mode_str && mode) {