pam_ssh_agent_auth: ENOENT

Stefan Bethke stb at lassitu.de
Tue Feb 26 23:39:52 UTC 2013


> Looks like the port is still broken if compiled on a 9-STABLE system
> with new vis(3) functions included. Compiling it on a 9.1-RELEASE
> system produces a working package. I use devel/poudriere-devel for
> compiling packages and I didn't test the port by compiling it
> manually.

I did some prodding, and it would appear the .so can't be loaded because of a missing symbol:

#include <dlfcn.h>
#include <err.h>
#include <stdio.h>
#include <sysexits.h>

int
main(void)
{
        void *dlh;

        dlh = dlopen("/usr/local/lib/pam_ssh_agent_auth.so", RTLD_NOW);
        if (dlh == NULL)
                errx(EX_OSERR, "dlopen(): %s", dlerror());
        return 0;
}

$ ./dltest 
dltest: dlopen(): /usr/local/lib/pam_ssh_agent_auth.so: Undefined symbol "pamsshagentauth_strnvis"

The code in the test program is similar to the code in src/contrib/openpam/lib/openpam_dynamic.c::openpam_dynamic().

Looking at the Makefiles, it seems that openbin-compat/vis.c should end up in libopenbsd-compat.a, and that in turn should get linked into the module, but:
# nm --defined-only openbsd-compat/libopenbsd-compat.a
...
strtonum.o:
0000000000000000 T pamsshagentauth_strtonum

strtoul.o:

vis.o:

port-aix.o:
...

openbsd-compat/vis.h is #ifdef'd HAVE_STRNVIS, so we check configure.  configure.log thinks we have a suitable strnvis:

configure:16566: checking for strnvis
configure:16622: cc -o conftest -O2 -pipe -fno-strict-aliasing -fPIC -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -fstack-protector-all   -fstack-protector-all conftest.c  -lutil -lpam >&5
configure:16629: $? = 0
configure:16651: result: yes


Do we?  Then the hard-coded use in log.c needs to be changed.  If FreeBSD's strnvis is not compatible, then the configure test needs to be fixed.  Attached is a (dirty) patch to make that change to log.c; not sure if this is the correct way.  Maybe use __FreeBSD_version instead.


Stefan

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-log.c.txt
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130227/2ea7778d/attachment.txt>


More information about the freebsd-ports mailing list