aboutsummaryrefslogtreecommitdiffstats
path: root/src/dblayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dblayer.c')
-rw-r--r--src/dblayer.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/dblayer.c b/src/dblayer.c
index f13236c..3a8dd4f 100644
--- a/src/dblayer.c
+++ b/src/dblayer.c
@@ -315,3 +315,24 @@ int get_program_paths(DB *db, cklist *ckl, const char* pName, int bname, int att
}
return -1;
}
+
+int secret_enabled(DB *db) {
+ sqlite3_stmt *stmt;
+ int rc;
+
+ char sql[STR_M] = "";
+ dbh_form_query_secret_enabled(sql);
+
+ rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
+ if (rc != SQLITE_OK) {
+ ERR("while preparing secret_enabled sql.");
+ return -2;
+ }
+ int enabled = 1;
+ while (sqlite3_step(stmt) == SQLITE_ROW) {
+ enabled = sqlite3_column_int(stmt, 0);
+ break;
+ }
+ sqlite3_finalize(stmt);
+ return enabled;
+}