svn commit: r228809 - vendor/openpam/dist/lib
Dag-Erling Smørgrav
des at des.no
Thu Dec 22 19:34:39 UTC 2011
Gleb Smirnoff <glebius at FreeBSD.org> writes:
> "Dag-Erling Smørgrav" <des at des.no> 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));
> > + if ((dlh = dlopen(modfn, RTLD_NOW)) == NULL) {
> > + openpam_log(PAM_LOG_DEBUG, "%s: %s", modfn, dlerror());
> > + errno = 0;
> > + }
> > + return (dlh);
> > }
>
> Why not PAM_LOG_ERROR?
copy-paste mistake
> > /*
> > @@ -124,7 +129,8 @@
> > dlclose(dlh);
> > FREE(module);
> > err:
> > - openpam_log(PAM_LOG_ERROR, "%m");
> > + if (errno != 0)
> > + openpam_log(PAM_LOG_ERROR, "%s: %m", path);
> > return (NULL);
> > }
>
> I think vpath is better choice here, as explained in previous mail
At this point, vpath is either NULL or garbage.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the svn-src-all
mailing list