From 864fc10a278869b1474e407c963f9f40464d55c0 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 13 Jan 2008 23:16:01 +0100 Subject: Add a function libnet_conf_delete_global_parameter() to libnet_conf.c Create the [global] section if it does not yet exist. Michael (This used to be commit 90fa2981c949e21f66a44d634ebe9d661819f0a3) --- source3/libnet/libnet_conf.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/libnet') diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index 37e05b9fe9..d20e10b141 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/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; +} -- cgit