public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] getgrent.3: Add ENOENT to error list.
@ 2014-09-10 14:23 Carlos O'Donell
       [not found] ` <54105ED1.5020206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos O'Donell @ 2014-09-10 14:23 UTC (permalink / raw)
  To: Michael Kerrisk
  Cc: linux-man@vger.kernel.org, Simo Sorce, Jakub Hrozek,
	GNU C Library

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. Pleas apply.

diff --git a/man3/getgrent.3 b/man3/getgrent.3
index f49c746..02f26bd 100644
--- a/man3/getgrent.3
+++ b/man3/getgrent.3
@@ -141,6 +141,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
---

Cheers,
Carlos.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-15  1:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 14:23 [PATCH] getgrent.3: Add ENOENT to error list Carlos O'Donell
     [not found] ` <54105ED1.5020206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-09-10 14:53   ` Siddhesh Poyarekar
2014-09-10 16:57     ` Carlos O'Donell
     [not found]       ` <541082E0.8050707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-09-15  1:04         ` Siddhesh Poyarekar
2014-09-10 16:45   ` Carlos O'Donell
2014-09-14 16:09   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox