Bug 673 - skeychallenge call has 4 args in NetBSD
Summary: skeychallenge call has 4 args in NetBSD
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: All NetBSD
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords: help-wanted
Depends on:
Blocks: 821
  Show dependency treegraph
 
Reported: 2003-09-18 10:19 AEST by Ed Ravin
Modified: 2004-04-19 23:30 AEST (History)
0 users

See Also:


Attachments
Test if skeychallenge() takes 4 args. (2.06 KB, patch)
2004-04-14 14:27 AEST, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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