Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2020 17:55:45 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360663 - head/contrib/libc-pwcache
Message-ID:  <202005051755.045HtjJ5077439@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Tue May  5 17:55:45 2020
New Revision: 360663
URL: https://svnweb.freebsd.org/changeset/base/360663

Log:
  pwcache.3: Explicitly document OOM condition
  
  The pwcache functions allocate memory, and may return NULL pointers if that
  allocation fails and the corresponding uid or gid was not found in the local
  password database.  Document this behavior.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  head/contrib/libc-pwcache/pwcache.3

Modified: head/contrib/libc-pwcache/pwcache.3
==============================================================================
--- head/contrib/libc-pwcache/pwcache.3	Tue May  5 17:52:44 2020	(r360662)
+++ head/contrib/libc-pwcache/pwcache.3	Tue May  5 17:55:45 2020	(r360663)
@@ -56,7 +56,7 @@
 .\"
 .\"     @(#)pwcache.3	8.1 (Berkeley) 6/9/93
 .\"
-.Dd October 19, 2012
+.Dd May 5, 2020
 .Dt PWCACHE 3
 .Os
 .Sh NAME
@@ -193,6 +193,15 @@ and
 may be
 .Dv NULL
 pointers.
+.Sh ERRORS
+If insufficient memory is available,
+.Fn user_from_uid
+and
+.Fn group_from_gid
+may return NULL pointers.
+.Va errno
+is set to
+.Er ENOMEM .
 .Sh SEE ALSO
 .Xr getgrgid 3 ,
 .Xr getgrnam 3 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005051755.045HtjJ5077439>