summaryrefslogtreecommitdiff
path: root/src/db/sysdb_autofs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb_autofs.c')
-rw-r--r--src/db/sysdb_autofs.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/db/sysdb_autofs.c b/src/db/sysdb_autofs.c
index f8fe3925..cc44c350 100644
--- a/src/db/sysdb_autofs.c
+++ b/src/db/sysdb_autofs.c
@@ -78,6 +78,26 @@ done:
return dn;
}
+char *
+sysdb_autofsentry_strdn(TALLOC_CTX *mem_ctx,
+ struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
+ const char *map_name,
+ const char *entry_name,
+ const char *entry_value)
+{
+ struct ldb_dn *dn;
+ char *strdn;
+
+ dn = sysdb_autofsentry_dn(mem_ctx, sysdb, domain,
+ map_name, entry_name, entry_value);
+ if (!dn) return NULL;
+
+ strdn = talloc_strdup(mem_ctx, ldb_dn_get_linearized(dn));
+ talloc_free(dn);
+ return strdn;
+}
+
errno_t
sysdb_save_autofsmap(struct sysdb_ctx *sysdb_ctx,
struct sss_domain_info *domain,
@@ -319,15 +339,12 @@ done:
errno_t
sysdb_del_autofsentry(struct sysdb_ctx *sysdb_ctx,
- struct sss_domain_info *domain,
- const char *map,
- const char *key,
- const char *value)
+ const char *entry_dn)
{
struct ldb_dn *dn;
errno_t ret;
- dn = sysdb_autofsentry_dn(sysdb_ctx, sysdb_ctx, domain, map, key, value);
+ dn = ldb_dn_new(NULL, sysdb_ctx_get_ldb(sysdb_ctx), entry_dn);
if (!dn) {
return ENOMEM;
}