From owner-svn-src-head@freebsd.org Tue May 5 17:55:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 479C313EEB7; Tue, 5 May 2020 17:55:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GnSy1F9sz4Jvl; Tue, 5 May 2020 17:55:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2105419E2A; Tue, 5 May 2020 17:55:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 045HtjTZ077440; Tue, 5 May 2020 17:55:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 045HtjJ5077439; Tue, 5 May 2020 17:55:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202005051755.045HtjJ5077439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 5 May 2020 17:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360663 - head/contrib/libc-pwcache X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/contrib/libc-pwcache X-SVN-Commit-Revision: 360663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2020 17:55:46 -0000 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 ,