summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_autofs.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-05 00:20:44 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-04-18 10:23:56 -0400
commiteb29ae58117ca88868491fe2240e27393c7a9068 (patch)
treeca653d80603b04c95e85a015943e654457b61259 /src/db/sysdb_autofs.c
parentdc2750954d694eeef46ec9bf31c7f675b2b1fb27 (diff)
downloadsssd-eb29ae58117ca88868491fe2240e27393c7a9068.tar.gz
sssd-eb29ae58117ca88868491fe2240e27393c7a9068.tar.xz
sssd-eb29ae58117ca88868491fe2240e27393c7a9068.zip
Add sysdb_set_service_attr and sysdb_set_autofsmap_attr
Diffstat (limited to 'src/db/sysdb_autofs.c')
-rw-r--r--src/db/sysdb_autofs.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/db/sysdb_autofs.c b/src/db/sysdb_autofs.c
index e9d918e49..eff4e2969 100644
--- a/src/db/sysdb_autofs.c
+++ b/src/db/sysdb_autofs.c
@@ -396,3 +396,31 @@ done:
talloc_free(tmp_ctx);
return ret;
}
+
+errno_t
+sysdb_set_autofsmap_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_autofsmap_dn(tmp_ctx, sysdb, name);
+ if (!dn) {
+ ret = ENOMEM;
+ goto done;
+ }
+
+ ret = sysdb_set_entry_attr(sysdb, dn, attrs, mod_op);
+
+done:
+ talloc_free(tmp_ctx);
+ return ret;
+}