summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_services.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb_services.c')
-rw-r--r--src/db/sysdb_services.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/db/sysdb_services.c b/src/db/sysdb_services.c
index 693263099..d443fcd80 100644
--- a/src/db/sysdb_services.c
+++ b/src/db/sysdb_services.c
@@ -759,3 +759,31 @@ done:
talloc_free(tmp_ctx);
return ret;
}
+
+errno_t
+sysdb_set_service_attr(struct sysdb_ctx *sysdb,
+ const char *name,
+ struct sysdb_attrs *attrs,
+ int mod_op)
+{
+ errno_t ret;
+ struct ldb_dn *dn;
+ TALLOC_CTX *tmp_ctx;
+
+ tmp_ctx = talloc_new(NULL);
+ if (!tmp_ctx) {
+ return ENOMEM;
+ }
+
+ dn = sysdb_svc_dn(sysdb, tmp_ctx, sysdb->domain->name, name);
+ if (!dn) {
+ ret = ENOMEM;
+ goto done;
+ }
+
+ ret = sysdb_set_entry_attr(sysdb, dn, attrs, mod_op);
+
+done:
+ talloc_free(tmp_ctx);
+ return ret;
+}