summaryrefslogtreecommitdiffstats
path: root/source/libnet
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-13 23:16:01 +0100
committerMichael Adam <obnox@samba.org>2008-01-13 23:16:42 +0100
commit90fa2981c949e21f66a44d634ebe9d661819f0a3 (patch)
treec6757ca6a62e1adf67c206cd1d5155d61c4fe2d0 /source/libnet
parent627a29b690c30f1096a4746186089cd9a1c92407 (diff)
downloadsamba-90fa2981c949e21f66a44d634ebe9d661819f0a3.tar.gz
samba-90fa2981c949e21f66a44d634ebe9d661819f0a3.tar.xz
samba-90fa2981c949e21f66a44d634ebe9d661819f0a3.zip
Add a function libnet_conf_delete_global_parameter() to libnet_conf.c
Create the [global] section if it does not yet exist. Michael
Diffstat (limited to 'source/libnet')
-rw-r--r--source/libnet/libnet_conf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/libnet/libnet_conf.c b/source/libnet/libnet_conf.c
index 37e05b9fe9b..d20e10b1416 100644
--- a/source/libnet/libnet_conf.c
+++ b/source/libnet/libnet_conf.c
@@ -925,3 +925,24 @@ done:
return werr;
}
+/**
+ * Delete a global parameter.
+ *
+ * Create [global] if it does not exist.
+ */
+WERROR libnet_conf_delete_global_parameter(struct libnet_conf_ctx *ctx,
+ const char *param)
+{
+ WERROR werr;
+
+ if (!libnet_conf_share_exists(ctx, GLOBAL_NAME)) {
+ werr = libnet_conf_create_share(ctx, GLOBAL_NAME);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+ }
+ werr = libnet_conf_delete_parameter(ctx, GLOBAL_NAME, param);
+
+done:
+ return werr;
+}