summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb.h')
-rw-r--r--src/db/sysdb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 4dc382f6f..fbc01851e 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -461,6 +461,17 @@ errno_t sysdb_update_view_name(struct sysdb_ctx *sysdb, const char *view_name);
errno_t sysdb_get_view_name(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb,
char **view_name);
+static inline bool is_default_view(const char *view_name)
+{
+ /* NULL is treated as default */
+ if (view_name == NULL
+ || strcmp(view_name, SYSDB_DEFAULT_VIEW_NAME) == 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
errno_t sysdb_delete_view_tree(struct sysdb_ctx *sysdb, const char *view_name);
errno_t sysdb_invalidate_overrides(struct sysdb_ctx *sysdb);