From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DF81C469719 for ; Fri, 18 Sep 2020 14:54:48 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id u21so4843398ljl.6 for ; Fri, 18 Sep 2020 04:54:48 -0700 (PDT) Date: Fri, 18 Sep 2020 14:54:45 +0300 From: Cyrill Gorcunov Message-ID: <20200918115445.GA28461@grain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917135121.60380-4-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH 3/3] lua/pwd: workaround the systemd bug List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: TML , Alexander Turenko On Thu, Sep 17, 2020 at 04:51:21PM +0300, Cyrill Gorcunov wrote: ... > > +-- > +-- systemd v209 sets errno is set to ENOENT in > +-- _nss_systemd_getpwent_r and _nss_systemd_getgrent_r > +-- when there are no more entries to enumerate. There is a typo in comment ("is set" phrase). Updated to +-- +-- systemd v209 sets errno to ENOENT in +-- _nss_systemd_getpwent_r and _nss_systemd_getgrent_r +-- when there are no more entries left to enumerate. +-- +-- This is a bug which has been fixed later in +-- systemd code but we have to deal with buggy +-- environment thus ignore such error if appears. +-- +-- See the reference for details +-- https://github.com/systemd/systemd/issues/9585 +-- +-- The issue affects getpwent/getgrent calls only +-- thus provide own wrappings to keep workaround +-- in one place and do not affect any other calls +-- where ENOENT might become a valid error case. +-- +-- Initially we observed this issue on Fedora 29 +-- when a password database is traversed for the +-- first time. and force pushed.