home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / patches / ssh-1.2.27-afs-kerberos.patch < prev    next >
Encoding:
Text File  |  2000-01-22  |  196.9 KB  |  5,900 lines

  1. diff -r -u -N ssh-1.2.27/Makefile.in ssh-1.2.27-pl1/Makefile.in
  2. --- ssh-1.2.27/Makefile.in    Wed May 12 13:19:31 1999
  3. +++ ssh-1.2.27-pl1/Makefile.in    Fri Jul 30 11:18:27 1999
  4. @@ -264,7 +264,7 @@
  5.  CFLAGS         = @CFLAGS@
  6.  LDFLAGS        = @LDFLAGS@
  7.  DEFS         = @DEFS@ $(COMMERCIAL)
  8. -LIBS        = @LIBS@
  9. +LIBS        = @LIBS@ @HESIOD_LIBS@
  10.  LIBOBJS        = @LIBOBJS@
  11.  CONFOBJS    = @CONFOBJS@
  12.  SSHCONFOBJS    = @SSHCONFOBJS@
  13. @@ -285,6 +285,9 @@
  14.  KERBEROS_LIBS   = @KERBEROS_LIBS@
  15.  KERBEROS_OBJS   = @KERBEROS_OBJS@
  16.  
  17. +HESIOD_ROOT    = @HESIOD_ROOT@
  18. +HESIOD_INCS    = @HESIOD_INCS@
  19. +
  20.  RSAREFDEP    = @RSAREFDEP@
  21.  
  22.  WRAPLIBS    = @WRAPLIBS@
  23. @@ -322,7 +325,7 @@
  24.      rsa.o randoms.o md5.o buffer.o emulate.o packet.o compress.o \
  25.      xmalloc.o ttymodes.o newchannels.o bufaux.o authfd.o authfile.o \
  26.      crc32.o rsaglue.o cipher.o des.o match.o arcfour.o mpaux.o \
  27. -    userfile.o signals.o blowfish.o deattack.o
  28. +    userfile.o signals.o blowfish.o deattack.o radix.o
  29.  SSHD_OBJS = sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o \
  30.      log-server.o login.o hostfile.o canohost.o servconf.o tildexpand.o \
  31.      serverloop.o $(COMMON_OBJS) $(KERBEROS_OBJS) $(SSHDCONFOBJS)
  32. @@ -411,7 +414,7 @@
  33.      $(CC) -o rfc-pg rfc-pg.o
  34.  
  35.  .c.o:
  36. -    $(CC) -c -I. $(KERBEROS_INCS) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $<
  37. +    $(CC) -c -I. $(KERBEROS_INCS) $(HESIOD_INCS) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $<
  38.  
  39.  sshd: $(SSHD_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
  40.      -rm -f sshd
  41. diff -r -u -N ssh-1.2.27/README.AFS-KERBEROS ssh-1.2.27-pl1/README.AFS-KERBEROS
  42. --- ssh-1.2.27/README.AFS-KERBEROS    Thu Jan  1 01:00:00 1970
  43. +++ ssh-1.2.27-pl1/README.AFS-KERBEROS    Fri Jul 30 12:01:54 1999
  44. @@ -0,0 +1,44 @@
  45. +
  46. +ssh-1.2.27-afs-kerberos.patch-1
  47. +AFS, Kerberos v4 support for SSH
  48. +
  49. +Here are the extra flags to configure, and what they do:
  50. +
  51. +--with-krb4[=PATH]    Compile in Kerberos v4 support:
  52. +            Kerberos v4 authentication
  53. +            Kerberos v4 password authentication
  54. +            Kerberos v4 ~/.klogin authorization
  55. +
  56. +These are all enabled by the 'KerberosAuthentication' config option.
  57. +Kerberos v4 and Kerberos v5 support are mutually exclusive for now.
  58. +PATH default is /usr/kerberos.
  59. +
  60. +--with-hesiod[=PATH]    Compile in support for Hesiod:
  61. +            getpwnam(), getpwuid() replacements
  62. +
  63. +--with-afs        Compile in AFS support (requires KTH krb4):
  64. +            ticket/token passing
  65. +            process authentication groups
  66. +            local Xauthority files (for AFS home dirs)
  67. +            /ticket TKT_ROOT directory (if it exists)
  68. +
  69. +Binaries built with AFS support will work just fine on non-AFS machines!
  70. +You will need to use the KTH krb4 libs (ftp://ftp.pdc.kth.se/pub/krb/src), 
  71. +or just their libkafs, also available separately from CMU as libkrbafs 
  72. +(http://andrew2.andrew.cmu.edu/dist/krbafs.html).
  73. +
  74. +Additional Kerberos client and server config options (and their defaults):
  75. +
  76. +     KerberosAuthentication             yes
  77. +     KerberosOrLocalPasswd        no
  78. +     KerberosTgtPassing        yes
  79. +     AFSTokenPassing        yes
  80. +     KerberosTicketCleanup        yes
  81. +
  82. +See sshd(8) and ssh(1) for details.
  83. +
  84. +The latest version of this patch can be found at
  85. +
  86. +    http://www.monkey.org/~dugsong/ssh-afs-kerberos.html
  87. +
  88. +dugsong@monkey.org
  89. diff -r -u -N ssh-1.2.27/acconfig.h ssh-1.2.27-pl1/acconfig.h
  90. --- ssh-1.2.27/acconfig.h    Wed May 12 13:19:23 1999
  91. +++ ssh-1.2.27-pl1/acconfig.h    Fri Jul 30 11:18:27 1999
  92. @@ -247,16 +247,23 @@
  93.  /* Define this if your gettimeofday doesn't have TZ parameter */
  94.  #undef HAVE_NO_TZ_IN_GETTIMEOFDAY
  95.  
  96. -/* Define this if you want to compile in Kerberos support. */
  97. -#undef KERBEROS
  98. -
  99.  /* Define this if you want to compile in Kerberos V5 support.
  100. -   KERBEROS must be compiled in as well. This can be done at configure
  101. -   time with the --with-kerberos5 argument*/
  102. +   This can be done at configure time with the --with-krb5 argument. */
  103.  #undef KRB5
  104.  
  105. -/* Define this if you want to pass the Kerberos TGT. */
  106. -#undef KERBEROS_TGT_PASSING
  107. +/* Define this if you want to compile in Kerberos V4 support.
  108. +   This can be done at configure time with the --with-krb4 argument. */
  109. +#undef KRB4
  110. +
  111. +/* Define this if you what to build ssh with Hesiod support. */
  112. +#undef HESIOD
  113. +
  114. +/* Define this if you want to compile in AFS support.
  115. +   This can be done at configure time with the --with-afs argument. */
  116. +#undef AFS
  117. +
  118. +/* Define this if you have the AFS lifetime conversion routines. */
  119. +#undef HAVE_KRB_LIFE_TO_TIME
  120.  
  121.  /* Define this if you dont have SIGINFO as signal but some other macro */
  122.  #undef HAVE_INCOMPATIBLE_SIGINFO
  123. diff -r -u -N ssh-1.2.27/auth-kerberos.c ssh-1.2.27-pl1/auth-kerberos.c
  124. --- ssh-1.2.27/auth-kerberos.c    Wed May 12 13:19:23 1999
  125. +++ ssh-1.2.27-pl1/auth-kerberos.c    Fri Jul 30 12:36:06 1999
  126. @@ -38,14 +38,13 @@
  127.  #include "xmalloc.h"
  128.  #include "ssh.h"
  129.  
  130. -#ifdef KERBEROS
  131. -#if defined (KRB5)
  132. +#ifdef KRB5
  133.  #include <krb5.h>
  134.  
  135.  extern  krb5_context ssh_context;
  136.  extern  krb5_auth_context auth_context;
  137.  
  138. -int auth_kerberos(char *server_user, krb5_data *auth, krb5_principal *client)
  139. +int auth_krb5(char *server_user, krb5_data *auth, krb5_principal *client)
  140.  {
  141.    krb5_error_code problem;
  142.    krb5_ticket *ticket;
  143. @@ -163,11 +162,115 @@
  144.    return 1;
  145.  }
  146.  #endif /* KRB5 */
  147. -#endif /* KERBEROS */
  148.  
  149. -#ifdef KERBEROS_TGT_PASSING
  150. -#if defined (KRB5)
  151. -int auth_kerberos_tgt( char *server_user, krb5_data *krb5data)
  152. +#ifdef KRB4
  153. +#include <sys/param.h>
  154. +#include <krb.h>
  155. +
  156. +int ssh_tf_init(uid_t uid)
  157. +{
  158. +  extern char *ticket;
  159. +  char *tkt_root = TKT_ROOT;
  160. +  struct stat st;
  161. +  int fd;
  162. +
  163. +  /* Set unique ticket string manually since we're still root. */
  164. +  ticket = xmalloc(MAXPATHLEN);
  165. +#ifdef AFS
  166. +  if (lstat("/ticket", &st) != -1)
  167. +    tkt_root = "/ticket/";
  168. +#endif /* AFS */
  169. +  snprintf(ticket, MAXPATHLEN, "%s%d_%d", tkt_root, uid, getpid());
  170. +  (void) krb_set_tkt_string(ticket);
  171. +
  172. +  /* Make sure we own this ticket file, and we created it. */
  173. +  if (lstat(ticket, &st) < 0 && errno == ENOENT) {
  174. +    /* good, no ticket file exists. create it. */
  175. +    if ((fd = open(ticket, O_RDWR|O_CREAT|O_EXCL, 0600)) != -1) {
  176. +      close(fd);
  177. +      return 1;
  178. +    }
  179. +  }
  180. +  else {
  181. +    /* file exists. make sure server_user owns it (e.g. just passed ticket),
  182. +       and that it isn't a symlink, and that it is mode 600. */
  183. +    if (st.st_mode == (S_IFREG|S_IRUSR|S_IWUSR) && st.st_uid == uid)
  184. +      return 1;
  185. +  }
  186. +  /* Failure. */
  187. +  log_msg("WARNING: bad ticket file %s", ticket);
  188. +  return 0;
  189. +}
  190. +
  191. +int auth_krb4(const char *server_user, KTEXT auth, char **client)
  192. +{
  193. +  AUTH_DAT adat   = { 0 };
  194. +  KTEXT_ST reply;
  195. +  char instance[INST_SZ];
  196. +  int r, s;
  197. +  u_long cksum;
  198. +  Key_schedule schedule;
  199. +  struct sockaddr_in local, foreign;
  200. +  
  201. +  s = packet_get_connection_in();
  202. +  
  203. +  r = sizeof(local);
  204. +  memset(&local, 0, sizeof(local));
  205. +  if (getsockname(s, (struct sockaddr *) &local, &r) < 0)
  206. +    debug("getsockname failed: %.100s", strerror(errno));
  207. +  r = sizeof(foreign);
  208. +  memset(&foreign, 0, sizeof(foreign));
  209. +  if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0)
  210. +    debug("getpeername failed: %.100s", strerror(errno));
  211. +  
  212. +  instance[0] = '*'; instance[1] = 0;
  213. +  
  214. +  /* Get the encrypted request, challenge, and session key. */
  215. +  if (r = krb_rd_req(auth, KRB4_SERVICE_NAME, instance, 0, &adat, "")) {
  216. +    packet_send_debug("Kerberos V4 krb_rd_req: %s", krb_err_txt[r]);
  217. +    return 0;
  218. +  }
  219. +  des_key_sched((des_cblock *)adat.session, schedule);
  220. +  
  221. +  *client = xmalloc(MAX_K_NAME_SZ);
  222. +  (void) snprintf(*client, MAX_K_NAME_SZ, "%s%s%s@%s", adat.pname,
  223. +                  *adat.pinst ? "." : "", adat.pinst, adat.prealm);
  224. +
  225. +  /* Check ~/.klogin authorization now. */
  226. +  if (kuserok(&adat, (char *)server_user) != KSUCCESS) {
  227. +    packet_send_debug("Kerberos V4 .klogin authorization failed!");
  228. +    log_msg("Kerberos V4 .klogin authorization failed for %s to account %s",
  229. +        *client, server_user);
  230. +    return 0;
  231. +  }
  232. +  /* Increment the checksum, and return it encrypted with the session key. */
  233. +  cksum = adat.checksum + 1;
  234. +  cksum = htonl(cksum);
  235. +  
  236. +  /* If we can't successfully encrypt the checksum, we send back an empty
  237. +     message, admitting our failure. */
  238. +  if ((r = krb_mk_priv((u_char *)&cksum, reply.dat, sizeof(cksum)+1,
  239. +               schedule, &adat.session, &local, &foreign)) < 0) {
  240. +    packet_send_debug("Kerberos V4 mk_priv: (%d) %s", r, krb_err_txt[r]);
  241. +    reply.dat[0] = 0;
  242. +    reply.length = 0;
  243. +  }
  244. +  else
  245. +    reply.length = r;
  246. +  
  247. +  /* Clear session key. */
  248. +  memset(&adat.session, 0, sizeof(&adat.session));
  249. +  
  250. +  packet_start(SSH_SMSG_AUTH_KERBEROS_RESPONSE);
  251. +  packet_put_string((char *) reply.dat, reply.length);
  252. +  packet_send();
  253. +  packet_write_wait();
  254. +  return 1;
  255. +}
  256. +#endif /* KRB4 */
  257. +
  258. +#ifdef KRB5
  259. +int auth_krb5_tgt( char *server_user, krb5_data *krb5data)
  260.  {
  261.    krb5_creds **creds;
  262.    krb5_error_code retval;
  263. @@ -267,5 +370,97 @@
  264.    
  265.  }
  266.  #endif /* KRB5 */
  267. -#endif /* KERBEROS_TGT_PASSING */
  268.  
  269. +
  270. +#ifdef AFS
  271. +#include <kafs.h>
  272. +
  273. +int auth_kerberos_tgt(struct passwd *pw, const char *string)
  274. +{
  275. +  CREDENTIALS creds;
  276. +  extern char *ticket;
  277. +  int r;
  278. +  
  279. +  if (!radix_to_creds(string, &creds)) {
  280. +    log_msg("Protocol error decoding Kerberos V4 tgt");
  281. +    packet_send_debug("Protocol error decoding Kerberos V4 tgt");
  282. +    goto auth_kerberos_tgt_failure;
  283. +  }
  284. +  if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */
  285. +    strcpy(creds.service, "krbtgt");
  286. +  
  287. +  if (strcmp(creds.service, "krbtgt")) {
  288. +    log_msg("Kerberos V4 tgt (%s%s%s@%s) rejected for uid %d",
  289. +        creds.pname, creds.pinst[0] ? "." : "", creds.pinst, creds.realm,
  290. +        pw->pw_uid);
  291. +    packet_send_debug("Kerberos V4 tgt (%s%s%s@%s) rejected for uid %d",
  292. +              creds.pname, creds.pinst[0] ? "." : "", creds.pinst,
  293. +              creds.realm, pw->pw_uid);
  294. +    goto auth_kerberos_tgt_failure;
  295. +  }
  296. +  if (!ssh_tf_init(pw->pw_uid) ||
  297. +      (r = in_tkt(creds.pname, creds.pinst)) ||
  298. +      (r = save_credentials(creds.service,creds.instance,creds.realm,
  299. +                creds.session,creds.lifetime,creds.kvno,
  300. +                &creds.ticket_st,creds.issue_date))) {
  301. +    xfree(ticket);
  302. +    ticket = NULL;
  303. +    packet_send_debug("Kerberos V4 tgt refused: couldn't save credentials");
  304. +    goto auth_kerberos_tgt_failure;
  305. +  }
  306. +  /* Successful authentication, passed all checks. */
  307. +  chown(ticket, pw->pw_uid, pw->pw_gid);
  308. +  packet_send_debug("Kerberos V4 tgt accepted (%s.%s@%s, %s%s%s@%s)",
  309. +            creds.service,creds.instance,creds.realm,
  310. +            creds.pname,creds.pinst[0] ? "." : "",
  311. +            creds.pinst,creds.realm);
  312. +  
  313. +  packet_start(SSH_SMSG_SUCCESS);
  314. +  packet_send();
  315. +  packet_write_wait();
  316. +  return 1;
  317. +
  318. +auth_kerberos_tgt_failure:
  319. +  memset(&creds, 0, sizeof(creds));
  320. +  packet_start(SSH_SMSG_FAILURE);
  321. +  packet_send();
  322. +  packet_write_wait();
  323. +  return 0;
  324. +}
  325. +
  326. +int auth_afs_token(char *server_user, uid_t uid, const char *string)
  327. +{
  328. +  CREDENTIALS creds;
  329. +
  330. +  if (!radix_to_creds(string, &creds)) {
  331. +    log_msg("Protocol error decoding AFS token");
  332. +    packet_send_debug("Protocol error decoding AFS token");
  333. +    packet_start(SSH_SMSG_FAILURE);
  334. +    packet_send();
  335. +    packet_write_wait();
  336. +    return 0;
  337. +  }
  338. +  if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */
  339. +    strcpy(creds.service, "afs");
  340. +  
  341. +  if (strncmp(creds.pname, "AFS ID ", 7) == 0)
  342. +    uid = atoi(creds.pname + 7);
  343. +  
  344. +  if (kafs_settoken(creds.realm, uid, &creds)) {
  345. +    log_msg("AFS token (%s@%s) rejected for uid %d", creds.pname,
  346. +        creds.realm, uid);
  347. +    packet_send_debug("AFS token (%s@%s) rejected for uid %d", creds.pname,
  348. +              creds.realm, uid);
  349. +    packet_start(SSH_SMSG_FAILURE);
  350. +    packet_send();
  351. +    packet_write_wait();
  352. +    return 0;
  353. +  }
  354. +  packet_send_debug("AFS token accepted (%s@%s, %s@%s)", creds.service,
  355. +            creds.realm, creds.pname, creds.realm);
  356. +  packet_start(SSH_SMSG_SUCCESS);
  357. +  packet_send();
  358. +  packet_write_wait();
  359. +  return 1;
  360. +}
  361. +#endif /* AFS */
  362. diff -r -u -N ssh-1.2.27/auth-passwd.c ssh-1.2.27-pl1/auth-passwd.c
  363. --- ssh-1.2.27/auth-passwd.c    Wed May 12 13:19:23 1999
  364. +++ ssh-1.2.27-pl1/auth-passwd.c    Fri Jul 30 11:28:29 1999
  365. @@ -301,29 +301,25 @@
  366.  static int securid_initialized = 0;
  367.  #endif /* HAVE_SECURID */
  368.  
  369. -#ifdef KERBEROS
  370. -#if defined(KRB5)
  371. +#ifdef KRB5
  372.  #include <krb5.h>
  373.  extern  krb5_context ssh_context;
  374.  extern  krb5_auth_context auth_context;
  375. -#else
  376. -#include <krb.h>
  377.  #endif /* KRB5 */
  378. -#endif /* KERBEROS */
  379.  
  380. -#ifdef AFS
  381. -#include <afs/param.h>
  382. -#include <afs/kautils.h>
  383. -#endif /* AFS */
  384. +#ifdef KRB4
  385. +#include <sys/param.h>
  386. +#include <krb.h>
  387. +#endif /* KRB4 */
  388.  
  389. -#if defined(KERBEROS) || defined(AFS_KERBEROS)
  390. +#if defined(KRB4) || defined(KRB5)
  391.  extern char *ticket;
  392. -#endif /* KERBEROS || AFS_KERBEROS */
  393. +#endif /* KRB4 || KRB5 */
  394.  
  395.  /* Tries to authenticate the user using password.  Returns true if
  396.     authentication succeeds. */
  397.  
  398. -#if defined(KERBEROS) && defined(KRB5)
  399. +#ifdef KRB5
  400.  /*
  401.   * This routine with some modification is from the MIT V5B6 appl/bsd/login.c
  402.   *
  403. @@ -479,16 +475,16 @@
  404.                                       0 };
  405.  #endif
  406.  krb5_preauthtype * preauth = preauth_list;
  407. -#endif /* KERBEROS */
  408. +#endif /* KRB5 */
  409.  
  410.  /* Tries to authenticate the user using password.  Returns true if
  411.     authentication succeeds. */
  412. -#ifdef KERBEROS
  413. +#ifdef KRB5
  414.  int auth_password(const char *server_user, const char *password,
  415.                    krb5_principal client)
  416. -#else  /* KERBEROS */
  417. +#else  /* KRB5 */
  418.  int auth_password(const char *server_user, const char *password)
  419. -#endif /* KERBEROS */
  420. +#endif /* KRB5 */
  421.  {
  422.  #if defined(_AIX) && defined(HAVE_AUTHENTICATE)
  423.    char *message;
  424. @@ -505,7 +501,7 @@
  425.      }
  426.  #else /* _AIX41 && HAVE_AUTHENTICATE */
  427.  
  428. -#ifdef KERBEROS
  429. +#ifdef KRB5
  430.    krb5_error_code problem;
  431.    int krb5_options = KDC_OPT_RENEWABLE | KDC_OPT_FORWARDABLE;
  432.    krb5_deltat rlife = 0;
  433. @@ -515,7 +511,7 @@
  434.    krb5_ccache ccache;
  435.    char ccname[80];
  436.    int results;
  437. -#endif  /* KERBEROS */
  438. +#endif  /* KRB5 */
  439.    extern ServerOptions options;
  440.    extern char *crypt(const char *key, const char *salt);
  441.    struct passwd *pw;
  442. @@ -537,10 +533,9 @@
  443.    saved_pw_name = xstrdup(pw->pw_name);
  444.    saved_pw_passwd = xstrdup(pw->pw_passwd);
  445.    
  446. -#if defined(KERBEROS)
  447. +#if defined(KRB5)
  448.    if (options.kerberos_authentication)
  449.      {
  450. -#if defined(KRB5)
  451.        snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_l%d", getpid());
  452.        
  453.        if (problem = krb5_cc_resolve(ssh_context, ccname, &ccache))
  454. @@ -658,9 +653,96 @@
  455.                return 0;
  456.              }
  457.          }
  458. +    }
  459.  #endif /* KRB5 */
  460. +#ifdef KRB4
  461. +  if (options.kerberos_authentication)
  462. +    {
  463. +      AUTH_DAT adata;
  464. +      KTEXT_ST tkt;
  465. +      struct hostent *hp;
  466. +      unsigned long faddr;
  467. +      char localhost[MAXHOSTNAMELEN];    /* local host name */
  468. +      char phost[INST_SZ];        /* host instance */
  469. +      char realm[REALM_SZ];        /* local Kerberos realm */
  470. +      int r;
  471. +      
  472. +      /* Try Kerberos password authentication only for non-root
  473. +     users and only if Kerberos is installed. */
  474. +      if (pw->pw_uid != 0 && krb_get_lrealm(realm, 0) == KSUCCESS) {
  475. +
  476. +    /* Set up our ticket file. */
  477. +    if (!ssh_tf_init(pw->pw_uid)) {
  478. +      log_msg("Couldn't initialize Kerberos ticket file for %s!",
  479. +          server_user);
  480. +      goto kerberos_auth_failure;
  481. +    }
  482. +    /* Try to get TGT using our password. */
  483. +        if ((r = krb_get_pw_in_tkt((char *)server_user, "", realm, "krbtgt",
  484. +             realm, DEFAULT_TKT_LIFE, (char *)password)) != INTK_OK) {
  485. +      packet_send_debug("Kerberos V4 password authentication for %s "
  486. +                "failed: %s", server_user, krb_err_txt[r]);
  487. +      goto kerberos_auth_failure;
  488. +    }
  489. +    /* Successful authentication. */
  490. +    chown(ticket, pw->pw_uid, pw->pw_gid);
  491. +    
  492. +    (void) gethostname(localhost, sizeof(localhost));
  493. +    (void) strncpy(phost, (char *)krb_get_phost(localhost), INST_SZ);
  494. +    phost[INST_SZ-1] = 0;
  495. +    
  496. +    /* Now that we have a TGT, try to get a local "rcmd" ticket to
  497. +       ensure that we are not talking to a bogus Kerberos server. */
  498. +    r = krb_mk_req(&tkt, KRB4_SERVICE_NAME, phost, realm, 33);
  499. +
  500. +    if (r == KSUCCESS) {
  501. +      if (!(hp = gethostbyname(localhost))) {
  502. +        log_msg("Couldn't get local host address!");
  503. +        goto kerberos_auth_failure;
  504. +      }
  505. +      memmove((void *)&faddr, (void *)hp->h_addr, sizeof(faddr));
  506. +
  507. +      /* Verify our "rcmd" ticket. */
  508. +      r = krb_rd_req(&tkt, KRB4_SERVICE_NAME, phost, faddr, &adata, "");
  509. +      if (r == RD_AP_UNDEC) {
  510. +        /* Probably didn't have a srvtab on localhost. Allow login. */
  511. +        log_msg("Kerberos V4 TGT for %s unverifiable, no srvtab? "
  512. +            "krb_rd_req: %s", server_user, krb_err_txt[r]);
  513. +      }
  514. +      else if (r != KSUCCESS) {
  515. +        log_msg("Kerberos V4 %s ticket unverifiable: %s",
  516. +            KRB4_SERVICE_NAME, krb_err_txt[r]);
  517. +        goto kerberos_auth_failure;
  518. +      }
  519. +    }
  520. +    else if (r == KDC_PR_UNKNOWN) {
  521. +      /* Allow login if no rcmd service exists, but log the error. */
  522. +      log_msg("Kerberos V4 TGT for %s unverifiable: %s; %s.%s "
  523. +          "not registered, or srvtab is wrong?", server_user,
  524. +          krb_err_txt[r], KRB4_SERVICE_NAME, phost);
  525. +    }
  526. +    else {
  527. +      /* TGT is bad, forget it. Possibly spoofed. */
  528. +      packet_send_debug("WARNING: Kerberos V4 TGT possibly spoofed for"
  529. +                "%s: %s", server_user, krb_err_txt[r]);
  530. +      goto kerberos_auth_failure;
  531. +    }
  532. +    
  533. +    /* Authentication succeeded. */
  534. +    return 1;
  535. +    
  536. +      kerberos_auth_failure:
  537. +    (void) dest_tkt();
  538. +    xfree(ticket);
  539. +    ticket = NULL;
  540. +    if (!options.kerberos_or_local_passwd ) return 0;
  541. +      }
  542. +      else /* Logging in as root or no local Kerberos realm. */
  543. +    packet_send_debug("Unable to authenticate to Kerberos.");
  544. +      
  545. +      /* Fall back to ordinary passwd authentication. */
  546.      }
  547. -#endif /* KERBEROS */
  548. +#endif /* KRB4 */
  549.    
  550.  #ifdef HAVE_SECURID
  551.    /* Support for Security Dynamics SecurId card.
  552. diff -r -u -N ssh-1.2.27/cipher.c ssh-1.2.27-pl1/cipher.c
  553. --- ssh-1.2.27/cipher.c    Wed May 12 13:19:24 1999
  554. +++ ssh-1.2.27-pl1/cipher.c    Fri Jul 30 11:18:27 1999
  555. @@ -213,7 +213,7 @@
  556.       used. */
  557.        if (keylen < 8)
  558.      error("Key length %d is insufficient for DES.", keylen);
  559. -      des_set_key(padded, &context->u.des.key);
  560. +      ssh_des_set_key(padded, &context->u.des.key);
  561.        memset(context->u.des.iv, 0, sizeof(context->u.des.iv));
  562.        break;
  563.  #endif /* WITH_DES */
  564. @@ -224,12 +224,12 @@
  565.       used (first and last keys are the same). */
  566.        if (keylen < 16)
  567.      error("Key length %d is insufficient for 3DES.", keylen);
  568. -      des_set_key(padded, &context->u.des3.key1);
  569. -      des_set_key(padded + 8, &context->u.des3.key2);
  570. +      ssh_des_set_key(padded, &context->u.des3.key1);
  571. +      ssh_des_set_key(padded + 8, &context->u.des3.key2);
  572.        if (keylen <= 16)
  573. -    des_set_key(padded, &context->u.des3.key3);
  574. +    ssh_des_set_key(padded, &context->u.des3.key3);
  575.        else
  576. -    des_set_key(padded + 16, &context->u.des3.key3);
  577. +    ssh_des_set_key(padded + 16, &context->u.des3.key3);
  578.        memset(context->u.des3.iv1, 0, sizeof(context->u.des3.iv1));
  579.        memset(context->u.des3.iv2, 0, sizeof(context->u.des3.iv2));
  580.        memset(context->u.des3.iv3, 0, sizeof(context->u.des3.iv3));
  581. @@ -274,12 +274,12 @@
  582.  
  583.  #ifdef WITH_DES
  584.      case SSH_CIPHER_DES:
  585. -      des_cbc_encrypt(&context->u.des.key, context->u.des.iv, dest, src, len);
  586. +      ssh_des_cbc_encrypt(&context->u.des.key, context->u.des.iv, dest, src, len);
  587.        break;
  588.  #endif /* WITH_DES */
  589.  
  590.      case SSH_CIPHER_3DES:
  591. -      des_3cbc_encrypt(&context->u.des3.key1, context->u.des3.iv1,
  592. +      ssh_des_3cbc_encrypt(&context->u.des3.key1, context->u.des3.iv1,
  593.                 &context->u.des3.key2, context->u.des3.iv2,
  594.                 &context->u.des3.key3, context->u.des3.iv3,
  595.                 dest, src, len);
  596. @@ -322,12 +322,12 @@
  597.  
  598.  #ifdef WITH_DES
  599.      case SSH_CIPHER_DES:
  600. -      des_cbc_decrypt(&context->u.des.key, context->u.des.iv, dest, src, len);
  601. +      ssh_des_cbc_decrypt(&context->u.des.key, context->u.des.iv, dest, src, len);
  602.        break;
  603.  #endif /* WITH_DES */
  604.  
  605.      case SSH_CIPHER_3DES:
  606. -      des_3cbc_decrypt(&context->u.des3.key1, context->u.des3.iv1,
  607. +      ssh_des_3cbc_decrypt(&context->u.des3.key1, context->u.des3.iv1,
  608.                 &context->u.des3.key2, context->u.des3.iv2,
  609.                 &context->u.des3.key3, context->u.des3.iv3,
  610.                 dest, src, len);
  611. diff -r -u -N ssh-1.2.27/cipher.h ssh-1.2.27-pl1/cipher.h
  612. --- ssh-1.2.27/cipher.h    Wed May 12 13:19:25 1999
  613. +++ ssh-1.2.27-pl1/cipher.h    Fri Jul 30 11:18:27 1999
  614. @@ -58,7 +58,7 @@
  615.  #ifndef WITHOUT_IDEA
  616.  #include "idea.h"
  617.  #endif /* WITHOUT_IDEA */
  618. -#include "des.h"
  619. +#include "ssh-des.h"
  620.  #ifdef WITH_ARCFOUR
  621.  #include "arcfour.h"
  622.  #endif /* WITH_ARCFOUR */
  623. diff -r -u -N ssh-1.2.27/config.h.in ssh-1.2.27-pl1/config.h.in
  624. --- ssh-1.2.27/config.h.in    Wed May 12 13:20:04 1999
  625. +++ ssh-1.2.27-pl1/config.h.in    Fri Jul 30 11:18:27 1999
  626. @@ -244,12 +244,6 @@
  627.  /* Support for Secure RPC */
  628.  #undef SECURE_RPC
  629.  
  630. -/* Support for Secure NFS */
  631. -#undef SECURE_NFS
  632. -
  633. -/* Support for NIS+ */
  634. -#undef NIS_PLUS
  635. -
  636.  /* Define this to disable all port forwardings in server (except X11) */
  637.  #undef SSHD_NO_PORT_FORWARDING
  638.  
  639. @@ -296,16 +290,23 @@
  640.  /* Define this if your gettimeofday doesn't have TZ parameter */
  641.  #undef HAVE_NO_TZ_IN_GETTIMEOFDAY
  642.  
  643. -/* Define this if you want to compile in Kerberos support. */
  644. -#undef KERBEROS
  645. -
  646.  /* Define this if you want to compile in Kerberos V5 support.
  647. -   KERBEROS must be compiled in as well. This can be done at configure
  648. -   time with the --with-kerberos5 argument*/
  649. +   This can be done at configure time with the --with-krb5 argument. */
  650.  #undef KRB5
  651.  
  652. -/* Define this if you want to pass the Kerberos TGT. */
  653. -#undef KERBEROS_TGT_PASSING
  654. +/* Define this if you want to compile in Kerberos V4 support.
  655. +   This can be done at configure time with the --with-krb4 argument. */
  656. +#undef KRB4
  657. +
  658. +/* Define this if you what to build ssh with Hesiod support. */
  659. +#undef HESIOD
  660. +
  661. +/* Define this if you want to compile in AFS support.
  662. +   This can be done at configure time with the --with-afs argument. */
  663. +#undef AFS
  664. +
  665. +/* Define this if you have the AFS lifetime conversion routines. */
  666. +#undef HAVE_KRB_LIFE_TO_TIME
  667.  
  668.  /* Define this if you dont have SIGINFO as signal but some other macro */
  669.  #undef HAVE_INCOMPATIBLE_SIGINFO
  670. @@ -518,6 +519,9 @@
  671.  
  672.  /* Define if you have the <sys/dir.h> header file.  */
  673.  #undef HAVE_SYS_DIR_H
  674. +
  675. +/* Define if you have the <sys/filio.h> header file.  */
  676. +#undef HAVE_SYS_FILIO_H
  677.  
  678.  /* Define if you have the <sys/ioctl.h> header file.  */
  679.  #undef HAVE_SYS_IOCTL_H
  680. diff -r -u -N ssh-1.2.27/configure ssh-1.2.27-pl1/configure
  681. --- ssh-1.2.27/configure    Wed May 12 13:20:06 1999
  682. +++ ssh-1.2.27-pl1/configure    Sat Jul 31 17:10:19 1999
  683. @@ -49,9 +49,13 @@
  684.  ac_help="$ac_help
  685.    --with-tis[=DIR]        Enable support for TIS authentication server."
  686.  ac_help="$ac_help
  687. -  --with-kerberos5=[KRB_PREFIX] Compile in Kerberos5 support."
  688. +  --with-krb4[=PATH]      Compile in Kerberos v4 support."
  689.  ac_help="$ac_help
  690. -  --enable-kerberos-tgt-passing  Pass Kerberos ticket-granting-ticket."
  691. +  --with-krb5[=PATH]      Compile in Kerberos v5 support."
  692. +ac_help="$ac_help
  693. +  --with-afs              Compile in AFS support (requires KTH krb4)."
  694. +ac_help="$ac_help
  695. +  --with-hesiod[=PATH]    Compile in Hesiod support."
  696.  ac_help="$ac_help
  697.    --with-libwrap[=PATH]   Compile in libwrap (tcp_wrappers) support."
  698.  ac_help="$ac_help
  699. @@ -602,6 +606,11 @@
  700.  
  701.  
  702.  
  703. +# SSH DES and AFS/Kerberos DES conflict. Yes, this is bogus.
  704. +if test -f $srcdir/des.h; then
  705. +   mv -f $srcdir/des.h $srcdir/ssh-des.h
  706. +fi
  707. +
  708.  # So many systems seem to need this that it is better do it here automatically.
  709.  LIBS="-L/usr/local/lib $LIBS"
  710.  
  711. @@ -631,7 +640,7 @@
  712.  fi
  713.  
  714.  echo $ac_n "checking host system type""... $ac_c" 1>&6
  715. -echo "configure:635: checking host system type" >&5
  716. +echo "configure:644: checking host system type" >&5
  717.  
  718.  host_alias=$host
  719.  case "$host_alias" in
  720. @@ -652,7 +661,7 @@
  721.  echo "$ac_t""$host" 1>&6
  722.  
  723.  echo $ac_n "checking cached information""... $ac_c" 1>&6
  724. -echo "configure:656: checking cached information" >&5
  725. +echo "configure:665: checking cached information" >&5
  726.  hostcheck="$host"
  727.  if eval "test \"`echo '$''{'ac_cv_hostcheck'+set}'`\" = set"; then
  728.    echo $ac_n "(cached) $ac_c" 1>&6
  729. @@ -671,7 +680,7 @@
  730.  # Extract the first word of "gcc", so it can be a program name with args.
  731.  set dummy gcc; ac_word=$2
  732.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  733. -echo "configure:675: checking for $ac_word" >&5
  734. +echo "configure:684: checking for $ac_word" >&5
  735.  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  736.    echo $ac_n "(cached) $ac_c" 1>&6
  737.  else
  738. @@ -700,7 +709,7 @@
  739.    # Extract the first word of "cc", so it can be a program name with args.
  740.  set dummy cc; ac_word=$2
  741.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  742. -echo "configure:704: checking for $ac_word" >&5
  743. +echo "configure:713: checking for $ac_word" >&5
  744.  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  745.    echo $ac_n "(cached) $ac_c" 1>&6
  746.  else
  747. @@ -748,7 +757,7 @@
  748.  fi
  749.  
  750.  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  751. -echo "configure:752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  752. +echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  753.  
  754.  ac_ext=c
  755.  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  756. @@ -758,11 +767,11 @@
  757.  cross_compiling=$ac_cv_prog_cc_cross
  758.  
  759.  cat > conftest.$ac_ext <<EOF
  760. -#line 762 "configure"
  761. +#line 771 "configure"
  762.  #include "confdefs.h"
  763.  main(){return(0);}
  764.  EOF
  765. -if { (eval echo configure:766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  766. +if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  767.    ac_cv_prog_cc_works=yes
  768.    # If we can't run a trivial program, we are probably using a cross compiler.
  769.    if (./conftest; exit) 2>/dev/null; then
  770. @@ -782,12 +791,12 @@
  771.    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  772.  fi
  773.  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  774. -echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  775. +echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  776.  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  777.  cross_compiling=$ac_cv_prog_cc_cross
  778.  
  779.  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  780. -echo "configure:791: checking whether we are using GNU C" >&5
  781. +echo "configure:800: checking whether we are using GNU C" >&5
  782.  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  783.    echo $ac_n "(cached) $ac_c" 1>&6
  784.  else
  785. @@ -796,7 +805,7 @@
  786.    yes;
  787.  #endif
  788.  EOF
  789. -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  790. +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  791.    ac_cv_prog_gcc=yes
  792.  else
  793.    ac_cv_prog_gcc=no
  794. @@ -811,7 +820,7 @@
  795.    ac_save_CFLAGS="$CFLAGS"
  796.    CFLAGS=
  797.    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  798. -echo "configure:815: checking whether ${CC-cc} accepts -g" >&5
  799. +echo "configure:824: checking whether ${CC-cc} accepts -g" >&5
  800.  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  801.    echo $ac_n "(cached) $ac_c" 1>&6
  802.  else
  803. @@ -839,7 +848,7 @@
  804.  fi
  805.  
  806.  echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  807. -echo "configure:843: checking for POSIXized ISC" >&5
  808. +echo "configure:852: checking for POSIXized ISC" >&5
  809.  if test -d /etc/conf/kconfig.d &&
  810.    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  811.  then
  812. @@ -876,20 +885,12 @@
  813.      ;;
  814.    *-*-solaris*)
  815.      # solaris stuff. appro@fy.chalmers.se
  816. -    cat >> confdefs.h <<\EOF
  817. -#define SECURE_RPC 1
  818. -EOF
  819. -
  820. -    cat >> confdefs.h <<\EOF
  821. -#define SECURE_NFS 1
  822. -EOF
  823. -
  824. +# this stuff breaks AFS/Kerberos. YUCK.
  825. +#    AC_DEFINE(SECURE_RPC)
  826. +#    AC_DEFINE(SECURE_NFS)
  827.      # NIS+ is forced so that we don't have to recompile
  828.      # if we move to NIS+. appro@fy.chalmers.se
  829. -    cat >> confdefs.h <<\EOF
  830. -#define NIS_PLUS 1
  831. -EOF
  832. -
  833. +#    AC_DEFINE(NIS_PLUS)
  834.      ;;
  835.    *-*-sunos*)
  836.      os_sunos=yes
  837. @@ -931,14 +932,14 @@
  838.      no_shadows_password_checking=yes
  839.      # We want support for <proj.h> eivind@ii.uib.no
  840.      cat > conftest.$ac_ext <<EOF
  841. -#line 935 "configure"
  842. +#line 936 "configure"
  843.  #include "confdefs.h"
  844.  #include <proj.h>
  845.  int main() {
  846.  int foo = MAXPROJNAMELEN; 
  847.  ; return 0; }
  848.  EOF
  849. -if { (eval echo configure:942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  850. +if { (eval echo configure:943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  851.    rm -rf conftest*
  852.    cat >> confdefs.h <<\EOF
  853.  #define HAVE_SGI_PROJ_H 1
  854. @@ -953,7 +954,7 @@
  855.    *-ibm-aix3.2|*-ibm-aix3.2.0|*-ibm-aix3.2.1|*-ibm-aix3.2.2|*-ibm-aix3.2.3|*-ibm-aix3.2.4)
  856.      os_aix=yes
  857.      echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6
  858. -echo "configure:957: checking for getuserattr in -ls" >&5
  859. +echo "configure:958: checking for getuserattr in -ls" >&5
  860.  ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'`
  861.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  862.    echo $ac_n "(cached) $ac_c" 1>&6
  863. @@ -961,7 +962,7 @@
  864.    ac_save_LIBS="$LIBS"
  865.  LIBS="-ls  $LIBS"
  866.  cat > conftest.$ac_ext <<EOF
  867. -#line 965 "configure"
  868. +#line 966 "configure"
  869.  #include "confdefs.h"
  870.  /* Override any gcc2 internal prototype to avoid an error.  */
  871.  /* We use char because int might match the return type of a gcc2
  872. @@ -972,7 +973,7 @@
  873.  getuserattr()
  874.  ; return 0; }
  875.  EOF
  876. -if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  877. +if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  878.    rm -rf conftest*
  879.    eval "ac_cv_lib_$ac_lib_var=yes"
  880.  else
  881. @@ -1004,7 +1005,7 @@
  882.      no_utmpx=yes
  883.      os_aix=yes
  884.      echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6
  885. -echo "configure:1008: checking for getuserattr in -ls" >&5
  886. +echo "configure:1009: checking for getuserattr in -ls" >&5
  887.  ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'`
  888.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  889.    echo $ac_n "(cached) $ac_c" 1>&6
  890. @@ -1012,7 +1013,7 @@
  891.    ac_save_LIBS="$LIBS"
  892.  LIBS="-ls  $LIBS"
  893.  cat > conftest.$ac_ext <<EOF
  894. -#line 1016 "configure"
  895. +#line 1017 "configure"
  896.  #include "confdefs.h"
  897.  /* Override any gcc2 internal prototype to avoid an error.  */
  898.  /* We use char because int might match the return type of a gcc2
  899. @@ -1023,7 +1024,7 @@
  900.  getuserattr()
  901.  ; return 0; }
  902.  EOF
  903. -if { (eval echo configure:1027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  904. +if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  905.    rm -rf conftest*
  906.    eval "ac_cv_lib_$ac_lib_var=yes"
  907.  else
  908. @@ -1054,7 +1055,7 @@
  909.    *-ibm-aix*)
  910.      os_aix=yes
  911.      echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6
  912. -echo "configure:1058: checking for getuserattr in -ls" >&5
  913. +echo "configure:1059: checking for getuserattr in -ls" >&5
  914.  ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'`
  915.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  916.    echo $ac_n "(cached) $ac_c" 1>&6
  917. @@ -1062,7 +1063,7 @@
  918.    ac_save_LIBS="$LIBS"
  919.  LIBS="-ls  $LIBS"
  920.  cat > conftest.$ac_ext <<EOF
  921. -#line 1066 "configure"
  922. +#line 1067 "configure"
  923.  #include "confdefs.h"
  924.  /* Override any gcc2 internal prototype to avoid an error.  */
  925.  /* We use char because int might match the return type of a gcc2
  926. @@ -1073,7 +1074,7 @@
  927.  getuserattr()
  928.  ; return 0; }
  929.  EOF
  930. -if { (eval echo configure:1077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  931. +if { (eval echo configure:1078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  932.    rm -rf conftest*
  933.    eval "ac_cv_lib_$ac_lib_var=yes"
  934.  else
  935. @@ -1123,7 +1124,7 @@
  936.      # Ultrix shadow passwords implemented in auth-passwd.c.
  937.      no_shadows_password_checking=yes
  938.      echo $ac_n "checking for authenticate_user in -lauth""... $ac_c" 1>&6
  939. -echo "configure:1127: checking for authenticate_user in -lauth" >&5
  940. +echo "configure:1128: checking for authenticate_user in -lauth" >&5
  941.  ac_lib_var=`echo auth'_'authenticate_user | sed 'y%./+-%__p_%'`
  942.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  943.    echo $ac_n "(cached) $ac_c" 1>&6
  944. @@ -1131,7 +1132,7 @@
  945.    ac_save_LIBS="$LIBS"
  946.  LIBS="-lauth  $LIBS"
  947.  cat > conftest.$ac_ext <<EOF
  948. -#line 1135 "configure"
  949. +#line 1136 "configure"
  950.  #include "confdefs.h"
  951.  /* Override any gcc2 internal prototype to avoid an error.  */
  952.  /* We use char because int might match the return type of a gcc2
  953. @@ -1142,7 +1143,7 @@
  954.  authenticate_user()
  955.  ; return 0; }
  956.  EOF
  957. -if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  958. +if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  959.    rm -rf conftest*
  960.    eval "ac_cv_lib_$ac_lib_var=yes"
  961.  else
  962. @@ -1170,14 +1171,14 @@
  963.  fi
  964.  
  965.      cat > conftest.$ac_ext <<EOF
  966. -#line 1174 "configure"
  967. +#line 1175 "configure"
  968.  #include "confdefs.h"
  969.  #include <syslog.h>
  970.  int main() {
  971.  int foo = LOG_DAEMON; 
  972.  ; return 0; }
  973.  EOF
  974. -if { (eval echo configure:1181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  975. +if { (eval echo configure:1182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  976.    :
  977.  else
  978.    echo "configure: failed program was:" >&5
  979. @@ -1215,7 +1216,7 @@
  980.        CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE"
  981.      fi
  982.      echo $ac_n "checking for HPUX tcb auth option""... $ac_c" 1>&6
  983. -echo "configure:1219: checking for HPUX tcb auth option" >&5
  984. +echo "configure:1220: checking for HPUX tcb auth option" >&5
  985.      if test -f /tcb/files/auth/system/pw_id_map; then
  986.        echo "$ac_t""yes" 1>&6
  987.        cat >> confdefs.h <<\EOF
  988. @@ -1227,7 +1228,7 @@
  989.        echo "$ac_t""no" 1>&6
  990.      fi
  991.      echo $ac_n "checking for keyserv""... $ac_c" 1>&6
  992. -echo "configure:1231: checking for keyserv" >&5
  993. +echo "configure:1232: checking for keyserv" >&5
  994.      if test -f /usr/sbin/keyserv; then
  995.        echo "$ac_t""yes" 1>&6
  996.        cat >> confdefs.h <<\EOF
  997. @@ -1256,7 +1257,7 @@
  998.      # The man page says that we need -lsecurity -ldb -laud -lm to quickstart
  999.      # programs using enchanced security. 
  1000.      echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
  1001. -echo "configure:1260: checking for set_auth_parameters in -lsecurity" >&5
  1002. +echo "configure:1261: checking for set_auth_parameters in -lsecurity" >&5
  1003.  ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
  1004.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1005.    echo $ac_n "(cached) $ac_c" 1>&6
  1006. @@ -1264,7 +1265,7 @@
  1007.    ac_save_LIBS="$LIBS"
  1008.  LIBS="-lsecurity  $LIBS"
  1009.  cat > conftest.$ac_ext <<EOF
  1010. -#line 1268 "configure"
  1011. +#line 1269 "configure"
  1012.  #include "confdefs.h"
  1013.  /* Override any gcc2 internal prototype to avoid an error.  */
  1014.  /* We use char because int might match the return type of a gcc2
  1015. @@ -1275,7 +1276,7 @@
  1016.  set_auth_parameters()
  1017.  ; return 0; }
  1018.  EOF
  1019. -if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1020. +if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1021.    rm -rf conftest*
  1022.    eval "ac_cv_lib_$ac_lib_var=yes"
  1023.  else
  1024. @@ -1303,7 +1304,7 @@
  1025.  fi
  1026.  
  1027.      echo $ac_n "checking for audgen in -laud""... $ac_c" 1>&6
  1028. -echo "configure:1307: checking for audgen in -laud" >&5
  1029. +echo "configure:1308: checking for audgen in -laud" >&5
  1030.  ac_lib_var=`echo aud'_'audgen | sed 'y%./+-%__p_%'`
  1031.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1032.    echo $ac_n "(cached) $ac_c" 1>&6
  1033. @@ -1311,7 +1312,7 @@
  1034.    ac_save_LIBS="$LIBS"
  1035.  LIBS="-laud  $LIBS"
  1036.  cat > conftest.$ac_ext <<EOF
  1037. -#line 1315 "configure"
  1038. +#line 1316 "configure"
  1039.  #include "confdefs.h"
  1040.  /* Override any gcc2 internal prototype to avoid an error.  */
  1041.  /* We use char because int might match the return type of a gcc2
  1042. @@ -1322,7 +1323,7 @@
  1043.  audgen()
  1044.  ; return 0; }
  1045.  EOF
  1046. -if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1047. +if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1048.    rm -rf conftest*
  1049.    eval "ac_cv_lib_$ac_lib_var=yes"
  1050.  else
  1051. @@ -1350,7 +1351,7 @@
  1052.  fi
  1053.  
  1054.      echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
  1055. -echo "configure:1354: checking for dbopen in -ldb" >&5
  1056. +echo "configure:1355: checking for dbopen in -ldb" >&5
  1057.  ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
  1058.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1059.    echo $ac_n "(cached) $ac_c" 1>&6
  1060. @@ -1358,7 +1359,7 @@
  1061.    ac_save_LIBS="$LIBS"
  1062.  LIBS="-ldb  $LIBS"
  1063.  cat > conftest.$ac_ext <<EOF
  1064. -#line 1362 "configure"
  1065. +#line 1363 "configure"
  1066.  #include "confdefs.h"
  1067.  /* Override any gcc2 internal prototype to avoid an error.  */
  1068.  /* We use char because int might match the return type of a gcc2
  1069. @@ -1369,7 +1370,7 @@
  1070.  dbopen()
  1071.  ; return 0; }
  1072.  EOF
  1073. -if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1074. +if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1075.    rm -rf conftest*
  1076.    eval "ac_cv_lib_$ac_lib_var=yes"
  1077.  else
  1078. @@ -1397,7 +1398,7 @@
  1079.  fi
  1080.  
  1081.      echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
  1082. -echo "configure:1401: checking for sin in -lm" >&5
  1083. +echo "configure:1402: checking for sin in -lm" >&5
  1084.  ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
  1085.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1086.    echo $ac_n "(cached) $ac_c" 1>&6
  1087. @@ -1405,7 +1406,7 @@
  1088.    ac_save_LIBS="$LIBS"
  1089.  LIBS="-lm  $LIBS"
  1090.  cat > conftest.$ac_ext <<EOF
  1091. -#line 1409 "configure"
  1092. +#line 1410 "configure"
  1093.  #include "confdefs.h"
  1094.  /* Override any gcc2 internal prototype to avoid an error.  */
  1095.  /* We use char because int might match the return type of a gcc2
  1096. @@ -1416,7 +1417,7 @@
  1097.  sin()
  1098.  ; return 0; }
  1099.  EOF
  1100. -if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1101. +if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1102.    rm -rf conftest*
  1103.    eval "ac_cv_lib_$ac_lib_var=yes"
  1104.  else
  1105. @@ -1446,12 +1447,12 @@
  1106.      for ac_func in setluid
  1107.  do
  1108.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1109. -echo "configure:1450: checking for $ac_func" >&5
  1110. +echo "configure:1451: checking for $ac_func" >&5
  1111.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1112.    echo $ac_n "(cached) $ac_c" 1>&6
  1113.  else
  1114.    cat > conftest.$ac_ext <<EOF
  1115. -#line 1455 "configure"
  1116. +#line 1456 "configure"
  1117.  #include "confdefs.h"
  1118.  /* System header to define __stub macros and hopefully few prototypes,
  1119.      which can conflict with char $ac_func(); below.  */
  1120. @@ -1474,7 +1475,7 @@
  1121.  
  1122.  ; return 0; }
  1123.  EOF
  1124. -if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1125. +if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1126.    rm -rf conftest*
  1127.    eval "ac_cv_func_$ac_func=yes"
  1128.  else
  1129. @@ -1507,7 +1508,7 @@
  1130.      OLD_CFLAGS="$CFLAGS"
  1131.      CFLAGS="$CFLAGS -I."
  1132.      cat > conftest.$ac_ext <<EOF
  1133. -#line 1511 "configure"
  1134. +#line 1512 "configure"
  1135.  #include "confdefs.h"
  1136.  #include <sys/types.h>
  1137.  #include <sys/security.h>
  1138. @@ -1516,7 +1517,7 @@
  1139.  
  1140.  ; return 0; }
  1141.  EOF
  1142. -if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1143. +if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1144.    :
  1145.  else
  1146.    echo "configure: failed program was:" >&5
  1147. @@ -1545,12 +1546,12 @@
  1148.    *-*-linux*|*-*-mklinux*)
  1149.      CFLAGS="-D_GNU_SOURCE $CFLAGS"
  1150.      echo $ac_n "checking for getspnam""... $ac_c" 1>&6
  1151. -echo "configure:1549: checking for getspnam" >&5
  1152. +echo "configure:1550: checking for getspnam" >&5
  1153.  if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then
  1154.    echo $ac_n "(cached) $ac_c" 1>&6
  1155.  else
  1156.    cat > conftest.$ac_ext <<EOF
  1157. -#line 1554 "configure"
  1158. +#line 1555 "configure"
  1159.  #include "confdefs.h"
  1160.  /* System header to define __stub macros and hopefully few prototypes,
  1161.      which can conflict with char getspnam(); below.  */
  1162. @@ -1573,7 +1574,7 @@
  1163.  
  1164.  ; return 0; }
  1165.  EOF
  1166. -if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1167. +if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1168.    rm -rf conftest*
  1169.    eval "ac_cv_func_getspnam=yes"
  1170.  else
  1171. @@ -1594,7 +1595,7 @@
  1172.  
  1173.      if test $ac_cv_func_getspnam = no; then
  1174.         echo $ac_n "checking for getspnam in -lshadow""... $ac_c" 1>&6
  1175. -echo "configure:1598: checking for getspnam in -lshadow" >&5
  1176. +echo "configure:1599: checking for getspnam in -lshadow" >&5
  1177.  ac_lib_var=`echo shadow'_'getspnam | sed 'y%./+-%__p_%'`
  1178.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1179.    echo $ac_n "(cached) $ac_c" 1>&6
  1180. @@ -1602,7 +1603,7 @@
  1181.    ac_save_LIBS="$LIBS"
  1182.  LIBS="-lshadow  $LIBS"
  1183.  cat > conftest.$ac_ext <<EOF
  1184. -#line 1606 "configure"
  1185. +#line 1607 "configure"
  1186.  #include "confdefs.h"
  1187.  /* Override any gcc2 internal prototype to avoid an error.  */
  1188.  /* We use char because int might match the return type of a gcc2
  1189. @@ -1613,7 +1614,7 @@
  1190.  getspnam()
  1191.  ; return 0; }
  1192.  EOF
  1193. -if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1194. +if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1195.    rm -rf conftest*
  1196.    eval "ac_cv_lib_$ac_lib_var=yes"
  1197.  else
  1198. @@ -1651,12 +1652,12 @@
  1199.      for ac_func in pw_encrypt
  1200.  do
  1201.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1202. -echo "configure:1655: checking for $ac_func" >&5
  1203. +echo "configure:1656: checking for $ac_func" >&5
  1204.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1205.    echo $ac_n "(cached) $ac_c" 1>&6
  1206.  else
  1207.    cat > conftest.$ac_ext <<EOF
  1208. -#line 1660 "configure"
  1209. +#line 1661 "configure"
  1210.  #include "confdefs.h"
  1211.  /* System header to define __stub macros and hopefully few prototypes,
  1212.      which can conflict with char $ac_func(); below.  */
  1213. @@ -1679,7 +1680,7 @@
  1214.  
  1215.  ; return 0; }
  1216.  EOF
  1217. -if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1218. +if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1219.    rm -rf conftest*
  1220.    eval "ac_cv_func_$ac_func=yes"
  1221.  else
  1222. @@ -1705,7 +1706,7 @@
  1223.  
  1224.      if test $ac_cv_func_pw_encrypt = no; then
  1225.        echo $ac_n "checking for pw_encrypt in -lshadow""... $ac_c" 1>&6
  1226. -echo "configure:1709: checking for pw_encrypt in -lshadow" >&5
  1227. +echo "configure:1710: checking for pw_encrypt in -lshadow" >&5
  1228.  ac_lib_var=`echo shadow'_'pw_encrypt | sed 'y%./+-%__p_%'`
  1229.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1230.    echo $ac_n "(cached) $ac_c" 1>&6
  1231. @@ -1713,7 +1714,7 @@
  1232.    ac_save_LIBS="$LIBS"
  1233.  LIBS="-lshadow  $LIBS"
  1234.  cat > conftest.$ac_ext <<EOF
  1235. -#line 1717 "configure"
  1236. +#line 1718 "configure"
  1237.  #include "confdefs.h"
  1238.  /* Override any gcc2 internal prototype to avoid an error.  */
  1239.  /* We use char because int might match the return type of a gcc2
  1240. @@ -1724,7 +1725,7 @@
  1241.  pw_encrypt()
  1242.  ; return 0; }
  1243.  EOF
  1244. -if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1245. +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1246.    rm -rf conftest*
  1247.    eval "ac_cv_lib_$ac_lib_var=yes"
  1248.  else
  1249. @@ -1748,7 +1749,7 @@
  1250.  
  1251.      fi
  1252.      echo $ac_n "checking whether to enable pw_encrypt""... $ac_c" 1>&6
  1253. -echo "configure:1752: checking whether to enable pw_encrypt" >&5
  1254. +echo "configure:1753: checking whether to enable pw_encrypt" >&5
  1255.      # Check whether --enable-deprecated-linux-pw-encrypt or --disable-deprecated-linux-pw-encrypt was given.
  1256.  if test "${enable_deprecated_linux_pw_encrypt+set}" = set; then
  1257.    enableval="$enable_deprecated_linux_pw_encrypt"
  1258. @@ -1825,7 +1826,7 @@
  1259.  EOF
  1260.  
  1261.      echo $ac_n "checking for openlog in -lgen""... $ac_c" 1>&6
  1262. -echo "configure:1829: checking for openlog in -lgen" >&5
  1263. +echo "configure:1830: checking for openlog in -lgen" >&5
  1264.  ac_lib_var=`echo gen'_'openlog | sed 'y%./+-%__p_%'`
  1265.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1266.    echo $ac_n "(cached) $ac_c" 1>&6
  1267. @@ -1833,7 +1834,7 @@
  1268.    ac_save_LIBS="$LIBS"
  1269.  LIBS="-lgen  $LIBS"
  1270.  cat > conftest.$ac_ext <<EOF
  1271. -#line 1837 "configure"
  1272. +#line 1838 "configure"
  1273.  #include "confdefs.h"
  1274.  /* Override any gcc2 internal prototype to avoid an error.  */
  1275.  /* We use char because int might match the return type of a gcc2
  1276. @@ -1844,7 +1845,7 @@
  1277.  openlog()
  1278.  ; return 0; }
  1279.  EOF
  1280. -if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1281. +if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1282.    rm -rf conftest*
  1283.    eval "ac_cv_lib_$ac_lib_var=yes"
  1284.  else
  1285. @@ -1874,7 +1875,7 @@
  1286.      ;;
  1287.    *-*-sysv4*)
  1288.      echo $ac_n "checking for openlog in -lgen""... $ac_c" 1>&6
  1289. -echo "configure:1878: checking for openlog in -lgen" >&5
  1290. +echo "configure:1879: checking for openlog in -lgen" >&5
  1291.  ac_lib_var=`echo gen'_'openlog | sed 'y%./+-%__p_%'`
  1292.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1293.    echo $ac_n "(cached) $ac_c" 1>&6
  1294. @@ -1882,7 +1883,7 @@
  1295.    ac_save_LIBS="$LIBS"
  1296.  LIBS="-lgen  $LIBS"
  1297.  cat > conftest.$ac_ext <<EOF
  1298. -#line 1886 "configure"
  1299. +#line 1887 "configure"
  1300.  #include "confdefs.h"
  1301.  /* Override any gcc2 internal prototype to avoid an error.  */
  1302.  /* We use char because int might match the return type of a gcc2
  1303. @@ -1893,7 +1894,7 @@
  1304.  openlog()
  1305.  ; return 0; }
  1306.  EOF
  1307. -if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1308. +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1309.    rm -rf conftest*
  1310.    eval "ac_cv_lib_$ac_lib_var=yes"
  1311.  else
  1312. @@ -1997,16 +1998,16 @@
  1313.  
  1314.  
  1315.  echo $ac_n "checking that the compiler works""... $ac_c" 1>&6
  1316. -echo "configure:2001: checking that the compiler works" >&5
  1317. +echo "configure:2002: checking that the compiler works" >&5
  1318.  if test "$cross_compiling" = yes; then
  1319.    { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; }
  1320.  else
  1321.    cat > conftest.$ac_ext <<EOF
  1322. -#line 2006 "configure"
  1323. +#line 2007 "configure"
  1324.  #include "confdefs.h"
  1325.   main(int ac, char **av) { return 0; } 
  1326.  EOF
  1327. -if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1328. +if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1329.  then
  1330.    echo "$ac_t""yes" 1>&6
  1331.  else
  1332. @@ -2023,18 +2024,18 @@
  1333.  if test -z "$no_pipe"; then
  1334.  if test -n "$GCC"; then
  1335.    echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
  1336. -echo "configure:2027: checking if the compiler understands -pipe" >&5
  1337. +echo "configure:2028: checking if the compiler understands -pipe" >&5
  1338.    OLDCC="$CC"
  1339.    CC="$CC -pipe"
  1340.    cat > conftest.$ac_ext <<EOF
  1341. -#line 2031 "configure"
  1342. +#line 2032 "configure"
  1343.  #include "confdefs.h"
  1344.  
  1345.  int main() {
  1346.  
  1347.  ; return 0; }
  1348.  EOF
  1349. -if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1350. +if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1351.    rm -rf conftest*
  1352.    echo "$ac_t""yes" 1>&6
  1353.  else
  1354. @@ -2049,7 +2050,7 @@
  1355.  fi
  1356.  
  1357.  echo $ac_n "checking whether to enable -Wall""... $ac_c" 1>&6
  1358. -echo "configure:2053: checking whether to enable -Wall" >&5
  1359. +echo "configure:2054: checking whether to enable -Wall" >&5
  1360.  # Check whether --enable-warnings or --disable-warnings was given.
  1361.  if test "${enable_warnings+set}" = set; then
  1362.    enableval="$enable_warnings"
  1363. @@ -2063,12 +2064,12 @@
  1364.  
  1365.  
  1366.  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1367. -echo "configure:2067: checking return type of signal handlers" >&5
  1368. +echo "configure:2068: checking return type of signal handlers" >&5
  1369.  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1370.    echo $ac_n "(cached) $ac_c" 1>&6
  1371.  else
  1372.    cat > conftest.$ac_ext <<EOF
  1373. -#line 2072 "configure"
  1374. +#line 2073 "configure"
  1375.  #include "confdefs.h"
  1376.  #include <sys/types.h>
  1377.  #include <signal.h>
  1378. @@ -2085,7 +2086,7 @@
  1379.  int i;
  1380.  ; return 0; }
  1381.  EOF
  1382. -if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1383. +if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1384.    rm -rf conftest*
  1385.    ac_cv_type_signal=void
  1386.  else
  1387. @@ -2104,7 +2105,7 @@
  1388.  
  1389.  
  1390.  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1391. -echo "configure:2108: checking how to run the C preprocessor" >&5
  1392. +echo "configure:2109: checking how to run the C preprocessor" >&5
  1393.  # On Suns, sometimes $CPP names a directory.
  1394.  if test -n "$CPP" && test -d "$CPP"; then
  1395.    CPP=
  1396. @@ -2119,13 +2120,13 @@
  1397.    # On the NeXT, cc -E runs the code through the compiler's parser,
  1398.    # not just through cpp.
  1399.    cat > conftest.$ac_ext <<EOF
  1400. -#line 2123 "configure"
  1401. +#line 2124 "configure"
  1402.  #include "confdefs.h"
  1403.  #include <assert.h>
  1404.  Syntax Error
  1405.  EOF
  1406.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1407. -{ (eval echo configure:2129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1408. +{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1409.  ac_err=`grep -v '^ *+' conftest.out`
  1410.  if test -z "$ac_err"; then
  1411.    :
  1412. @@ -2136,13 +2137,13 @@
  1413.    rm -rf conftest*
  1414.    CPP="${CC-cc} -E -traditional-cpp"
  1415.    cat > conftest.$ac_ext <<EOF
  1416. -#line 2140 "configure"
  1417. +#line 2141 "configure"
  1418.  #include "confdefs.h"
  1419.  #include <assert.h>
  1420.  Syntax Error
  1421.  EOF
  1422.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1423. -{ (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1424. +{ (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1425.  ac_err=`grep -v '^ *+' conftest.out`
  1426.  if test -z "$ac_err"; then
  1427.    :
  1428. @@ -2165,12 +2166,12 @@
  1429.  echo "$ac_t""$CPP" 1>&6
  1430.  
  1431.  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1432. -echo "configure:2169: checking for ANSI C header files" >&5
  1433. +echo "configure:2170: checking for ANSI C header files" >&5
  1434.  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1435.    echo $ac_n "(cached) $ac_c" 1>&6
  1436.  else
  1437.    cat > conftest.$ac_ext <<EOF
  1438. -#line 2174 "configure"
  1439. +#line 2175 "configure"
  1440.  #include "confdefs.h"
  1441.  #include <stdlib.h>
  1442.  #include <stdarg.h>
  1443. @@ -2178,7 +2179,7 @@
  1444.  #include <float.h>
  1445.  EOF
  1446.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1447. -{ (eval echo configure:2182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1448. +{ (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1449.  ac_err=`grep -v '^ *+' conftest.out`
  1450.  if test -z "$ac_err"; then
  1451.    rm -rf conftest*
  1452. @@ -2195,7 +2196,7 @@
  1453.  if test $ac_cv_header_stdc = yes; then
  1454.    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1455.  cat > conftest.$ac_ext <<EOF
  1456. -#line 2199 "configure"
  1457. +#line 2200 "configure"
  1458.  #include "confdefs.h"
  1459.  #include <string.h>
  1460.  EOF
  1461. @@ -2213,7 +2214,7 @@
  1462.  if test $ac_cv_header_stdc = yes; then
  1463.    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1464.  cat > conftest.$ac_ext <<EOF
  1465. -#line 2217 "configure"
  1466. +#line 2218 "configure"
  1467.  #include "confdefs.h"
  1468.  #include <stdlib.h>
  1469.  EOF
  1470. @@ -2234,7 +2235,7 @@
  1471.    :
  1472.  else
  1473.    cat > conftest.$ac_ext <<EOF
  1474. -#line 2238 "configure"
  1475. +#line 2239 "configure"
  1476.  #include "confdefs.h"
  1477.  #include <ctype.h>
  1478.  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1479. @@ -2245,7 +2246,7 @@
  1480.  exit (0); }
  1481.  
  1482.  EOF
  1483. -if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1484. +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1485.  then
  1486.    :
  1487.  else
  1488. @@ -2269,12 +2270,12 @@
  1489.  fi
  1490.  
  1491.  echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1492. -echo "configure:2273: checking for size_t" >&5
  1493. +echo "configure:2274: checking for size_t" >&5
  1494.  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1495.    echo $ac_n "(cached) $ac_c" 1>&6
  1496.  else
  1497.    cat > conftest.$ac_ext <<EOF
  1498. -#line 2278 "configure"
  1499. +#line 2279 "configure"
  1500.  #include "confdefs.h"
  1501.  #include <sys/types.h>
  1502.  #if STDC_HEADERS
  1503. @@ -2302,12 +2303,12 @@
  1504.  fi
  1505.  
  1506.  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1507. -echo "configure:2306: checking for uid_t in sys/types.h" >&5
  1508. +echo "configure:2307: checking for uid_t in sys/types.h" >&5
  1509.  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1510.    echo $ac_n "(cached) $ac_c" 1>&6
  1511.  else
  1512.    cat > conftest.$ac_ext <<EOF
  1513. -#line 2311 "configure"
  1514. +#line 2312 "configure"
  1515.  #include "confdefs.h"
  1516.  #include <sys/types.h>
  1517.  EOF
  1518. @@ -2336,12 +2337,12 @@
  1519.  fi
  1520.  
  1521.  echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1522. -echo "configure:2340: checking for off_t" >&5
  1523. +echo "configure:2341: checking for off_t" >&5
  1524.  if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1525.    echo $ac_n "(cached) $ac_c" 1>&6
  1526.  else
  1527.    cat > conftest.$ac_ext <<EOF
  1528. -#line 2345 "configure"
  1529. +#line 2346 "configure"
  1530.  #include "confdefs.h"
  1531.  #include <sys/types.h>
  1532.  #if STDC_HEADERS
  1533. @@ -2369,12 +2370,12 @@
  1534.  fi
  1535.  
  1536.  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1537. -echo "configure:2373: checking for mode_t" >&5
  1538. +echo "configure:2374: checking for mode_t" >&5
  1539.  if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1540.    echo $ac_n "(cached) $ac_c" 1>&6
  1541.  else
  1542.    cat > conftest.$ac_ext <<EOF
  1543. -#line 2378 "configure"
  1544. +#line 2379 "configure"
  1545.  #include "confdefs.h"
  1546.  #include <sys/types.h>
  1547.  #if STDC_HEADERS
  1548. @@ -2402,12 +2403,12 @@
  1549.  fi
  1550.  
  1551.  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  1552. -echo "configure:2406: checking for st_blksize in struct stat" >&5
  1553. +echo "configure:2407: checking for st_blksize in struct stat" >&5
  1554.  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1555.    echo $ac_n "(cached) $ac_c" 1>&6
  1556.  else
  1557.    cat > conftest.$ac_ext <<EOF
  1558. -#line 2411 "configure"
  1559. +#line 2412 "configure"
  1560.  #include "confdefs.h"
  1561.  #include <sys/types.h>
  1562.  #include <sys/stat.h>
  1563. @@ -2415,7 +2416,7 @@
  1564.  struct stat s; s.st_blksize;
  1565.  ; return 0; }
  1566.  EOF
  1567. -if { (eval echo configure:2419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1568. +if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1569.    rm -rf conftest*
  1570.    ac_cv_struct_st_blksize=yes
  1571.  else
  1572. @@ -2437,12 +2438,12 @@
  1573.  
  1574.  
  1575.  echo $ac_n "checking for working const""... $ac_c" 1>&6
  1576. -echo "configure:2441: checking for working const" >&5
  1577. +echo "configure:2442: checking for working const" >&5
  1578.  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1579.    echo $ac_n "(cached) $ac_c" 1>&6
  1580.  else
  1581.    cat > conftest.$ac_ext <<EOF
  1582. -#line 2446 "configure"
  1583. +#line 2447 "configure"
  1584.  #include "confdefs.h"
  1585.  
  1586.  int main() {
  1587. @@ -2491,7 +2492,7 @@
  1588.  
  1589.  ; return 0; }
  1590.  EOF
  1591. -if { (eval echo configure:2495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1592. +if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1593.    rm -rf conftest*
  1594.    ac_cv_c_const=yes
  1595.  else
  1596. @@ -2512,21 +2513,21 @@
  1597.  fi
  1598.  
  1599.  echo $ac_n "checking for inline""... $ac_c" 1>&6
  1600. -echo "configure:2516: checking for inline" >&5
  1601. +echo "configure:2517: checking for inline" >&5
  1602.  if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1603.    echo $ac_n "(cached) $ac_c" 1>&6
  1604.  else
  1605.    ac_cv_c_inline=no
  1606.  for ac_kw in inline __inline__ __inline; do
  1607.    cat > conftest.$ac_ext <<EOF
  1608. -#line 2523 "configure"
  1609. +#line 2524 "configure"
  1610.  #include "confdefs.h"
  1611.  
  1612.  int main() {
  1613.  } $ac_kw foo() {
  1614.  ; return 0; }
  1615.  EOF
  1616. -if { (eval echo configure:2530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1617. +if { (eval echo configure:2531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1618.    rm -rf conftest*
  1619.    ac_cv_c_inline=$ac_kw; break
  1620.  else
  1621. @@ -2552,14 +2553,14 @@
  1622.  esac
  1623.  
  1624.  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1625. -echo "configure:2556: checking whether byte ordering is bigendian" >&5
  1626. +echo "configure:2557: checking whether byte ordering is bigendian" >&5
  1627.  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1628.    echo $ac_n "(cached) $ac_c" 1>&6
  1629.  else
  1630.    ac_cv_c_bigendian=unknown
  1631.  # See if sys/param.h defines the BYTE_ORDER macro.
  1632.  cat > conftest.$ac_ext <<EOF
  1633. -#line 2563 "configure"
  1634. +#line 2564 "configure"
  1635.  #include "confdefs.h"
  1636.  #include <sys/types.h>
  1637.  #include <sys/param.h>
  1638. @@ -2570,11 +2571,11 @@
  1639.  #endif
  1640.  ; return 0; }
  1641.  EOF
  1642. -if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1643. +if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1644.    rm -rf conftest*
  1645.    # It does; now see whether it defined to BIG_ENDIAN or not.
  1646.  cat > conftest.$ac_ext <<EOF
  1647. -#line 2578 "configure"
  1648. +#line 2579 "configure"
  1649.  #include "confdefs.h"
  1650.  #include <sys/types.h>
  1651.  #include <sys/param.h>
  1652. @@ -2585,7 +2586,7 @@
  1653.  #endif
  1654.  ; return 0; }
  1655.  EOF
  1656. -if { (eval echo configure:2589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1657. +if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1658.    rm -rf conftest*
  1659.    ac_cv_c_bigendian=yes
  1660.  else
  1661. @@ -2605,7 +2606,7 @@
  1662.      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1663.  else
  1664.    cat > conftest.$ac_ext <<EOF
  1665. -#line 2609 "configure"
  1666. +#line 2610 "configure"
  1667.  #include "confdefs.h"
  1668.  main () {
  1669.    /* Are we little or big endian?  From Harbison&Steele.  */
  1670. @@ -2618,7 +2619,7 @@
  1671.    exit (u.c[sizeof (long) - 1] == 1);
  1672.  }
  1673.  EOF
  1674. -if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1675. +if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1676.  then
  1677.    ac_cv_c_bigendian=no
  1678.  else
  1679. @@ -2642,7 +2643,7 @@
  1680.  fi
  1681.  
  1682.  echo $ac_n "checking size of long""... $ac_c" 1>&6
  1683. -echo "configure:2646: checking size of long" >&5
  1684. +echo "configure:2647: checking size of long" >&5
  1685.  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  1686.    echo $ac_n "(cached) $ac_c" 1>&6
  1687.  else
  1688. @@ -2650,7 +2651,7 @@
  1689.    ac_cv_sizeof_long=4
  1690.  else
  1691.    cat > conftest.$ac_ext <<EOF
  1692. -#line 2654 "configure"
  1693. +#line 2655 "configure"
  1694.  #include "confdefs.h"
  1695.  #include <stdio.h>
  1696.  main()
  1697. @@ -2661,7 +2662,7 @@
  1698.    exit(0);
  1699.  }
  1700.  EOF
  1701. -if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1702. +if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1703.  then
  1704.    ac_cv_sizeof_long=`cat conftestval`
  1705.  else
  1706. @@ -2681,7 +2682,7 @@
  1707.  
  1708.  
  1709.  echo $ac_n "checking size of int""... $ac_c" 1>&6
  1710. -echo "configure:2685: checking size of int" >&5
  1711. +echo "configure:2686: checking size of int" >&5
  1712.  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  1713.    echo $ac_n "(cached) $ac_c" 1>&6
  1714.  else
  1715. @@ -2689,7 +2690,7 @@
  1716.    ac_cv_sizeof_int=4
  1717.  else
  1718.    cat > conftest.$ac_ext <<EOF
  1719. -#line 2693 "configure"
  1720. +#line 2694 "configure"
  1721.  #include "confdefs.h"
  1722.  #include <stdio.h>
  1723.  main()
  1724. @@ -2700,7 +2701,7 @@
  1725.    exit(0);
  1726.  }
  1727.  EOF
  1728. -if { (eval echo configure:2704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1729. +if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1730.  then
  1731.    ac_cv_sizeof_int=`cat conftestval`
  1732.  else
  1733. @@ -2720,7 +2721,7 @@
  1734.  
  1735.  
  1736.  echo $ac_n "checking size of short""... $ac_c" 1>&6
  1737. -echo "configure:2724: checking size of short" >&5
  1738. +echo "configure:2725: checking size of short" >&5
  1739.  if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  1740.    echo $ac_n "(cached) $ac_c" 1>&6
  1741.  else
  1742. @@ -2728,7 +2729,7 @@
  1743.    ac_cv_sizeof_short=2
  1744.  else
  1745.    cat > conftest.$ac_ext <<EOF
  1746. -#line 2732 "configure"
  1747. +#line 2733 "configure"
  1748.  #include "confdefs.h"
  1749.  #include <stdio.h>
  1750.  main()
  1751. @@ -2739,7 +2740,7 @@
  1752.    exit(0);
  1753.  }
  1754.  EOF
  1755. -if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1756. +if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1757.  then
  1758.    ac_cv_sizeof_short=`cat conftestval`
  1759.  else
  1760. @@ -2764,17 +2765,17 @@
  1761.  do
  1762.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1763.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1764. -echo "configure:2768: checking for $ac_hdr" >&5
  1765. +echo "configure:2769: checking for $ac_hdr" >&5
  1766.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1767.    echo $ac_n "(cached) $ac_c" 1>&6
  1768.  else
  1769.    cat > conftest.$ac_ext <<EOF
  1770. -#line 2773 "configure"
  1771. +#line 2774 "configure"
  1772.  #include "confdefs.h"
  1773.  #include <$ac_hdr>
  1774.  EOF
  1775.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1776. -{ (eval echo configure:2778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1777. +{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1778.  ac_err=`grep -v '^ *+' conftest.out`
  1779.  if test -z "$ac_err"; then
  1780.    rm -rf conftest*
  1781. @@ -2807,17 +2808,17 @@
  1782.  do
  1783.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1784.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1785. -echo "configure:2811: checking for $ac_hdr" >&5
  1786. +echo "configure:2812: checking for $ac_hdr" >&5
  1787.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1788.    echo $ac_n "(cached) $ac_c" 1>&6
  1789.  else
  1790.    cat > conftest.$ac_ext <<EOF
  1791. -#line 2816 "configure"
  1792. +#line 2817 "configure"
  1793.  #include "confdefs.h"
  1794.  #include <$ac_hdr>
  1795.  EOF
  1796.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1797. -{ (eval echo configure:2821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1798. +{ (eval echo configure:2822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1799.  ac_err=`grep -v '^ *+' conftest.out`
  1800.  if test -z "$ac_err"; then
  1801.    rm -rf conftest*
  1802. @@ -2844,9 +2845,9 @@
  1803.  done
  1804.  
  1805.    echo $ac_n "checking whether utmpx have ut_syslen field""... $ac_c" 1>&6
  1806. -echo "configure:2848: checking whether utmpx have ut_syslen field" >&5
  1807. +echo "configure:2849: checking whether utmpx have ut_syslen field" >&5
  1808.    cat > conftest.$ac_ext <<EOF
  1809. -#line 2850 "configure"
  1810. +#line 2851 "configure"
  1811.  #include "confdefs.h"
  1812.  #include <utmpx.h>
  1813.  EOF
  1814. @@ -2867,12 +2868,12 @@
  1815.  fi
  1816.  
  1817.  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1818. -echo "configure:2871: checking for ANSI C header files" >&5
  1819. +echo "configure:2872: checking for ANSI C header files" >&5
  1820.  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1821.    echo $ac_n "(cached) $ac_c" 1>&6
  1822.  else
  1823.    cat > conftest.$ac_ext <<EOF
  1824. -#line 2876 "configure"
  1825. +#line 2877 "configure"
  1826.  #include "confdefs.h"
  1827.  #include <stdlib.h>
  1828.  #include <stdarg.h>
  1829. @@ -2880,7 +2881,7 @@
  1830.  #include <float.h>
  1831.  EOF
  1832.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1833. -{ (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1834. +{ (eval echo configure:2885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1835.  ac_err=`grep -v '^ *+' conftest.out`
  1836.  if test -z "$ac_err"; then
  1837.    rm -rf conftest*
  1838. @@ -2897,7 +2898,7 @@
  1839.  if test $ac_cv_header_stdc = yes; then
  1840.    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1841.  cat > conftest.$ac_ext <<EOF
  1842. -#line 2901 "configure"
  1843. +#line 2902 "configure"
  1844.  #include "confdefs.h"
  1845.  #include <string.h>
  1846.  EOF
  1847. @@ -2915,7 +2916,7 @@
  1848.  if test $ac_cv_header_stdc = yes; then
  1849.    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1850.  cat > conftest.$ac_ext <<EOF
  1851. -#line 2919 "configure"
  1852. +#line 2920 "configure"
  1853.  #include "confdefs.h"
  1854.  #include <stdlib.h>
  1855.  EOF
  1856. @@ -2936,7 +2937,7 @@
  1857.    :
  1858.  else
  1859.    cat > conftest.$ac_ext <<EOF
  1860. -#line 2940 "configure"
  1861. +#line 2941 "configure"
  1862.  #include "confdefs.h"
  1863.  #include <ctype.h>
  1864.  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1865. @@ -2947,7 +2948,7 @@
  1866.  exit (0); }
  1867.  
  1868.  EOF
  1869. -if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1870. +if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1871.  then
  1872.    :
  1873.  else
  1874. @@ -2971,12 +2972,12 @@
  1875.  fi
  1876.  
  1877.  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  1878. -echo "configure:2975: checking for sys/wait.h that is POSIX.1 compatible" >&5
  1879. +echo "configure:2976: checking for sys/wait.h that is POSIX.1 compatible" >&5
  1880.  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1881.    echo $ac_n "(cached) $ac_c" 1>&6
  1882.  else
  1883.    cat > conftest.$ac_ext <<EOF
  1884. -#line 2980 "configure"
  1885. +#line 2981 "configure"
  1886.  #include "confdefs.h"
  1887.  #include <sys/types.h>
  1888.  #include <sys/wait.h>
  1889. @@ -2992,7 +2993,7 @@
  1890.  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1891.  ; return 0; }
  1892.  EOF
  1893. -if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1894. +if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1895.    rm -rf conftest*
  1896.    ac_cv_header_sys_wait_h=yes
  1897.  else
  1898. @@ -3016,17 +3017,17 @@
  1899.  do
  1900.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1901.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1902. -echo "configure:3020: checking for $ac_hdr" >&5
  1903. +echo "configure:3021: checking for $ac_hdr" >&5
  1904.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1905.    echo $ac_n "(cached) $ac_c" 1>&6
  1906.  else
  1907.    cat > conftest.$ac_ext <<EOF
  1908. -#line 3025 "configure"
  1909. +#line 3026 "configure"
  1910.  #include "confdefs.h"
  1911.  #include <$ac_hdr>
  1912.  EOF
  1913.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1914. -{ (eval echo configure:3030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1915. +{ (eval echo configure:3031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1916.  ac_err=`grep -v '^ *+' conftest.out`
  1917.  if test -z "$ac_err"; then
  1918.    rm -rf conftest*
  1919. @@ -3052,21 +3053,21 @@
  1920.  fi
  1921.  done
  1922.  
  1923. -for ac_hdr in sgtty.h sys/select.h sys/ioctl.h machine/endian.h
  1924. +for ac_hdr in sgtty.h sys/select.h sys/ioctl.h sys/filio.h machine/endian.h
  1925.  do
  1926.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1927.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1928. -echo "configure:3060: checking for $ac_hdr" >&5
  1929. +echo "configure:3061: checking for $ac_hdr" >&5
  1930.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1931.    echo $ac_n "(cached) $ac_c" 1>&6
  1932.  else
  1933.    cat > conftest.$ac_ext <<EOF
  1934. -#line 3065 "configure"
  1935. +#line 3066 "configure"
  1936.  #include "confdefs.h"
  1937.  #include <$ac_hdr>
  1938.  EOF
  1939.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1940. -{ (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1941. +{ (eval echo configure:3071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1942.  ac_err=`grep -v '^ *+' conftest.out`
  1943.  if test -z "$ac_err"; then
  1944.    rm -rf conftest*
  1945. @@ -3096,17 +3097,17 @@
  1946.  do
  1947.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1948.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1949. -echo "configure:3100: checking for $ac_hdr" >&5
  1950. +echo "configure:3101: checking for $ac_hdr" >&5
  1951.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1952.    echo $ac_n "(cached) $ac_c" 1>&6
  1953.  else
  1954.    cat > conftest.$ac_ext <<EOF
  1955. -#line 3105 "configure"
  1956. +#line 3106 "configure"
  1957.  #include "confdefs.h"
  1958.  #include <$ac_hdr>
  1959.  EOF
  1960.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1961. -{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1962. +{ (eval echo configure:3111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1963.  ac_err=`grep -v '^ *+' conftest.out`
  1964.  if test -z "$ac_err"; then
  1965.    rm -rf conftest*
  1966. @@ -3136,17 +3137,17 @@
  1967.  do
  1968.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1969.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1970. -echo "configure:3140: checking for $ac_hdr" >&5
  1971. +echo "configure:3141: checking for $ac_hdr" >&5
  1972.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1973.    echo $ac_n "(cached) $ac_c" 1>&6
  1974.  else
  1975.    cat > conftest.$ac_ext <<EOF
  1976. -#line 3145 "configure"
  1977. +#line 3146 "configure"
  1978.  #include "confdefs.h"
  1979.  #include <$ac_hdr>
  1980.  EOF
  1981.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1982. -{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1983. +{ (eval echo configure:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1984.  ac_err=`grep -v '^ *+' conftest.out`
  1985.  if test -z "$ac_err"; then
  1986.    rm -rf conftest*
  1987. @@ -3176,17 +3177,17 @@
  1988.  do
  1989.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1990.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1991. -echo "configure:3180: checking for $ac_hdr" >&5
  1992. +echo "configure:3181: checking for $ac_hdr" >&5
  1993.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1994.    echo $ac_n "(cached) $ac_c" 1>&6
  1995.  else
  1996.    cat > conftest.$ac_ext <<EOF
  1997. -#line 3185 "configure"
  1998. +#line 3186 "configure"
  1999.  #include "confdefs.h"
  2000.  #include <$ac_hdr>
  2001.  EOF
  2002.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2003. -{ (eval echo configure:3190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2004. +{ (eval echo configure:3191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2005.  ac_err=`grep -v '^ *+' conftest.out`
  2006.  if test -z "$ac_err"; then
  2007.    rm -rf conftest*
  2008. @@ -3213,12 +3214,12 @@
  2009.  done
  2010.  
  2011.  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2012. -echo "configure:3217: checking whether time.h and sys/time.h may both be included" >&5
  2013. +echo "configure:3218: checking whether time.h and sys/time.h may both be included" >&5
  2014.  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2015.    echo $ac_n "(cached) $ac_c" 1>&6
  2016.  else
  2017.    cat > conftest.$ac_ext <<EOF
  2018. -#line 3222 "configure"
  2019. +#line 3223 "configure"
  2020.  #include "confdefs.h"
  2021.  #include <sys/types.h>
  2022.  #include <sys/time.h>
  2023. @@ -3227,7 +3228,7 @@
  2024.  struct tm *tp;
  2025.  ; return 0; }
  2026.  EOF
  2027. -if { (eval echo configure:3231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2028. +if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2029.    rm -rf conftest*
  2030.    ac_cv_header_time=yes
  2031.  else
  2032. @@ -3252,12 +3253,12 @@
  2033.  do
  2034.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2035.  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  2036. -echo "configure:3256: checking for $ac_hdr that defines DIR" >&5
  2037. +echo "configure:3257: checking for $ac_hdr that defines DIR" >&5
  2038.  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  2039.    echo $ac_n "(cached) $ac_c" 1>&6
  2040.  else
  2041.    cat > conftest.$ac_ext <<EOF
  2042. -#line 3261 "configure"
  2043. +#line 3262 "configure"
  2044.  #include "confdefs.h"
  2045.  #include <sys/types.h>
  2046.  #include <$ac_hdr>
  2047. @@ -3265,7 +3266,7 @@
  2048.  DIR *dirp = 0;
  2049.  ; return 0; }
  2050.  EOF
  2051. -if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2052. +if { (eval echo configure:3270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2053.    rm -rf conftest*
  2054.    eval "ac_cv_header_dirent_$ac_safe=yes"
  2055.  else
  2056. @@ -3290,7 +3291,7 @@
  2057.  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  2058.  if test $ac_header_dirent = dirent.h; then
  2059.  echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  2060. -echo "configure:3294: checking for opendir in -ldir" >&5
  2061. +echo "configure:3295: checking for opendir in -ldir" >&5
  2062.  ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  2063.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2064.    echo $ac_n "(cached) $ac_c" 1>&6
  2065. @@ -3298,7 +3299,7 @@
  2066.    ac_save_LIBS="$LIBS"
  2067.  LIBS="-ldir  $LIBS"
  2068.  cat > conftest.$ac_ext <<EOF
  2069. -#line 3302 "configure"
  2070. +#line 3303 "configure"
  2071.  #include "confdefs.h"
  2072.  /* Override any gcc2 internal prototype to avoid an error.  */
  2073.  /* We use char because int might match the return type of a gcc2
  2074. @@ -3309,7 +3310,7 @@
  2075.  opendir()
  2076.  ; return 0; }
  2077.  EOF
  2078. -if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2079. +if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2080.    rm -rf conftest*
  2081.    eval "ac_cv_lib_$ac_lib_var=yes"
  2082.  else
  2083. @@ -3331,7 +3332,7 @@
  2084.  
  2085.  else
  2086.  echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  2087. -echo "configure:3335: checking for opendir in -lx" >&5
  2088. +echo "configure:3336: checking for opendir in -lx" >&5
  2089.  ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  2090.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2091.    echo $ac_n "(cached) $ac_c" 1>&6
  2092. @@ -3339,7 +3340,7 @@
  2093.    ac_save_LIBS="$LIBS"
  2094.  LIBS="-lx  $LIBS"
  2095.  cat > conftest.$ac_ext <<EOF
  2096. -#line 3343 "configure"
  2097. +#line 3344 "configure"
  2098.  #include "confdefs.h"
  2099.  /* Override any gcc2 internal prototype to avoid an error.  */
  2100.  /* We use char because int might match the return type of a gcc2
  2101. @@ -3350,7 +3351,7 @@
  2102.  opendir()
  2103.  ; return 0; }
  2104.  EOF
  2105. -if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2106. +if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2107.    rm -rf conftest*
  2108.    eval "ac_cv_lib_$ac_lib_var=yes"
  2109.  else
  2110. @@ -3373,12 +3374,12 @@
  2111.  fi
  2112.  
  2113.  echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  2114. -echo "configure:3377: checking whether stat file-mode macros are broken" >&5
  2115. +echo "configure:3378: checking whether stat file-mode macros are broken" >&5
  2116.  if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  2117.    echo $ac_n "(cached) $ac_c" 1>&6
  2118.  else
  2119.    cat > conftest.$ac_ext <<EOF
  2120. -#line 3382 "configure"
  2121. +#line 3383 "configure"
  2122.  #include "confdefs.h"
  2123.  #include <sys/types.h>
  2124.  #include <sys/stat.h>
  2125. @@ -3429,19 +3430,19 @@
  2126.  fi
  2127.  
  2128.  echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
  2129. -echo "configure:3433: checking whether sys/types.h defines makedev" >&5
  2130. +echo "configure:3434: checking whether sys/types.h defines makedev" >&5
  2131.  if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
  2132.    echo $ac_n "(cached) $ac_c" 1>&6
  2133.  else
  2134.    cat > conftest.$ac_ext <<EOF
  2135. -#line 3438 "configure"
  2136. +#line 3439 "configure"
  2137.  #include "confdefs.h"
  2138.  #include <sys/types.h>
  2139.  int main() {
  2140.  return makedev(0, 0);
  2141.  ; return 0; }
  2142.  EOF
  2143. -if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2144. +if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2145.    rm -rf conftest*
  2146.    ac_cv_header_sys_types_h_makedev=yes
  2147.  else
  2148. @@ -3459,17 +3460,17 @@
  2149.  if test $ac_cv_header_sys_types_h_makedev = no; then
  2150.  ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
  2151.  echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
  2152. -echo "configure:3463: checking for sys/mkdev.h" >&5
  2153. +echo "configure:3464: checking for sys/mkdev.h" >&5
  2154.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2155.    echo $ac_n "(cached) $ac_c" 1>&6
  2156.  else
  2157.    cat > conftest.$ac_ext <<EOF
  2158. -#line 3468 "configure"
  2159. +#line 3469 "configure"
  2160.  #include "confdefs.h"
  2161.  #include <sys/mkdev.h>
  2162.  EOF
  2163.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2164. -{ (eval echo configure:3473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2165. +{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2166.  ac_err=`grep -v '^ *+' conftest.out`
  2167.  if test -z "$ac_err"; then
  2168.    rm -rf conftest*
  2169. @@ -3497,17 +3498,17 @@
  2170.    if test $ac_cv_header_sys_mkdev_h = no; then
  2171.  ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
  2172.  echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
  2173. -echo "configure:3501: checking for sys/sysmacros.h" >&5
  2174. +echo "configure:3502: checking for sys/sysmacros.h" >&5
  2175.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2176.    echo $ac_n "(cached) $ac_c" 1>&6
  2177.  else
  2178.    cat > conftest.$ac_ext <<EOF
  2179. -#line 3506 "configure"
  2180. +#line 3507 "configure"
  2181.  #include "confdefs.h"
  2182.  #include <sys/sysmacros.h>
  2183.  EOF
  2184.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2185. -{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2186. +{ (eval echo configure:3512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2187.  ac_err=`grep -v '^ *+' conftest.out`
  2188.  if test -z "$ac_err"; then
  2189.    rm -rf conftest*
  2190. @@ -3535,9 +3536,9 @@
  2191.  fi
  2192.  
  2193.  echo $ac_n "checking whether utmp have ut_pid field""... $ac_c" 1>&6
  2194. -echo "configure:3539: checking whether utmp have ut_pid field" >&5
  2195. +echo "configure:3540: checking whether utmp have ut_pid field" >&5
  2196.  cat > conftest.$ac_ext <<EOF
  2197. -#line 3541 "configure"
  2198. +#line 3542 "configure"
  2199.  #include "confdefs.h"
  2200.  #include <utmp.h>
  2201.  EOF
  2202. @@ -3556,9 +3557,9 @@
  2203.  rm -f conftest*
  2204.  
  2205.  echo $ac_n "checking whether utmp have ut_name field""... $ac_c" 1>&6
  2206. -echo "configure:3560: checking whether utmp have ut_name field" >&5
  2207. +echo "configure:3561: checking whether utmp have ut_name field" >&5
  2208.  cat > conftest.$ac_ext <<EOF
  2209. -#line 3562 "configure"
  2210. +#line 3563 "configure"
  2211.  #include "confdefs.h"
  2212.  #include <utmp.h>
  2213.  EOF
  2214. @@ -3577,9 +3578,9 @@
  2215.  rm -f conftest*
  2216.  
  2217.  echo $ac_n "checking whether utmp have ut_id field""... $ac_c" 1>&6
  2218. -echo "configure:3581: checking whether utmp have ut_id field" >&5
  2219. +echo "configure:3582: checking whether utmp have ut_id field" >&5
  2220.  cat > conftest.$ac_ext <<EOF
  2221. -#line 3583 "configure"
  2222. +#line 3584 "configure"
  2223.  #include "confdefs.h"
  2224.  #include <utmp.h>
  2225.  EOF
  2226. @@ -3598,9 +3599,9 @@
  2227.  rm -f conftest*
  2228.  
  2229.  echo $ac_n "checking whether utmp have ut_host field""... $ac_c" 1>&6
  2230. -echo "configure:3602: checking whether utmp have ut_host field" >&5
  2231. +echo "configure:3603: checking whether utmp have ut_host field" >&5
  2232.  cat > conftest.$ac_ext <<EOF
  2233. -#line 3604 "configure"
  2234. +#line 3605 "configure"
  2235.  #include "confdefs.h"
  2236.  #include <utmp.h>
  2237.  EOF
  2238. @@ -3619,9 +3620,9 @@
  2239.  rm -f conftest*
  2240.  
  2241.  echo $ac_n "checking whether utmp have ut_addr field""... $ac_c" 1>&6
  2242. -echo "configure:3623: checking whether utmp have ut_addr field" >&5
  2243. +echo "configure:3624: checking whether utmp have ut_addr field" >&5
  2244.  cat > conftest.$ac_ext <<EOF
  2245. -#line 3625 "configure"
  2246. +#line 3626 "configure"
  2247.  #include "confdefs.h"
  2248.  #include <utmp.h>
  2249.  EOF
  2250. @@ -3640,9 +3641,9 @@
  2251.  rm -f conftest*
  2252.  
  2253.  echo $ac_n "checking whether you have incompatible SIGINFO macro""... $ac_c" 1>&6
  2254. -echo "configure:3644: checking whether you have incompatible SIGINFO macro" >&5
  2255. +echo "configure:3645: checking whether you have incompatible SIGINFO macro" >&5
  2256.  cat > conftest.$ac_ext <<EOF
  2257. -#line 3646 "configure"
  2258. +#line 3647 "configure"
  2259.  #include "confdefs.h"
  2260.  #include <sys/siginfo.h>
  2261.  SIGINFO(p,1)
  2262. @@ -3663,7 +3664,7 @@
  2263.  
  2264.  
  2265.  echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
  2266. -echo "configure:3667: checking for crypt in -lc" >&5
  2267. +echo "configure:3668: checking for crypt in -lc" >&5
  2268.  ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
  2269.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2270.    echo $ac_n "(cached) $ac_c" 1>&6
  2271. @@ -3671,7 +3672,7 @@
  2272.    ac_save_LIBS="$LIBS"
  2273.  LIBS="-lc  $LIBS"
  2274.  cat > conftest.$ac_ext <<EOF
  2275. -#line 3675 "configure"
  2276. +#line 3676 "configure"
  2277.  #include "confdefs.h"
  2278.  /* Override any gcc2 internal prototype to avoid an error.  */
  2279.  /* We use char because int might match the return type of a gcc2
  2280. @@ -3682,7 +3683,7 @@
  2281.  crypt()
  2282.  ; return 0; }
  2283.  EOF
  2284. -if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2285. +if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2286.    rm -rf conftest*
  2287.    eval "ac_cv_lib_$ac_lib_var=yes"
  2288.  else
  2289. @@ -3701,7 +3702,7 @@
  2290.  else
  2291.    echo "$ac_t""no" 1>&6
  2292.  echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
  2293. -echo "configure:3705: checking for crypt in -lcrypt" >&5
  2294. +echo "configure:3706: checking for crypt in -lcrypt" >&5
  2295.  ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
  2296.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2297.    echo $ac_n "(cached) $ac_c" 1>&6
  2298. @@ -3709,7 +3710,7 @@
  2299.    ac_save_LIBS="$LIBS"
  2300.  LIBS="-lcrypt  $LIBS"
  2301.  cat > conftest.$ac_ext <<EOF
  2302. -#line 3713 "configure"
  2303. +#line 3714 "configure"
  2304.  #include "confdefs.h"
  2305.  /* Override any gcc2 internal prototype to avoid an error.  */
  2306.  /* We use char because int might match the return type of a gcc2
  2307. @@ -3720,7 +3721,7 @@
  2308.  crypt()
  2309.  ; return 0; }
  2310.  EOF
  2311. -if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2312. +if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2313.    rm -rf conftest*
  2314.    eval "ac_cv_lib_$ac_lib_var=yes"
  2315.  else
  2316. @@ -3750,7 +3751,7 @@
  2317.  fi
  2318.  
  2319.  echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
  2320. -echo "configure:3754: checking for getspnam in -lsec" >&5
  2321. +echo "configure:3755: checking for getspnam in -lsec" >&5
  2322.  ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
  2323.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2324.    echo $ac_n "(cached) $ac_c" 1>&6
  2325. @@ -3758,7 +3759,7 @@
  2326.    ac_save_LIBS="$LIBS"
  2327.  LIBS="-lsec  $LIBS"
  2328.  cat > conftest.$ac_ext <<EOF
  2329. -#line 3762 "configure"
  2330. +#line 3763 "configure"
  2331.  #include "confdefs.h"
  2332.  /* Override any gcc2 internal prototype to avoid an error.  */
  2333.  /* We use char because int might match the return type of a gcc2
  2334. @@ -3769,7 +3770,7 @@
  2335.  getspnam()
  2336.  ; return 0; }
  2337.  EOF
  2338. -if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2339. +if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2340.    rm -rf conftest*
  2341.    eval "ac_cv_lib_$ac_lib_var=yes"
  2342.  else
  2343. @@ -3797,7 +3798,7 @@
  2344.  fi
  2345.  
  2346.  echo $ac_n "checking for get_process_stats in -lseq""... $ac_c" 1>&6
  2347. -echo "configure:3801: checking for get_process_stats in -lseq" >&5
  2348. +echo "configure:3802: checking for get_process_stats in -lseq" >&5
  2349.  ac_lib_var=`echo seq'_'get_process_stats | sed 'y%./+-%__p_%'`
  2350.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2351.    echo $ac_n "(cached) $ac_c" 1>&6
  2352. @@ -3805,7 +3806,7 @@
  2353.    ac_save_LIBS="$LIBS"
  2354.  LIBS="-lseq  $LIBS"
  2355.  cat > conftest.$ac_ext <<EOF
  2356. -#line 3809 "configure"
  2357. +#line 3810 "configure"
  2358.  #include "confdefs.h"
  2359.  /* Override any gcc2 internal prototype to avoid an error.  */
  2360.  /* We use char because int might match the return type of a gcc2
  2361. @@ -3816,7 +3817,7 @@
  2362.  get_process_stats()
  2363.  ; return 0; }
  2364.  EOF
  2365. -if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2366. +if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2367.    rm -rf conftest*
  2368.    eval "ac_cv_lib_$ac_lib_var=yes"
  2369.  else
  2370. @@ -3844,7 +3845,7 @@
  2371.  fi
  2372.  
  2373.  echo $ac_n "checking for bcopy in -lbsd""... $ac_c" 1>&6
  2374. -echo "configure:3848: checking for bcopy in -lbsd" >&5
  2375. +echo "configure:3849: checking for bcopy in -lbsd" >&5
  2376.  ac_lib_var=`echo bsd'_'bcopy | sed 'y%./+-%__p_%'`
  2377.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2378.    echo $ac_n "(cached) $ac_c" 1>&6
  2379. @@ -3852,7 +3853,7 @@
  2380.    ac_save_LIBS="$LIBS"
  2381.  LIBS="-lbsd  $LIBS"
  2382.  cat > conftest.$ac_ext <<EOF
  2383. -#line 3856 "configure"
  2384. +#line 3857 "configure"
  2385.  #include "confdefs.h"
  2386.  /* Override any gcc2 internal prototype to avoid an error.  */
  2387.  /* We use char because int might match the return type of a gcc2
  2388. @@ -3863,7 +3864,7 @@
  2389.  bcopy()
  2390.  ; return 0; }
  2391.  EOF
  2392. -if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2393. +if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2394.    rm -rf conftest*
  2395.    eval "ac_cv_lib_$ac_lib_var=yes"
  2396.  else
  2397. @@ -3892,7 +3893,7 @@
  2398.  
  2399.  if test -z "$no_libnsl"; then
  2400.    echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
  2401. -echo "configure:3896: checking for main in -lnsl" >&5
  2402. +echo "configure:3897: checking for main in -lnsl" >&5
  2403.  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  2404.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2405.    echo $ac_n "(cached) $ac_c" 1>&6
  2406. @@ -3900,14 +3901,14 @@
  2407.    ac_save_LIBS="$LIBS"
  2408.  LIBS="-lnsl  $LIBS"
  2409.  cat > conftest.$ac_ext <<EOF
  2410. -#line 3904 "configure"
  2411. +#line 3905 "configure"
  2412.  #include "confdefs.h"
  2413.  
  2414.  int main() {
  2415.  main()
  2416.  ; return 0; }
  2417.  EOF
  2418. -if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2419. +if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2420.    rm -rf conftest*
  2421.    eval "ac_cv_lib_$ac_lib_var=yes"
  2422.  else
  2423. @@ -3937,7 +3938,7 @@
  2424.  fi
  2425.  if test -n "$test_libinet"; then
  2426.    echo $ac_n "checking for inet_network in -linet""... $ac_c" 1>&6
  2427. -echo "configure:3941: checking for inet_network in -linet" >&5
  2428. +echo "configure:3942: checking for inet_network in -linet" >&5
  2429.  ac_lib_var=`echo inet'_'inet_network | sed 'y%./+-%__p_%'`
  2430.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2431.    echo $ac_n "(cached) $ac_c" 1>&6
  2432. @@ -3945,7 +3946,7 @@
  2433.    ac_save_LIBS="$LIBS"
  2434.  LIBS="-linet  $LIBS"
  2435.  cat > conftest.$ac_ext <<EOF
  2436. -#line 3949 "configure"
  2437. +#line 3950 "configure"
  2438.  #include "confdefs.h"
  2439.  /* Override any gcc2 internal prototype to avoid an error.  */
  2440.  /* We use char because int might match the return type of a gcc2
  2441. @@ -3956,7 +3957,7 @@
  2442.  inet_network()
  2443.  ; return 0; }
  2444.  EOF
  2445. -if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2446. +if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2447.    rm -rf conftest*
  2448.    eval "ac_cv_lib_$ac_lib_var=yes"
  2449.  else
  2450. @@ -3986,7 +3987,7 @@
  2451.  fi
  2452.  if test -z "$no_libsocket"; then
  2453.    echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  2454. -echo "configure:3990: checking for socket in -lsocket" >&5
  2455. +echo "configure:3991: checking for socket in -lsocket" >&5
  2456.  ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  2457.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2458.    echo $ac_n "(cached) $ac_c" 1>&6
  2459. @@ -3994,7 +3995,7 @@
  2460.    ac_save_LIBS="$LIBS"
  2461.  LIBS="-lsocket  $LIBS"
  2462.  cat > conftest.$ac_ext <<EOF
  2463. -#line 3998 "configure"
  2464. +#line 3999 "configure"
  2465.  #include "confdefs.h"
  2466.  /* Override any gcc2 internal prototype to avoid an error.  */
  2467.  /* We use char because int might match the return type of a gcc2
  2468. @@ -4005,7 +4006,7 @@
  2469.  socket()
  2470.  ; return 0; }
  2471.  EOF
  2472. -if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2473. +if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2474.    rm -rf conftest*
  2475.    eval "ac_cv_lib_$ac_lib_var=yes"
  2476.  else
  2477. @@ -4035,7 +4036,7 @@
  2478.  fi
  2479.  if test -z "$no_libsun"; then
  2480.    echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
  2481. -echo "configure:4039: checking for getpwnam in -lsun" >&5
  2482. +echo "configure:4040: checking for getpwnam in -lsun" >&5
  2483.  ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
  2484.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2485.    echo $ac_n "(cached) $ac_c" 1>&6
  2486. @@ -4043,7 +4044,7 @@
  2487.    ac_save_LIBS="$LIBS"
  2488.  LIBS="-lsun  $LIBS"
  2489.  cat > conftest.$ac_ext <<EOF
  2490. -#line 4047 "configure"
  2491. +#line 4048 "configure"
  2492.  #include "confdefs.h"
  2493.  /* Override any gcc2 internal prototype to avoid an error.  */
  2494.  /* We use char because int might match the return type of a gcc2
  2495. @@ -4054,7 +4055,7 @@
  2496.  getpwnam()
  2497.  ; return 0; }
  2498.  EOF
  2499. -if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2500. +if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2501.    rm -rf conftest*
  2502.    eval "ac_cv_lib_$ac_lib_var=yes"
  2503.  else
  2504. @@ -4084,7 +4085,7 @@
  2505.  fi
  2506.  if test -z "$no_libbsd"; then
  2507.    echo $ac_n "checking for openpty in -lbsd""... $ac_c" 1>&6
  2508. -echo "configure:4088: checking for openpty in -lbsd" >&5
  2509. +echo "configure:4089: checking for openpty in -lbsd" >&5
  2510.  ac_lib_var=`echo bsd'_'openpty | sed 'y%./+-%__p_%'`
  2511.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2512.    echo $ac_n "(cached) $ac_c" 1>&6
  2513. @@ -4092,7 +4093,7 @@
  2514.    ac_save_LIBS="$LIBS"
  2515.  LIBS="-lbsd  $LIBS"
  2516.  cat > conftest.$ac_ext <<EOF
  2517. -#line 4096 "configure"
  2518. +#line 4097 "configure"
  2519.  #include "confdefs.h"
  2520.  /* Override any gcc2 internal prototype to avoid an error.  */
  2521.  /* We use char because int might match the return type of a gcc2
  2522. @@ -4103,7 +4104,7 @@
  2523.  openpty()
  2524.  ; return 0; }
  2525.  EOF
  2526. -if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2527. +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2528.    rm -rf conftest*
  2529.    eval "ac_cv_lib_$ac_lib_var=yes"
  2530.  else
  2531. @@ -4132,7 +4133,7 @@
  2532.  
  2533.  fi
  2534.  echo $ac_n "checking for login in -lutil""... $ac_c" 1>&6
  2535. -echo "configure:4136: checking for login in -lutil" >&5
  2536. +echo "configure:4137: checking for login in -lutil" >&5
  2537.  ac_lib_var=`echo util'_'login | sed 'y%./+-%__p_%'`
  2538.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2539.    echo $ac_n "(cached) $ac_c" 1>&6
  2540. @@ -4140,7 +4141,7 @@
  2541.    ac_save_LIBS="$LIBS"
  2542.  LIBS="-lutil  $LIBS"
  2543.  cat > conftest.$ac_ext <<EOF
  2544. -#line 4144 "configure"
  2545. +#line 4145 "configure"
  2546.  #include "confdefs.h"
  2547.  /* Override any gcc2 internal prototype to avoid an error.  */
  2548.  /* We use char because int might match the return type of a gcc2
  2549. @@ -4151,7 +4152,7 @@
  2550.  login()
  2551.  ; return 0; }
  2552.  EOF
  2553. -if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2554. +if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2555.    rm -rf conftest*
  2556.    eval "ac_cv_lib_$ac_lib_var=yes"
  2557.  else
  2558. @@ -4180,12 +4181,12 @@
  2559.    for ac_func in vhangup
  2560.  do
  2561.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2562. -echo "configure:4184: checking for $ac_func" >&5
  2563. +echo "configure:4185: checking for $ac_func" >&5
  2564.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2565.    echo $ac_n "(cached) $ac_c" 1>&6
  2566.  else
  2567.    cat > conftest.$ac_ext <<EOF
  2568. -#line 4189 "configure"
  2569. +#line 4190 "configure"
  2570.  #include "confdefs.h"
  2571.  /* System header to define __stub macros and hopefully few prototypes,
  2572.      which can conflict with char $ac_func(); below.  */
  2573. @@ -4208,7 +4209,7 @@
  2574.  
  2575.  ; return 0; }
  2576.  EOF
  2577. -if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2578. +if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2579.    rm -rf conftest*
  2580.    eval "ac_cv_func_$ac_func=yes"
  2581.  else
  2582. @@ -4238,12 +4239,12 @@
  2583.    for ac_func in setsid
  2584.  do
  2585.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2586. -echo "configure:4242: checking for $ac_func" >&5
  2587. +echo "configure:4243: checking for $ac_func" >&5
  2588.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2589.    echo $ac_n "(cached) $ac_c" 1>&6
  2590.  else
  2591.    cat > conftest.$ac_ext <<EOF
  2592. -#line 4247 "configure"
  2593. +#line 4248 "configure"
  2594.  #include "confdefs.h"
  2595.  /* System header to define __stub macros and hopefully few prototypes,
  2596.      which can conflict with char $ac_func(); below.  */
  2597. @@ -4266,7 +4267,7 @@
  2598.  
  2599.  ; return 0; }
  2600.  EOF
  2601. -if { (eval echo configure:4270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2602. +if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2603.    rm -rf conftest*
  2604.    eval "ac_cv_func_$ac_func=yes"
  2605.  else
  2606. @@ -4295,12 +4296,12 @@
  2607.  for ac_func in gettimeofday times getrusage ftruncate revoke makeutx
  2608.  do
  2609.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2610. -echo "configure:4299: checking for $ac_func" >&5
  2611. +echo "configure:4300: checking for $ac_func" >&5
  2612.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2613.    echo $ac_n "(cached) $ac_c" 1>&6
  2614.  else
  2615.    cat > conftest.$ac_ext <<EOF
  2616. -#line 4304 "configure"
  2617. +#line 4305 "configure"
  2618.  #include "confdefs.h"
  2619.  /* System header to define __stub macros and hopefully few prototypes,
  2620.      which can conflict with char $ac_func(); below.  */
  2621. @@ -4323,7 +4324,7 @@
  2622.  
  2623.  ; return 0; }
  2624.  EOF
  2625. -if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2626. +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2627.    rm -rf conftest*
  2628.    eval "ac_cv_func_$ac_func=yes"
  2629.  else
  2630. @@ -4350,12 +4351,12 @@
  2631.  for ac_func in strchr memcpy setlogin openpty _getpty clock fchmod ulimit
  2632.  do
  2633.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2634. -echo "configure:4354: checking for $ac_func" >&5
  2635. +echo "configure:4355: checking for $ac_func" >&5
  2636.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2637.    echo $ac_n "(cached) $ac_c" 1>&6
  2638.  else
  2639.    cat > conftest.$ac_ext <<EOF
  2640. -#line 4359 "configure"
  2641. +#line 4360 "configure"
  2642.  #include "confdefs.h"
  2643.  /* System header to define __stub macros and hopefully few prototypes,
  2644.      which can conflict with char $ac_func(); below.  */
  2645. @@ -4378,7 +4379,7 @@
  2646.  
  2647.  ; return 0; }
  2648.  EOF
  2649. -if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2650. +if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2651.    rm -rf conftest*
  2652.    eval "ac_cv_func_$ac_func=yes"
  2653.  else
  2654. @@ -4405,12 +4406,12 @@
  2655.  for ac_func in gethostname getdtablesize umask innetgr initgroups setpgrp
  2656.  do
  2657.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2658. -echo "configure:4409: checking for $ac_func" >&5
  2659. +echo "configure:4410: checking for $ac_func" >&5
  2660.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2661.    echo $ac_n "(cached) $ac_c" 1>&6
  2662.  else
  2663.    cat > conftest.$ac_ext <<EOF
  2664. -#line 4414 "configure"
  2665. +#line 4415 "configure"
  2666.  #include "confdefs.h"
  2667.  /* System header to define __stub macros and hopefully few prototypes,
  2668.      which can conflict with char $ac_func(); below.  */
  2669. @@ -4433,7 +4434,7 @@
  2670.  
  2671.  ; return 0; }
  2672.  EOF
  2673. -if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2674. +if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2675.    rm -rf conftest*
  2676.    eval "ac_cv_func_$ac_func=yes"
  2677.  else
  2678. @@ -4460,12 +4461,12 @@
  2679.  for ac_func in setpgid daemon waitpid ttyslot authenticate getpt isastream
  2680.  do
  2681.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2682. -echo "configure:4464: checking for $ac_func" >&5
  2683. +echo "configure:4465: checking for $ac_func" >&5
  2684.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2685.    echo $ac_n "(cached) $ac_c" 1>&6
  2686.  else
  2687.    cat > conftest.$ac_ext <<EOF
  2688. -#line 4469 "configure"
  2689. +#line 4470 "configure"
  2690.  #include "confdefs.h"
  2691.  /* System header to define __stub macros and hopefully few prototypes,
  2692.      which can conflict with char $ac_func(); below.  */
  2693. @@ -4488,7 +4489,7 @@
  2694.  
  2695.  ; return 0; }
  2696.  EOF
  2697. -if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2698. +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2699.    rm -rf conftest*
  2700.    eval "ac_cv_func_$ac_func=yes"
  2701.  else
  2702. @@ -4516,12 +4517,12 @@
  2703.  for ac_func in strerror memmove remove random putenv crypt socketpair snprintf
  2704.  do
  2705.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2706. -echo "configure:4520: checking for $ac_func" >&5
  2707. +echo "configure:4521: checking for $ac_func" >&5
  2708.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2709.    echo $ac_n "(cached) $ac_c" 1>&6
  2710.  else
  2711.    cat > conftest.$ac_ext <<EOF
  2712. -#line 4525 "configure"
  2713. +#line 4526 "configure"
  2714.  #include "confdefs.h"
  2715.  /* System header to define __stub macros and hopefully few prototypes,
  2716.      which can conflict with char $ac_func(); below.  */
  2717. @@ -4544,7 +4545,7 @@
  2718.  
  2719.  ; return 0; }
  2720.  EOF
  2721. -if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2722. +if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2723.    rm -rf conftest*
  2724.    eval "ac_cv_func_$ac_func=yes"
  2725.  else
  2726. @@ -4572,7 +4573,7 @@
  2727.  
  2728.  
  2729.  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  2730. -echo "configure:4576: checking whether ln -s works" >&5
  2731. +echo "configure:4577: checking whether ln -s works" >&5
  2732.  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  2733.    echo $ac_n "(cached) $ac_c" 1>&6
  2734.  else
  2735. @@ -4603,7 +4604,7 @@
  2736.  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2737.  # ./install, which can be erroneously created by make from ./install.sh.
  2738.  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  2739. -echo "configure:4607: checking for a BSD compatible install" >&5
  2740. +echo "configure:4608: checking for a BSD compatible install" >&5
  2741.  if test -z "$INSTALL"; then
  2742.  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  2743.    echo $ac_n "(cached) $ac_c" 1>&6
  2744. @@ -4655,7 +4656,7 @@
  2745.  # Extract the first word of "ar", so it can be a program name with args.
  2746.  set dummy ar; ac_word=$2
  2747.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2748. -echo "configure:4659: checking for $ac_word" >&5
  2749. +echo "configure:4660: checking for $ac_word" >&5
  2750.  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  2751.    echo $ac_n "(cached) $ac_c" 1>&6
  2752.  else
  2753. @@ -4685,7 +4686,7 @@
  2754.    # Extract the first word of "ranlib", so it can be a program name with args.
  2755.  set dummy ranlib; ac_word=$2
  2756.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2757. -echo "configure:4689: checking for $ac_word" >&5
  2758. +echo "configure:4690: checking for $ac_word" >&5
  2759.  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  2760.    echo $ac_n "(cached) $ac_c" 1>&6
  2761.  else
  2762. @@ -4719,7 +4720,7 @@
  2763.  # Extract the first word of "$ac_prog", so it can be a program name with args.
  2764.  set dummy $ac_prog; ac_word=$2
  2765.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2766. -echo "configure:4723: checking for $ac_word" >&5
  2767. +echo "configure:4724: checking for $ac_word" >&5
  2768.  if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEP'+set}'`\" = set"; then
  2769.    echo $ac_n "(cached) $ac_c" 1>&6
  2770.  else
  2771. @@ -4754,7 +4755,7 @@
  2772.  # Uses ac_ vars as temps to allow command line to override cache and checks.
  2773.  # --without-x overrides everything else, but does not touch the cache.
  2774.  echo $ac_n "checking for X""... $ac_c" 1>&6
  2775. -echo "configure:4758: checking for X" >&5
  2776. +echo "configure:4759: checking for X" >&5
  2777.  
  2778.  # Check whether --with-x or --without-x was given.
  2779.  if test "${with_x+set}" = set; then
  2780. @@ -4816,12 +4817,12 @@
  2781.  
  2782.    # First, try using that file with no special directory specified.
  2783.  cat > conftest.$ac_ext <<EOF
  2784. -#line 4820 "configure"
  2785. +#line 4821 "configure"
  2786.  #include "confdefs.h"
  2787.  #include <$x_direct_test_include>
  2788.  EOF
  2789.  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2790. -{ (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2791. +{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2792.  ac_err=`grep -v '^ *+' conftest.out`
  2793.  if test -z "$ac_err"; then
  2794.    rm -rf conftest*
  2795. @@ -4890,14 +4891,14 @@
  2796.    ac_save_LIBS="$LIBS"
  2797.    LIBS="-l$x_direct_test_library $LIBS"
  2798.  cat > conftest.$ac_ext <<EOF
  2799. -#line 4894 "configure"
  2800. +#line 4895 "configure"
  2801.  #include "confdefs.h"
  2802.  
  2803.  int main() {
  2804.  ${x_direct_test_function}()
  2805.  ; return 0; }
  2806.  EOF
  2807. -if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2808. +if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2809.    rm -rf conftest*
  2810.    LIBS="$ac_save_LIBS"
  2811.  # We can link X programs with no special library path.
  2812. @@ -5003,17 +5004,17 @@
  2813.      case "`(uname -sr) 2>/dev/null`" in
  2814.      "SunOS 5"*)
  2815.        echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  2816. -echo "configure:5007: checking whether -R must be followed by a space" >&5
  2817. +echo "configure:5008: checking whether -R must be followed by a space" >&5
  2818.        ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  2819.        cat > conftest.$ac_ext <<EOF
  2820. -#line 5010 "configure"
  2821. +#line 5011 "configure"
  2822.  #include "confdefs.h"
  2823.  
  2824.  int main() {
  2825.  
  2826.  ; return 0; }
  2827.  EOF
  2828. -if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2829. +if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2830.    rm -rf conftest*
  2831.    ac_R_nospace=yes
  2832.  else
  2833. @@ -5029,14 +5030,14 @@
  2834.        else
  2835.      LIBS="$ac_xsave_LIBS -R $x_libraries"
  2836.      cat > conftest.$ac_ext <<EOF
  2837. -#line 5033 "configure"
  2838. +#line 5034 "configure"
  2839.  #include "confdefs.h"
  2840.  
  2841.  int main() {
  2842.  
  2843.  ; return 0; }
  2844.  EOF
  2845. -if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2846. +if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2847.    rm -rf conftest*
  2848.    ac_R_space=yes
  2849.  else
  2850. @@ -5068,7 +5069,7 @@
  2851.      # libraries were built with DECnet support.  And karl@cs.umb.edu says
  2852.      # the Alpha needs dnet_stub (dnet does not exist).
  2853.      echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  2854. -echo "configure:5072: checking for dnet_ntoa in -ldnet" >&5
  2855. +echo "configure:5073: checking for dnet_ntoa in -ldnet" >&5
  2856.  ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2857.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2858.    echo $ac_n "(cached) $ac_c" 1>&6
  2859. @@ -5076,7 +5077,7 @@
  2860.    ac_save_LIBS="$LIBS"
  2861.  LIBS="-ldnet  $LIBS"
  2862.  cat > conftest.$ac_ext <<EOF
  2863. -#line 5080 "configure"
  2864. +#line 5081 "configure"
  2865.  #include "confdefs.h"
  2866.  /* Override any gcc2 internal prototype to avoid an error.  */
  2867.  /* We use char because int might match the return type of a gcc2
  2868. @@ -5087,7 +5088,7 @@
  2869.  dnet_ntoa()
  2870.  ; return 0; }
  2871.  EOF
  2872. -if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2873. +if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2874.    rm -rf conftest*
  2875.    eval "ac_cv_lib_$ac_lib_var=yes"
  2876.  else
  2877. @@ -5109,7 +5110,7 @@
  2878.  
  2879.      if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2880.        echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  2881. -echo "configure:5113: checking for dnet_ntoa in -ldnet_stub" >&5
  2882. +echo "configure:5114: checking for dnet_ntoa in -ldnet_stub" >&5
  2883.  ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2884.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2885.    echo $ac_n "(cached) $ac_c" 1>&6
  2886. @@ -5117,7 +5118,7 @@
  2887.    ac_save_LIBS="$LIBS"
  2888.  LIBS="-ldnet_stub  $LIBS"
  2889.  cat > conftest.$ac_ext <<EOF
  2890. -#line 5121 "configure"
  2891. +#line 5122 "configure"
  2892.  #include "confdefs.h"
  2893.  /* Override any gcc2 internal prototype to avoid an error.  */
  2894.  /* We use char because int might match the return type of a gcc2
  2895. @@ -5128,7 +5129,7 @@
  2896.  dnet_ntoa()
  2897.  ; return 0; }
  2898.  EOF
  2899. -if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2900. +if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2901.    rm -rf conftest*
  2902.    eval "ac_cv_lib_$ac_lib_var=yes"
  2903.  else
  2904. @@ -5157,12 +5158,12 @@
  2905.      # The nsl library prevents programs from opening the X display
  2906.      # on Irix 5.2, according to dickey@clark.net.
  2907.      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2908. -echo "configure:5161: checking for gethostbyname" >&5
  2909. +echo "configure:5162: checking for gethostbyname" >&5
  2910.  if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2911.    echo $ac_n "(cached) $ac_c" 1>&6
  2912.  else
  2913.    cat > conftest.$ac_ext <<EOF
  2914. -#line 5166 "configure"
  2915. +#line 5167 "configure"
  2916.  #include "confdefs.h"
  2917.  /* System header to define __stub macros and hopefully few prototypes,
  2918.      which can conflict with char gethostbyname(); below.  */
  2919. @@ -5185,7 +5186,7 @@
  2920.  
  2921.  ; return 0; }
  2922.  EOF
  2923. -if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2924. +if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2925.    rm -rf conftest*
  2926.    eval "ac_cv_func_gethostbyname=yes"
  2927.  else
  2928. @@ -5206,7 +5207,7 @@
  2929.  
  2930.      if test $ac_cv_func_gethostbyname = no; then
  2931.        echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2932. -echo "configure:5210: checking for gethostbyname in -lnsl" >&5
  2933. +echo "configure:5211: checking for gethostbyname in -lnsl" >&5
  2934.  ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2935.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2936.    echo $ac_n "(cached) $ac_c" 1>&6
  2937. @@ -5214,7 +5215,7 @@
  2938.    ac_save_LIBS="$LIBS"
  2939.  LIBS="-lnsl  $LIBS"
  2940.  cat > conftest.$ac_ext <<EOF
  2941. -#line 5218 "configure"
  2942. +#line 5219 "configure"
  2943.  #include "confdefs.h"
  2944.  /* Override any gcc2 internal prototype to avoid an error.  */
  2945.  /* We use char because int might match the return type of a gcc2
  2946. @@ -5225,7 +5226,7 @@
  2947.  gethostbyname()
  2948.  ; return 0; }
  2949.  EOF
  2950. -if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2951. +if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2952.    rm -rf conftest*
  2953.    eval "ac_cv_lib_$ac_lib_var=yes"
  2954.  else
  2955. @@ -5255,12 +5256,12 @@
  2956.      # -lsocket must be given before -lnsl if both are needed.
  2957.      # We assume that if connect needs -lnsl, so does gethostbyname.
  2958.      echo $ac_n "checking for connect""... $ac_c" 1>&6
  2959. -echo "configure:5259: checking for connect" >&5
  2960. +echo "configure:5260: checking for connect" >&5
  2961.  if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2962.    echo $ac_n "(cached) $ac_c" 1>&6
  2963.  else
  2964.    cat > conftest.$ac_ext <<EOF
  2965. -#line 5264 "configure"
  2966. +#line 5265 "configure"
  2967.  #include "confdefs.h"
  2968.  /* System header to define __stub macros and hopefully few prototypes,
  2969.      which can conflict with char connect(); below.  */
  2970. @@ -5283,7 +5284,7 @@
  2971.  
  2972.  ; return 0; }
  2973.  EOF
  2974. -if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2975. +if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2976.    rm -rf conftest*
  2977.    eval "ac_cv_func_connect=yes"
  2978.  else
  2979. @@ -5304,7 +5305,7 @@
  2980.  
  2981.      if test $ac_cv_func_connect = no; then
  2982.        echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  2983. -echo "configure:5308: checking for connect in -lsocket" >&5
  2984. +echo "configure:5309: checking for connect in -lsocket" >&5
  2985.  ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  2986.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2987.    echo $ac_n "(cached) $ac_c" 1>&6
  2988. @@ -5312,7 +5313,7 @@
  2989.    ac_save_LIBS="$LIBS"
  2990.  LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  2991.  cat > conftest.$ac_ext <<EOF
  2992. -#line 5316 "configure"
  2993. +#line 5317 "configure"
  2994.  #include "confdefs.h"
  2995.  /* Override any gcc2 internal prototype to avoid an error.  */
  2996.  /* We use char because int might match the return type of a gcc2
  2997. @@ -5323,7 +5324,7 @@
  2998.  connect()
  2999.  ; return 0; }
  3000.  EOF
  3001. -if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3002. +if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3003.    rm -rf conftest*
  3004.    eval "ac_cv_lib_$ac_lib_var=yes"
  3005.  else
  3006. @@ -5347,12 +5348,12 @@
  3007.  
  3008.      # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3009.      echo $ac_n "checking for remove""... $ac_c" 1>&6
  3010. -echo "configure:5351: checking for remove" >&5
  3011. +echo "configure:5352: checking for remove" >&5
  3012.  if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  3013.    echo $ac_n "(cached) $ac_c" 1>&6
  3014.  else
  3015.    cat > conftest.$ac_ext <<EOF
  3016. -#line 5356 "configure"
  3017. +#line 5357 "configure"
  3018.  #include "confdefs.h"
  3019.  /* System header to define __stub macros and hopefully few prototypes,
  3020.      which can conflict with char remove(); below.  */
  3021. @@ -5375,7 +5376,7 @@
  3022.  
  3023.  ; return 0; }
  3024.  EOF
  3025. -if { (eval echo configure:5379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3026. +if { (eval echo configure:5380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3027.    rm -rf conftest*
  3028.    eval "ac_cv_func_remove=yes"
  3029.  else
  3030. @@ -5396,7 +5397,7 @@
  3031.  
  3032.      if test $ac_cv_func_remove = no; then
  3033.        echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3034. -echo "configure:5400: checking for remove in -lposix" >&5
  3035. +echo "configure:5401: checking for remove in -lposix" >&5
  3036.  ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3037.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3038.    echo $ac_n "(cached) $ac_c" 1>&6
  3039. @@ -5404,7 +5405,7 @@
  3040.    ac_save_LIBS="$LIBS"
  3041.  LIBS="-lposix  $LIBS"
  3042.  cat > conftest.$ac_ext <<EOF
  3043. -#line 5408 "configure"
  3044. +#line 5409 "configure"
  3045.  #include "confdefs.h"
  3046.  /* Override any gcc2 internal prototype to avoid an error.  */
  3047.  /* We use char because int might match the return type of a gcc2
  3048. @@ -5415,7 +5416,7 @@
  3049.  remove()
  3050.  ; return 0; }
  3051.  EOF
  3052. -if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3053. +if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3054.    rm -rf conftest*
  3055.    eval "ac_cv_lib_$ac_lib_var=yes"
  3056.  else
  3057. @@ -5439,12 +5440,12 @@
  3058.  
  3059.      # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3060.      echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3061. -echo "configure:5443: checking for shmat" >&5
  3062. +echo "configure:5444: checking for shmat" >&5
  3063.  if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  3064.    echo $ac_n "(cached) $ac_c" 1>&6
  3065.  else
  3066.    cat > conftest.$ac_ext <<EOF
  3067. -#line 5448 "configure"
  3068. +#line 5449 "configure"
  3069.  #include "confdefs.h"
  3070.  /* System header to define __stub macros and hopefully few prototypes,
  3071.      which can conflict with char shmat(); below.  */
  3072. @@ -5467,7 +5468,7 @@
  3073.  
  3074.  ; return 0; }
  3075.  EOF
  3076. -if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3077. +if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3078.    rm -rf conftest*
  3079.    eval "ac_cv_func_shmat=yes"
  3080.  else
  3081. @@ -5488,7 +5489,7 @@
  3082.  
  3083.      if test $ac_cv_func_shmat = no; then
  3084.        echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  3085. -echo "configure:5492: checking for shmat in -lipc" >&5
  3086. +echo "configure:5493: checking for shmat in -lipc" >&5
  3087.  ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  3088.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3089.    echo $ac_n "(cached) $ac_c" 1>&6
  3090. @@ -5496,7 +5497,7 @@
  3091.    ac_save_LIBS="$LIBS"
  3092.  LIBS="-lipc  $LIBS"
  3093.  cat > conftest.$ac_ext <<EOF
  3094. -#line 5500 "configure"
  3095. +#line 5501 "configure"
  3096.  #include "confdefs.h"
  3097.  /* Override any gcc2 internal prototype to avoid an error.  */
  3098.  /* We use char because int might match the return type of a gcc2
  3099. @@ -5507,7 +5508,7 @@
  3100.  shmat()
  3101.  ; return 0; }
  3102.  EOF
  3103. -if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3104. +if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3105.    rm -rf conftest*
  3106.    eval "ac_cv_lib_$ac_lib_var=yes"
  3107.  else
  3108. @@ -5540,7 +5541,7 @@
  3109.    # libraries we check for below, so use a different variable.
  3110.    #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  3111.    echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  3112. -echo "configure:5544: checking for IceConnectionNumber in -lICE" >&5
  3113. +echo "configure:5545: checking for IceConnectionNumber in -lICE" >&5
  3114.  ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  3115.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3116.    echo $ac_n "(cached) $ac_c" 1>&6
  3117. @@ -5548,7 +5549,7 @@
  3118.    ac_save_LIBS="$LIBS"
  3119.  LIBS="-lICE  $LIBS"
  3120.  cat > conftest.$ac_ext <<EOF
  3121. -#line 5552 "configure"
  3122. +#line 5553 "configure"
  3123.  #include "confdefs.h"
  3124.  /* Override any gcc2 internal prototype to avoid an error.  */
  3125.  /* We use char because int might match the return type of a gcc2
  3126. @@ -5559,7 +5560,7 @@
  3127.  IceConnectionNumber()
  3128.  ; return 0; }
  3129.  EOF
  3130. -if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3131. +if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3132.    rm -rf conftest*
  3133.    eval "ac_cv_lib_$ac_lib_var=yes"
  3134.  else
  3135. @@ -5587,7 +5588,7 @@
  3136.  # Extract the first word of "passwd", so it can be a program name with args.
  3137.  set dummy passwd; ac_word=$2
  3138.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3139. -echo "configure:5591: checking for $ac_word" >&5
  3140. +echo "configure:5592: checking for $ac_word" >&5
  3141.  if eval "test \"`echo '$''{'ac_cv_path_PASSWD_PATH'+set}'`\" = set"; then
  3142.    echo $ac_n "(cached) $ac_c" 1>&6
  3143.  else
  3144. @@ -5625,7 +5626,7 @@
  3145.  # Extract the first word of "xauth", so it can be a program name with args.
  3146.  set dummy xauth; ac_word=$2
  3147.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3148. -echo "configure:5629: checking for $ac_word" >&5
  3149. +echo "configure:5630: checking for $ac_word" >&5
  3150.  if eval "test \"`echo '$''{'ac_cv_path_XAUTH_PATH'+set}'`\" = set"; then
  3151.    echo $ac_n "(cached) $ac_c" 1>&6
  3152.  else
  3153. @@ -5669,7 +5670,7 @@
  3154.    X_PROGRAMS="ssh-askpass"
  3155.  fi
  3156.  echo $ac_n "checking for X11 unix domain socket directory""... $ac_c" 1>&6
  3157. -echo "configure:5673: checking for X11 unix domain socket directory" >&5
  3158. +echo "configure:5674: checking for X11 unix domain socket directory" >&5
  3159.  
  3160.  if test '!' -d /tmp/.X11-unix; then
  3161.    if test -d /var/X/.X11-unix; then
  3162. @@ -5698,7 +5699,7 @@
  3163.  # Extract the first word of "$ac_prog", so it can be a program name with args.
  3164.  set dummy $ac_prog; ac_word=$2
  3165.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3166. -echo "configure:5702: checking for $ac_word" >&5
  3167. +echo "configure:5703: checking for $ac_word" >&5
  3168.  if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  3169.    echo $ac_n "(cached) $ac_c" 1>&6
  3170.  else
  3171. @@ -5739,12 +5740,12 @@
  3172.  for ac_func in getpseudotty
  3173.  do
  3174.  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3175. -echo "configure:5743: checking for $ac_func" >&5
  3176. +echo "configure:5744: checking for $ac_func" >&5
  3177.  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3178.    echo $ac_n "(cached) $ac_c" 1>&6
  3179.  else
  3180.    cat > conftest.$ac_ext <<EOF
  3181. -#line 5748 "configure"
  3182. +#line 5749 "configure"
  3183.  #include "confdefs.h"
  3184.  /* System header to define __stub macros and hopefully few prototypes,
  3185.      which can conflict with char $ac_func(); below.  */
  3186. @@ -5767,7 +5768,7 @@
  3187.  
  3188.  ; return 0; }
  3189.  EOF
  3190. -if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3191. +if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3192.    rm -rf conftest*
  3193.    eval "ac_cv_func_$ac_func=yes"
  3194.  else
  3195. @@ -5792,7 +5793,7 @@
  3196.  done
  3197.  
  3198.  echo $ac_n "checking for pseudo ttys""... $ac_c" 1>&6
  3199. -echo "configure:5796: checking for pseudo ttys" >&5
  3200. +echo "configure:5797: checking for pseudo ttys" >&5
  3201.  if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes
  3202.  then
  3203.    cat >> confdefs.h <<\EOF
  3204. @@ -5832,7 +5833,7 @@
  3205.  fi
  3206.  
  3207.  echo $ac_n "checking for /etc/default/login""... $ac_c" 1>&6
  3208. -echo "configure:5836: checking for /etc/default/login" >&5
  3209. +echo "configure:5837: checking for /etc/default/login" >&5
  3210.  if test -f /etc/default/login; then
  3211.    cat >> confdefs.h <<\EOF
  3212.  #define HAVE_ETC_DEFAULT_LOGIN 1
  3213. @@ -5845,7 +5846,7 @@
  3214.  
  3215.  if test -z "$no_shadows_password_checking"; then
  3216.    echo $ac_n "checking for shadow passwords""... $ac_c" 1>&6
  3217. -echo "configure:5849: checking for shadow passwords" >&5
  3218. +echo "configure:5850: checking for shadow passwords" >&5
  3219.    if test -f /etc/shadow; then
  3220.        # If we don't have shadow.h, this might be some nonstandard
  3221.        # kludging... So better check it out.
  3222. @@ -5859,7 +5860,7 @@
  3223.        # have getspent in a system library.  However, a libshadow.a library
  3224.        # contaning these is publicly available.
  3225.        echo $ac_n "checking for getspent in -lshadow""... $ac_c" 1>&6
  3226. -echo "configure:5863: checking for getspent in -lshadow" >&5
  3227. +echo "configure:5864: checking for getspent in -lshadow" >&5
  3228.  ac_lib_var=`echo shadow'_'getspent | sed 'y%./+-%__p_%'`
  3229.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3230.    echo $ac_n "(cached) $ac_c" 1>&6
  3231. @@ -5867,7 +5868,7 @@
  3232.    ac_save_LIBS="$LIBS"
  3233.  LIBS="-lshadow  $LIBS"
  3234.  cat > conftest.$ac_ext <<EOF
  3235. -#line 5871 "configure"
  3236. +#line 5872 "configure"
  3237.  #include "confdefs.h"
  3238.  /* Override any gcc2 internal prototype to avoid an error.  */
  3239.  /* We use char because int might match the return type of a gcc2
  3240. @@ -5878,7 +5879,7 @@
  3241.  getspent()
  3242.  ; return 0; }
  3243.  EOF
  3244. -if { (eval echo configure:5882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3245. +if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3246.    rm -rf conftest*
  3247.    eval "ac_cv_lib_$ac_lib_var=yes"
  3248.  else
  3249. @@ -5906,9 +5907,9 @@
  3250.  fi
  3251.  
  3252.        echo $ac_n "checking whether spwd have sp_expire field""... $ac_c" 1>&6
  3253. -echo "configure:5910: checking whether spwd have sp_expire field" >&5
  3254. +echo "configure:5911: checking whether spwd have sp_expire field" >&5
  3255.        cat > conftest.$ac_ext <<EOF
  3256. -#line 5912 "configure"
  3257. +#line 5913 "configure"
  3258.  #include "confdefs.h"
  3259.  #include <shadow.h>
  3260.  EOF
  3261. @@ -5927,9 +5928,9 @@
  3262.  rm -f conftest*
  3263.  
  3264.        echo $ac_n "checking whether spwd have sp_inact field""... $ac_c" 1>&6
  3265. -echo "configure:5931: checking whether spwd have sp_inact field" >&5
  3266. +echo "configure:5932: checking whether spwd have sp_inact field" >&5
  3267.        cat > conftest.$ac_ext <<EOF
  3268. -#line 5933 "configure"
  3269. +#line 5934 "configure"
  3270.  #include "confdefs.h"
  3271.  #include <shadow.h>
  3272.  EOF
  3273. @@ -5968,7 +5969,7 @@
  3274.  fi
  3275.  
  3276.  echo $ac_n "checking location of mail spool files""... $ac_c" 1>&6
  3277. -echo "configure:5972: checking location of mail spool files" >&5
  3278. +echo "configure:5973: checking location of mail spool files" >&5
  3279.  for dir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail FILE
  3280.  do
  3281.    if test "$dir" = "FILE"; then
  3282. @@ -6007,7 +6008,7 @@
  3283.  done
  3284.  
  3285.  echo $ac_n "checking location of utmp""... $ac_c" 1>&6
  3286. -echo "configure:6011: checking location of utmp" >&5
  3287. +echo "configure:6012: checking location of utmp" >&5
  3288.  if test -f /var/run/utmp; then
  3289.    cat >> confdefs.h <<\EOF
  3290.  #define SSH_UTMP "/var/run/utmp"
  3291. @@ -6043,7 +6044,7 @@
  3292.  fi
  3293.  
  3294.  echo $ac_n "checking location of wtmp""... $ac_c" 1>&6
  3295. -echo "configure:6047: checking location of wtmp" >&5
  3296. +echo "configure:6048: checking location of wtmp" >&5
  3297.  if test -f /var/log/wtmp; then
  3298.    cat >> confdefs.h <<\EOF
  3299.  #define SSH_WTMP "/var/log/wtmp"
  3300. @@ -6077,7 +6078,7 @@
  3301.  fi
  3302.  
  3303.  echo $ac_n "checking location of lastlog""... $ac_c" 1>&6
  3304. -echo "configure:6081: checking location of lastlog" >&5
  3305. +echo "configure:6082: checking location of lastlog" >&5
  3306.  if test -f /var/log/lastlog || test -d /var/log/lastlog; then
  3307.    cat >> confdefs.h <<\EOF
  3308.  #define SSH_LASTLOG "/var/log/lastlog"
  3309. @@ -6132,7 +6133,7 @@
  3310.  fi
  3311.  
  3312.  echo $ac_n "checking whether $LASTLOG is a directory""... $ac_c" 1>&6
  3313. -echo "configure:6136: checking whether $LASTLOG is a directory" >&5
  3314. +echo "configure:6137: checking whether $LASTLOG is a directory" >&5
  3315.  if test -d $LASTLOG
  3316.  then
  3317.    echo "$ac_t""yes" 1>&6
  3318. @@ -6145,7 +6146,7 @@
  3319.  fi
  3320.  
  3321.  echo $ac_n "checking whether to include the IDEA encryption algorithm""... $ac_c" 1>&6
  3322. -echo "configure:6149: checking whether to include the IDEA encryption algorithm" >&5
  3323. +echo "configure:6150: checking whether to include the IDEA encryption algorithm" >&5
  3324.  # Check whether --with-idea or --without-idea was given.
  3325.  if test "${with_idea+set}" = set; then
  3326.    withval="$with_idea"
  3327. @@ -6179,7 +6180,7 @@
  3328.  
  3329.  
  3330.  echo $ac_n "checking whether to include the Blowfish encryption algorithm""... $ac_c" 1>&6
  3331. -echo "configure:6183: checking whether to include the Blowfish encryption algorithm" >&5
  3332. +echo "configure:6184: checking whether to include the Blowfish encryption algorithm" >&5
  3333.  # Check whether --with-blowfish or --without-blowfish was given.
  3334.  if test "${with_blowfish+set}" = set; then
  3335.    withval="$with_blowfish"
  3336. @@ -6206,7 +6207,7 @@
  3337.  
  3338.  
  3339.  echo $ac_n "checking whether to include the DES encryption algorithm""... $ac_c" 1>&6
  3340. -echo "configure:6210: checking whether to include the DES encryption algorithm" >&5
  3341. +echo "configure:6211: checking whether to include the DES encryption algorithm" >&5
  3342.  # Check whether --with-des or --without-des was given.
  3343.  if test "${with_des+set}" = set; then
  3344.    withval="$with_des"
  3345. @@ -6229,7 +6230,7 @@
  3346.  
  3347.  
  3348.  echo $ac_n "checking whether to include the ARCFOUR encryption algorithm""... $ac_c" 1>&6
  3349. -echo "configure:6233: checking whether to include the ARCFOUR encryption algorithm" >&5
  3350. +echo "configure:6234: checking whether to include the ARCFOUR encryption algorithm" >&5
  3351.  # Check whether --with-arcfour or --without-arcfour was given.
  3352.  if test "${with_arcfour+set}" = set; then
  3353.    withval="$with_arcfour"
  3354. @@ -6252,7 +6253,7 @@
  3355.  
  3356.  
  3357.  echo $ac_n "checking whether to include the none encryption algorithm""... $ac_c" 1>&6
  3358. -echo "configure:6256: checking whether to include the none encryption algorithm" >&5
  3359. +echo "configure:6257: checking whether to include the none encryption algorithm" >&5
  3360.  # Check whether --with-none or --without-none was given.
  3361.  if test "${with_none+set}" = set; then
  3362.    withval="$with_none"
  3363. @@ -6275,7 +6276,7 @@
  3364.  
  3365.  
  3366.  echo $ac_n "checking whether to use login""... $ac_c" 1>&6
  3367. -echo "configure:6279: checking whether to use login" >&5
  3368. +echo "configure:6280: checking whether to use login" >&5
  3369.  # Check whether --with-login or --without-login was given.
  3370.  if test "${with_login+set}" = set; then
  3371.    withval="$with_login"
  3372. @@ -6290,7 +6291,7 @@
  3373.  # Extract the first word of "$ac_prog", so it can be a program name with args.
  3374.  set dummy $ac_prog; ac_word=$2
  3375.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3376. -echo "configure:6294: checking for $ac_word" >&5
  3377. +echo "configure:6295: checking for $ac_word" >&5
  3378.  if eval "test \"`echo '$''{'ac_cv_path_PATH_LOGIN'+set}'`\" = set"; then
  3379.    echo $ac_n "(cached) $ac_c" 1>&6
  3380.  else
  3381. @@ -6349,7 +6350,7 @@
  3382.  
  3383.  
  3384.  echo $ac_n "checking whether to use rsh""... $ac_c" 1>&6
  3385. -echo "configure:6353: checking whether to use rsh" >&5
  3386. +echo "configure:6354: checking whether to use rsh" >&5
  3387.  # Check whether --with-rsh or --without-rsh was given.
  3388.  if test "${with_rsh+set}" = set; then
  3389.    withval="$with_rsh"
  3390. @@ -6364,7 +6365,7 @@
  3391.  # Extract the first word of "$ac_prog", so it can be a program name with args.
  3392.  set dummy $ac_prog; ac_word=$2
  3393.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3394. -echo "configure:6368: checking for $ac_word" >&5
  3395. +echo "configure:6369: checking for $ac_word" >&5
  3396.  if eval "test \"`echo '$''{'ac_cv_path_RSH_PATH'+set}'`\" = set"; then
  3397.    echo $ac_n "(cached) $ac_c" 1>&6
  3398.  else
  3399. @@ -6416,7 +6417,7 @@
  3400.  # Extract the first word of "$ac_prog", so it can be a program name with args.
  3401.  set dummy $ac_prog; ac_word=$2
  3402.  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3403. -echo "configure:6420: checking for $ac_word" >&5
  3404. +echo "configure:6421: checking for $ac_word" >&5
  3405.  if eval "test \"`echo '$''{'ac_cv_path_RSH_PATH'+set}'`\" = set"; then
  3406.    echo $ac_n "(cached) $ac_c" 1>&6
  3407.  else
  3408. @@ -6465,7 +6466,7 @@
  3409.  
  3410.  # Code to permit setting default path for users (alden@math.ohio-state.edu)
  3411.  echo $ac_n "checking default path""... $ac_c" 1>&6
  3412. -echo "configure:6469: checking default path" >&5
  3413. +echo "configure:6470: checking default path" >&5
  3414.  # Check whether --with-path or --without-path was given.
  3415.  if test "${with_path+set}" = set; then
  3416.    withval="$with_path"
  3417. @@ -6488,7 +6489,7 @@
  3418.  
  3419.  
  3420.  echo $ac_n "checking etcdir""... $ac_c" 1>&6
  3421. -echo "configure:6492: checking etcdir" >&5
  3422. +echo "configure:6493: checking etcdir" >&5
  3423.  # Check whether --with-etcdir or --without-etcdir was given.
  3424.  if test "${with_etcdir+set}" = set; then
  3425.    withval="$with_etcdir"
  3426. @@ -6513,7 +6514,7 @@
  3427.  
  3428.  
  3429.  echo $ac_n "checking whether to use nologin.allow file to override nologin""... $ac_c" 1>&6
  3430. -echo "configure:6517: checking whether to use nologin.allow file to override nologin" >&5
  3431. +echo "configure:6518: checking whether to use nologin.allow file to override nologin" >&5
  3432.  # Check whether --with-nologin-allow or --without-nologin-allow was given.
  3433.  if test "${with_nologin_allow+set}" = set; then
  3434.    withval="$with_nologin_allow"
  3435. @@ -6543,7 +6544,7 @@
  3436.  
  3437.  
  3438.  echo $ac_n "checking whether to support SecurID""... $ac_c" 1>&6
  3439. -echo "configure:6547: checking whether to support SecurID" >&5
  3440. +echo "configure:6548: checking whether to support SecurID" >&5
  3441.  # Check whether --with-securid or --without-securid was given.
  3442.  if test "${with_securid+set}" = set; then
  3443.    withval="$with_securid"
  3444. @@ -6586,7 +6587,7 @@
  3445.  
  3446.  
  3447.  echo $ac_n "checking whether to support TIS authentication server""... $ac_c" 1>&6
  3448. -echo "configure:6590: checking whether to support TIS authentication server" >&5
  3449. +echo "configure:6591: checking whether to support TIS authentication server" >&5
  3450.  # Check whether --with-tis or --without-tis was given.
  3451.  if test "${with_tis+set}" = set; then
  3452.    withval="$with_tis"
  3453. @@ -6616,40 +6617,138 @@
  3454.  fi
  3455.  
  3456.  
  3457. -echo $ac_n "checking whether to use Kerberos""... $ac_c" 1>&6
  3458. -echo "configure:6621: checking whether to use Kerberos" >&5
  3459. -# Check whether --with-kerberos5 or --without-kerberos5 was given.
  3460. -if test "${with_kerberos5+set}" = set; then
  3461. -  withval="$with_kerberos5"
  3462. +echo $ac_n "checking whether to use Kerberos v4""... $ac_c" 1>&6
  3463. +echo "configure:6622: checking whether to use Kerberos v4" >&5
  3464. +# Check whether --with-krb4 or --without-krb4 was given.
  3465. +if test "${with_krb4+set}" = set; then
  3466. +  withval="$with_krb4"
  3467.     case "$withval" in
  3468.    yes)
  3469. -    with_kerberos5=/usr/local
  3470. +    with_krb4=/usr/kerberos
  3471.      ;;
  3472.    esac 
  3473.  else
  3474. -   with_kerberos5=no 
  3475. +   with_krb4=no 
  3476.  
  3477.  fi
  3478.  
  3479. -case "$with_kerberos5" in
  3480. +case "$with_krb4" in
  3481.  no)
  3482.    echo "$ac_t""no" 1>&6
  3483.    ;;
  3484.  *)
  3485.    echo "$ac_t""yes" 1>&6
  3486.    cat >> confdefs.h <<\EOF
  3487. -#define KERBEROS 1
  3488. +#define KRB4 1
  3489.  EOF
  3490.  
  3491. +  KERBEROS_ROOT="$with_krb4"
  3492. +  KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
  3493. +  KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes"
  3494. +  KERBEROS_OBJS="auth-kerberos.o"
  3495. +  echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
  3496. +echo "configure:6651: checking for dn_expand in -lresolv" >&5
  3497. +ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
  3498. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3499. +  echo $ac_n "(cached) $ac_c" 1>&6
  3500. +else
  3501. +  ac_save_LIBS="$LIBS"
  3502. +LIBS="-lresolv  $LIBS"
  3503. +cat > conftest.$ac_ext <<EOF
  3504. +#line 6659 "configure"
  3505. +#include "confdefs.h"
  3506. +/* Override any gcc2 internal prototype to avoid an error.  */
  3507. +/* We use char because int might match the return type of a gcc2
  3508. +    builtin and then its argument prototype would still apply.  */
  3509. +char dn_expand();
  3510. +
  3511. +int main() {
  3512. +dn_expand()
  3513. +; return 0; }
  3514. +EOF
  3515. +if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3516. +  rm -rf conftest*
  3517. +  eval "ac_cv_lib_$ac_lib_var=yes"
  3518. +else
  3519. +  echo "configure: failed program was:" >&5
  3520. +  cat conftest.$ac_ext >&5
  3521. +  rm -rf conftest*
  3522. +  eval "ac_cv_lib_$ac_lib_var=no"
  3523. +fi
  3524. +rm -f conftest*
  3525. +LIBS="$ac_save_LIBS"
  3526. +
  3527. +fi
  3528. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3529. +  echo "$ac_t""yes" 1>&6
  3530. +  KERBEROS_LIBS="$KERBEROS_LIBS -lresolv"
  3531. +else
  3532. +  echo "$ac_t""no" 1>&6
  3533. +fi
  3534. +
  3535. +    echo $ac_n "checking whether AFS lifetime conversion routines are present""... $ac_c" 1>&6
  3536. +echo "configure:6691: checking whether AFS lifetime conversion routines are present" >&5
  3537. +  keeplibs="$LIBS"
  3538. +  keepcflags="$CFLAGS"
  3539. +  LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS"
  3540. +  CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS"
  3541. +  cat > conftest.$ac_ext <<EOF
  3542. +#line 6697 "configure"
  3543. +#include "confdefs.h"
  3544. +#include <krb.h>
  3545. +int main() {
  3546. + krb_life_to_time(10, 10);
  3547. +; return 0; }
  3548. +EOF
  3549. +if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3550. +  rm -rf conftest*
  3551. +  echo "$ac_t""yes" 1>&6
  3552. +               cat >> confdefs.h <<\EOF
  3553. +#define HAVE_KRB_LIFE_TO_TIME 1
  3554. +EOF
  3555. +
  3556. +else
  3557. +  echo "configure: failed program was:" >&5
  3558. +  cat conftest.$ac_ext >&5
  3559. +  rm -rf conftest*
  3560. +  echo "$ac_t""no" 1>&6
  3561. +fi
  3562. +rm -f conftest*
  3563. +  LIBS="$keeplibs"
  3564. +  CFLAGS="$keepcflags"
  3565. +  ;;
  3566. +esac
  3567. +
  3568. +echo $ac_n "checking whether to use Kerberos v5""... $ac_c" 1>&6
  3569. +echo "configure:6724: checking whether to use Kerberos v5" >&5
  3570. +# Check whether --with-krb5 or --without-krb5 was given.
  3571. +if test "${with_krb5+set}" = set; then
  3572. +  withval="$with_krb5"
  3573. +   case "$withval" in
  3574. +  yes)
  3575. +    with_krb5=/usr/local
  3576. +    ;;
  3577. +  esac 
  3578. +else
  3579. +   with_krb5=no 
  3580. +
  3581. +fi
  3582. +
  3583. +case "$with_krb5" in
  3584. +  no)
  3585. +    echo "$ac_t""no" 1>&6
  3586. +    ;;
  3587. +  *)
  3588. +  echo "$ac_t""yes" 1>&6
  3589.    cat >> confdefs.h <<\EOF
  3590.  #define KRB5 1
  3591.  EOF
  3592.  
  3593. -  KERBEROS_ROOT="$with_kerberos5"
  3594. +  KERBEROS_ROOT="$with_krb5"
  3595.    KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
  3596.    KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
  3597.    echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
  3598. -echo "configure:6653: checking for dbm_open in -lndbm" >&5
  3599. +echo "configure:6752: checking for dbm_open in -lndbm" >&5
  3600.  ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
  3601.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3602.    echo $ac_n "(cached) $ac_c" 1>&6
  3603. @@ -6657,7 +6756,7 @@
  3604.    ac_save_LIBS="$LIBS"
  3605.  LIBS="-lndbm  $LIBS"
  3606.  cat > conftest.$ac_ext <<EOF
  3607. -#line 6661 "configure"
  3608. +#line 6760 "configure"
  3609.  #include "confdefs.h"
  3610.  /* Override any gcc2 internal prototype to avoid an error.  */
  3611.  /* We use char because int might match the return type of a gcc2
  3612. @@ -6668,7 +6767,7 @@
  3613.  dbm_open()
  3614.  ; return 0; }
  3615.  EOF
  3616. -if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3617. +if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3618.    rm -rf conftest*
  3619.    eval "ac_cv_lib_$ac_lib_var=yes"
  3620.  else
  3621. @@ -6692,40 +6791,66 @@
  3622.    ;;
  3623.  esac
  3624.  
  3625. -
  3626. -
  3627. -
  3628. -
  3629. -echo $ac_n "checking whether to enable passing the Kerberos TGT""... $ac_c" 1>&6
  3630. -echo "configure:6701: checking whether to enable passing the Kerberos TGT" >&5
  3631. -# Check whether --enable-kerberos-tgt-passing or --disable-kerberos-tgt-passing was given.
  3632. -if test "${enable_kerberos_tgt_passing+set}" = set; then
  3633. -  enableval="$enable_kerberos_tgt_passing"
  3634. -   case "$enableval" in
  3635. -  no)
  3636. -    echo "$ac_t""no" 1>&6
  3637. -    ;;
  3638. -  *)
  3639. -    if test "$with_kerberos5" = no ; then
  3640. +echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
  3641. +echo "configure:6796: checking whether to use AFS" >&5
  3642. +# Check whether --with-afs or --without-afs was given.
  3643. +if test "${with_afs+set}" = set; then
  3644. +  withval="$with_afs"
  3645. +  if test "$with_afs" = no; then
  3646.        echo "$ac_t""no" 1>&6
  3647. -      echo "configure: warning: "Passing Kerberos TGT requires Kerberos5 support."" 1>&2
  3648.      else
  3649.        echo "$ac_t""yes" 1>&6
  3650. -      cat >> confdefs.h <<\EOF
  3651. -#define KERBEROS_TGT_PASSING 1
  3652. +  cat >> confdefs.h <<\EOF
  3653. +#define AFS 1
  3654.  EOF
  3655.  
  3656. +  if test "$with_krb4" = no; then
  3657. +    echo "$ac_t""no" 1>&6
  3658. +    echo "configure: warning: "AFS requires Kerberos v4 support."" 1>&2
  3659. +  else
  3660. +    KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs"
  3661. +    if test -n "$os_aix"; then
  3662. +      KERBEROS_LIBS="${KERBEROS_LIBS} -lld"
  3663.      fi
  3664. +  fi
  3665. +fi
  3666. +
  3667. +fi
  3668. +
  3669. +
  3670. +echo $ac_n "checking whether to use Hesiod""... $ac_c" 1>&6
  3671. +echo "configure:6823: checking whether to use Hesiod" >&5
  3672. +# Check whether --with-hesiod or --without-hesiod was given.
  3673. +if test "${with_hesiod+set}" = set; then
  3674. +  withval="$with_hesiod"
  3675. +   case "$withval" in
  3676. +  yes)
  3677. +    with_hesiod=/usr/local/athena
  3678.      ;;
  3679.    esac 
  3680.  else
  3681. -  echo "$ac_t""no" 1>&6
  3682. +   with_hesiod=no 
  3683.  
  3684.  fi
  3685.  
  3686. +case "$with_hesiod" in
  3687. +no)
  3688. +  echo "$ac_t""no" 1>&6
  3689. +  ;;
  3690. +*)
  3691. +  echo "$ac_t""yes" 1>&6
  3692. +  cat >> confdefs.h <<\EOF
  3693. +#define HESIOD 1
  3694. +EOF
  3695. +
  3696. +  HESIOD_ROOT="$with_hesiod"
  3697. +  HESIOD_INCS="-I${HESIOD_ROOT}/include"
  3698. +  HESIOD_LIBS="-L${HESIOD_ROOT}/lib -lhesiod"
  3699. +  ;;
  3700. +esac
  3701.  
  3702.  echo $ac_n "checking whether to use libwrap""... $ac_c" 1>&6
  3703. -echo "configure:6729: checking whether to use libwrap" >&5
  3704. +echo "configure:6854: checking whether to use libwrap" >&5
  3705.  # Check whether --with-libwrap or --without-libwrap was given.
  3706.  if test "${with_libwrap+set}" = set; then
  3707.    withval="$with_libwrap"
  3708. @@ -6736,7 +6861,7 @@
  3709.    yes)
  3710.      echo "$ac_t""yes" 1>&6
  3711.      echo $ac_n "checking for request_init in -lwrap""... $ac_c" 1>&6
  3712. -echo "configure:6740: checking for request_init in -lwrap" >&5
  3713. +echo "configure:6865: checking for request_init in -lwrap" >&5
  3714.  ac_lib_var=`echo wrap'_'request_init | sed 'y%./+-%__p_%'`
  3715.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3716.    echo $ac_n "(cached) $ac_c" 1>&6
  3717. @@ -6744,7 +6869,7 @@
  3718.    ac_save_LIBS="$LIBS"
  3719.  LIBS="-lwrap  $LIBS"
  3720.  cat > conftest.$ac_ext <<EOF
  3721. -#line 6748 "configure"
  3722. +#line 6873 "configure"
  3723.  #include "confdefs.h"
  3724.  /* Override any gcc2 internal prototype to avoid an error.  */
  3725.  /* We use char because int might match the return type of a gcc2
  3726. @@ -6755,7 +6880,7 @@
  3727.  request_init()
  3728.  ; return 0; }
  3729.  EOF
  3730. -if { (eval echo configure:6759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3731. +if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3732.    rm -rf conftest*
  3733.    eval "ac_cv_lib_$ac_lib_var=yes"
  3734.  else
  3735. @@ -6799,14 +6924,14 @@
  3736.      OLDLIBS="$LIBS"
  3737.      LIBS="$WRAPLIBS $LIBS"
  3738.      cat > conftest.$ac_ext <<EOF
  3739. -#line 6803 "configure"
  3740. +#line 6928 "configure"
  3741.  #include "confdefs.h"
  3742.   int allow_severity; int deny_severity; 
  3743.  int main() {
  3744.   hosts_access(); 
  3745.  ; return 0; }
  3746.  EOF
  3747. -if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3748. +if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3749.    :
  3750.  else
  3751.    echo "configure: failed program was:" >&5
  3752. @@ -6827,7 +6952,7 @@
  3753.  
  3754.  
  3755.  echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6
  3756. -echo "configure:6831: checking whether to support SOCKS" >&5
  3757. +echo "configure:6956: checking whether to support SOCKS" >&5
  3758.  # Check whether --with-socks or --without-socks was given.
  3759.  if test "${with_socks+set}" = set; then
  3760.    withval="$with_socks"
  3761. @@ -6838,7 +6963,7 @@
  3762.    yes)
  3763.      echo "$ac_t""yes" 1>&6
  3764.      echo $ac_n "checking for SOCKSconnect in -lsocks5""... $ac_c" 1>&6
  3765. -echo "configure:6842: checking for SOCKSconnect in -lsocks5" >&5
  3766. +echo "configure:6967: checking for SOCKSconnect in -lsocks5" >&5
  3767.  ac_lib_var=`echo socks5'_'SOCKSconnect | sed 'y%./+-%__p_%'`
  3768.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3769.    echo $ac_n "(cached) $ac_c" 1>&6
  3770. @@ -6846,7 +6971,7 @@
  3771.    ac_save_LIBS="$LIBS"
  3772.  LIBS="-lsocks5  $LIBS"
  3773.  cat > conftest.$ac_ext <<EOF
  3774. -#line 6850 "configure"
  3775. +#line 6975 "configure"
  3776.  #include "confdefs.h"
  3777.  /* Override any gcc2 internal prototype to avoid an error.  */
  3778.  /* We use char because int might match the return type of a gcc2
  3779. @@ -6857,7 +6982,7 @@
  3780.  SOCKSconnect()
  3781.  ; return 0; }
  3782.  EOF
  3783. -if { (eval echo configure:6861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3784. +if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3785.    rm -rf conftest*
  3786.    eval "ac_cv_lib_$ac_lib_var=yes"
  3787.  else
  3788. @@ -6879,7 +7004,7 @@
  3789.    echo "$ac_t""no" 1>&6
  3790.  
  3791.      echo $ac_n "checking for Rconnect in -lsocks""... $ac_c" 1>&6
  3792. -echo "configure:6883: checking for Rconnect in -lsocks" >&5
  3793. +echo "configure:7008: checking for Rconnect in -lsocks" >&5
  3794.  ac_lib_var=`echo socks'_'Rconnect | sed 'y%./+-%__p_%'`
  3795.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3796.    echo $ac_n "(cached) $ac_c" 1>&6
  3797. @@ -6887,7 +7012,7 @@
  3798.    ac_save_LIBS="$LIBS"
  3799.  LIBS="-lsocks  $LIBS"
  3800.  cat > conftest.$ac_ext <<EOF
  3801. -#line 6891 "configure"
  3802. +#line 7016 "configure"
  3803.  #include "confdefs.h"
  3804.  /* Override any gcc2 internal prototype to avoid an error.  */
  3805.  /* We use char because int might match the return type of a gcc2
  3806. @@ -6898,7 +7023,7 @@
  3807.  Rconnect()
  3808.  ; return 0; }
  3809.  EOF
  3810. -if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3811. +if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3812.    rm -rf conftest*
  3813.    eval "ac_cv_lib_$ac_lib_var=yes"
  3814.  else
  3815. @@ -6934,7 +7059,7 @@
  3816.  
  3817.  if test "x$socks" = "x"; then
  3818.      echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6
  3819. -echo "configure:6938: checking whether to support SOCKS5" >&5
  3820. +echo "configure:7063: checking whether to support SOCKS5" >&5
  3821.      # Check whether --with-socks5 or --without-socks5 was given.
  3822.  if test "${with_socks5+set}" = set; then
  3823.    withval="$with_socks5"
  3824. @@ -6968,14 +7093,14 @@
  3825.          TMPLIBS="$LIBS"
  3826.          LIBS="$LIBS $KERBEROS_LIBS"
  3827.          cat > conftest.$ac_ext <<EOF
  3828. -#line 6972 "configure"
  3829. +#line 7097 "configure"
  3830.  #include "confdefs.h"
  3831.  
  3832.  int main() {
  3833.   SOCKSconnect(); 
  3834.  ; return 0; }
  3835.  EOF
  3836. -if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3837. +if { (eval echo configure:7104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3838.    :
  3839.  else
  3840.    echo "configure: failed program was:" >&5
  3841. @@ -6996,7 +7121,7 @@
  3842.  
  3843.  if test "x$socks" = "x"; then
  3844.      echo $ac_n "checking whether to support SOCKS4""... $ac_c" 1>&6
  3845. -echo "configure:7000: checking whether to support SOCKS4" >&5
  3846. +echo "configure:7125: checking whether to support SOCKS4" >&5
  3847.      # Check whether --with-socks4 or --without-socks4 was given.
  3848.  if test "${with_socks4+set}" = set; then
  3849.    withval="$with_socks4"
  3850. @@ -7016,14 +7141,14 @@
  3851.          fi
  3852.          LIBS="$withval $LIBS"
  3853.          cat > conftest.$ac_ext <<EOF
  3854. -#line 7020 "configure"
  3855. +#line 7145 "configure"
  3856.  #include "confdefs.h"
  3857.  
  3858.  int main() {
  3859.   Rconnect(); 
  3860.  ; return 0; }
  3861.  EOF
  3862. -if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3863. +if { (eval echo configure:7152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3864.    :
  3865.  else
  3866.    echo "configure: failed program was:" >&5
  3867. @@ -7150,7 +7275,7 @@
  3868.  fi
  3869.  
  3870.  echo $ac_n "checking whether to use rsaref""... $ac_c" 1>&6
  3871. -echo "configure:7154: checking whether to use rsaref" >&5
  3872. +echo "configure:7279: checking whether to use rsaref" >&5
  3873.  # Check whether --with-rsaref or --without-rsaref was given.
  3874.  if test "${with_rsaref+set}" = set; then
  3875.    withval="$with_rsaref"
  3876. @@ -7184,7 +7309,7 @@
  3877.  
  3878.  # This allows group writeability in userfile_check_owner_permissions()
  3879.  echo $ac_n "checking whether to allow group writeability""... $ac_c" 1>&6
  3880. -echo "configure:7188: checking whether to allow group writeability" >&5
  3881. +echo "configure:7313: checking whether to allow group writeability" >&5
  3882.  # Check whether --enable-group-writeability or --disable-group-writeability was given.
  3883.  if test "${enable_group_writeability+set}" = set; then
  3884.    enableval="$enable_group_writeability"
  3885. @@ -7200,7 +7325,7 @@
  3886.  
  3887.  
  3888.  echo $ac_n "checking whether to disable forwardings in server""... $ac_c" 1>&6
  3889. -echo "configure:7204: checking whether to disable forwardings in server" >&5
  3890. +echo "configure:7329: checking whether to disable forwardings in server" >&5
  3891.  # Check whether --enable-server-port-forwardings or --disable-server-port-forwardings was given.
  3892.  if test "${enable_server_port_forwardings+set}" = set; then
  3893.    enableval="$enable_server_port_forwardings"
  3894. @@ -7222,7 +7347,7 @@
  3895.  
  3896.  
  3897.  echo $ac_n "checking whether to disable forwardings in client""... $ac_c" 1>&6
  3898. -echo "configure:7226: checking whether to disable forwardings in client" >&5
  3899. +echo "configure:7351: checking whether to disable forwardings in client" >&5
  3900.  # Check whether --enable-client-port-forwardings or --disable-client-port-forwardings was given.
  3901.  if test "${enable_client_port_forwardings+set}" = set; then
  3902.    enableval="$enable_client_port_forwardings"
  3903. @@ -7244,7 +7369,7 @@
  3904.  
  3905.  
  3906.  echo $ac_n "checking whether to disable X11 forwarding in server""... $ac_c" 1>&6
  3907. -echo "configure:7248: checking whether to disable X11 forwarding in server" >&5
  3908. +echo "configure:7373: checking whether to disable X11 forwarding in server" >&5
  3909.  # Check whether --enable-server-x11-forwarding or --disable-server-x11-forwarding was given.
  3910.  if test "${enable_server_x11_forwarding+set}" = set; then
  3911.    enableval="$enable_server_x11_forwarding"
  3912. @@ -7266,7 +7391,7 @@
  3913.  
  3914.  
  3915.  echo $ac_n "checking whether to disable X11 forwarding in client""... $ac_c" 1>&6
  3916. -echo "configure:7270: checking whether to disable X11 forwarding in client" >&5
  3917. +echo "configure:7395: checking whether to disable X11 forwarding in client" >&5
  3918.  # Check whether --enable-client-x11-forwarding or --disable-client-x11-forwarding was given.
  3919.  if test "${enable_client_x11_forwarding+set}" = set; then
  3920.    enableval="$enable_client_x11_forwarding"
  3921. @@ -7288,7 +7413,7 @@
  3922.  
  3923.  
  3924.  echo $ac_n "checking whether to install ssh as suid root""... $ac_c" 1>&6
  3925. -echo "configure:7292: checking whether to install ssh as suid root" >&5
  3926. +echo "configure:7417: checking whether to install ssh as suid root" >&5
  3927.  # Check whether --enable-suid-ssh or --disable-suid-ssh was given.
  3928.  if test "${enable_suid_ssh+set}" = set; then
  3929.    enableval="$enable_suid_ssh"
  3930. @@ -7309,7 +7434,7 @@
  3931.  
  3932.  
  3933.  echo $ac_n "checking whether to enable TCP_NODELAY""... $ac_c" 1>&6
  3934. -echo "configure:7313: checking whether to enable TCP_NODELAY" >&5
  3935. +echo "configure:7438: checking whether to enable TCP_NODELAY" >&5
  3936.  # Check whether --enable-tcp-nodelay or --disable-tcp-nodelay was given.
  3937.  if test "${enable_tcp_nodelay+set}" = set; then
  3938.    enableval="$enable_tcp_nodelay"
  3939. @@ -7335,7 +7460,7 @@
  3940.  
  3941.  
  3942.  echo $ac_n "checking whether to enable SO_LINGER""... $ac_c" 1>&6
  3943. -echo "configure:7339: checking whether to enable SO_LINGER" >&5
  3944. +echo "configure:7464: checking whether to enable SO_LINGER" >&5
  3945.  # Check whether --enable-so-linger or --disable-so-linger was given.
  3946.  if test "${enable_so_linger+set}" = set; then
  3947.    enableval="$enable_so_linger"
  3948. @@ -7357,7 +7482,7 @@
  3949.  
  3950.  
  3951.  echo $ac_n "checking whether to include scp statistics at all""... $ac_c" 1>&6
  3952. -echo "configure:7361: checking whether to include scp statistics at all" >&5
  3953. +echo "configure:7486: checking whether to include scp statistics at all" >&5
  3954.  # Check whether --with-scp-stats or --without-scp-stats was given.
  3955.  if test "${with_scp_stats+set}" = set; then
  3956.    withval="$with_scp_stats"
  3957. @@ -7383,7 +7508,7 @@
  3958.  
  3959.  
  3960.  echo $ac_n "checking whether to enable scp statistics""... $ac_c" 1>&6
  3961. -echo "configure:7387: checking whether to enable scp statistics" >&5
  3962. +echo "configure:7512: checking whether to enable scp statistics" >&5
  3963.  # Check whether --enable-scp-stats or --disable-scp-stats was given.
  3964.  if test "${enable_scp_stats+set}" = set; then
  3965.    enableval="$enable_scp_stats"
  3966. @@ -7409,7 +7534,7 @@
  3967.  
  3968.  
  3969.  echo $ac_n "checking whether to enable scp statistics for all files""... $ac_c" 1>&6
  3970. -echo "configure:7413: checking whether to enable scp statistics for all files" >&5
  3971. +echo "configure:7538: checking whether to enable scp statistics for all files" >&5
  3972.  # Check whether --enable-all-scp-stats or --disable-all-scp-stats was given.
  3973.  if test "${enable_all_scp_stats+set}" = set; then
  3974.    enableval="$enable_all_scp_stats"
  3975. @@ -7445,7 +7570,7 @@
  3976.  
  3977.  PIDDIR="/var/run"
  3978.  echo $ac_n "checking where to put sshd.pid""... $ac_c" 1>&6
  3979. -echo "configure:7449: checking where to put sshd.pid" >&5
  3980. +echo "configure:7574: checking where to put sshd.pid" >&5
  3981.  if test '!' -d $PIDDIR; then
  3982.    PIDDIR="$ETCDIR"
  3983.  fi
  3984. @@ -7641,6 +7766,9 @@
  3985.  s%@KERBEROS_INCS@%$KERBEROS_INCS%g
  3986.  s%@KERBEROS_LIBS@%$KERBEROS_LIBS%g
  3987.  s%@KERBEROS_OBJS@%$KERBEROS_OBJS%g
  3988. +s%@HESIOD_ROOT@%$HESIOD_ROOT%g
  3989. +s%@HESIOD_INCS@%$HESIOD_INCS%g
  3990. +s%@HESIOD_LIBS@%$HESIOD_LIBS%g
  3991.  s%@WRAPLIBS@%$WRAPLIBS%g
  3992.  s%@subdirs@%$subdirs%g
  3993.  s%@ETCDIR@%$ETCDIR%g
  3994. diff -r -u -N ssh-1.2.27/configure.in ssh-1.2.27-pl1/configure.in
  3995. --- ssh-1.2.27/configure.in    Wed May 12 13:20:02 1999
  3996. +++ ssh-1.2.27-pl1/configure.in    Fri Jul 30 11:30:18 1999
  3997. @@ -14,6 +14,11 @@
  3998.  AC_CONFIG_HEADER(config.h)
  3999.  AC_PREREQ(2.10)
  4000.  
  4001. +# SSH DES and AFS/Kerberos DES conflict. Yes, this is bogus.
  4002. +if test -f $srcdir/des.h; then
  4003. +   mv -f $srcdir/des.h $srcdir/ssh-des.h
  4004. +fi
  4005. +
  4006.  # So many systems seem to need this that it is better do it here automatically.
  4007.  LIBS="-L/usr/local/lib $LIBS"
  4008.  
  4009. @@ -42,11 +47,12 @@
  4010.      ;;
  4011.    *-*-solaris*)
  4012.      # solaris stuff. appro@fy.chalmers.se
  4013. -    AC_DEFINE(SECURE_RPC)
  4014. -    AC_DEFINE(SECURE_NFS)
  4015. +# this stuff breaks AFS/Kerberos. YUCK.
  4016. +#    AC_DEFINE(SECURE_RPC)
  4017. +#    AC_DEFINE(SECURE_NFS)
  4018.      # NIS+ is forced so that we don't have to recompile
  4019.      # if we move to NIS+. appro@fy.chalmers.se
  4020. -    AC_DEFINE(NIS_PLUS)
  4021. +#    AC_DEFINE(NIS_PLUS)
  4022.      ;;
  4023.    *-*-sunos*)
  4024.      os_sunos=yes
  4025. @@ -370,7 +376,7 @@
  4026.  AC_HEADER_STDC
  4027.  AC_HEADER_SYS_WAIT
  4028.  AC_CHECK_HEADERS(unistd.h rusage.h sys/time.h lastlog.h utmp.h shadow.h)
  4029. -AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h machine/endian.h)
  4030. +AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h sys/filio.h machine/endian.h)
  4031.  AC_CHECK_HEADERS(paths.h usersec.h utime.h netinet/in_systm.h)
  4032.  AC_CHECK_HEADERS(netinet/in_system.h netinet/ip.h netinet/tcp.h ulimit.h)
  4033.  AC_CHECK_HEADERS(sys/resource.h login_cap.h sys/stream.h sys/conf.h)
  4034. @@ -912,55 +918,117 @@
  4035.    AC_MSG_RESULT(no)
  4036.  )
  4037.  
  4038. -AC_MSG_CHECKING(whether to use Kerberos)
  4039. -AC_ARG_WITH(kerberos5,
  4040. -[  --with-kerberos5=[KRB_PREFIX] Compile in Kerberos5 support.],
  4041. +AC_MSG_CHECKING(whether to use Kerberos v4)
  4042. +AC_ARG_WITH(krb4,
  4043. +[  --with-krb4[=PATH]      Compile in Kerberos v4 support.],
  4044.  [ case "$withval" in
  4045.    yes)
  4046. -    with_kerberos5=/usr/local
  4047. +    with_krb4=/usr/kerberos
  4048.      ;;
  4049.    esac ],
  4050. -[ with_kerberos5=no ]
  4051. +[ with_krb4=no ]
  4052.  )
  4053. -case "$with_kerberos5" in
  4054. +case "$with_krb4" in
  4055.  no)
  4056.    AC_MSG_RESULT(no)
  4057.    ;;
  4058.  *)
  4059.    AC_MSG_RESULT(yes)
  4060. -  AC_DEFINE(KERBEROS)
  4061. -  AC_DEFINE(KRB5)
  4062. -  KERBEROS_ROOT="$with_kerberos5"
  4063. +  AC_DEFINE(KRB4)
  4064. +  KERBEROS_ROOT="$with_krb4"
  4065.    KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
  4066. -  KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
  4067. -  AC_CHECK_LIB(ndbm, dbm_open, KERBEROS_LIBS="$KERBEROS_LIBS -lndbm")
  4068. +  KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes"
  4069.    KERBEROS_OBJS="auth-kerberos.o"
  4070. +  AC_CHECK_LIB(resolv, dn_expand, KERBEROS_LIBS="$KERBEROS_LIBS -lresolv")
  4071. +  dnl Check whether or not the AFS lifetime conversion routines exist.
  4072. +  AC_MSG_CHECKING(whether AFS lifetime conversion routines are present)
  4073. +  keeplibs="$LIBS"
  4074. +  keepcflags="$CFLAGS"
  4075. +  LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS"
  4076. +  CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS"
  4077. +  AC_TRY_LINK([#include <krb.h>], [ krb_life_to_time(10, 10);],
  4078. +              [AC_MSG_RESULT(yes)
  4079. +               AC_DEFINE(HAVE_KRB_LIFE_TO_TIME)],
  4080. +              [AC_MSG_RESULT(no)])
  4081. +  LIBS="$keeplibs"
  4082. +  CFLAGS="$keepcflags"
  4083.    ;;
  4084.  esac
  4085. -AC_SUBST(KERBEROS_ROOT)
  4086. -AC_SUBST(KERBEROS_INCS)
  4087. -AC_SUBST(KERBEROS_LIBS)
  4088. -AC_SUBST(KERBEROS_OBJS)
  4089. -
  4090. -AC_MSG_CHECKING(whether to enable passing the Kerberos TGT)
  4091. -AC_ARG_ENABLE(kerberos-tgt-passing,
  4092. -[  --enable-kerberos-tgt-passing  Pass Kerberos ticket-granting-ticket.],
  4093. -[ case "$enableval" in
  4094. +
  4095. +AC_MSG_CHECKING(whether to use Kerberos v5)
  4096. +AC_ARG_WITH(krb5,
  4097. +[  --with-krb5[=PATH]      Compile in Kerberos v5 support.],
  4098. +[ case "$withval" in
  4099. +  yes)
  4100. +    with_krb5=/usr/local
  4101. +    ;;
  4102. +  esac ],
  4103. +[ with_krb5=no ]
  4104. +)
  4105. +case "$with_krb5" in
  4106.    no)
  4107.      AC_MSG_RESULT(no)
  4108.      ;;
  4109.    *)
  4110. -    if test "$with_kerberos5" = no ; then
  4111. +  AC_MSG_RESULT(yes)
  4112. +  AC_DEFINE(KRB5)
  4113. +  KERBEROS_ROOT="$with_krb5"
  4114. +  KERBEROS_INCS="-I${KERBEROS_ROOT}/include"
  4115. +  KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
  4116. +  AC_CHECK_LIB(ndbm, dbm_open, KERBEROS_LIBS="$KERBEROS_LIBS -lndbm")
  4117. +  KERBEROS_OBJS="auth-kerberos.o"
  4118. +  ;;
  4119. +esac
  4120. +
  4121. +AC_MSG_CHECKING(whether to use AFS)
  4122. +AC_ARG_WITH(afs,
  4123. +[  --with-afs              Compile in AFS support (requires KTH krb4).],
  4124. +if test "$with_afs" = no; then
  4125.        AC_MSG_RESULT(no)
  4126. -      AC_MSG_WARN("Passing Kerberos TGT requires Kerberos5 support.")
  4127.      else
  4128.        AC_MSG_RESULT(yes)
  4129. -      AC_DEFINE(KERBEROS_TGT_PASSING)
  4130. +  AC_DEFINE(AFS)
  4131. +  if test "$with_krb4" = no; then
  4132. +    AC_MSG_RESULT(no)
  4133. +    AC_MSG_WARN("AFS requires Kerberos v4 support.")
  4134. +  else
  4135. +    KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs"
  4136. +    if test -n "$os_aix"; then
  4137. +      KERBEROS_LIBS="${KERBEROS_LIBS} -lld"
  4138.      fi
  4139. +  fi
  4140. +fi
  4141. +)
  4142. +AC_SUBST(KERBEROS_ROOT)dnl
  4143. +AC_SUBST(KERBEROS_INCS)dnl
  4144. +AC_SUBST(KERBEROS_LIBS)dnl
  4145. +AC_SUBST(KERBEROS_OBJS)dnl
  4146. +
  4147. +AC_MSG_CHECKING(whether to use Hesiod)
  4148. +AC_ARG_WITH(hesiod,
  4149. +[  --with-hesiod[=PATH]    Compile in Hesiod support.],
  4150. +[ case "$withval" in
  4151. +  yes)
  4152. +    with_hesiod=/usr/local/athena
  4153.      ;;
  4154.    esac ],
  4155. -  AC_MSG_RESULT(no)
  4156. +[ with_hesiod=no ]
  4157.  )
  4158. +case "$with_hesiod" in
  4159. +no)
  4160. +  AC_MSG_RESULT(no)
  4161. +  ;;
  4162. +*)
  4163. +  AC_MSG_RESULT(yes)
  4164. +  AC_DEFINE(HESIOD)
  4165. +  HESIOD_ROOT="$with_hesiod"
  4166. +  HESIOD_INCS="-I${HESIOD_ROOT}/include"
  4167. +  HESIOD_LIBS="-L${HESIOD_ROOT}/lib -lhesiod"
  4168. +  ;;
  4169. +esac
  4170. +AC_SUBST(HESIOD_ROOT)dnl
  4171. +AC_SUBST(HESIOD_INCS)dnl
  4172. +AC_SUBST(HESIOD_LIBS)dnl
  4173.  
  4174.  AC_MSG_CHECKING(whether to use libwrap)
  4175.  AC_ARG_WITH(libwrap,
  4176. diff -r -u -N ssh-1.2.27/des.c ssh-1.2.27-pl1/des.c
  4177. --- ssh-1.2.27/des.c    Wed May 12 13:19:25 1999
  4178. +++ ssh-1.2.27-pl1/des.c    Fri Jul 30 11:18:27 1999
  4179. @@ -38,7 +38,7 @@
  4180.  
  4181.  #include "includes.h"
  4182.  #include "getput.h"
  4183. -#include "des.h"
  4184. +#include "ssh-des.h"
  4185.  
  4186.  /* Table for key generation.  This used to be in sk.h. */
  4187.  /* Copyright (C) 1993 Eric Young - see README for more details */
  4188. @@ -400,7 +400,7 @@
  4189.  /* This part is based on code that used to be in ecb_enc.c. */
  4190.  /* Copyright (C) 1993 Eric Young - see README for more details */
  4191.  
  4192. -void des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, 
  4193. +void ssh_des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, 
  4194.           int encrypt)
  4195.  {
  4196.    register word32 t,u;
  4197. @@ -452,7 +452,7 @@
  4198.  #define HPERM_OP(a,t,n,m) ((t)=((((a)<<(16-(n)))^(a))&(m)),\
  4199.      (a)=(a)^(t)^(t>>(16-(n))))
  4200.  
  4201. -void des_set_key(unsigned char *key, DESContext *ks)
  4202. +void ssh_des_set_key(unsigned char *key, DESContext *ks)
  4203.  {
  4204.    register word32 c, d, t, s, shifts;
  4205.    register int i;
  4206. @@ -507,7 +507,7 @@
  4207.      }
  4208.  }
  4209.  
  4210. -void des_cbc_encrypt(DESContext *ks, unsigned char *iv,
  4211. +void ssh_des_cbc_encrypt(DESContext *ks, unsigned char *iv,
  4212.               unsigned char *dest, const unsigned char *src,
  4213.               unsigned int len)
  4214.  {
  4215. @@ -523,7 +523,7 @@
  4216.      {
  4217.        iv0 ^= GET_32BIT_LSB_FIRST(src + i);
  4218.        iv1 ^= GET_32BIT_LSB_FIRST(src + i + 4);
  4219. -      des_encrypt(iv0, iv1, out, ks, 1);
  4220. +      ssh_des_encrypt(iv0, iv1, out, ks, 1);
  4221.        iv0 = out[0];
  4222.        iv1 = out[1];
  4223.        PUT_32BIT_LSB_FIRST(dest + i, iv0);
  4224. @@ -533,7 +533,7 @@
  4225.    PUT_32BIT_LSB_FIRST(iv + 4, iv1);
  4226.  }
  4227.  
  4228. -void des_cbc_decrypt(DESContext *ks, unsigned char *iv,
  4229. +void ssh_des_cbc_decrypt(DESContext *ks, unsigned char *iv,
  4230.               unsigned char *dest, const unsigned char *src,
  4231.               unsigned int len)
  4232.  {
  4233. @@ -549,7 +549,7 @@
  4234.      {
  4235.        d0 = GET_32BIT_LSB_FIRST(src + i);
  4236.        d1 = GET_32BIT_LSB_FIRST(src + i + 4);
  4237. -      des_encrypt(d0, d1, out, ks, 0);
  4238. +      ssh_des_encrypt(d0, d1, out, ks, 0);
  4239.        iv0 ^= out[0];
  4240.        iv1 ^= out[1];
  4241.        PUT_32BIT_LSB_FIRST(dest + i, iv0);
  4242. @@ -561,38 +561,38 @@
  4243.    PUT_32BIT_LSB_FIRST(iv + 4, iv1);
  4244.  }
  4245.  
  4246. -void des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, 
  4247. +void ssh_des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, 
  4248.                DESContext *ks2, unsigned char *iv2,
  4249.                DESContext *ks3, unsigned char *iv3,
  4250.                unsigned char *dest, const unsigned char *src,
  4251.                unsigned int len)
  4252.  {
  4253. -  des_cbc_encrypt(ks1, iv1, dest, src, len);
  4254. -  des_cbc_decrypt(ks2, iv2, dest, dest, len);
  4255. -  des_cbc_encrypt(ks3, iv3, dest, dest, len);
  4256. +  ssh_des_cbc_encrypt(ks1, iv1, dest, src, len);
  4257. +  ssh_des_cbc_decrypt(ks2, iv2, dest, dest, len);
  4258. +  ssh_des_cbc_encrypt(ks3, iv3, dest, dest, len);
  4259.  }
  4260.  
  4261. -void des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, 
  4262. +void ssh_des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, 
  4263.                DESContext *ks2, unsigned char *iv2,
  4264.                DESContext *ks3, unsigned char *iv3,
  4265.                unsigned char *dest, const unsigned char *src,
  4266.                unsigned int len)
  4267.  {
  4268. -  des_cbc_decrypt(ks3, iv3, dest, src, len);
  4269. -  des_cbc_encrypt(ks2, iv2, dest, dest, len);
  4270. -  des_cbc_decrypt(ks1, iv1, dest, dest, len);
  4271. +  ssh_des_cbc_decrypt(ks3, iv3, dest, src, len);
  4272. +  ssh_des_cbc_encrypt(ks2, iv2, dest, dest, len);
  4273. +  ssh_des_cbc_decrypt(ks1, iv1, dest, dest, len);
  4274.  }
  4275.  
  4276. -#ifdef DES_TEST
  4277. +#ifdef SSH_DES_TEST
  4278.  
  4279. -void des_encrypt_buf(DESContext *ks, unsigned char *out, 
  4280. +void ssh_des_encrypt_buf(DESContext *ks, unsigned char *out, 
  4281.               const unsigned char *in, int encrypt)
  4282.  {
  4283.    word32 in0, in1, output[0];
  4284.  
  4285.    in0 = GET_32BIT_LSB_FIRST(in);
  4286.    in1 = GET_32BIT_LSB_FIRST(in + 4);
  4287. -  des_encrypt(in0, in1, output, ks, encrypt);
  4288. +  ssh_des_encrypt(in0, in1, output, ks, encrypt);
  4289.    PUT_32BIT_LSB_FIRST(out, output[0]);
  4290.    PUT_32BIT_LSB_FIRST(out + 4, output[1]);
  4291.  }
  4292. @@ -634,15 +634,15 @@
  4293.          }
  4294.        result[i] = value;
  4295.      }
  4296. -      des_set_key(key, &ks);
  4297. -      des_encrypt_buf(&ks, output, data, 1);
  4298. +      ssh_des_set_key(key, &ks);
  4299. +      ssh_des_encrypt_buf(&ks, output, data, 1);
  4300.        if (memcmp(output, result, 8) != 0)
  4301.      fprintf(stderr, "Encrypt failed: %s", line);
  4302. -      des_encrypt_buf(&ks, output, result, 0);
  4303. +      ssh_des_encrypt_buf(&ks, output, result, 0);
  4304.        if (memcmp(output, data, 8) != 0)
  4305.      fprintf(stderr, "Decrypt failed: %s", line);
  4306.      }
  4307.    exit(0);
  4308.  }
  4309. -#endif /* DES_TEST */
  4310. +#endif /* SSH_DES_TEST */
  4311.  
  4312. diff -r -u -N ssh-1.2.27/des.h ssh-1.2.27-pl1/des.h
  4313. --- ssh-1.2.27/des.h    Wed May 12 13:19:25 1999
  4314. +++ ssh-1.2.27-pl1/des.h    Fri Jul 30 11:18:27 1999
  4315. @@ -25,8 +25,8 @@
  4316.   * $Endlog$
  4317.   */
  4318.  
  4319. -#ifndef DES_H
  4320. -#define DES_H
  4321. +#ifndef SSH_DES_H
  4322. +#define SSH_DES_H
  4323.  
  4324.  typedef struct
  4325.  {
  4326. @@ -35,40 +35,40 @@
  4327.  
  4328.  /* Sets the des key for the context.  Initializes the context.  The least
  4329.     significant bit of each byte of the key is ignored as parity. */
  4330. -void des_set_key(unsigned char *key, DESContext *ks);
  4331. +void ssh_des_set_key(unsigned char *key, DESContext *ks);
  4332.  
  4333.  /* Encrypts 32 bits in l,r, and stores the result in output[0] and output[1].
  4334.     Performs encryption if encrypt is non-zero, and decryption if it is zero.
  4335. -   The key context must have been initialized previously with des_set_key. */
  4336. -void des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks,
  4337. +   The key context must have been initialized previously with ssh_des_set_key. */
  4338. +void ssh_des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks,
  4339.           int encrypt);
  4340.  
  4341.  /* Encrypts len bytes from src to dest in CBC modes.  Len must be a multiple
  4342.     of 8.  iv will be modified at end to a value suitable for continuing
  4343.     encryption. */
  4344. -void des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
  4345. +void ssh_des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
  4346.               const unsigned char *src, unsigned int len);
  4347.  
  4348.  /* Decrypts len bytes from src to dest in CBC modes.  Len must be a multiple
  4349.     of 8.  iv will be modified at end to a value suitable for continuing
  4350.     decryption. */
  4351. -void des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
  4352. +void ssh_des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest,
  4353.               const unsigned char *src, unsigned int len);
  4354.  
  4355.  /* Encrypts in CBC mode using triple-DES. */
  4356. -void des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, 
  4357. +void ssh_des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, 
  4358.                DESContext *ks2, unsigned char *iv2,
  4359.                DESContext *ks3, unsigned char *iv3,
  4360.                unsigned char *dest, const unsigned char *src,
  4361.                unsigned int len);
  4362.  
  4363.  /* Decrypts in CBC mode using triple-DES. */
  4364. -void des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1,
  4365. +void ssh_des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1,
  4366.                DESContext *ks2, unsigned char *iv2,
  4367.                DESContext *ks3, unsigned char *iv3,
  4368.                unsigned char *dest, const unsigned char *src,
  4369.                unsigned int len);
  4370.  
  4371. -#endif /* DES_H */
  4372. +#endif /* SSH_DES_H */
  4373.  
  4374.  
  4375. diff -r -u -N ssh-1.2.27/log-server.c ssh-1.2.27-pl1/log-server.c
  4376. --- ssh-1.2.27/log-server.c    Wed May 12 13:19:26 1999
  4377. +++ ssh-1.2.27-pl1/log-server.c    Fri Jul 30 11:18:27 1999
  4378. @@ -265,9 +265,12 @@
  4379.  {
  4380.    struct fatal_cleanup *cu, *next_cu;
  4381.    static int fatal_called = 0;
  4382. -#ifdef KERBEROS
  4383. +#if defined(KRB4) || defined(KRB5)
  4384.    extern char *ticket;
  4385. -#endif
  4386. +#ifdef AFS
  4387. +  extern char *xauthfile;
  4388. +#endif /* AFS */
  4389. +#endif /* KRB4 || KRB5 */
  4390.  
  4391.    if (!fatal_called)
  4392.      {
  4393. @@ -281,19 +284,27 @@
  4394.                  (unsigned long)cu->proc, (unsigned long)cu->context);
  4395.            (*cu->proc)(cu->context);
  4396.          }
  4397. -#ifdef KERBEROS
  4398. +#if defined(KRB4) || defined(KRB5)
  4399.        /* If you forwarded a ticket you get one shot for proper
  4400.           authentication. */
  4401.        /* If tgt was passed unlink file */
  4402.        if (ticket)
  4403.          {
  4404.            if (strcmp(ticket,"none"))
  4405. +#ifdef KRB5
  4406.              /* ticket -> FILE:path */
  4407.              unlink(ticket + 5);
  4408. +#else /* KRB4 */
  4409. +        unlink(ticket);
  4410. +#endif
  4411.            else
  4412.              ticket = NULL;
  4413.          }
  4414. -#endif /* KERBEROS */
  4415. +#ifdef AFS
  4416. +      /* If local XAUTHORITY was created, remove it. */
  4417. +      if (xauthfile) unlink(xauthfile);
  4418. +#endif /* AFS */
  4419. +#endif /* KRB4 || KRB5 */
  4420.      }
  4421.  }
  4422.  
  4423. diff -r -u -N ssh-1.2.27/radix.c ssh-1.2.27-pl1/radix.c
  4424. --- ssh-1.2.27/radix.c    Thu Jan  1 01:00:00 1970
  4425. +++ ssh-1.2.27-pl1/radix.c    Fri Jul 30 11:18:27 1999
  4426. @@ -0,0 +1,267 @@
  4427. +/*
  4428. +  radix.c
  4429. +
  4430. +  base-64 encoding pinched from lynx2-7-2, who pinched it from rpem.
  4431. +  Originally written by Mark Riordan 12 August 1990 and 17 Feb 1991
  4432. +  and placed in the public domain.
  4433. +
  4434. +  dugsong@UMICH.EDU
  4435. +*/
  4436. +  
  4437. +#include "includes.h"
  4438. +
  4439. +#ifdef AFS
  4440. +#include <krb.h>
  4441. +#include <kafs.h>
  4442. +
  4443. +char six2pr[64] = {
  4444. +    'A','B','C','D','E','F','G','H','I','J','K','L','M',
  4445. +    'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
  4446. +    'a','b','c','d','e','f','g','h','i','j','k','l','m',
  4447. +    'n','o','p','q','r','s','t','u','v','w','x','y','z',
  4448. +    '0','1','2','3','4','5','6','7','8','9','+','/'
  4449. +};
  4450. +
  4451. +unsigned char pr2six[256];
  4452. +
  4453. +int uuencode(unsigned char *bufin, unsigned int nbytes, char *bufcoded)
  4454. +{
  4455. +  /* ENC is the basic 1 character encoding function to make a char printing */
  4456. +#define ENC(c) six2pr[c]
  4457. +  
  4458. +  register char *outptr = bufcoded;
  4459. +  unsigned int i;
  4460. +  
  4461. +  for (i=0; i<nbytes; i += 3) {
  4462. +    *(outptr++) = ENC(*bufin >> 2);            /* c1 */
  4463. +    *(outptr++) = ENC(((*bufin << 4) & 060) | ((bufin[1] >> 4) & 017)); /*c2*/
  4464. +    *(outptr++) = ENC(((bufin[1] << 2) & 074) | ((bufin[2] >> 6) & 03));/*c3*/
  4465. +    *(outptr++) = ENC(bufin[2] & 077);         /* c4 */
  4466. +    bufin += 3;
  4467. +  }
  4468. +  if (i == nbytes+1) {
  4469. +    outptr[-1] = '=';
  4470. +  } else if (i == nbytes+2) {
  4471. +    outptr[-1] = '=';
  4472. +    outptr[-2] = '=';
  4473. +  }
  4474. +  *outptr = '\0';
  4475. +  return(outptr - bufcoded);
  4476. +}
  4477. +
  4478. +int uudecode(char *bufcoded, unsigned char *bufplain, int outbufsize)
  4479. +{
  4480. +  /* single character decode */
  4481. +#define DEC(c) pr2six[c]
  4482. +#define MAXVAL 63
  4483. +  
  4484. +  static int first = 1;
  4485. +  int nbytesdecoded, j;
  4486. +  register char *bufin = bufcoded;
  4487. +  register unsigned char *bufout = bufplain;
  4488. +  register int nprbytes;
  4489. +  
  4490. +  /* If this is the first call, initialize the mapping table. */
  4491. +  if (first) {
  4492. +    first = 0;
  4493. +    for(j=0; j<256; j++) pr2six[j] = MAXVAL+1;
  4494. +    for(j=0; j<64; j++) pr2six[(unsigned char)six2pr[j]] = (unsigned char)j;
  4495. +  }
  4496. +  
  4497. +  /* Strip leading whitespace. */
  4498. +  while (*bufcoded==' ' || *bufcoded == '\t') bufcoded++;
  4499. +  
  4500. +  /* Figure out how many characters are in the input buffer.
  4501. +     If this would decode into more bytes than would fit into
  4502. +     the output buffer, adjust the number of input bytes downwards. */
  4503. +  bufin = bufcoded;
  4504. +  while (pr2six[(unsigned char)*(bufin++)] <= MAXVAL);
  4505. +  nprbytes = bufin - bufcoded - 1;
  4506. +  nbytesdecoded = ((nprbytes+3)/4) * 3;
  4507. +  if (nbytesdecoded > outbufsize)
  4508. +    nprbytes = (outbufsize*4)/3;
  4509. +  
  4510. +  bufin = bufcoded;
  4511. +  
  4512. +  while (nprbytes > 0) {
  4513. +    *(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4);
  4514. +    *(bufout++) = (unsigned char) (DEC(bufin[1]) << 4 | DEC(bufin[2]) >> 2);
  4515. +    *(bufout++) = (unsigned char) (DEC(bufin[2]) << 6 | DEC(bufin[3]));
  4516. +    bufin += 4;
  4517. +    nprbytes -= 4;
  4518. +  }
  4519. +  if (nprbytes & 03) {
  4520. +    if (pr2six[bufin[-2]] > MAXVAL)
  4521. +      nbytesdecoded -= 2;
  4522. +    else 
  4523. +      nbytesdecoded -= 1;
  4524. +  }
  4525. +  return(nbytesdecoded);
  4526. +}
  4527. +
  4528. +typedef unsigned char my_u_char;
  4529. +typedef unsigned int my_u_int32_t;
  4530. +typedef unsigned short my_u_short;
  4531. +
  4532. +/* Nasty macros from BIND-4.9.2 */
  4533. +
  4534. +#define GETSHORT(s, cp) { \
  4535. +    register my_u_char *t_cp = (my_u_char*)(cp); \
  4536. +    (s) = (((my_u_short)t_cp[0]) << 8) \
  4537. +        | (((my_u_short)t_cp[1])) \
  4538. +        ; \
  4539. +    (cp) += 2; \
  4540. +}
  4541. +
  4542. +#define GETLONG(l, cp) { \
  4543. +    register my_u_char *t_cp = (my_u_char*)(cp); \
  4544. +    (l) = (((my_u_int32_t)t_cp[0]) << 24) \
  4545. +        | (((my_u_int32_t)t_cp[1]) << 16) \
  4546. +        | (((my_u_int32_t)t_cp[2]) << 8) \
  4547. +        | (((my_u_int32_t)t_cp[3])) \
  4548. +        ; \
  4549. +    (cp) += 4; \
  4550. +}
  4551. +
  4552. +#define PUTSHORT(s, cp) { \
  4553. +    register my_u_short t_s = (my_u_short)(s); \
  4554. +    register my_u_char *t_cp = (my_u_char*)(cp); \
  4555. +    *t_cp++ = t_s >> 8; \
  4556. +    *t_cp   = t_s; \
  4557. +    (cp) += 2; \
  4558. +}
  4559. +
  4560. +#define PUTLONG(l, cp) { \
  4561. +    register my_u_int32_t t_l = (my_u_int32_t)(l); \
  4562. +    register my_u_char *t_cp = (my_u_char*)(cp); \
  4563. +    *t_cp++ = t_l >> 24; \
  4564. +    *t_cp++ = t_l >> 16; \
  4565. +    *t_cp++ = t_l >> 8; \
  4566. +    *t_cp   = t_l; \
  4567. +    (cp) += 4; \
  4568. +}
  4569. +
  4570. +#define GETSTRING(s, p, p_l) {            \
  4571. +    register char* p_targ = (p) + p_l;        \
  4572. +    register char* s_c = (s);            \
  4573. +    register char* p_c = (p);            \
  4574. +    while (*p_c && (p_c < p_targ)) {        \
  4575. +    *s_c++ = *p_c++;            \
  4576. +    }                        \
  4577. +    if (p_c == p_targ) {            \
  4578. +    return 1;                \
  4579. +    }                        \
  4580. +    *s_c = *p_c++;                \
  4581. +    (p_l) = (p_l) - (p_c - (p));        \
  4582. +    (p) = p_c;                    \
  4583. +}
  4584. +
  4585. +
  4586. +int creds_to_radix(CREDENTIALS *creds, unsigned char *buf)
  4587. +{
  4588. +  char *p, *s;
  4589. +  int len;
  4590. +  char temp[2048];
  4591. +  
  4592. +  p = temp;
  4593. +  *p++ = 1; /* version */
  4594. +  s = creds->service;    while (*s) *p++ = *s++; *p++ = *s;
  4595. +  s = creds->instance;    while (*s) *p++ = *s++; *p++ = *s;
  4596. +  s = creds->realm;    while (*s) *p++ = *s++; *p++ = *s;
  4597. +
  4598. +  s = creds->pname;    while (*s) *p++ = *s++;   *p++ = *s;
  4599. +  s = creds->pinst;    while (*s) *p++ = *s++;   *p++ = *s;
  4600. +  /* Null string to repeat the realm. */
  4601. +  *p++ = '\0';
  4602. +
  4603. +  PUTLONG(creds->issue_date,p);
  4604. +  {
  4605. +    unsigned long    endTime ;
  4606. +#ifdef HAVE_KRB_LIFE_TO_TIME
  4607. +    endTime = (unsigned long)krb_life_to_time(creds->issue_date,
  4608. +                          creds->lifetime);
  4609. +#else /* !HAVE_KRB_LIFE_TO_TIME */
  4610. +    endTime = creds->issue_date + ((unsigned char)(creds->lifetime))*5*60;
  4611. +#endif /* !HAVE_KRB_LIFE_TO_TIME */
  4612. +    PUTLONG(endTime,p);
  4613. +  }
  4614. +
  4615. +  memcpy(p,&creds->session, sizeof(creds->session));
  4616. +  p += sizeof(creds->session);
  4617. +  
  4618. +  PUTSHORT(creds->kvno,p);
  4619. +  PUTLONG(creds->ticket_st.length,p);
  4620. +  
  4621. +  memcpy(p,creds->ticket_st.dat, creds->ticket_st.length);
  4622. +  p += creds->ticket_st.length;
  4623. +  len = p - temp;
  4624. +
  4625. +  return(uuencode(temp, len, buf));
  4626. +}
  4627. +
  4628. +int radix_to_creds(char *buf, CREDENTIALS *creds)
  4629. +{
  4630. +
  4631. +  char *p, *s;
  4632. +  int len, tl, status;
  4633. +  char version;
  4634. +  char temp[2048];
  4635. +  
  4636. +  if (!(len = uudecode(buf, temp, sizeof(temp))))
  4637. +    return 0;
  4638. +  
  4639. +  p = temp;
  4640. +
  4641. +  /* check version and length! */
  4642. +  if (len < 1) return 0;
  4643. +  version = *p; p++; len--;
  4644. +
  4645. +  GETSTRING(creds->service, p, len);
  4646. +  GETSTRING(creds->instance, p, len);
  4647. +  GETSTRING(creds->realm, p, len);
  4648. +  
  4649. +  GETSTRING(creds->pname, p, len);
  4650. +  GETSTRING(creds->pinst, p, len);
  4651. +  /* Ignore possibly different realm. */
  4652. +  while (*p && len) p++, len--;
  4653. +  if (len == 0) return 0;
  4654. +  p++, len--;
  4655. +  
  4656. +  /* Enough space for remaining fixed-length parts? */
  4657. +  if (len < (4 + 4 + sizeof(creds->session) + 2 + 4))
  4658. +    return 0;
  4659. +  
  4660. +  GETLONG(creds->issue_date,p);
  4661. +  len -= 4;
  4662. +  {
  4663. +    unsigned long    endTime;
  4664. +    GETLONG(endTime,p);
  4665. +    len -= 4;
  4666. +#ifdef HAVE_KRB_LIFE_TO_TIME
  4667. +    creds->lifetime = krb_time_to_life(creds->issue_date, endTime);
  4668. +#else
  4669. +    creds->lifetime = ((endTime - creds->issue_date) + 5*60 - 1) / (5*60);
  4670. +#endif
  4671. +  }
  4672. +
  4673. +  memcpy(&creds->session, p, sizeof(creds->session));
  4674. +  p += sizeof(creds->session);
  4675. +  len -= sizeof(creds->session);
  4676. +  
  4677. +  GETSHORT(creds->kvno,p);
  4678. +  len -= 2;
  4679. +  GETLONG(creds->ticket_st.length,p);
  4680. +  len -= 4;
  4681. +
  4682. +  tl = creds->ticket_st.length;
  4683. +  if (tl < 0 || tl > len || tl > sizeof(creds->ticket_st.dat))
  4684. +    return 0;
  4685. +  
  4686. +  memcpy(creds->ticket_st.dat, p, tl);
  4687. +  p += tl;
  4688. +  len -= tl;
  4689. +  
  4690. +  return 1;
  4691. +}
  4692. +
  4693. +#endif /* AFS */
  4694. diff -r -u -N ssh-1.2.27/readconf.c ssh-1.2.27-pl1/readconf.c
  4695. --- ssh-1.2.27/readconf.c    Wed May 12 13:19:27 1999
  4696. +++ ssh-1.2.27-pl1/readconf.c    Fri Jul 30 11:18:27 1999
  4697. @@ -170,6 +170,9 @@
  4698.    oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
  4699.    oBatchMode, oStrictHostKeyChecking, oCompression, oCompressionLevel,
  4700.    oKeepAlives, oUsePrivilegedPort, oKerberosAuthentication,
  4701. +#ifdef AFS
  4702. +  oAFSTokenPassing,
  4703. +#endif /* AFS */
  4704.    oKerberosTgtPassing, oClearAllForwardings, oNumberOfPasswordPrompts,
  4705.    oXauthPath, oGatewayPorts, oPasswordPromptLogin, oPasswordPromptHost
  4706.  } OpCodes;
  4707. @@ -213,6 +216,9 @@
  4708.    { "useprivilegedport", oUsePrivilegedPort },
  4709.    { "kerberosauthentication", oKerberosAuthentication },
  4710.    { "kerberostgtpassing", oKerberosTgtPassing },
  4711. +#ifdef AFS
  4712. +  { "afstokenpassing", oAFSTokenPassing },
  4713. +#endif /* AFS */
  4714.    { "clearallforwardings", oClearAllForwardings },
  4715.    { "numberofpasswordprompts", oNumberOfPasswordPrompts },
  4716.    { "xauthlocation", oXauthPath },
  4717. @@ -354,6 +360,12 @@
  4718.        intptr = &options->kerberos_tgt_passing;
  4719.        goto parse_flag;
  4720.        
  4721. +#ifdef AFS
  4722. +    case oAFSTokenPassing:
  4723. +      intptr = &options->afs_token_passing;
  4724. +      goto parse_flag;
  4725. +#endif /* AFS */
  4726. +      
  4727.      case oFallBackToRsh:
  4728.        intptr = &options->fallback_to_rsh;
  4729.        goto parse_flag;
  4730. @@ -678,6 +690,9 @@
  4731.    options->rsa_authentication = -1;
  4732.    options->kerberos_authentication = -1;
  4733.    options->kerberos_tgt_passing = -1;
  4734. +#ifdef AFS
  4735. +  options->afs_token_passing = -1;
  4736. +#endif /* AFS */
  4737.    options->tis_authentication = -1;
  4738.    options->password_authentication = -1;
  4739.    options->rhosts_rsa_authentication = -1;
  4740. @@ -724,17 +739,19 @@
  4741.    if (options->rsa_authentication == -1)
  4742.      options->rsa_authentication = 1;
  4743.    if (options->kerberos_authentication == -1)
  4744. -#if defined(KERBEROS) && defined(KRB5)
  4745. +#if defined(KRB4) || defined(KRB5)
  4746.      options->kerberos_authentication = 1;
  4747. -#else  /* defined(KERBEROS) && defined(KRB5) */
  4748. +#else
  4749.      options->kerberos_authentication = 0;
  4750. -#endif /* defined(KERBEROS) && defined(KRB5) */
  4751. +#endif /* defined(KRB4) ||  defined(KRB5) */
  4752.    if (options->kerberos_tgt_passing == -1)
  4753. -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5)
  4754. +#if defined(AFS)
  4755.      options->kerberos_tgt_passing = 1;
  4756. -#else  /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */
  4757. +  if (options->afs_token_passing == -1)
  4758. +    options->afs_token_passing = 1;
  4759. +#else
  4760.      options->kerberos_tgt_passing = 0;
  4761. -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */
  4762. +#endif /* AFS */
  4763.    if (options->tis_authentication == -1)
  4764.      options->tis_authentication = 0;
  4765.    if (options->password_authentication == -1)
  4766. diff -r -u -N ssh-1.2.27/readconf.h ssh-1.2.27-pl1/readconf.h
  4767. --- ssh-1.2.27/readconf.h    Wed May 12 13:19:27 1999
  4768. +++ ssh-1.2.27-pl1/readconf.h    Fri Jul 30 11:18:27 1999
  4769. @@ -85,6 +85,9 @@
  4770.    int rsa_authentication;    /* Try RSA authentication. */
  4771.    int kerberos_authentication;    /* Try Kerberos authentication. */
  4772.    int kerberos_tgt_passing;    /* Try Kerberos tgt passing. */
  4773. +#ifdef AFS
  4774. +  int afs_token_passing;    /* Try AFS token passing. */
  4775. +#endif /* AFS */
  4776.    int tis_authentication;    /* Try TIS authsrv authentication. */
  4777.    int password_authentication;    /* Try password authentication. */
  4778.    int fallback_to_rsh;        /* Use rsh if cannot connect with ssh. */
  4779. diff -r -u -N ssh-1.2.27/scp.c ssh-1.2.27-pl1/scp.c
  4780. --- ssh-1.2.27/scp.c    Wed May 12 13:19:28 1999
  4781. +++ ssh-1.2.27-pl1/scp.c    Fri Jul 30 11:18:27 1999
  4782. @@ -180,6 +180,11 @@
  4783.  #define STDERR_FILENO 2
  4784.  #endif
  4785.  
  4786. +#ifdef AFS
  4787. +/* This is set to non-zero to disable authentication forwarding. */
  4788. +int nofwd = 0;
  4789. +#endif /* AFS */
  4790. +
  4791.  /* This is set to non-zero to enable verbose mode. */
  4792.  int verbose = 0;
  4793.  
  4794. @@ -305,6 +310,10 @@
  4795.          args[i++] = "-P";
  4796.        if (batchmode)
  4797.          args[i++] = "-oBatchMode yes";
  4798. +#ifdef AFS
  4799. +      if (nofwd)
  4800. +    args[i++] = "-k";
  4801. +#endif /* AFS */
  4802.        if (cipher != NULL)
  4803.          {
  4804.            args[i++] = "-c";
  4805. @@ -441,7 +450,11 @@
  4806.              statistics = 0;
  4807.  
  4808.          fflag = tflag = 0;
  4809. +#ifdef AFS
  4810. +        while ((ch = getopt(argc, argv, "kaAqQdfprtvBCL1c:i:P:o:S:")) != EOF)
  4811. +#else
  4812.          while ((ch = getopt(argc, argv, "aAqQdfprtvBCL1c:i:P:o:S:")) != EOF)
  4813. +#endif /* AFS */
  4814.                  switch(ch) {                    /* User-visible flags. */
  4815.                  case 'S':
  4816.                          ssh_program = optarg;
  4817. @@ -490,6 +503,11 @@
  4818.                  case 'r':
  4819.                          iamrecursive = 1;
  4820.                          break;
  4821. +#ifdef AFS
  4822. +             case 'k':
  4823. +            nofwd = 1;
  4824. +            break;
  4825. +#endif /* AFS */
  4826.                                                  /* Server options. */
  4827.                  case 'd':
  4828.                          targetshouldbedirectory = 1;
  4829. diff -r -u -N ssh-1.2.27/servconf.c ssh-1.2.27-pl1/servconf.c
  4830. --- ssh-1.2.27/servconf.c    Wed May 12 13:19:28 1999
  4831. +++ ssh-1.2.27-pl1/servconf.c    Fri Jul 30 11:18:27 1999
  4832. @@ -106,6 +106,12 @@
  4833.    options->kerberos_authentication = -1;
  4834.    options->kerberos_or_local_passwd = -1;
  4835.    options->kerberos_tgt_passing = -1;
  4836. +#if defined(KRB4)
  4837. +  options->kerberos_ticket_cleanup = -1;
  4838. +#endif /* KRB4 */
  4839. +#ifdef AFS
  4840. +  options->afs_token_passing = -1;
  4841. +#endif
  4842.    options->tis_authentication = -1;
  4843.    options->allow_tcp_forwarding = -1;
  4844.    options->password_authentication = -1;
  4845. @@ -190,19 +196,27 @@
  4846.    if (options->rsa_authentication == -1)
  4847.      options->rsa_authentication = 1;
  4848.    if (options->kerberos_authentication == -1)
  4849. -#if defined(KERBEROS) && defined(KRB5)
  4850. +#if defined(KRB4) || defined(KRB5)
  4851.      options->kerberos_authentication = 1;
  4852. -#else  /* defined(KERBEROS) && defined(KRB5) */
  4853. +#else
  4854.      options->kerberos_authentication = 0;
  4855. -#endif /* defined(KERBEROS) && defined(KRB5) */
  4856. +#endif /* defined(KRB4 || KRB5 */
  4857.    if (options->kerberos_or_local_passwd == -1)
  4858.      options->kerberos_or_local_passwd = 0;
  4859.    if (options->kerberos_tgt_passing == -1)
  4860. -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5)
  4861. +#if defined(AFS) || defined(KRB5)
  4862.      options->kerberos_tgt_passing = 1;
  4863. -#else  /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */
  4864. +#else
  4865.      options->kerberos_tgt_passing = 0;
  4866. -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */
  4867. +#endif /* AFS || KRB5 */
  4868. +#if defined(KRB4)
  4869. +  if (options->kerberos_ticket_cleanup == -1)
  4870. +    options->kerberos_ticket_cleanup = 1;
  4871. +#endif /* KRB4 */
  4872. +#ifdef AFS
  4873. +  if (options->afs_token_passing == -1)
  4874. +    options->afs_token_passing = 1;
  4875. +#endif /* AFS */
  4876.    if (options->allow_tcp_forwarding == -1)
  4877.      options->allow_tcp_forwarding = 1;
  4878.    if (options->tis_authentication == -1)
  4879. @@ -249,7 +263,14 @@
  4880.    sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sPidFile,
  4881.    sForcedPasswd, sForcedEmptyPasswd, sUmask, sSilentDeny, sIdleTimeout,
  4882.    sUseLogin, sKerberosAuthentication, sKerberosOrLocalPasswd,
  4883. -  sKerberosTgtPassing, sAllowTcpForwarding, sAllowUsers, sDenyUsers,
  4884. +  sKerberosTgtPassing,
  4885. +#ifdef KRB4
  4886. +  sKerberosTicketCleanup,
  4887. +#ifdef AFS
  4888. +  sAFSTokenPassing,
  4889. +#endif /* AFS */
  4890. +#endif /* KRB4 */
  4891. +  sAllowTcpForwarding, sAllowUsers, sDenyUsers,
  4892.    sXauthPath, sCheckMail, sDenyGroups, sAllowGroups, sIgnoreRootRhosts,
  4893.    sAllowSHosts, sDenySHosts, sPasswordExpireWarningDays,
  4894.    sAccountExpireWarningDays
  4895. @@ -313,6 +334,12 @@
  4896.    { "kerberosauthentication", sKerberosAuthentication },
  4897.    { "kerberosorlocalpasswd", sKerberosOrLocalPasswd },
  4898.    { "kerberostgtpassing", sKerberosTgtPassing },
  4899. +#ifdef KRB4
  4900. +  { "kerberosticketcleanup", sKerberosTicketCleanup },
  4901. +#endif
  4902. +#ifdef AFS
  4903. +  { "afstokenpassing", sAFSTokenPassing },
  4904. +#endif
  4905.    { "allowtcpforwarding", sAllowTcpForwarding },
  4906.    { "xauthlocation", sXauthPath },
  4907.    { "checkmail", sCheckMail },
  4908. @@ -571,6 +598,18 @@
  4909.       case sKerberosTgtPassing:
  4910.         intptr = &options->kerberos_tgt_passing;
  4911.         goto parse_flag;
  4912. +
  4913. +#ifdef KRB4
  4914. +    case sKerberosTicketCleanup:
  4915. +      intptr = &options->kerberos_ticket_cleanup;
  4916. +      goto parse_flag;
  4917. +#endif /* KRB4 */
  4918. +
  4919. +#ifdef AFS
  4920. +    case sAFSTokenPassing:
  4921. +      intptr = &options->afs_token_passing;
  4922. +      goto parse_flag;
  4923. +#endif /* AFS */
  4924.        
  4925.       case sAllowTcpForwarding:
  4926.         intptr = &options->allow_tcp_forwarding;
  4927. diff -r -u -N ssh-1.2.27/servconf.h ssh-1.2.27-pl1/servconf.h
  4928. --- ssh-1.2.27/servconf.h    Wed May 12 13:19:28 1999
  4929. +++ ssh-1.2.27-pl1/servconf.h    Fri Jul 30 11:18:27 1999
  4930. @@ -111,6 +111,12 @@
  4931.                     password authentication mechanism, such
  4932.                     as SecurID or /etc/passwd */
  4933.    int kerberos_tgt_passing;    /* If true, permit Kerberos tgt passing. */
  4934. +#ifdef KRB4
  4935. +  int kerberos_ticket_cleanup;  /* If true, destroy ticket file on logout. */
  4936. +#endif /* KRB4 */
  4937. +#ifdef AFS
  4938. +  int afs_token_passing;        /* If true, permit AFS token passing. */
  4939. +#endif /* AFS */
  4940.    int allow_tcp_forwarding;
  4941.    int tis_authentication;    /* If true, permit TIS authsrv auth. */
  4942.    int password_authentication;  /* If true, permit password authentication. */
  4943. diff -r -u -N ssh-1.2.27/ssh.1.in ssh-1.2.27-pl1/ssh.1.in
  4944. --- ssh-1.2.27/ssh.1.in    Wed May 12 13:19:30 1999
  4945. +++ ssh-1.2.27-pl1/ssh.1.in    Fri Jul 30 11:18:27 1999
  4946. @@ -470,7 +470,7 @@
  4947.  .ne 3
  4948.  .TP
  4949.  .B \-k
  4950. -Disables forwarding of the kerberos tickets.  This may
  4951. +Disables forwarding of Kerberos tickets / AFS tokens.  This may
  4952.  also be specified on a per-host basis in the configuration file.
  4953.  .ne 3
  4954.  .TP
  4955. @@ -770,11 +770,15 @@
  4956.  
  4957.  .TP
  4958.  .B KerberosAuthentication
  4959. -Specifies whether Kerberos V5 authentication will be used. 
  4960. +Specifies whether Kerberos authentication will be used. 
  4961.  
  4962.  .TP
  4963.  .B KerberosTgtPassing
  4964. -Specifies whether a Kerberos V5 TGT will be forwarded to the server.
  4965. +Specifies whether a Kerberos TGT will be forwarded to the server.
  4966. +
  4967. +.TP
  4968. +.B AFSTokenPassing
  4969. +Specifies whether an AFS token will be forwarded to the server.
  4970.  
  4971.  .TP
  4972.  .B LocalForward
  4973. diff -r -u -N ssh-1.2.27/ssh.c ssh-1.2.27-pl1/ssh.c
  4974. --- ssh-1.2.27/ssh.c    Wed May 12 13:19:28 1999
  4975. +++ ssh-1.2.27-pl1/ssh.c    Fri Jul 30 11:18:27 1999
  4976. @@ -280,9 +280,9 @@
  4977.    fprintf(stderr, "  -l user     Log in using this user name.\n");
  4978.    fprintf(stderr, "  -n          Redirect input from /dev/null.\n");
  4979.    fprintf(stderr, "  -a          Disable authentication agent forwarding.\n");
  4980. -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5)
  4981. -  fprintf(stderr, "  -k          Disable Kerberos ticket passing.\n");
  4982. -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */
  4983. +#ifdef AFS
  4984. +  fprintf(stderr, "  -k          Disable Kerberos ticket and AFS token passing.\n");
  4985. +#endif /* AFS */
  4986.  #ifndef SSH_NO_X11_FORWARDING
  4987.    fprintf(stderr, "  -x          Disable X11 connection forwarding.\n");
  4988.  #endif
  4989. @@ -541,6 +541,9 @@
  4990.  
  4991.          case 'k':
  4992.            options.kerberos_tgt_passing = 0;
  4993. +#ifdef AFS
  4994. +      options.afs_token_passing = 0;
  4995. +#endif /* AFS */
  4996.            break;
  4997.            
  4998.          case 'i':
  4999. diff -r -u -N ssh-1.2.27/ssh.h ssh-1.2.27-pl1/ssh.h
  5000. --- ssh-1.2.27/ssh.h    Wed May 12 13:19:28 1999
  5001. +++ ssh-1.2.27-pl1/ssh.h    Fri Jul 30 11:18:27 1999
  5002. @@ -176,6 +176,16 @@
  5003.  #include "randoms.h"
  5004.  #include "cipher.h"
  5005.  
  5006. +#ifdef HESIOD
  5007. +#include <hesiod.h>
  5008. +
  5009. +#define getpwnam(a) hes_getpwnam(a)
  5010. +#define getpwuid(a) hes_getpwuid(a)
  5011. +
  5012. +extern struct passwd *hes_getpwnam(const char *name);
  5013. +extern struct passwd *hes_getpwuid(uid_t uid);
  5014. +#endif /* HESIOD */
  5015. +
  5016.  /* The default cipher used if IDEA is not supported by the remote host. 
  5017.     It is recommended that this be one of the mandatory ciphers (DES, 3DES),
  5018.     though that is not required. */
  5019. @@ -307,12 +317,13 @@
  5020.     protocol.)  */
  5021.  #define SSH_SESSION_KEY_LENGTH          32
  5022.  
  5023. -#ifdef KERBEROS
  5024.  #ifdef KRB5
  5025.  #include <krb5.h>
  5026. -#define KRB_SERVICE_NAME                "host"
  5027. +#define KRB5_SERVICE_NAME                "host"
  5028.  #endif /* KRB5 */
  5029. -#endif /* KERBEROS */
  5030. +#ifdef KRB4
  5031. +#define KRB4_SERVICE_NAME        "rcmd"
  5032. +#endif /* KRB4 */
  5033.  
  5034.  /* Authentication methods.  New types can be added, but old types should not
  5035.     be removed for compatibility.  The maximum allowed value is 31. */
  5036. @@ -336,6 +347,10 @@
  5037.  
  5038.  /* If you add new methods add them after this using random number between 16-31
  5039.     so if someone else adds also new methods you dont use same number. */
  5040. +#ifdef AFS
  5041. +#define SSH_PASS_AFS_TOKEN    21
  5042. +#endif /* AFS */
  5043. +
  5044.  
  5045.  /* Protocol flags.  These are bit masks. */
  5046.  #define SSH_PROTOFLAG_SCREEN_NUMBER     1 /* X11 forwarding includes screen */
  5047. @@ -410,7 +425,9 @@
  5048.  /* If ou add new messages add them starting from something after 64, better to
  5049.     use some random number between 64-127 so if someone else adds something else
  5050.     you dont use same numbers */
  5051. -
  5052. +#ifdef AFS
  5053. +#define SSH_CMSG_HAVE_AFS_TOKEN            65
  5054. +#endif /* AFS */
  5055.  
  5056.  /* define this and debug() will print local hostname */
  5057.  #define LOCAL_HOSTNAME_IN_DEBUG 1
  5058. @@ -479,12 +496,12 @@
  5059.  
  5060.  /* Tries to authenticate the user using password.  Returns true if
  5061.     authentication succeeds. */
  5062. -#if defined(KERBEROS) && defined(KRB5)
  5063. +#ifdef KRB5
  5064.  int auth_password(const char *server_user, const char *password,
  5065.                    krb5_principal client);
  5066. -#else /* defined(KERBEROS) && defined(KRB5) */
  5067. +#else /* KRB5 */
  5068.  int auth_password(const char *server_user, const char *password);
  5069. -#endif /* defined(KERBEROS) && defined(KRB5) */
  5070. +#endif /* KRB5 */
  5071.  
  5072.  /* Performs the RSA authentication dialog with the client.  This returns
  5073.     0 if the client could not be authenticated, and 1 if authentication was
  5074. diff -r -u -N ssh-1.2.27/sshconnect.c ssh-1.2.27-pl1/sshconnect.c
  5075. --- ssh-1.2.27/sshconnect.c    Wed May 12 13:19:29 1999
  5076. +++ ssh-1.2.27-pl1/sshconnect.c    Fri Jul 30 12:27:29 1999
  5077. @@ -215,7 +215,6 @@
  5078.  #include "userfile.h"
  5079.  #include "emulate.h"
  5080.  
  5081. -#ifdef KERBEROS
  5082.  #ifdef KRB5
  5083.  #include <krb5.h>
  5084.  
  5085. @@ -223,7 +222,19 @@
  5086.  krb5_context ssh_context = 0;
  5087.  krb5_auth_context auth_context = 0;
  5088.  #endif /* KRB5 */
  5089. -#endif /* KERBEROS */
  5090. +
  5091. +#ifdef KRB4
  5092. +#include <krb.h>
  5093. +#ifdef AFS
  5094. +#if defined(HAVE_SYS_IOCTL_H) && SunOS != 4
  5095. +#include <sys/ioctl.h>
  5096. +#endif
  5097. +#ifdef HAVE_SYS_FILIO_H
  5098. +#include <sys/filio.h>
  5099. +#endif
  5100. +#include <kafs.h>
  5101. +#endif /* AFS */
  5102. +#endif /* KRB4 */
  5103.  
  5104.  /* Session id for the current session. */
  5105.  unsigned char session_id[16];
  5106. @@ -932,10 +943,9 @@
  5107.    return 0;
  5108.  }
  5109.  
  5110. -#ifdef KERBEROS
  5111. +#ifdef KRB5
  5112.  int try_kerberos_authentication(void)
  5113.  {
  5114. -#ifdef KRB5
  5115.    char *remotehost;
  5116.    krb5_data auth;
  5117.    krb5_error_code r;
  5118. @@ -1084,15 +1094,118 @@
  5119.      krb5_free_ap_rep_enc_part(ssh_context, repl);
  5120.    
  5121.    return(ret_stat);
  5122. +}
  5123.  #endif /* KRB5 */
  5124. +
  5125. +#ifdef KRB4
  5126. +int try_kerberos_authentication()
  5127. +{
  5128. +  KTEXT_ST auth;                     /* Kerberos data */
  5129. +  char *reply;
  5130. +  char inst[INST_SZ];
  5131. +  char *realm;
  5132. +  char *service;
  5133. +  CREDENTIALS cred;
  5134. +  int r, type;
  5135. +  Key_schedule schedule;
  5136. +  u_long checksum, cksum;
  5137. +  MSG_DAT msg_data;
  5138. +  struct sockaddr_in local, foreign;
  5139. +  struct stat st;
  5140. +  
  5141. +  /* Don't do anything if we don't have any tickets. */
  5142. +  if (stat(tkt_string(), &st) < 0) return 0;
  5143. +  
  5144. +  strncpy(inst, (char *) krb_get_phost(get_canonical_hostname()), INST_SZ);
  5145. +  
  5146. +  realm = (char *)krb_realmofhost(get_canonical_hostname());
  5147. +  if (!realm) {
  5148. +    debug("Kerberos V4: no realm for %s", get_canonical_hostname());
  5149. +    return 0;
  5150. +  }
  5151. +  /* This can really be anything. */
  5152. +  checksum = (u_long) getpid();
  5153. +  
  5154. +  if (r = krb_mk_req(&auth, KRB4_SERVICE_NAME, inst, realm, checksum)) {
  5155. +    debug("Kerberos V4 krb_mk_req failed: %s", krb_err_txt[r]);
  5156. +    return 0;
  5157. +  }
  5158. +  /* Get session key to decrypt the server's reply with. */
  5159. +  if (r = krb_get_cred(KRB4_SERVICE_NAME, inst, realm, &cred)) {
  5160. +     debug("get_cred failed: %s", krb_err_txt[r]);
  5161. +     return 0;
  5162. +  }
  5163. +  des_key_sched((des_cblock *)cred.session, schedule);
  5164. +  
  5165. +  /* Send authentication info to server. */
  5166. +  packet_start(SSH_CMSG_AUTH_KERBEROS);
  5167. +  packet_put_string((char *)auth.dat, auth.length);
  5168. +  packet_send();
  5169. +  packet_write_wait();
  5170. +  
  5171. +  /* zero the buffer */
  5172. +  (void) memset(auth.dat, 0, MAX_KTXT_LEN);
  5173. +  
  5174. +  r = sizeof(local);
  5175. +  memset(&local, 0, sizeof(local));
  5176. +  if (getsockname(packet_get_connection_in(),
  5177. +           (struct sockaddr *) &local, &r) < 0)
  5178. +    debug("getsockname failed: %.100s", strerror(errno));
  5179. +  
  5180. +  r = sizeof(foreign);
  5181. +  memset(&foreign, 0, sizeof(foreign));
  5182. +   if (getpeername(packet_get_connection_in(),
  5183. +           (struct sockaddr *)&foreign, &r) < 0)
  5184. +     debug("getpeername failed: %.100s", strerror(errno));
  5185. +   
  5186. +   /* Get server reply. */
  5187. +   type = packet_read();
  5188. +   switch(type) {
  5189. +     
  5190. +   case SSH_SMSG_FAILURE: /* Should really be SSH_SMSG_AUTH_KERBEROS_FAILURE */
  5191. +     debug("Kerberos V4 authentication failed.");
  5192. +     return 0;
  5193. +     break;
  5194. +     
  5195. +   case SSH_SMSG_AUTH_KERBEROS_RESPONSE: /* SSH_SMSG_AUTH_KERBEROS_SUCCESS */
  5196. +     debug("Kerberos V4 authentication accepted.");
  5197. +     
  5198. +     /* Get server's response. */
  5199. +     reply = packet_get_string((unsigned int *)&auth.length);
  5200. +     memcpy(auth.dat, reply, auth.length);
  5201. +     xfree(reply);
  5202. +     
  5203. +     /* If his response isn't properly encrypted with the session key,
  5204. +        and the decrypted checksum fails to match, he's bogus. Bail out. */
  5205. +     if (r = krb_rd_priv(auth.dat, auth.length, schedule, &cred.session,
  5206. +             &foreign, &local, &msg_data)) {
  5207. +       debug("Kerberos V4 krb_rd_priv failed: %s", krb_err_txt[r]);
  5208. +       packet_disconnect("Kerberos V4 challenge failed!");
  5209. +     }
  5210. +     /* fetch the (incremented) checksum that we supplied in the request */
  5211. +     (void)memcpy((char *)&cksum, (char *)msg_data.app_data, sizeof(cksum));
  5212. +     cksum = ntohl(cksum);
  5213. +     
  5214. +     /* If it matches, we're golden. */
  5215. +     if (cksum == checksum + 1) {
  5216. +       debug("Kerberos V4 challenge successful.");
  5217. +       return 1;
  5218. +     }
  5219. +     else
  5220. +       packet_disconnect("Kerberos V4 challenge failed!");
  5221. +     break;
  5222. +     
  5223. +   default:
  5224. +     packet_disconnect("Protocol error on Kerberos V4 response: %d", type);
  5225. +   }
  5226.  }
  5227. -#endif /* KERBEROS */
  5228. +#endif /* KRB4 */
  5229. +
  5230.  
  5231. -#ifdef KERBEROS_TGT_PASSING
  5232.  /* Forward our local Kerberos tgt to the server. */
  5233. +#ifdef KRB5
  5234.  int send_kerberos_tgt(void)
  5235.  {
  5236. -#ifdef KRB5
  5237.    char *remotehost;
  5238.    krb5_principal client;
  5239.    krb5_principal server;
  5240. @@ -1172,22 +1285,117 @@
  5241.      krb5_free_principal(ssh_context, client);
  5242.      krb5_free_principal(ssh_context, server);
  5243.      
  5244. -    type = packet_read();
  5245. -    if (type == SSH_SMSG_SUCCESS)
  5246. -      {
  5247. -        debug("Kerberos V5 TGT passing was successful.");
  5248. -        return 1;
  5249. -      }
  5250. -    else
  5251. -      if (type != SSH_SMSG_FAILURE)
  5252. -        packet_disconnect("Protocol error on Kerberos tgt response: %d", type);
  5253. -      else 
  5254. -        debug("Kerberos V5 TGT passing failed.");
  5255. -    
  5256. -    return 0;
  5257. +    return 1;
  5258. +}
  5259.  #endif /* KRB5 */
  5260. +
  5261. +#ifdef AFS
  5262. +int send_kerberos_tgt()
  5263. +{
  5264. +  CREDENTIALS *creds;
  5265. +  char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ];
  5266. +  int r, type;
  5267. +  unsigned char buffer[8192];
  5268. +  struct stat st;
  5269. +
  5270. +  /* Don't do anything if we don't have any tickets. */
  5271. +  if (stat(tkt_string(), &st) < 0) return 0;
  5272. +      
  5273. +  creds = xmalloc(sizeof(CREDENTIALS));
  5274. +  
  5275. +  if ((r=krb_get_tf_fullname(TKT_FILE,pname,pinst,prealm)) != KSUCCESS) {
  5276. +    debug("Kerberos V4 tf_fullname failed: %s",krb_err_txt[r]);
  5277. +    return 0;
  5278. +  }
  5279. +  if ((r=krb_get_cred("krbtgt", prealm, prealm, creds)) != GC_OK) {
  5280. +    debug("Kerberos V4 get_cred failed: %s", krb_err_txt[r]);
  5281. +    return 0;
  5282. +  }
  5283. +  if (time(0) >
  5284. +#ifdef HAVE_KRB_LIFE_TO_TIME
  5285. +      (unsigned long)krb_life_to_time(creds->issue_date, creds->lifetime)) {
  5286. +#else
  5287. +      (creds->issue_date + ((unsigned char)creds->lifetime * 5 * 60))) {
  5288. +#endif /* HAVE_KRB_LIFE_TO_TIME */
  5289. +    debug("Kerberos V4 ticket expired: %s", TKT_FILE);
  5290. +    return 0;
  5291. +  }
  5292. +
  5293. +  creds_to_radix(creds, buffer);
  5294. +  xfree(creds);
  5295. +    
  5296. +  packet_start(SSH_CMSG_HAVE_KERBEROS_TGT);
  5297. +  packet_put_string((char *)buffer, strlen(buffer));
  5298. +  packet_send();
  5299. +  packet_write_wait();
  5300. +
  5301. +  return 1;
  5302.  }
  5303. -#endif /* KERBEROS_TGT_PASSING */
  5304. +
  5305. +/* Forwards our AFS tokens to the server. */
  5306. +void send_afs_tokens(void)
  5307. +{
  5308. +  CREDENTIALS creds;
  5309. +  struct ViceIoctl parms;
  5310. +  struct ClearToken ct;
  5311. +  int i, type;
  5312. +  int len;
  5313. +  char buf[2048], *p, *server_cell;
  5314. +  unsigned char buffer[8192];
  5315. +
  5316. +  /* Move over ktc_GetToken, here's something leaner. */
  5317. +  for (i = 0; i < 100; i++) { /* just in case */
  5318. +    parms.in = (char *)&i;
  5319. +    parms.in_size = sizeof(i);
  5320. +    parms.out = buf;
  5321. +    parms.out_size = sizeof(buf);
  5322. +    if (k_pioctl(0, VIOCGETTOK, &parms, 0) != 0) break;
  5323. +    p = buf;
  5324. +    
  5325. +    /* Get secret token. */
  5326. +    memcpy(&creds.ticket_st.length, p, sizeof(unsigned int));
  5327. +    if (creds.ticket_st.length > MAX_KTXT_LEN) break;
  5328. +    p += sizeof(unsigned int);
  5329. +    memcpy(creds.ticket_st.dat, p, creds.ticket_st.length);
  5330. +    p += creds.ticket_st.length;
  5331. +        
  5332. +    /* Get clear token. */
  5333. +    memcpy(&len, p, sizeof(len));
  5334. +    if (len != sizeof(struct ClearToken)) break;
  5335. +    p += sizeof(len);
  5336. +    memcpy(&ct, p, len);
  5337. +    p += len;
  5338. +    p += sizeof(len); /* primary flag */
  5339. +    server_cell = p;
  5340. +
  5341. +    /* Flesh out our credentials. */
  5342. +    strcpy(creds.service, "afs");
  5343. +    creds.instance[0] = '\0';
  5344. +    strncpy(creds.realm, server_cell, REALM_SZ);
  5345. +    memcpy(creds.session, ct.HandShakeKey, DES_KEY_SZ);
  5346. +    creds.issue_date = ct.BeginTimestamp;
  5347. +    creds.lifetime = krb_time_to_life(creds.issue_date, ct.EndTimestamp);
  5348. +    creds.kvno = ct.AuthHandle;
  5349. +    snprintf(creds.pname, sizeof(creds.pname), "AFS ID %d", ct.ViceId);
  5350. +    creds.pinst[0] = '\0';
  5351. +
  5352. +    /* Encode token, ship it off. */
  5353. +    if (!creds_to_radix(&creds, buffer)) break;
  5354. +    packet_start(SSH_CMSG_HAVE_AFS_TOKEN);
  5355. +    packet_put_string((char *)buffer, strlen(buffer));
  5356. +    packet_send();
  5357. +    packet_write_wait();
  5358. +
  5359. +    /* Roger, Roger. Clearance, Clarence. What's your vector, Victor? */
  5360. +    type = packet_read();
  5361. +
  5362. +    if (type == SSH_SMSG_FAILURE)
  5363. +      debug("AFS token for cell %s rejected.", server_cell);
  5364. +    else if (type != SSH_SMSG_SUCCESS)
  5365. +      packet_disconnect("Protocol error on AFS token response: %d", type);
  5366. +  }  
  5367. +}
  5368. +#endif /* AFS */
  5369.  
  5370.  /* Waits for the server identification string, and sends our own identification
  5371.     string. */
  5372. @@ -1285,14 +1493,12 @@
  5373.    unsigned char check_bytes[8];
  5374.    unsigned int supported_ciphers, supported_authentications, protocol_flags;
  5375.    HostStatus host_status;
  5376. -#ifdef KERBEROS 
  5377.  #ifdef KRB5
  5378.    char *kuser;
  5379.    krb5_ccache ccache;
  5380.    krb5_error_code problem;
  5381.    krb5_principal client;
  5382. -#endif
  5383. -#endif
  5384. +#endif /* KRB5 */
  5385.    
  5386.    /* Convert the user-supplied hostname into all lowercase. */
  5387.    host = xstrdup(orighost);
  5388. @@ -1595,7 +1801,6 @@
  5389.  
  5390.    debug("Received encrypted confirmation.");
  5391.  
  5392. -#ifdef KERBEROS 
  5393.  #ifdef KRB5
  5394.    if (!ssh_context)
  5395.      {
  5396. @@ -1629,7 +1834,6 @@
  5397.          debug("Kerberos V5: could not get default ccache.");
  5398.      }
  5399.  #endif /* KRB5 */
  5400. -#endif /* KERBEROS */
  5401.    
  5402.    /* Send the name of the user to log in as on the server. */
  5403.    packet_start(SSH_CMSG_USER);
  5404. @@ -1647,24 +1851,39 @@
  5405.      packet_disconnect("Protocol error: got %d in response to SSH_CMSG_USER",
  5406.                        type);
  5407.  
  5408. -#ifdef KERBEROS_TGT_PASSING
  5409. +#if defined(KRB5) || defined(AFS)
  5410.    /* Try Kerberos tgt passing if the server supports it. */
  5411.    if ((supported_authentications & (1 << SSH_PASS_KERBEROS_TGT)) &&
  5412.        options->kerberos_tgt_passing)
  5413.      {
  5414.        if (options->cipher == SSH_CIPHER_NONE)
  5415.          log_msg("WARNING: Encryption is disabled! Ticket will be transmitted in the clear!");
  5416. -      (void)send_kerberos_tgt();
  5417. +      if (send_kerberos_tgt())
  5418. +      {
  5419. +        type = packet_read();
  5420. +        if (type == SSH_SMSG_FAILURE)
  5421. +      debug("Kerberos TGT passing failed.");
  5422. +        else if (type != SSH_SMSG_SUCCESS)
  5423. +      packet_disconnect("Protocol error on Kerberos tgt response: %d", type);
  5424. +      }
  5425.      }
  5426. -#endif /* KERBEROS_TGT_PASSING */
  5427. +#endif /* KRB5 || AFS */
  5428. +
  5429. +#ifdef AFS
  5430. +  /* Try AFS token passing if the server supports it. */
  5431. +  if ((supported_authentications & (1 << SSH_PASS_AFS_TOKEN)) &&
  5432. +      options->afs_token_passing && k_hasafs())  {
  5433. +    if (options->cipher == SSH_CIPHER_NONE)
  5434. +      log_msg("WARNING: Encryption is disabled! Token will be transmitted in the clear!");
  5435. +    send_afs_tokens();
  5436. +  }
  5437. +#endif /* AFS */
  5438.    
  5439. -#ifdef KERBEROS
  5440. -#ifdef KRB5
  5441. +#if defined(KRB4) || defined(KRB5)
  5442.    if ((supported_authentications & (1 << SSH_AUTH_KERBEROS)) &&
  5443.        options->kerberos_authentication)
  5444.      {
  5445. -      debug("Trying Kerberos V5 authentication.");
  5446. -#endif
  5447. +      debug("Trying Kerberos authentication.");
  5448.        if (try_kerberos_authentication()) {
  5449.          /* The server should respond with success or failure. */
  5450.          type = packet_read();
  5451. @@ -1673,10 +1892,8 @@
  5452.          if (type != SSH_SMSG_FAILURE)
  5453.            packet_disconnect("Protocol error: got %d in response to Kerberos auth", type);
  5454.        }
  5455. -#ifdef KRB5
  5456.      }
  5457. -#endif
  5458. -#endif /* KERBEROS */
  5459. +#endif /* KRB4 || KRB5 */
  5460.  
  5461.    /* Use rhosts authentication if running in privileged socket and we do not
  5462.       wish to remain anonymous. */
  5463. diff -r -u -N ssh-1.2.27/sshd.8.in ssh-1.2.27-pl1/sshd.8.in
  5464. --- ssh-1.2.27/sshd.8.in    Wed May 12 13:19:31 1999
  5465. +++ ssh-1.2.27-pl1/sshd.8.in    Fri Jul 30 11:18:27 1999
  5466. @@ -529,10 +529,10 @@
  5467.  
  5468.  .TP
  5469.  .B KerberosAuthentication
  5470. -Specifies whether Kerberos V5 authentication is allowed. This can
  5471. +Specifies whether Kerberos authentication is allowed. This can
  5472.  be in the form of a Kerberos ticket, or if PasswordAuthentication
  5473.  is yes, the password provided by the user will be validated through
  5474. -the Kerberos KDC or DCE Security Server. Default is yes.
  5475. +the Kerberos KDC / AFS kaserver / DCE Security Server. Default is yes.
  5476.  
  5477.  .TP
  5478.  .B KerberosOrLocalPasswd
  5479. @@ -542,8 +542,18 @@
  5480.  
  5481.  .TP
  5482.  .B KerberosTgtPassing
  5483. -Specifies whether a Kerberos V5 TGT may be forwarded to the server.
  5484. +Specifies whether a Kerberos TGT may be forwarded to the server.
  5485.  Default is yes.
  5486. +
  5487. +.TP
  5488. +.B AFSTokenPassing
  5489. +Specifies whether an AFS token may be forwarded to the server.
  5490. +Default is yes.
  5491. +
  5492. +.TP
  5493. +.B KerberosTicketCleanup
  5494. +Specifies whether to automatically destroy the user's Kerberos v4
  5495. +ticket cache file on logout. Default is yes.
  5496.  
  5497.  .TP
  5498.  .B KeyRegenerationInterval
  5499. diff -r -u -N ssh-1.2.27/sshd.c ssh-1.2.27-pl1/sshd.c
  5500. --- ssh-1.2.27/sshd.c    Wed May 12 13:19:29 1999
  5501. +++ ssh-1.2.27-pl1/sshd.c    Fri Jul 30 21:41:35 1999
  5502. @@ -537,15 +537,26 @@
  5503.  #define O_NOCTTY        0
  5504.  #endif
  5505.  
  5506. -#ifdef KERBEROS
  5507.  #ifdef KRB5
  5508.  #include <krb5.h>
  5509.  /* Global the contexts */
  5510.  krb5_context ssh_context = 0;
  5511.  krb5_auth_context auth_context = 0;
  5512.  #endif /* KRB5 */
  5513. -char *ticket = "none\0";
  5514. -#endif /* KERBEROS */
  5515. +
  5516. +#ifdef KRB4
  5517. +#include <sys/param.h>
  5518. +#include <krb.h>
  5519. +#ifdef AFS
  5520. +#include <kafs.h>
  5521. +/* Local Xauthority file. */
  5522. +char *xauthfile = NULL;
  5523. +#endif /* AFS */
  5524. +#endif /* KRB4 */
  5525. +
  5526. +#if defined(KRB5) || defined(KRB4)
  5527. +char *ticket = NULL;
  5528. +#endif /* KRB5 || KRB4 */
  5529.  
  5530.  /* Server configuration options. */
  5531.  ServerOptions options;
  5532. @@ -649,7 +660,6 @@
  5533.                const char *display, const char *auth_proto,
  5534.                const char *auth_data, const char *ttyname);
  5535.  
  5536. -
  5537.  /* Signal handler for SIGHUP.  Sshd execs itself when it receives SIGHUP;
  5538.     the effect is to reread the configuration file (and to regenerate
  5539.     the server key). */
  5540. @@ -1115,7 +1125,6 @@
  5541.        /* Arrange SIGCHLD to be caught. */
  5542.        signal(SIGCHLD, main_sigchld_handler);
  5543.  
  5544. -#ifdef KERBEROS
  5545.  #ifdef KRB5
  5546.        /* Initialize contexts and setup replay cache */
  5547.        if (!ssh_context)
  5548. @@ -1128,7 +1137,6 @@
  5549.            krb5_init_ets(ssh_context);
  5550.          }
  5551.  #endif
  5552. -#endif
  5553.  
  5554.        /* Stay listening for connections until the system crashes or the
  5555.           daemon is killed with a signal. */
  5556. @@ -1407,6 +1415,16 @@
  5557.    /* Try to remove authentication socket and directory */
  5558.    auth_delete_socket(NULL);
  5559.    
  5560. +#ifdef KRB4
  5561. +  /* Cleanup user's ticket cache file. */
  5562. +  if (options.kerberos_ticket_cleanup)
  5563. +    (void) dest_tkt();
  5564. +#ifdef AFS
  5565. +  /* Cleanup user's local Xauthority file. */
  5566. +  if (xauthfile) unlink(xauthfile);
  5567. +#endif /* AFS */
  5568. +#endif /* KRB4 */
  5569. +  
  5570.    /* The connection has been terminated. */
  5571.    log_msg("Closing connection to %.100s", get_remote_ipaddr());
  5572.    packet_close();
  5573. @@ -1470,17 +1488,17 @@
  5574.    if (options.tis_authentication)
  5575.      auth_mask |= 1 << SSH_AUTH_TIS;
  5576.  #endif
  5577. -#ifdef KERBEROS
  5578. -#ifdef KRB5
  5579. +#if defined(KRB4) || defined(KRB5)
  5580.    if (options.kerberos_authentication)
  5581.      auth_mask |= 1 << SSH_AUTH_KERBEROS;
  5582.  #endif
  5583. -#endif
  5584. -#ifdef KERBEROS_TGT_PASSING
  5585. -#ifdef KRB5
  5586. +#if defined(AFS) || defined(KRB5)
  5587.    if (options.kerberos_tgt_passing)
  5588.      auth_mask |= 1 << SSH_PASS_KERBEROS_TGT;
  5589.  #endif
  5590. +#ifdef AFS
  5591. +  if (options.afs_token_passing)
  5592. +    auth_mask |= 1 << SSH_PASS_AFS_TOKEN;
  5593.  #endif
  5594.    if (options.password_authentication)
  5595.      auth_mask |= 1 << SSH_AUTH_PASSWORD;
  5596. @@ -1677,7 +1695,7 @@
  5597.      /* XXX No days_before_password_expires calculation here */
  5598.    }
  5599.  #endif /* HAVE_USERSEC_H */
  5600. -#ifdef HAVE_ETC_SHADOW
  5601. +#if defined(HAVE_ETC_SHADOW) && !defined(KRB4) && !defined(KRB5)
  5602.    {
  5603.      struct spwd *sp;
  5604.      
  5605. @@ -2039,7 +2057,7 @@
  5606.            }
  5607.      }
  5608.    
  5609. -  /* Check whether logins are deneid for this group. */
  5610. +  /* Check whether logins are denied for this group. */
  5611.    grp = getgrgid(pwd->pw_gid);
  5612.    if (grp)
  5613.      group = grp->gr_name;
  5614. @@ -2151,11 +2169,11 @@
  5615.    unsigned int client_host_key_bits;
  5616.    MP_INT client_host_key_e, client_host_key_n;
  5617.    int password_attempts = 0;
  5618. -#if defined(KERBEROS) && defined(KRB5)
  5619. +#ifdef KRB5
  5620.    char kuser[256];
  5621.    krb5_principal client = 0, tkt_client = 0;
  5622.    krb5_data krb5data;
  5623. -#endif /* defined(KERBEROS) && defined(KRB5) */
  5624. +#endif /* KRB5 */
  5625.  #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
  5626.    login_cap_t *lc;
  5627.    const char *hostname;
  5628. @@ -2167,10 +2185,18 @@
  5629.    ipaddr = get_remote_ipaddr();
  5630.  #endif /* HAVE_LOGIN_CAP_H */
  5631.  
  5632. +#ifdef AFS
  5633. +  /* If machine has AFS, set process authentication group. */
  5634. +  if (k_hasafs()) {
  5635. +    k_setpag();
  5636. +    k_unlog();
  5637. +  }
  5638. +#endif /* AFS */
  5639. +       
  5640.    if (strlen(user) > 255)
  5641.      do_authentication_fail_loop();
  5642.  
  5643. -#if defined(KERBEROS) && defined(KRB5)
  5644. +#ifdef KRB5
  5645.    /* For KRB5 allow the user to input fully qualified name i.e.
  5646.       "username@realm" as the local user name. Then use this name to call
  5647.       out to krb5_aname_to_localname to find if there is a localname
  5648. @@ -2203,7 +2229,7 @@
  5649.      }
  5650.    else 
  5651.      krb5_parse_name(ssh_context, user, &client);
  5652. -#endif /* defined(KERBEROS) && defined(KRB5) */
  5653. +#endif /* KRB5 */
  5654.                           
  5655.    /* Verify that the user is a valid user.  We disallow usernames starting
  5656.       with any characters that are commonly used to start NIS entries. */
  5657. @@ -2241,11 +2267,11 @@
  5658.  
  5659.    debug("Attempting authentication for %.100s.", user);
  5660.  
  5661. -#if defined (KERBEROS) && defined (KRB5)
  5662. +  /* If the user has no password, accept authentication immediately. */
  5663. +#ifdef KRB5
  5664.    if (!options.kerberos_authentication && options.password_authentication &&
  5665.        auth_password(user, "", 0))
  5666. -#else /* defined(KERBEROS) && defined(KRB5) */
  5667. -  /* If the user has no password, accept authentication immediately. */
  5668. +#else /* KRB5 */
  5669.  #if defined (HAVE_SIA)
  5670.    /* For SIA, only call auth_password() here if the user really
  5671.       has no password.  Otherwise, the call would generate misleading
  5672. @@ -2254,9 +2280,13 @@
  5673.    if (options.password_authentication && sia_no_password(user) &&
  5674.        auth_password(user, ""))
  5675.  #else /* defined(HAVE_SIA) */
  5676. -  if (options.password_authentication && auth_password(user, ""))
  5677. +  if (options.password_authentication &&
  5678. +#ifdef KRB4
  5679. +      options.kerberos_or_local_passwd &&
  5680. +#endif /* KRB4 */
  5681. +      auth_password(user, ""))
  5682.  #endif /* defined(HAVE_SIA) */
  5683. -#endif /* defined(KERBEROS) && defined(KRB5) */
  5684. +#endif /* KRB5 */
  5685.      {
  5686.        /* Authentication with empty password succeeded. */
  5687.        debug("Login for user %.100s accepted without authentication.", user);
  5688. @@ -2281,19 +2311,22 @@
  5689.        /* Process the packet. */
  5690.        switch (type)
  5691.          {
  5692. -#ifdef KERBEROS_TGT_PASSING
  5693. -#ifdef KRB5
  5694. +#if defined(KRB5) || defined(AFS)
  5695.          case SSH_CMSG_HAVE_KERBEROS_TGT:
  5696. +#ifdef KRB5
  5697.            if (!options.kerberos_tgt_passing || 
  5698.                (!(options.kerberos_authentication || 
  5699.                   options.password_authentication ||
  5700.                   options.rsa_authentication)))
  5701. +#else /* KRB5 */
  5702. +      if (!options.kerberos_tgt_passing)
  5703. +#endif /* KRB5 */
  5704.              {
  5705.                packet_get_all();
  5706.                log_msg("Kerberos tgt passing disabled.");
  5707.                break;
  5708.              }
  5709. -          
  5710. +#ifdef KRB5
  5711.            /* Accept Kerberos tgt. */
  5712.            krb5data.data = packet_get_string((unsigned int *) &krb5data.length);
  5713.            
  5714. @@ -2303,12 +2336,36 @@
  5715.              debug("Kerberos tgt REFUSED for %.100s", user);
  5716.            }
  5717.            free(krb5data.data);
  5718. -#endif
  5719. -          continue;
  5720. -#endif /* KERBEROS_TGT_PASSING */
  5721. +#else /* KRB5 */
  5722. +      {
  5723. +        /* Accept Kerberos tgt. */
  5724. +        char *tgt = packet_get_string(NULL);
  5725. +        if (!auth_kerberos_tgt(pw, tgt))
  5726. +          debug("Kerberos tgt REFUSED for %s", user);
  5727. +        xfree(tgt);
  5728. +      }
  5729. +#endif /* KRB5 */
  5730. +      continue;
  5731. +#endif /* KRB5 || AFS */
  5732.            
  5733. -#ifdef KERBEROS
  5734. -#ifdef KRB5
  5735. +#ifdef AFS
  5736. +    case SSH_CMSG_HAVE_AFS_TOKEN:
  5737. +      if (!k_hasafs() || !options.afs_token_passing) {
  5738. +        packet_get_all();
  5739. +        log_msg("AFS token passing disabled.");
  5740. +        break;
  5741. +      }
  5742. +      else {
  5743. +        /* Accept AFS token. */
  5744. +        char *token_string = packet_get_string(NULL);
  5745. +        if (!auth_afs_token(user, pw->pw_uid, token_string))
  5746. +          debug("AFS token REFUSED for %s", user);
  5747. +        xfree(token_string);
  5748. +        continue;
  5749. +      }
  5750. +#endif /* AFS */
  5751. +      
  5752. +#if defined(KRB4) || defined(KRB5)
  5753.          case SSH_CMSG_AUTH_KERBEROS:
  5754.            if (!options.kerberos_authentication)
  5755.              {
  5756. @@ -2316,6 +2373,7 @@
  5757.                log_msg("Kerberos authentication disabled.");
  5758.                break;
  5759.              }
  5760. +#ifdef KRB5
  5761.            /* Try Kerberos authentication. */
  5762.            krb5data.data = packet_get_string((unsigned int *) &krb5data.length);
  5763.            if (auth_kerberos(user, &krb5data, &tkt_client))
  5764. @@ -2347,11 +2405,31 @@
  5765.                  }
  5766.                free(tkt_user);
  5767.              }
  5768. +#else /* !KRB5  XXX - how to make these coexist? */
  5769. +      else {
  5770. +        /* Try Kerberos v4 authentication. */
  5771. +        KTEXT_ST auth;
  5772. +        char *tkt_user = NULL;
  5773. +        char *kdata = packet_get_string((unsigned int *)&auth.length);
  5774. +        
  5775. +        memcpy(auth.dat, kdata, auth.length);
  5776. +        xfree(kdata);
  5777. +
  5778. +        if (auth_krb4(user, &auth, &tkt_user)) {
  5779. +          /* Client has successfully authenticated to us. */
  5780. +          log_msg("Kerberos authentication accepted %s for account "
  5781. +              "%.100s from %.200s", tkt_user, user,
  5782. +              get_canonical_hostname());
  5783. +          authentication_type = SSH_AUTH_KERBEROS;
  5784. +          authenticated = 1;
  5785. +          xfree(tkt_user);
  5786. +      break;
  5787. +        }
  5788. +        log_msg("Kerberos authentication failed for account "
  5789. +            "%.100s from %.200s", user, get_canonical_hostname());
  5790. +      }
  5791.  #endif /* KRB5 */
  5792. -          debug("Kerberos authentication failed for %.100s from %.200s",
  5793. -                user, get_canonical_hostname());
  5794. -          break;
  5795. -#endif /* KERBEROS */
  5796. +#endif /* KRB5 || KRB4 */
  5797.            
  5798.          case SSH_CMSG_AUTH_RHOSTS:
  5799.            if (!options.rhosts_authentication)
  5800. @@ -2657,11 +2735,11 @@
  5801.            password_attempts++;
  5802.  
  5803.            /* Try authentication with the password. */
  5804. -#if defined(KERBEROS) && defined(KRB5)
  5805. +#ifdef KRB5
  5806.            if (auth_password(user, password, client))
  5807. -#else  /* defined(KERBEROS) && defined(KRB5) */
  5808. +#else  /* KRB5 */
  5809.            if (auth_password(user, password))
  5810. -#endif /* defined(KERBEROS) && defined(KRB5) */
  5811. +#endif /* KRB5 */
  5812.              {
  5813.                /* Successful authentication. */
  5814.                /* Clear the password from memory. */
  5815. @@ -2688,7 +2766,7 @@
  5816.        if (authenticated)
  5817.          break;
  5818.  
  5819. -#ifdef KERBEROS
  5820. +#if defined(KRB5)
  5821.        /* If you forwarded a ticket you get one shot for proper
  5822.           authentication. */
  5823.        /* If tgt was passed unlink file */
  5824. @@ -2699,7 +2777,7 @@
  5825.            else
  5826.              ticket = NULL;
  5827.        }
  5828. -#endif /* KERBEROS */
  5829. +#endif /* KRB5 */
  5830.        
  5831.        /* Send a message indicating that the authentication attempt failed. */
  5832.        packet_start(SSH_SMSG_FAILURE);
  5833. @@ -2965,6 +3043,21 @@
  5834.            display = x11_create_display_inet(screen);
  5835.            if (!display)
  5836.              goto fail;
  5837. +#ifdef AFS
  5838. +      /* Setup to have a local .Xauthority, if homedir is in AFS. */
  5839. +      {
  5840. +        struct stat st;
  5841. +        char cell[64], *xauthdir = "/ticket";
  5842. +        
  5843. +        if (k_hasafs() && k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0) {
  5844. +          xauthfile = xmalloc(MAXPATHLEN);
  5845. +          if (stat(xauthdir, &st) < 0)
  5846. +        xauthdir = "/tmp";
  5847. +          snprintf(xauthfile, MAXPATHLEN, "%s/Xauth%d_%d", xauthdir,
  5848. +                   pw->pw_uid, getpid());
  5849. +        }
  5850. +      }
  5851. +#endif /* AFS */
  5852.            break;
  5853.  #else /* XAUTH_PATH */
  5854.            /* No xauth program; we won't accept forwarding with spoofing. */
  5855. @@ -4184,6 +4277,19 @@
  5856.    real_shell = login_getcapstr(lc, "shell", (char*)shell, (char*)shell);
  5857.    login_close(lc);
  5858.  #endif /* HAVE_LOGIN_CAP_H */
  5859. +
  5860. +#ifdef AFS
  5861. +  /* Try to get AFS tokens for the local cell. */
  5862. +  if (k_hasafs()) {
  5863. +    char cell[64];
  5864. +    
  5865. +    if (k_afs_cell_of_file(user_dir, cell, sizeof(cell)) == 0)
  5866. +      krb_afslog(cell, 0);
  5867. +
  5868. +    krb_afslog(0, 0);
  5869. +  }
  5870. +#endif /* AFS */
  5871. +
  5872.    /* Initialize the environment if not already done. In the first part we
  5873.       allocate space for all environment variables. */
  5874.    if (env == NULL)
  5875. @@ -4290,13 +4396,21 @@
  5876.    }
  5877.  #endif
  5878.  
  5879. -#ifdef KERBEROS
  5880. -  /* Set KRBTKFILE to point to our ticket */
  5881. +  /* Set KRBTKFILE to point to our ticket. */
  5882.  #ifdef KRB5
  5883.    if (ticket)
  5884.      child_set_env(&env, &envsize, "KRB5CCNAME", ticket);
  5885.  #endif /* KRB5 */
  5886. -#endif /* KERBEROS */
  5887. +#ifdef KRB4 /* XXX - how to make these coexist? */
  5888. +  if (ticket)
  5889. +    child_set_env(&env, &envsize, "KRBTKFILE", ticket);
  5890. +
  5891. +#ifdef AFS
  5892. +  /* Set XAUTHORITY to a local file, if homedir is in AFS. */
  5893. +  if (xauthfile)
  5894. +      child_set_env(&env, &envsize, "XAUTHORITY", xauthfile);
  5895. +#endif /* AFS */
  5896. +#endif /* KRB4 */
  5897.  
  5898.    /* Set variable for forwarded authentication connection, if we have one. */
  5899.    if (auth_get_socket_name() != NULL)
  5900.