From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:22:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453FD106566C; Thu, 22 Dec 2011 18:22:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id B74638FC1D; Thu, 22 Dec 2011 18:22:20 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMIMJUH092830; Thu, 22 Dec 2011 22:22:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMIMJvd092829; Thu, 22 Dec 2011 22:22:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 22:22:19 +0400 From: Gleb Smirnoff To: Dag-Erling Smorgrav Message-ID: <20111222182219.GS80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201112221810.pBMIAFlo028054@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:22:21 -0000 Dag-Erling, On Thu, Dec 22, 2011 at 06:10:15PM +0000, Dag-Erling Smorgrav wrote: D> Author: des D> Date: Thu Dec 22 18:10:15 2011 D> New Revision: 228809 D> URL: http://svn.freebsd.org/changeset/base/228809 D> D> Log: D> Merge upstream r509: don't log an error in the common case (ENOENT). D> D> Modified: D> vendor/openpam/dist/lib/openpam_check_owner_perms.c D> D> Modified: vendor/openpam/dist/lib/openpam_check_owner_perms.c D> ============================================================================== D> --- vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 16:40:35 2011 (r228808) D> +++ vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 18:10:15 2011 (r228809) D> @@ -104,9 +104,11 @@ openpam_check_path_owner_perms(const cha D> len = strlen(pathbuf); D> while (len > 0) { D> if (stat(pathbuf, &sb) != 0) { D> - serrno = errno; D> - openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); D> - errno = serrno; D> + if (errno != ENOENT) { D> + serrno = errno; D> + openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); D> + errno = serrno; D> + } D> return (-1); D> } D> if ((sb.st_uid != root && sb.st_uid != arbitrator) || I haven't yet tested this, but code looks like it is not going to print anything in a case I don't have /usr/local/bin/pam_foo.so, while purpose of the patch is to avoid logging of failure to open /usr/local/bin/pam_foo.so.5. Although openpam_dynamic() will do some logging of errno value, the name of the failed file won't be logged. If I got a lot of modules configured, then I can't figure out which one is ENOENT. IMHO, some no_log flag should be passed down from the try_dlopen() to fix the issue correctly. -- Totus tuus, Glebius.