Re: Radius and the "UNIX" password...

William Bulley (web@merit.edu)
Fri, 8 Sep 1995 11:09:59 -0400 (EDT)

According to David Jirku:
>
> wintermute# make all
> gcc -O -DHAVE_SETVBUF -o ./src/authenticate.o -c ./src/authenticate.c
> ./src/authenticate.c: In function `unix_pass':
> ./src/authenticate.c:717: warning: assignment makes pointer from integer
> without a cast
> ./src/authenticate.c:725: dereferencing pointer to incomplete type
> *** Error code 1
>
> Stop.
>
> Line 725 is:
>
> encrypted_pass = spwd->sp_pwdp;
>
> So it's still related to shadow passwords, or the like. I don't have too
> much experience with these data types, so any ideas would be great.
> Thanks again for the help...

This is code which is in the Merit 2.3 release because it was in the
Livingston 1.16 release (remember the Merit 2.3 version is supposed
to be the best of both worlds!) :-)

Since you are running BSDi 2.0 you have shadow passwords. Therefore
you removed the NOSHADOW make(1) macro from the Makefile. In the
authenticate.c file this macro guards two relevant sequences:

#if defined(M_UNIX)
struct passwd *spwd;
#else /* M_UNIX */
struct spwd *spwd;
#endif /* M_UNIX */

and later around line 725:

#if defined(M_UNIX)
encrypted_pass = spwd->pw_passwd;
#else /* M_UNIX */
encrypted_pass = spwd->sp_pwdp;
#endif /* M_UNIX */

Since BSDi 2.0 preserves the getpwnam(3) semantics and the standard
struct passwd fields in pwd.h, you don't want to be referring to the
struct spwd stuff and probably should define the make(1) macro M_UNIX.

Regards,

web...

-- 
William Bulley, N8NXN              Senior Systems Research Programmer
Merit Network Inc.                 Domain: web@merit.edu
4251 Plymouth Road                 MaBell: (313) 764-9993
Ann Arbor, Michigan  48105-2785    Fax:    (313) 747-3185