From patchwork Wed Sep 10 16:45:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 387900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43CCF1400AF for ; Thu, 11 Sep 2014 02:45:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=KqRoc70MTLtuKdQk JEkIMKxkHJ8yNQ4HrqJbBcbz/OEWlf65dAEb2r3jQrjfkNO3w1xdYk7RZ+gL+hiB CG1poSKYbPSJZzwrwrbaIvoYSlLt/QqiZPTmlCVqPc9jQ3WK/5RU5kneGLsfAJ5Y iLltB4czY/aIqTfLqD1B8h2R4yY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=KS23rwPErqDjLERtPHvl5z wUXIk=; b=OBDSALIBX+qzbgJzNGRJo95gbcvAoNZ8MrZGr3t92x5HV1iU9G18pk tCJVI9wQfYJdncNRxPOQALsCIZQgpsd4/uM2Neo5MZkhwDKsQl4Fd+bXRmcYfycD Sp32sdgSU2q99fF9kUcqqvj4ciMFU+BErDvv1Pju9bX1bq2kiUHyQ= Received: (qmail 23160 invoked by alias); 10 Sep 2014 16:45:30 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23145 invoked by uid 89); 10 Sep 2014 16:45:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <54108025.3090500@redhat.com> Date: Wed, 10 Sep 2014 12:45:25 -0400 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Michael Kerrisk CC: "linux-man@vger.kernel.org" , Simo Sorce , Jakub Hrozek , GNU C Library Subject: Re: [PATCH] getgrent.3: Add ENOENT to error list. References: <54105ED1.5020206@redhat.com> In-Reply-To: <54105ED1.5020206@redhat.com> On 09/10/2014 10:23 AM, Carlos O'Donell wrote: > Michael, > > It's possible to get ENOENT returned from getgrent > if the backend, for example say SSSD, isn't configured > or the daemon isn't running. The same can be said of any > of the NSS backend. > > As POSIX does not list ENOENT, we can list it ourselves > and define it how we like. > > I don't know how you handle errno values that are glibc > specific, but here is the patch that enhances getgrent > to make users aware of what ENOENT is intended to mean > from glibc. > > Patch against master. Please apply. While I'm fixing one I might as well fix the other. v1 - Add ENOENT. v2 - Add EAGAIN. --- Cheers, Carlos. diff --git a/man3/getgrent.3 b/man3/getgrent.3 index f49c746..599b9fd 100644 --- a/man3/getgrent.3 +++ b/man3/getgrent.3 @@ -129,6 +129,11 @@ or .BR free (3).) .SH ERRORS .TP +.B EAGAIN +The service was temporarily unavailable; try again later. +For NSS backends in glibc this indicates a temporary error talking to the backend. +The error may correct itself, retrying later is suggested. +.TP .B EINTR A signal was caught. .TP @@ -141,6 +146,11 @@ The calling process already has too many open files. .B ENFILE Too many open files in the system. .TP +.\" not in POSIX +.B ENOENT +A necessary input file cannot be found. +For NSS backends in glibc this indicates the backend is not correctly configured. +.TP .B ENOMEM .\" not in POSIX Insufficient memory to allocate