FYI....

I was able to get some very good assistance from Reliable Penguin
(www.reliablepenguin.com).  Please see their response below.  Looks like
there may be a compile issue under Redhat 9.0.  Anybody have any ideas?

Eric Ferguson 


-----Original Message-----
From: Lee Blakely [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 8:49 AM
To: Eric Ferguson
Subject: RE: FW: Pam and Radius 9.0

Eric,

Here's a summary of my troubleshooting efforts with pam_radius_auth.
Feel free
to post this to the mailing list.

The conclusion was that there are memory allocation problems in the
pam_radius_auth code that are resulting in heap corruption when compiled
and run
under RedHat 9. The code works on RedHat 8. The difference between 8 and
9 is
the glibc version - 9 is newer and includes new malloc routines that may
not be
as forgiving as the older version.

Compiling on RH9 works. There is an warning about an invalid token after
a endif
directive but this is not a problem - the extra token is a misplaced
comment.

When pam_radius_auth is installed and configured to run from an
application as
root then it works. For testing purposes, I used the "su" command. I was
able to
"su" from root to a user account sucessfully. But when I tried to "su"
from a
non-root account to root the command would hang before prompting for a
password.
In the debug log I would see a message "Got user name root" but no
further messages.

Next I tried activating the malloc debug functions in glibc by setting
the
MALLOC_CHECK_ environment variable to 1. With this set an su from root
to a user
account gave an "invalid pointer" warning. An su from non-root to root
still
hung. With MALLOC_CHECK_ set to 2 the su command segfaulted in all
cases.

Next I tried testing with the MPatrol memory debugger. It reported
memory
allocation errors but was not able to localize the error in a way that
was
meaningful to me.

Looking at the code it appears that the failure is happening in the
initialize()
function - it looks like su is hanging when it tries to read from the
config
file. I added a few debugging lines and found that the pointer address
for the
file handle cooresponded to the invalid pointer address returned by
MALLOC_CHECK_. This leads me to conclude that the heap is being
corrupted at
point prior to the call to initialize().

This was a far as I was able to track the problem. I've got only limited
C
experience. Hopefully somebody that is more familiar with the code will
be able
to make more progress.

-- 
Lee Blakely
Senior Support Engineer
Reliable Penguin Consulting
Phone: 704-996-3241
[EMAIL PROTECTED]
http://www.reliablepenguin.com
BEGIN:VCARD
VERSION:2.1
N:Ferguson;Eric;V
FN:Eric V Ferguson ([EMAIL PROTECTED])
ORG:Jaguar Technology
TITLE:Sales Engineer
TEL;WORK;VOICE:(410) 876-0585
TEL;CELL;VOICE:(443) 677-6119
TEL;WORK;FAX:(410) 795-5666
ADR;WORK:;410-876-0585;4440 Embassy Drive;Sykesville;Md.;21784
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:410-876-0585=0D=0A4440 Embassy Drive=0D=0ASykesville, Md. 21784
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020418T205731Z
END:VCARD

Reply via email to