diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-04-05 00:20:44 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-04-18 10:23:56 -0400 |
commit | eb29ae58117ca88868491fe2240e27393c7a9068 (patch) | |
tree | ca653d80603b04c95e85a015943e654457b61259 /src/db/sysdb_autofs.c | |
parent | dc2750954d694eeef46ec9bf31c7f675b2b1fb27 (diff) | |
download | sssd-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.c | 28 |
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; +} |