Bug 673

Summary: skeychallenge call has 4 args in NetBSD
Product: Portable OpenSSH Reporter: Ed Ravin <eravin>
Component: sshdAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: normal Keywords: help-wanted
Priority: P2    
Version: -current   
Hardware: All   
OS: NetBSD   
Bug Depends on:    
Bug Blocks: 821    
Attachments:
Description Flags
Test if skeychallenge() takes 4 args. none

Description Ed Ravin 2003-09-18 10:19:22 AEST
The skeychallenge() call has four arguments in NetBSD:

     int
     skeychallenge(struct skey *mp, const char *name, char *ss, size_t 
sslen);

OpenSSH does not know about the 4th argument, so when you build with 
--with-skey, the compile fails.

If I put this into config.h:

  #define skeychallenge(a,b,c) skeychallenge(a,b,c,sizeof(c))

then compilation is successful.
Comment 1 Darren Tucker 2004-01-24 19:20:45 AEDT
Perhaps configure could test for a 4-arg version the same as it does for
loginfailed() on AIX, then add the define if required?
Comment 2 Damien Miller 2004-02-10 16:58:11 AEDT
Is there an easy way to detect how many args a #define has from autoconf? It may
need a test prog.
Comment 3 Darren Tucker 2004-02-10 17:10:37 AEDT
There's an example in the AIX section of configure.ac (look for
LOGINFAILED_4ARG).  It just does AC_TRY_COMPILE.
Comment 4 Darren Tucker 2004-02-24 13:28:46 AEDT
If someone could write (and test!) a patch against configure.ac to check for a
4-arg skeychallenge we will review and probably apply it.  The test should not
be NetBSD-specific, in case other platforms have the same issue.

See LOGINFAILED_4ARG for an example of how it can be done.
Comment 5 Darren Tucker 2004-04-14 14:27:45 AEST
Created attachment 602 [details]
Test if skeychallenge() takes 4 args.
Comment 6 Darren Tucker 2004-04-14 15:36:56 AEST
Patch applied and will be in 3.8.1p1.  Thanks for the report.
Comment 7 Damien Miller 2004-04-19 23:30:33 AEST
Closed with release of portable OpenSSH 3.8.1p1