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

Gleb Smirnoff glebius at FreeBSD.org
Thu Dec 22 18:40:07 UTC 2011


On Thu, Dec 22, 2011 at 07:27:05PM +0100, Dag-Erling Sm??rgrav wrote:
D> Gleb Smirnoff <glebius at FreeBSD.org> 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 to open
D> > /usr/local/bin/pam_foo.so.5.
D> >
D> > Although openpam_dynamic() will do some logging of errno value, the name
D> > of the failed file won't be logged. If I got a lot of modules configured,
D> > then I can't figure out which one is ENOENT.
D> >
D> > IMHO, some no_log flag should be passed down from the try_dlopen() to fix
D> > the issue correctly.
D> 
D> Index: openpam_dynamic.c
D> ===================================================================
D> --- openpam_dynamic.c   (revision 509)
D> +++ openpam_dynamic.c   (working copy)
D> @@ -124,7 +124,7 @@
D>           dlclose(dlh);
D>           FREE(module);
D>  err:
D> -       openpam_log(PAM_LOG_ERROR, "%m");
D> +       openpam_log(PAM_LOG_ERROR, "%s: %m", path);
D>         return (NULL);
D>  }

If you don't mind, I'd prefer printing vpath here. Looks like in some
cases the path may be not absolute, and informing user of open failure
is more useful when an exact path where open failed is logged. This
would require shifting FREE(vpath) down the function, I hope this isn't
a problem.

-- 
Totus tuus, Glebius.


More information about the svn-src-vendor mailing list