From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 747F122954 for ; Wed, 4 Sep 2019 17:59:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJr-TlkkhL7M for ; Wed, 4 Sep 2019 17:59:16 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3498F2294F for ; Wed, 4 Sep 2019 17:59:16 -0400 (EDT) Subject: [tarantool-patches] Re: [server-dev] [PATCH] lua: pwd: split data fetch from deserialization References: <8b8c10ef080d380f5b9e0ec45f5fcbdf73c209d8.1567433319.git.alexander.turenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 5 Sep 2019 00:02:44 +0200 MIME-Version: 1.0 In-Reply-To: <8b8c10ef080d380f5b9e0ec45f5fcbdf73c209d8.1567433319.git.alexander.turenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Alexander Turenko Cc: tarantool-patches@freelists.org, Kirill Yukhin Hi! Thanks for the patch! LGTM. On 04/09/2019 00:42, Alexander Turenko wrote: > This commit does not change a user visible behaviour. It refactors pwd > module to explicitly divide code that fetches data from passwd / group > databases from code that performs deserialization of the data to Lua > tables. > > The idea of splitting of those actions appears when it was observed that > a call of getpw() / getgr() leads to problems on some systems when it is > invoked during passwd / group database traveral. > > Now it is more obvious that we don't call getpw() during passwd > traversal and getgr() during group traveral. > > Follows up #4428 and #4447. > --- > > This patch follows up the discussion in > https://www.freelists.org/post/tarantool-patches/PATCH-lua-pwd-fix-passwd-and-group-traversal,1 > > https://github.com/tarantool/tarantool/tree/Totktonada/gh-4447-refactor-pwd > > src/lua/pwd.lua | 111 +++++++++++++++++++++++++++++++++--------------- > 1 file changed, 77 insertions(+), 34 deletions(-)