1826410 Members
4136 Online
109692 Solutions
New Discussion

where is the getspnam?

 
SOLVED
Go to solution
MA Qiang
Regular Advisor

where is the getspnam?

When I compiled the pure-ftpd source code which was downloaded from ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.20.tar.gz, I got a error:Could not found the getspnam.

I have installed the shadow password depot downloaded from software.hp.com.
8 REPLIES 8
Bill Hassell
Honored Contributor

Re: where is the getspnam?

getspnam is for Trusted systems only. Since shadow passwords on HP-UX is relatively new, pureFTP may not be compatible with this feature and assumes a Trusted system. You'll need to contact the author of pureFTP for a workaround or use a Trusted system. I would look over the notes at the end of the man page for getspnam and the release notes for shadow password.


Bill Hassell, sysadmin
MA Qiang
Regular Advisor

Re: where is the getspnam?

I compiled the source in trust system but still got the error:
checking for getspnam... no
checking for getspnam in -lshadow... no
MA Qiang
Regular Advisor

Re: where is the getspnam?

I modified the configure file of pure-ftpd, changed the "-lshadow" to "-lsec". When I executed the 'make install', I got the link error:
/usr/ccs/bin/ld: Unsatisfied symbols:
getspnam (first referenced in pure-pwconvert.o) (code)
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.

The output of "ar -t /usr/lib/libsec.a" is:
accept_pw.o
authcap.o
data.o
discr.o
fields.o
getdvagent.o
getpasswd.o
getprdfent.o
getprpwent.o
getprtcent.o
getspwent.o
identity.o
iscomsec.o
secdef.o
map_ids.o
passlen.o
putspent.o
putspwent.o
randomword.o
seed.o
tod.o
getspent.o
write_sec.o
thread.o
fgetprpwent.o
fgetpw_sec.o
libsec_cs.2_vers.o

I can not find the getspnam.o
Stephen Keane
Honored Contributor

Re: where is the getspnam?

getspnam is in /usr/lib/libsec.sl. Is there any way you can change the makefile to link in the shared library rather than the archive one?
MA Qiang
Regular Advisor

Re: where is the getspnam?

Could you tell me how to add the shared library to my Makefile?
Stephen Keane
Honored Contributor
Solution

Re: where is the getspnam?

You've edited configure and around line 11647 you've changed LIBS="-lsec $LIBS" as shown below?

if test "${ac_cv_lib_shadow_getspnam+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */

You must also change configure around line 11597 to look like this ...

int
main ()
{
return f != getspnam;
;
return 0;
}
_ACEOF
LIBS="-lsec $LIBS"
cp conftest.$ac_ext fred.c
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5

I've added the LIBS line. This makes configure run correctly, but as I don't have a secure system, I can't tell if it actually compiles! :)

See how you get on with that, and post any errors you get.
Stephen Keane
Honored Contributor

Re: where is the getspnam?

Sorry, the

cp conftest.$ac_ext fred.c

isn't necessary, I was just trying to see what it was trying to compile.
MA Qiang
Regular Advisor

Re: where is the getspnam?

I have run the pure-ftpd with shadow password. Thank Stephen Keane!