From owner-freebsd-current@FreeBSD.ORG Sun Jun 26 21:09:57 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D827216A41C; Sun, 26 Jun 2005 21:09:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AFEF43D48; Sun, 26 Jun 2005 21:09:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix4-2.free.fr (Postfix) with ESMTP id EF5E63202EE; Sun, 26 Jun 2005 23:09:56 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 36A60405B; Sun, 26 Jun 2005 23:10:11 +0200 (CEST) Date: Sun, 26 Jun 2005 23:10:11 +0200 From: Jeremie Le Hen To: freebsd-current@FreeBSD.org Message-ID: <20050626211011.GH1283@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.9i Cc: freebsd-ports@FreeBSD.org Subject: OpenPAM Figwort broke PAM modules from ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2005 21:09:58 -0000 Hi, first sorry for cross-posting, but I think this may interest both -current@ and -ports@ readers. Dag-Erling Smørgrav imported the lastest OpenPAM release, called "Figwort". This release includes the following diff : %%% diff -urNp openpam-feterita/lib/openpam_dynamic.c openpam-figwort/lib/openpam_dynamic.c --- openpam-feterita/lib/openpam_dynamic.c Sun Jun 1 14:54:03 2003 +++ openpam-figwort/lib/openpam_dynamic.c Fri Jun 17 10:11:42 2005 @@ -57,6 +57,7 @@ pam_module_t * openpam_dynamic(const char *path) { pam_module_t *module; + const char *prefix; char *vpath; void *dlh; int i; @@ -65,8 +66,14 @@ openpam_dynamic(const char *path) if ((module = calloc(1, sizeof *module)) == NULL) goto buf_err; + /* Prepend the standard prefix if not an absolute pathname. */ + if (path[0] != '/') + prefix = OPENPAM_MODULES_DIR; + else + prefix = ""; + /* try versioned module first, then unversioned module */ - if (asprintf(&vpath, "%s.%d", path, LIB_MAJ) < 0) + if (asprintf(&vpath, "%s%s.%d", prefix, path, LIB_MAJ) < 0) goto buf_err; if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror()); %%% This prevents PAM modules installed in /usr/local/lib from being dlopen(3)'d. I'm not sure whether FreeBSD really wants this new ``feature'' or not, but actually I think this needs a note in src/UPDATING to be issued, explaining that PAM modules installed from ports need to be specified with their full path now. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >