Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 20:34:29 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org
Subject:   Re: svn commit: r228809 - vendor/openpam/dist/lib
Message-ID:  <8639ccs8my.fsf@ds4.des.no>
In-Reply-To: <20111222184258.GU80057@FreeBSD.org> (Gleb Smirnoff's message of "Thu, 22 Dec 2011 22:42:58 %2B0400")
References:  <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> <867h1osbgl.fsf@ds4.des.no> <20111222184258.GU80057@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Gleb Smirnoff <glebius@FreeBSD.org> writes:
> "Dag-Erling Sm=C3=B8rgrav" <des@des.no> writes:
> > @@ -63,10 +63,15 @@
> >  static void *
> >  try_dlopen(const char *modfn)
> >  {
> > +	void *dlh;
> >=20=20
> >  	if (openpam_check_path_owner_perms(modfn) !=3D 0)
> >  		return (NULL);
> > -	return (dlopen(modfn, RTLD_NOW));
> > +	if ((dlh =3D dlopen(modfn, RTLD_NOW)) =3D=3D NULL) {
> > +		openpam_log(PAM_LOG_DEBUG, "%s: %s", modfn, dlerror());
> > +		errno =3D 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 !=3D 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
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8639ccs8my.fsf>