From 609a89ceace25a0a81d0a9cafde3a4d1afd1b916 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sun, 3 Oct 2010 02:41:29 +0000 Subject: mgmt/Glusterd: new command volume reset , volume set enhancements - Write the reconfigured options in 'info' file to make it persistant - Implementation of volume set history - Implementation of volume reset Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159 --- xlators/protocol/server/src/server.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/server/src') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 719ffdc31cc..26848001171 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -481,16 +481,32 @@ reconfigure (xlator_t *this, dict_t *options) gf_log (this->name, GF_LOG_WARNING, "'trace' takes on only boolean values. " "Neglecting option"); - return -1; + ret = -1; + goto out; } conf->trace = trace; gf_log (this->name, GF_LOG_TRACE, "Reconfigured trace" " to %d", conf->trace); } + if (!conf->auth_modules) + conf->auth_modules = dict_new (); - return 0; + dict_foreach (options, get_auth_types, conf->auth_modules); + ret = validate_auth_options (this, options); + if (ret == -1) { + /* logging already done in validate_auth_options function. */ + goto out; + } + + ret = gf_auth_init (this, conf->auth_modules); + if (ret) { + dict_unref (conf->auth_modules); + goto out; + } +out: + return ret; } int -- cgit