Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Gleb Smirnoff
On Thu, Dec 22, 2011 at 11:50:53PM +0400, Gleb Smirnoff wrote: T> Here is my variant attached. Sorry, this one is correct. -- Totus tuus, Glebius. Index: openpam_dynamic.c === --- openpam_dynamic.c (revision 228816) +++ openpam_dyna

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Gleb Smirnoff
On Thu, Dec 22, 2011 at 08:34:29PM +0100, Dag-Erling Sm??rgrav wrote: D> > > /* D> > > @@ -124,7 +129,8 @@ D> > > dlclose(dlh); D> > > FREE(module); D> > > err: D> > > -openpam_log(PAM_LOG_ERROR, "%m"); D> > > +if (errno != 0) D> > > +open

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Dag-Erling Smørgrav
Gleb Smirnoff writes: > "Dag-Erling Smørgrav" writes: > > @@ -63,10 +63,15 @@ > > static void * > > try_dlopen(const char *modfn) > > { > > + void *dlh; > > > > if (openpam_check_path_owner_perms(modfn) != 0) > > return (NULL); > > - return (dlopen(modfn, RTLD_NOW)); > >

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Gleb Smirnoff
On Thu, Dec 22, 2011 at 07:33:30PM +0100, Dag-Erling Sm??rgrav wrote: D> Actually, there is no good general solution, because the rtld does not D> set errno. Here's what I came up with: D> D> Index: openpam_dynamic.c D> === D> --- op

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Gleb Smirnoff
On Thu, Dec 22, 2011 at 07:27:05PM +0100, Dag-Erling Sm??rgrav wrote: D> Gleb Smirnoff writes: D> > I haven't yet tested this, but code looks like it is not going to print D> > anything in a case I don't have /usr/local/bin/pam_foo.so, while purpose D> > of the patch is to avoid logging of failure

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Dag-Erling Smørgrav
Actually, there is no good general solution, because the rtld does not set errno. Here's what I came up with: Index: openpam_dynamic.c === --- openpam_dynamic.c (revision 509) +++ openpam_dynamic.c (working copy) @@ -63,10 +63,15

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Dag-Erling Smørgrav
Gleb Smirnoff writes: > 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 som

Re: svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Gleb Smirnoff
Dag-Erling, On Thu, Dec 22, 2011 at 06:10:15PM +, 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>

svn commit: r228809 - vendor/openpam/dist/lib

2011-12-22 Thread Dag-Erling Smorgrav
Author: des Date: Thu Dec 22 18:10:15 2011 New Revision: 228809 URL: http://svn.freebsd.org/changeset/base/228809 Log: Merge upstream r509: don't log an error in the common case (ENOENT). Modified: vendor/openpam/dist/lib/openpam_check_owner_perms.c Modified: vendor/openpam/dist/lib/openpam_