Open stwongst opened 5 years ago
Can get getopt.h compiled after completing manual configuration steps after running gnulib-tool. However, got other error that err.h is not found even the gnulib error module is imported. Have to comment out err.h and rewrite functions, e.g. replace err with fprintf.
After handling the err.h problem, got _GL_INLINE_HEADER_BEGIN undefined problem:
CC src/base32_prog.o
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/fcntl.h:242,
from src/base32_prog.c:20:
./lib/unistd.h:627:3: error: #error "Please include config.h first."
#error "Please include config.h first."
^~~~~
./lib/unistd.h:629:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN'
_GL_INLINE_HEADER_BEGIN
^~~~~~~~~~~~~~~~~~~~~~~
./lib/unistd.h:2147:22: error: expected ';' before 'extern'
_GL_INLINE_HEADER_END
^
;
Checked following line is already in configure.ac but seems didn't help.
AC_CONFIG_HEADER(config.h)
Would anyone please help? Thanks a lot.
What if you add #include "config.h"
as the first include in src/base32_prog.c
?
Yes, get compiled after adding '#include "config.h" to src/base32_prog.c. Thanks for your help.
I put a line in /etc/pam.conf for testing. `
su auth required pam_google_authenticator.so user=root secret=/var/lib/google-authenticator/${USER} su auth required pam_aix `
Will prompt for entering Verification Code but got segmentation fault.
Repeat the test by removing all arguments in pam.conf, got same result.
su auth required pam_google_authenticator.so
Tried truss on AIX but not much information disclosed:
[snipped] 8847830: 20971843: _sigaction(1, 0x2FF21D18, 0x00000000) = 0 8847830: 20971843: thread_setmymask_fast(0x00000000, 0x00000000, 0x00000000, 0x11400143, 0x00003BE8, 0x00000000, 0x507B4000, 0x00000000) = 0x00000000 8847830: Received signal #11, SIGSEGV [default] 8847830: *** process killed ***
Would anyone please shed some light on steps to compile it on AIX 7.x ? Thanks a lot.
Looks like it may be the same issue as issue #100.
Thanks. Seems no solution yet.... Tried to do backtrace and gives following, not much information.
#0 0xd3628fec in vsyslog () from /usr/lib/security/pam_google_authenticator.so
#1 0xd3629b9c in log_message ()
from /usr/lib/security/pam_google_authenticator.so
#2 0xd362d4a0 in google_authenticator ()
from /usr/lib/security/pam_google_authenticator.so
#3 0xd200ffac in pam_authenticate () from /usr/lib/libpam.a(shr.o)
warning: (Internal error: pc 0x10002a23 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x10002a23 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x10002a23 in read in psymtab, but not in symtab.)
#4 0x10002a24 in ?? ()
warning: (Internal error: pc 0x100018f7 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x100018f7 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x100018f7 in read in psymtab, but not in symtab.)
#5 0x100018f8 in ?? ()
warning: (Internal error: pc 0x1000016b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1000016b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1000016b in read in psymtab, but not in symtab.)
#6 0x1000016c in ?? ()
Copy-paste of comment from #100:
I'm afraid that realistically I don't have time to troubleshoot this, not having access to an AIX system[1]. You could sprinkle some fprintf(stderr,
in there, which may help if you know what you're doing.
[1] even with access I'm unlikely to have time at least the next month or two.
Thanks. After doing some debugging, seems the segmentation fault was caught at vsyslog in pam_google_authenticator.c:
#if !defined(DEMO) && !defined(TESTING)
openlog(logname, LOG_CONS | LOG_PID, LOG_AUTHPRIV);
vsyslog(priority, format, args); <----
closelog();
Also tried to make up a local vsyslog function and the segmentation fault was caught at vasprintf:
void vsyslog (int facility_priority, const char *format, va_list arglist)
{
char *msg = NULL;
vasprintf(&msg, format, arglist);
if (!msg)
return;
syslog(facility_priority, "%s", msg);
SAFE_FREE(msg);
}
Yet to do more debugging on the vasprintf call from gnulib....
I'd inspect that format string, see if it's NULL
or bad.
Just have time to re-visit the case. The format string looks good:
Failed to read "%s" for "%s"
Always got segmentation fault when calling "vasprintf(&msg, format, arglist);".
Does anyone has made it on AIX?
Thanks.
Hi, I tried to compile it on AIX 7.2 but failed with error during make:
I tried to add getopt module but not sure if the steps are correct:
Can only found lib/getopt.in.h but nowhere else.
Would anyone please help? Sorry for the newbie question.
Thanks and rgds