From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 11 Jul 2018 15:59:53 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v1 1/1] box: support reload whole module Message-ID: <20180711125953.eevnmjygj2s7swwj@esperanza> References: <8846b566-24c5-9f11-ca29-18baed551921@tarantool.org> <20180711124656.pzuh254bjku3k2xc@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Wed, Jul 11, 2018 at 03:52:46PM +0300, Kirill Shcherbatov wrote: > On 11.07.2018 15:46, Vladimir Davydov wrote: > > AFAIU a user may reload a whole module only if he has the global EXECUTE > > privilege (because we don't have such an entity as module in our data > > dictionary to grant access rights for). access_check_func(), which is > > called by func_reload(), already checks the global EXECUTE privilege and > > returns 0 (success) if it is set, no matter if the function was found or > > not. So all you have to do is call module_reload() from func_reload() if > > access_check_func() returned func = NULL, no? > > No, this call iterates through all loaded functions of specified module and > reload all that belongs to initiator if any. I understand what you code does, but I wonder why it does that.