diff -r -u -N ssh-1.2.27/Makefile.in ssh-1.2.27-pl1/Makefile.in --- ssh-1.2.27/Makefile.in Wed May 12 13:19:31 1999 +++ ssh-1.2.27-pl1/Makefile.in Fri Jul 30 11:18:27 1999 @@ -264,7 +264,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DEFS = @DEFS@ $(COMMERCIAL) -LIBS = @LIBS@ +LIBS = @LIBS@ @HESIOD_LIBS@ LIBOBJS = @LIBOBJS@ CONFOBJS = @CONFOBJS@ SSHCONFOBJS = @SSHCONFOBJS@ @@ -285,6 +285,9 @@ KERBEROS_LIBS = @KERBEROS_LIBS@ KERBEROS_OBJS = @KERBEROS_OBJS@ +HESIOD_ROOT = @HESIOD_ROOT@ +HESIOD_INCS = @HESIOD_INCS@ + RSAREFDEP = @RSAREFDEP@ WRAPLIBS = @WRAPLIBS@ @@ -322,7 +325,7 @@ rsa.o randoms.o md5.o buffer.o emulate.o packet.o compress.o \ xmalloc.o ttymodes.o newchannels.o bufaux.o authfd.o authfile.o \ crc32.o rsaglue.o cipher.o des.o match.o arcfour.o mpaux.o \ - userfile.o signals.o blowfish.o deattack.o + userfile.o signals.o blowfish.o deattack.o radix.o SSHD_OBJS = sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o \ log-server.o login.o hostfile.o canohost.o servconf.o tildexpand.o \ serverloop.o $(COMMON_OBJS) $(KERBEROS_OBJS) $(SSHDCONFOBJS) @@ -411,7 +414,7 @@ $(CC) -o rfc-pg rfc-pg.o .c.o: - $(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) $< + $(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) $< sshd: $(SSHD_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP) -rm -f sshd diff -r -u -N ssh-1.2.27/README.AFS-KERBEROS ssh-1.2.27-pl1/README.AFS-KERBEROS --- ssh-1.2.27/README.AFS-KERBEROS Thu Jan 1 01:00:00 1970 +++ ssh-1.2.27-pl1/README.AFS-KERBEROS Fri Jul 30 12:01:54 1999 @@ -0,0 +1,44 @@ + +ssh-1.2.27-afs-kerberos.patch-1 +AFS, Kerberos v4 support for SSH + +Here are the extra flags to configure, and what they do: + +--with-krb4[=PATH] Compile in Kerberos v4 support: + Kerberos v4 authentication + Kerberos v4 password authentication + Kerberos v4 ~/.klogin authorization + +These are all enabled by the 'KerberosAuthentication' config option. +Kerberos v4 and Kerberos v5 support are mutually exclusive for now. +PATH default is /usr/kerberos. + +--with-hesiod[=PATH] Compile in support for Hesiod: + getpwnam(), getpwuid() replacements + +--with-afs Compile in AFS support (requires KTH krb4): + ticket/token passing + process authentication groups + local Xauthority files (for AFS home dirs) + /ticket TKT_ROOT directory (if it exists) + +Binaries built with AFS support will work just fine on non-AFS machines! +You will need to use the KTH krb4 libs (ftp://ftp.pdc.kth.se/pub/krb/src), +or just their libkafs, also available separately from CMU as libkrbafs +(http://andrew2.andrew.cmu.edu/dist/krbafs.html). + +Additional Kerberos client and server config options (and their defaults): + + KerberosAuthentication yes + KerberosOrLocalPasswd no + KerberosTgtPassing yes + AFSTokenPassing yes + KerberosTicketCleanup yes + +See sshd(8) and ssh(1) for details. + +The latest version of this patch can be found at + + http://www.monkey.org/~dugsong/ssh-afs-kerberos.html + +dugsong@monkey.org diff -r -u -N ssh-1.2.27/acconfig.h ssh-1.2.27-pl1/acconfig.h --- ssh-1.2.27/acconfig.h Wed May 12 13:19:23 1999 +++ ssh-1.2.27-pl1/acconfig.h Fri Jul 30 11:18:27 1999 @@ -247,16 +247,23 @@ /* Define this if your gettimeofday doesn't have TZ parameter */ #undef HAVE_NO_TZ_IN_GETTIMEOFDAY -/* Define this if you want to compile in Kerberos support. */ -#undef KERBEROS - /* Define this if you want to compile in Kerberos V5 support. - KERBEROS must be compiled in as well. This can be done at configure - time with the --with-kerberos5 argument*/ + This can be done at configure time with the --with-krb5 argument. */ #undef KRB5 -/* Define this if you want to pass the Kerberos TGT. */ -#undef KERBEROS_TGT_PASSING +/* Define this if you want to compile in Kerberos V4 support. + This can be done at configure time with the --with-krb4 argument. */ +#undef KRB4 + +/* Define this if you what to build ssh with Hesiod support. */ +#undef HESIOD + +/* Define this if you want to compile in AFS support. + This can be done at configure time with the --with-afs argument. */ +#undef AFS + +/* Define this if you have the AFS lifetime conversion routines. */ +#undef HAVE_KRB_LIFE_TO_TIME /* Define this if you dont have SIGINFO as signal but some other macro */ #undef HAVE_INCOMPATIBLE_SIGINFO diff -r -u -N ssh-1.2.27/auth-kerberos.c ssh-1.2.27-pl1/auth-kerberos.c --- ssh-1.2.27/auth-kerberos.c Wed May 12 13:19:23 1999 +++ ssh-1.2.27-pl1/auth-kerberos.c Fri Jul 30 12:36:06 1999 @@ -38,14 +38,13 @@ #include "xmalloc.h" #include "ssh.h" -#ifdef KERBEROS -#if defined (KRB5) +#ifdef KRB5 #include extern krb5_context ssh_context; extern krb5_auth_context auth_context; -int auth_kerberos(char *server_user, krb5_data *auth, krb5_principal *client) +int auth_krb5(char *server_user, krb5_data *auth, krb5_principal *client) { krb5_error_code problem; krb5_ticket *ticket; @@ -163,11 +162,115 @@ return 1; } #endif /* KRB5 */ -#endif /* KERBEROS */ -#ifdef KERBEROS_TGT_PASSING -#if defined (KRB5) -int auth_kerberos_tgt( char *server_user, krb5_data *krb5data) +#ifdef KRB4 +#include +#include + +int ssh_tf_init(uid_t uid) +{ + extern char *ticket; + char *tkt_root = TKT_ROOT; + struct stat st; + int fd; + + /* Set unique ticket string manually since we're still root. */ + ticket = xmalloc(MAXPATHLEN); +#ifdef AFS + if (lstat("/ticket", &st) != -1) + tkt_root = "/ticket/"; +#endif /* AFS */ + snprintf(ticket, MAXPATHLEN, "%s%d_%d", tkt_root, uid, getpid()); + (void) krb_set_tkt_string(ticket); + + /* Make sure we own this ticket file, and we created it. */ + if (lstat(ticket, &st) < 0 && errno == ENOENT) { + /* good, no ticket file exists. create it. */ + if ((fd = open(ticket, O_RDWR|O_CREAT|O_EXCL, 0600)) != -1) { + close(fd); + return 1; + } + } + else { + /* file exists. make sure server_user owns it (e.g. just passed ticket), + and that it isn't a symlink, and that it is mode 600. */ + if (st.st_mode == (S_IFREG|S_IRUSR|S_IWUSR) && st.st_uid == uid) + return 1; + } + /* Failure. */ + log_msg("WARNING: bad ticket file %s", ticket); + return 0; +} + +int auth_krb4(const char *server_user, KTEXT auth, char **client) +{ + AUTH_DAT adat = { 0 }; + KTEXT_ST reply; + char instance[INST_SZ]; + int r, s; + u_long cksum; + Key_schedule schedule; + struct sockaddr_in local, foreign; + + s = packet_get_connection_in(); + + r = sizeof(local); + memset(&local, 0, sizeof(local)); + if (getsockname(s, (struct sockaddr *) &local, &r) < 0) + debug("getsockname failed: %.100s", strerror(errno)); + r = sizeof(foreign); + memset(&foreign, 0, sizeof(foreign)); + if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0) + debug("getpeername failed: %.100s", strerror(errno)); + + instance[0] = '*'; instance[1] = 0; + + /* Get the encrypted request, challenge, and session key. */ + if (r = krb_rd_req(auth, KRB4_SERVICE_NAME, instance, 0, &adat, "")) { + packet_send_debug("Kerberos V4 krb_rd_req: %s", krb_err_txt[r]); + return 0; + } + des_key_sched((des_cblock *)adat.session, schedule); + + *client = xmalloc(MAX_K_NAME_SZ); + (void) snprintf(*client, MAX_K_NAME_SZ, "%s%s%s@%s", adat.pname, + *adat.pinst ? "." : "", adat.pinst, adat.prealm); + + /* Check ~/.klogin authorization now. */ + if (kuserok(&adat, (char *)server_user) != KSUCCESS) { + packet_send_debug("Kerberos V4 .klogin authorization failed!"); + log_msg("Kerberos V4 .klogin authorization failed for %s to account %s", + *client, server_user); + return 0; + } + /* Increment the checksum, and return it encrypted with the session key. */ + cksum = adat.checksum + 1; + cksum = htonl(cksum); + + /* If we can't successfully encrypt the checksum, we send back an empty + message, admitting our failure. */ + if ((r = krb_mk_priv((u_char *)&cksum, reply.dat, sizeof(cksum)+1, + schedule, &adat.session, &local, &foreign)) < 0) { + packet_send_debug("Kerberos V4 mk_priv: (%d) %s", r, krb_err_txt[r]); + reply.dat[0] = 0; + reply.length = 0; + } + else + reply.length = r; + + /* Clear session key. */ + memset(&adat.session, 0, sizeof(&adat.session)); + + packet_start(SSH_SMSG_AUTH_KERBEROS_RESPONSE); + packet_put_string((char *) reply.dat, reply.length); + packet_send(); + packet_write_wait(); + return 1; +} +#endif /* KRB4 */ + +#ifdef KRB5 +int auth_krb5_tgt( char *server_user, krb5_data *krb5data) { krb5_creds **creds; krb5_error_code retval; @@ -267,5 +370,97 @@ } #endif /* KRB5 */ -#endif /* KERBEROS_TGT_PASSING */ + +#ifdef AFS +#include + +int auth_kerberos_tgt(struct passwd *pw, const char *string) +{ + CREDENTIALS creds; + extern char *ticket; + int r; + + if (!radix_to_creds(string, &creds)) { + log_msg("Protocol error decoding Kerberos V4 tgt"); + packet_send_debug("Protocol error decoding Kerberos V4 tgt"); + goto auth_kerberos_tgt_failure; + } + if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */ + strcpy(creds.service, "krbtgt"); + + if (strcmp(creds.service, "krbtgt")) { + log_msg("Kerberos V4 tgt (%s%s%s@%s) rejected for uid %d", + creds.pname, creds.pinst[0] ? "." : "", creds.pinst, creds.realm, + pw->pw_uid); + packet_send_debug("Kerberos V4 tgt (%s%s%s@%s) rejected for uid %d", + creds.pname, creds.pinst[0] ? "." : "", creds.pinst, + creds.realm, pw->pw_uid); + goto auth_kerberos_tgt_failure; + } + if (!ssh_tf_init(pw->pw_uid) || + (r = in_tkt(creds.pname, creds.pinst)) || + (r = save_credentials(creds.service,creds.instance,creds.realm, + creds.session,creds.lifetime,creds.kvno, + &creds.ticket_st,creds.issue_date))) { + xfree(ticket); + ticket = NULL; + packet_send_debug("Kerberos V4 tgt refused: couldn't save credentials"); + goto auth_kerberos_tgt_failure; + } + /* Successful authentication, passed all checks. */ + chown(ticket, pw->pw_uid, pw->pw_gid); + packet_send_debug("Kerberos V4 tgt accepted (%s.%s@%s, %s%s%s@%s)", + creds.service,creds.instance,creds.realm, + creds.pname,creds.pinst[0] ? "." : "", + creds.pinst,creds.realm); + + packet_start(SSH_SMSG_SUCCESS); + packet_send(); + packet_write_wait(); + return 1; + +auth_kerberos_tgt_failure: + memset(&creds, 0, sizeof(creds)); + packet_start(SSH_SMSG_FAILURE); + packet_send(); + packet_write_wait(); + return 0; +} + +int auth_afs_token(char *server_user, uid_t uid, const char *string) +{ + CREDENTIALS creds; + + if (!radix_to_creds(string, &creds)) { + log_msg("Protocol error decoding AFS token"); + packet_send_debug("Protocol error decoding AFS token"); + packet_start(SSH_SMSG_FAILURE); + packet_send(); + packet_write_wait(); + return 0; + } + if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */ + strcpy(creds.service, "afs"); + + if (strncmp(creds.pname, "AFS ID ", 7) == 0) + uid = atoi(creds.pname + 7); + + if (kafs_settoken(creds.realm, uid, &creds)) { + log_msg("AFS token (%s@%s) rejected for uid %d", creds.pname, + creds.realm, uid); + packet_send_debug("AFS token (%s@%s) rejected for uid %d", creds.pname, + creds.realm, uid); + packet_start(SSH_SMSG_FAILURE); + packet_send(); + packet_write_wait(); + return 0; + } + packet_send_debug("AFS token accepted (%s@%s, %s@%s)", creds.service, + creds.realm, creds.pname, creds.realm); + packet_start(SSH_SMSG_SUCCESS); + packet_send(); + packet_write_wait(); + return 1; +} +#endif /* AFS */ diff -r -u -N ssh-1.2.27/auth-passwd.c ssh-1.2.27-pl1/auth-passwd.c --- ssh-1.2.27/auth-passwd.c Wed May 12 13:19:23 1999 +++ ssh-1.2.27-pl1/auth-passwd.c Fri Jul 30 11:28:29 1999 @@ -301,29 +301,25 @@ static int securid_initialized = 0; #endif /* HAVE_SECURID */ -#ifdef KERBEROS -#if defined(KRB5) +#ifdef KRB5 #include extern krb5_context ssh_context; extern krb5_auth_context auth_context; -#else -#include #endif /* KRB5 */ -#endif /* KERBEROS */ -#ifdef AFS -#include -#include -#endif /* AFS */ +#ifdef KRB4 +#include +#include +#endif /* KRB4 */ -#if defined(KERBEROS) || defined(AFS_KERBEROS) +#if defined(KRB4) || defined(KRB5) extern char *ticket; -#endif /* KERBEROS || AFS_KERBEROS */ +#endif /* KRB4 || KRB5 */ /* Tries to authenticate the user using password. Returns true if authentication succeeds. */ -#if defined(KERBEROS) && defined(KRB5) +#ifdef KRB5 /* * This routine with some modification is from the MIT V5B6 appl/bsd/login.c * @@ -479,16 +475,16 @@ 0 }; #endif krb5_preauthtype * preauth = preauth_list; -#endif /* KERBEROS */ +#endif /* KRB5 */ /* Tries to authenticate the user using password. Returns true if authentication succeeds. */ -#ifdef KERBEROS +#ifdef KRB5 int auth_password(const char *server_user, const char *password, krb5_principal client) -#else /* KERBEROS */ +#else /* KRB5 */ int auth_password(const char *server_user, const char *password) -#endif /* KERBEROS */ +#endif /* KRB5 */ { #if defined(_AIX) && defined(HAVE_AUTHENTICATE) char *message; @@ -505,7 +501,7 @@ } #else /* _AIX41 && HAVE_AUTHENTICATE */ -#ifdef KERBEROS +#ifdef KRB5 krb5_error_code problem; int krb5_options = KDC_OPT_RENEWABLE | KDC_OPT_FORWARDABLE; krb5_deltat rlife = 0; @@ -515,7 +511,7 @@ krb5_ccache ccache; char ccname[80]; int results; -#endif /* KERBEROS */ +#endif /* KRB5 */ extern ServerOptions options; extern char *crypt(const char *key, const char *salt); struct passwd *pw; @@ -537,10 +533,9 @@ saved_pw_name = xstrdup(pw->pw_name); saved_pw_passwd = xstrdup(pw->pw_passwd); -#if defined(KERBEROS) +#if defined(KRB5) if (options.kerberos_authentication) { -#if defined(KRB5) snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_l%d", getpid()); if (problem = krb5_cc_resolve(ssh_context, ccname, &ccache)) @@ -658,9 +653,96 @@ return 0; } } + } #endif /* KRB5 */ +#ifdef KRB4 + if (options.kerberos_authentication) + { + AUTH_DAT adata; + KTEXT_ST tkt; + struct hostent *hp; + unsigned long faddr; + char localhost[MAXHOSTNAMELEN]; /* local host name */ + char phost[INST_SZ]; /* host instance */ + char realm[REALM_SZ]; /* local Kerberos realm */ + int r; + + /* Try Kerberos password authentication only for non-root + users and only if Kerberos is installed. */ + if (pw->pw_uid != 0 && krb_get_lrealm(realm, 0) == KSUCCESS) { + + /* Set up our ticket file. */ + if (!ssh_tf_init(pw->pw_uid)) { + log_msg("Couldn't initialize Kerberos ticket file for %s!", + server_user); + goto kerberos_auth_failure; + } + /* Try to get TGT using our password. */ + if ((r = krb_get_pw_in_tkt((char *)server_user, "", realm, "krbtgt", + realm, DEFAULT_TKT_LIFE, (char *)password)) != INTK_OK) { + packet_send_debug("Kerberos V4 password authentication for %s " + "failed: %s", server_user, krb_err_txt[r]); + goto kerberos_auth_failure; + } + /* Successful authentication. */ + chown(ticket, pw->pw_uid, pw->pw_gid); + + (void) gethostname(localhost, sizeof(localhost)); + (void) strncpy(phost, (char *)krb_get_phost(localhost), INST_SZ); + phost[INST_SZ-1] = 0; + + /* Now that we have a TGT, try to get a local "rcmd" ticket to + ensure that we are not talking to a bogus Kerberos server. */ + r = krb_mk_req(&tkt, KRB4_SERVICE_NAME, phost, realm, 33); + + if (r == KSUCCESS) { + if (!(hp = gethostbyname(localhost))) { + log_msg("Couldn't get local host address!"); + goto kerberos_auth_failure; + } + memmove((void *)&faddr, (void *)hp->h_addr, sizeof(faddr)); + + /* Verify our "rcmd" ticket. */ + r = krb_rd_req(&tkt, KRB4_SERVICE_NAME, phost, faddr, &adata, ""); + if (r == RD_AP_UNDEC) { + /* Probably didn't have a srvtab on localhost. Allow login. */ + log_msg("Kerberos V4 TGT for %s unverifiable, no srvtab? " + "krb_rd_req: %s", server_user, krb_err_txt[r]); + } + else if (r != KSUCCESS) { + log_msg("Kerberos V4 %s ticket unverifiable: %s", + KRB4_SERVICE_NAME, krb_err_txt[r]); + goto kerberos_auth_failure; + } + } + else if (r == KDC_PR_UNKNOWN) { + /* Allow login if no rcmd service exists, but log the error. */ + log_msg("Kerberos V4 TGT for %s unverifiable: %s; %s.%s " + "not registered, or srvtab is wrong?", server_user, + krb_err_txt[r], KRB4_SERVICE_NAME, phost); + } + else { + /* TGT is bad, forget it. Possibly spoofed. */ + packet_send_debug("WARNING: Kerberos V4 TGT possibly spoofed for" + "%s: %s", server_user, krb_err_txt[r]); + goto kerberos_auth_failure; + } + + /* Authentication succeeded. */ + return 1; + + kerberos_auth_failure: + (void) dest_tkt(); + xfree(ticket); + ticket = NULL; + if (!options.kerberos_or_local_passwd ) return 0; + } + else /* Logging in as root or no local Kerberos realm. */ + packet_send_debug("Unable to authenticate to Kerberos."); + + /* Fall back to ordinary passwd authentication. */ } -#endif /* KERBEROS */ +#endif /* KRB4 */ #ifdef HAVE_SECURID /* Support for Security Dynamics SecurId card. diff -r -u -N ssh-1.2.27/cipher.c ssh-1.2.27-pl1/cipher.c --- ssh-1.2.27/cipher.c Wed May 12 13:19:24 1999 +++ ssh-1.2.27-pl1/cipher.c Fri Jul 30 11:18:27 1999 @@ -213,7 +213,7 @@ used. */ if (keylen < 8) error("Key length %d is insufficient for DES.", keylen); - des_set_key(padded, &context->u.des.key); + ssh_des_set_key(padded, &context->u.des.key); memset(context->u.des.iv, 0, sizeof(context->u.des.iv)); break; #endif /* WITH_DES */ @@ -224,12 +224,12 @@ used (first and last keys are the same). */ if (keylen < 16) error("Key length %d is insufficient for 3DES.", keylen); - des_set_key(padded, &context->u.des3.key1); - des_set_key(padded + 8, &context->u.des3.key2); + ssh_des_set_key(padded, &context->u.des3.key1); + ssh_des_set_key(padded + 8, &context->u.des3.key2); if (keylen <= 16) - des_set_key(padded, &context->u.des3.key3); + ssh_des_set_key(padded, &context->u.des3.key3); else - des_set_key(padded + 16, &context->u.des3.key3); + ssh_des_set_key(padded + 16, &context->u.des3.key3); memset(context->u.des3.iv1, 0, sizeof(context->u.des3.iv1)); memset(context->u.des3.iv2, 0, sizeof(context->u.des3.iv2)); memset(context->u.des3.iv3, 0, sizeof(context->u.des3.iv3)); @@ -274,12 +274,12 @@ #ifdef WITH_DES case SSH_CIPHER_DES: - des_cbc_encrypt(&context->u.des.key, context->u.des.iv, dest, src, len); + ssh_des_cbc_encrypt(&context->u.des.key, context->u.des.iv, dest, src, len); break; #endif /* WITH_DES */ case SSH_CIPHER_3DES: - des_3cbc_encrypt(&context->u.des3.key1, context->u.des3.iv1, + ssh_des_3cbc_encrypt(&context->u.des3.key1, context->u.des3.iv1, &context->u.des3.key2, context->u.des3.iv2, &context->u.des3.key3, context->u.des3.iv3, dest, src, len); @@ -322,12 +322,12 @@ #ifdef WITH_DES case SSH_CIPHER_DES: - des_cbc_decrypt(&context->u.des.key, context->u.des.iv, dest, src, len); + ssh_des_cbc_decrypt(&context->u.des.key, context->u.des.iv, dest, src, len); break; #endif /* WITH_DES */ case SSH_CIPHER_3DES: - des_3cbc_decrypt(&context->u.des3.key1, context->u.des3.iv1, + ssh_des_3cbc_decrypt(&context->u.des3.key1, context->u.des3.iv1, &context->u.des3.key2, context->u.des3.iv2, &context->u.des3.key3, context->u.des3.iv3, dest, src, len); diff -r -u -N ssh-1.2.27/cipher.h ssh-1.2.27-pl1/cipher.h --- ssh-1.2.27/cipher.h Wed May 12 13:19:25 1999 +++ ssh-1.2.27-pl1/cipher.h Fri Jul 30 11:18:27 1999 @@ -58,7 +58,7 @@ #ifndef WITHOUT_IDEA #include "idea.h" #endif /* WITHOUT_IDEA */ -#include "des.h" +#include "ssh-des.h" #ifdef WITH_ARCFOUR #include "arcfour.h" #endif /* WITH_ARCFOUR */ diff -r -u -N ssh-1.2.27/config.h.in ssh-1.2.27-pl1/config.h.in --- ssh-1.2.27/config.h.in Wed May 12 13:20:04 1999 +++ ssh-1.2.27-pl1/config.h.in Fri Jul 30 11:18:27 1999 @@ -244,12 +244,6 @@ /* Support for Secure RPC */ #undef SECURE_RPC -/* Support for Secure NFS */ -#undef SECURE_NFS - -/* Support for NIS+ */ -#undef NIS_PLUS - /* Define this to disable all port forwardings in server (except X11) */ #undef SSHD_NO_PORT_FORWARDING @@ -296,16 +290,23 @@ /* Define this if your gettimeofday doesn't have TZ parameter */ #undef HAVE_NO_TZ_IN_GETTIMEOFDAY -/* Define this if you want to compile in Kerberos support. */ -#undef KERBEROS - /* Define this if you want to compile in Kerberos V5 support. - KERBEROS must be compiled in as well. This can be done at configure - time with the --with-kerberos5 argument*/ + This can be done at configure time with the --with-krb5 argument. */ #undef KRB5 -/* Define this if you want to pass the Kerberos TGT. */ -#undef KERBEROS_TGT_PASSING +/* Define this if you want to compile in Kerberos V4 support. + This can be done at configure time with the --with-krb4 argument. */ +#undef KRB4 + +/* Define this if you what to build ssh with Hesiod support. */ +#undef HESIOD + +/* Define this if you want to compile in AFS support. + This can be done at configure time with the --with-afs argument. */ +#undef AFS + +/* Define this if you have the AFS lifetime conversion routines. */ +#undef HAVE_KRB_LIFE_TO_TIME /* Define this if you dont have SIGINFO as signal but some other macro */ #undef HAVE_INCOMPATIBLE_SIGINFO @@ -518,6 +519,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILIO_H /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H diff -r -u -N ssh-1.2.27/configure ssh-1.2.27-pl1/configure --- ssh-1.2.27/configure Wed May 12 13:20:06 1999 +++ ssh-1.2.27-pl1/configure Sat Jul 31 17:10:19 1999 @@ -49,9 +49,13 @@ ac_help="$ac_help --with-tis[=DIR] Enable support for TIS authentication server." ac_help="$ac_help - --with-kerberos5=[KRB_PREFIX] Compile in Kerberos5 support." + --with-krb4[=PATH] Compile in Kerberos v4 support." ac_help="$ac_help - --enable-kerberos-tgt-passing Pass Kerberos ticket-granting-ticket." + --with-krb5[=PATH] Compile in Kerberos v5 support." +ac_help="$ac_help + --with-afs Compile in AFS support (requires KTH krb4)." +ac_help="$ac_help + --with-hesiod[=PATH] Compile in Hesiod support." ac_help="$ac_help --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support." ac_help="$ac_help @@ -602,6 +606,11 @@ +# SSH DES and AFS/Kerberos DES conflict. Yes, this is bogus. +if test -f $srcdir/des.h; then + mv -f $srcdir/des.h $srcdir/ssh-des.h +fi + # So many systems seem to need this that it is better do it here automatically. LIBS="-L/usr/local/lib $LIBS" @@ -631,7 +640,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:635: checking host system type" >&5 +echo "configure:644: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -652,7 +661,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking cached information""... $ac_c" 1>&6 -echo "configure:656: checking cached information" >&5 +echo "configure:665: checking cached information" >&5 hostcheck="$host" if eval "test \"`echo '$''{'ac_cv_hostcheck'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -671,7 +680,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:675: checking for $ac_word" >&5 +echo "configure:684: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -700,7 +709,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:704: checking for $ac_word" >&5 +echo "configure:713: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -748,7 +757,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -758,11 +767,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -782,12 +791,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:791: checking whether we are using GNU C" >&5 +echo "configure:800: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -796,7 +805,7 @@ yes; #endif EOF -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 +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 ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -811,7 +820,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:815: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:824: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -839,7 +848,7 @@ fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:843: checking for POSIXized ISC" >&5 +echo "configure:852: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -876,20 +885,12 @@ ;; *-*-solaris*) # solaris stuff. appro@fy.chalmers.se - cat >> confdefs.h <<\EOF -#define SECURE_RPC 1 -EOF - - cat >> confdefs.h <<\EOF -#define SECURE_NFS 1 -EOF - +# this stuff breaks AFS/Kerberos. YUCK. +# AC_DEFINE(SECURE_RPC) +# AC_DEFINE(SECURE_NFS) # NIS+ is forced so that we don't have to recompile # if we move to NIS+. appro@fy.chalmers.se - cat >> confdefs.h <<\EOF -#define NIS_PLUS 1 -EOF - +# AC_DEFINE(NIS_PLUS) ;; *-*-sunos*) os_sunos=yes @@ -931,14 +932,14 @@ no_shadows_password_checking=yes # We want support for eivind@ii.uib.no cat > conftest.$ac_ext < int main() { int foo = MAXPROJNAMELEN; ; return 0; } EOF -if { (eval echo configure:942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SGI_PROJ_H 1 @@ -953,7 +954,7 @@ *-ibm-aix3.2|*-ibm-aix3.2.0|*-ibm-aix3.2.1|*-ibm-aix3.2.2|*-ibm-aix3.2.3|*-ibm-aix3.2.4) os_aix=yes echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6 -echo "configure:957: checking for getuserattr in -ls" >&5 +echo "configure:958: checking for getuserattr in -ls" >&5 ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -961,7 +962,7 @@ ac_save_LIBS="$LIBS" LIBS="-ls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1004,7 +1005,7 @@ no_utmpx=yes os_aix=yes echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6 -echo "configure:1008: checking for getuserattr in -ls" >&5 +echo "configure:1009: checking for getuserattr in -ls" >&5 ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1012,7 +1013,7 @@ ac_save_LIBS="$LIBS" LIBS="-ls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1054,7 +1055,7 @@ *-ibm-aix*) os_aix=yes echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6 -echo "configure:1058: checking for getuserattr in -ls" >&5 +echo "configure:1059: checking for getuserattr in -ls" >&5 ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1062,7 +1063,7 @@ ac_save_LIBS="$LIBS" LIBS="-ls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1123,7 +1124,7 @@ # Ultrix shadow passwords implemented in auth-passwd.c. no_shadows_password_checking=yes echo $ac_n "checking for authenticate_user in -lauth""... $ac_c" 1>&6 -echo "configure:1127: checking for authenticate_user in -lauth" >&5 +echo "configure:1128: checking for authenticate_user in -lauth" >&5 ac_lib_var=`echo auth'_'authenticate_user | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1131,7 +1132,7 @@ ac_save_LIBS="$LIBS" LIBS="-lauth $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1170,14 +1171,14 @@ fi cat > conftest.$ac_ext < int main() { int foo = LOG_DAEMON; ; return 0; } EOF -if { (eval echo configure:1181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -1215,7 +1216,7 @@ CFLAGS="$CFLAGS -Ae -D_HPUX_SOURCE" fi echo $ac_n "checking for HPUX tcb auth option""... $ac_c" 1>&6 -echo "configure:1219: checking for HPUX tcb auth option" >&5 +echo "configure:1220: checking for HPUX tcb auth option" >&5 if test -f /tcb/files/auth/system/pw_id_map; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1227,7 +1228,7 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for keyserv""... $ac_c" 1>&6 -echo "configure:1231: checking for keyserv" >&5 +echo "configure:1232: checking for keyserv" >&5 if test -f /usr/sbin/keyserv; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1256,7 +1257,7 @@ # The man page says that we need -lsecurity -ldb -laud -lm to quickstart # programs using enchanced security. echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:1260: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:1261: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1264,7 +1265,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1303,7 +1304,7 @@ fi echo $ac_n "checking for audgen in -laud""... $ac_c" 1>&6 -echo "configure:1307: checking for audgen in -laud" >&5 +echo "configure:1308: checking for audgen in -laud" >&5 ac_lib_var=`echo aud'_'audgen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1311,7 +1312,7 @@ ac_save_LIBS="$LIBS" LIBS="-laud $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1350,7 +1351,7 @@ fi echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1354: checking for dbopen in -ldb" >&5 +echo "configure:1355: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1358,7 +1359,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1397,7 +1398,7 @@ fi echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:1401: checking for sin in -lm" >&5 +echo "configure:1402: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1405,7 +1406,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1446,12 +1447,12 @@ for ac_func in setluid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1450: checking for $ac_func" >&5 +echo "configure:1451: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1507,7 +1508,7 @@ OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I." cat > conftest.$ac_ext < #include @@ -1516,7 +1517,7 @@ ; return 0; } EOF -if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -1545,12 +1546,12 @@ *-*-linux*|*-*-mklinux*) CFLAGS="-D_GNU_SOURCE $CFLAGS" echo $ac_n "checking for getspnam""... $ac_c" 1>&6 -echo "configure:1549: checking for getspnam" >&5 +echo "configure:1550: checking for getspnam" >&5 if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getspnam=yes" else @@ -1594,7 +1595,7 @@ if test $ac_cv_func_getspnam = no; then echo $ac_n "checking for getspnam in -lshadow""... $ac_c" 1>&6 -echo "configure:1598: checking for getspnam in -lshadow" >&5 +echo "configure:1599: checking for getspnam in -lshadow" >&5 ac_lib_var=`echo shadow'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1602,7 +1603,7 @@ ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1651,12 +1652,12 @@ for ac_func in pw_encrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1655: checking for $ac_func" >&5 +echo "configure:1656: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1705,7 +1706,7 @@ if test $ac_cv_func_pw_encrypt = no; then echo $ac_n "checking for pw_encrypt in -lshadow""... $ac_c" 1>&6 -echo "configure:1709: checking for pw_encrypt in -lshadow" >&5 +echo "configure:1710: checking for pw_encrypt in -lshadow" >&5 ac_lib_var=`echo shadow'_'pw_encrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1713,7 +1714,7 @@ ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1748,7 +1749,7 @@ fi echo $ac_n "checking whether to enable pw_encrypt""... $ac_c" 1>&6 -echo "configure:1752: checking whether to enable pw_encrypt" >&5 +echo "configure:1753: checking whether to enable pw_encrypt" >&5 # Check whether --enable-deprecated-linux-pw-encrypt or --disable-deprecated-linux-pw-encrypt was given. if test "${enable_deprecated_linux_pw_encrypt+set}" = set; then enableval="$enable_deprecated_linux_pw_encrypt" @@ -1825,7 +1826,7 @@ EOF echo $ac_n "checking for openlog in -lgen""... $ac_c" 1>&6 -echo "configure:1829: checking for openlog in -lgen" >&5 +echo "configure:1830: checking for openlog in -lgen" >&5 ac_lib_var=`echo gen'_'openlog | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1833,7 +1834,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1874,7 +1875,7 @@ ;; *-*-sysv4*) echo $ac_n "checking for openlog in -lgen""... $ac_c" 1>&6 -echo "configure:1878: checking for openlog in -lgen" >&5 +echo "configure:1879: checking for openlog in -lgen" >&5 ac_lib_var=`echo gen'_'openlog | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1882,7 +1883,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1997,16 +1998,16 @@ echo $ac_n "checking that the compiler works""... $ac_c" 1>&6 -echo "configure:2001: checking that the compiler works" >&5 +echo "configure:2002: checking that the compiler works" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -2023,18 +2024,18 @@ if test -z "$no_pipe"; then if test -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:2027: checking if the compiler understands -pipe" >&5 +echo "configure:2028: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2049,7 +2050,7 @@ fi echo $ac_n "checking whether to enable -Wall""... $ac_c" 1>&6 -echo "configure:2053: checking whether to enable -Wall" >&5 +echo "configure:2054: checking whether to enable -Wall" >&5 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" @@ -2063,12 +2064,12 @@ echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2067: checking return type of signal handlers" >&5 +echo "configure:2068: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2085,7 +2086,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2104,7 +2105,7 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2108: checking how to run the C preprocessor" >&5 +echo "configure:2109: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2119,13 +2120,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -2136,13 +2137,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -2165,12 +2166,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2169: checking for ANSI C header files" >&5 +echo "configure:2170: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2178,7 +2179,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2195,7 +2196,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2213,7 +2214,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2234,7 +2235,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2245,7 +2246,7 @@ exit (0); } EOF -if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2269,12 +2270,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2273: checking for size_t" >&5 +echo "configure:2274: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2302,12 +2303,12 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2306: checking for uid_t in sys/types.h" >&5 +echo "configure:2307: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2336,12 +2337,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2340: checking for off_t" >&5 +echo "configure:2341: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2369,12 +2370,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2373: checking for mode_t" >&5 +echo "configure:2374: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2402,12 +2403,12 @@ fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2406: checking for st_blksize in struct stat" >&5 +echo "configure:2407: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2415,7 +2416,7 @@ struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2437,12 +2438,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2441: checking for working const" >&5 +echo "configure:2442: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2512,21 +2513,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2516: checking for inline" >&5 +echo "configure:2517: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2552,14 +2553,14 @@ esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2556: checking whether byte ordering is bigendian" >&5 +echo "configure:2557: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2570,11 +2571,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2585,7 +2586,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:2589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2605,7 +2606,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2642,7 +2643,7 @@ fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2646: checking size of long" >&5 +echo "configure:2647: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2650,7 +2651,7 @@ ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -2661,7 +2662,7 @@ exit(0); } EOF -if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2681,7 +2682,7 @@ echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2685: checking size of int" >&5 +echo "configure:2686: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2689,7 +2690,7 @@ ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -2700,7 +2701,7 @@ exit(0); } EOF -if { (eval echo configure:2704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2720,7 +2721,7 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2724: checking size of short" >&5 +echo "configure:2725: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2728,7 +2729,7 @@ ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -2739,7 +2740,7 @@ exit(0); } EOF -if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2764,17 +2765,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2768: checking for $ac_hdr" >&5 +echo "configure:2769: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2807,17 +2808,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2811: checking for $ac_hdr" >&5 +echo "configure:2812: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2844,9 +2845,9 @@ done echo $ac_n "checking whether utmpx have ut_syslen field""... $ac_c" 1>&6 -echo "configure:2848: checking whether utmpx have ut_syslen field" >&5 +echo "configure:2849: checking whether utmpx have ut_syslen field" >&5 cat > conftest.$ac_ext < EOF @@ -2867,12 +2868,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2871: checking for ANSI C header files" >&5 +echo "configure:2872: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2880,7 +2881,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2897,7 +2898,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2915,7 +2916,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2936,7 +2937,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2947,7 +2948,7 @@ exit (0); } EOF -if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2971,12 +2972,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2975: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2976: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2992,7 +2993,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3016,17 +3017,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3020: checking for $ac_hdr" >&5 +echo "configure:3021: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3052,21 +3053,21 @@ fi done -for ac_hdr in sgtty.h sys/select.h sys/ioctl.h machine/endian.h +for ac_hdr in sgtty.h sys/select.h sys/ioctl.h sys/filio.h machine/endian.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3060: checking for $ac_hdr" >&5 +echo "configure:3061: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3096,17 +3097,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3100: checking for $ac_hdr" >&5 +echo "configure:3101: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3136,17 +3137,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3140: checking for $ac_hdr" >&5 +echo "configure:3141: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3176,17 +3177,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3180: checking for $ac_hdr" >&5 +echo "configure:3181: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3213,12 +3214,12 @@ done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3217: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3218: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3227,7 +3228,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3252,12 +3253,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3256: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3257: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3265,7 +3266,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3290,7 +3291,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3294: checking for opendir in -ldir" >&5 +echo "configure:3295: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3298,7 +3299,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3331,7 +3332,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3335: checking for opendir in -lx" >&5 +echo "configure:3336: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3339,7 +3340,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3373,12 +3374,12 @@ fi echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:3377: checking whether stat file-mode macros are broken" >&5 +echo "configure:3378: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3429,19 +3430,19 @@ fi echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6 -echo "configure:3433: checking whether sys/types.h defines makedev" >&5 +echo "configure:3434: checking whether sys/types.h defines makedev" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return makedev(0, 0); ; return 0; } EOF -if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_sys_types_h_makedev=yes else @@ -3459,17 +3460,17 @@ if test $ac_cv_header_sys_types_h_makedev = no; then ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6 -echo "configure:3463: checking for sys/mkdev.h" >&5 +echo "configure:3464: checking for sys/mkdev.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3497,17 +3498,17 @@ if test $ac_cv_header_sys_mkdev_h = no; then ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6 -echo "configure:3501: checking for sys/sysmacros.h" >&5 +echo "configure:3502: checking for sys/sysmacros.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3535,9 +3536,9 @@ fi echo $ac_n "checking whether utmp have ut_pid field""... $ac_c" 1>&6 -echo "configure:3539: checking whether utmp have ut_pid field" >&5 +echo "configure:3540: checking whether utmp have ut_pid field" >&5 cat > conftest.$ac_ext < EOF @@ -3556,9 +3557,9 @@ rm -f conftest* echo $ac_n "checking whether utmp have ut_name field""... $ac_c" 1>&6 -echo "configure:3560: checking whether utmp have ut_name field" >&5 +echo "configure:3561: checking whether utmp have ut_name field" >&5 cat > conftest.$ac_ext < EOF @@ -3577,9 +3578,9 @@ rm -f conftest* echo $ac_n "checking whether utmp have ut_id field""... $ac_c" 1>&6 -echo "configure:3581: checking whether utmp have ut_id field" >&5 +echo "configure:3582: checking whether utmp have ut_id field" >&5 cat > conftest.$ac_ext < EOF @@ -3598,9 +3599,9 @@ rm -f conftest* echo $ac_n "checking whether utmp have ut_host field""... $ac_c" 1>&6 -echo "configure:3602: checking whether utmp have ut_host field" >&5 +echo "configure:3603: checking whether utmp have ut_host field" >&5 cat > conftest.$ac_ext < EOF @@ -3619,9 +3620,9 @@ rm -f conftest* echo $ac_n "checking whether utmp have ut_addr field""... $ac_c" 1>&6 -echo "configure:3623: checking whether utmp have ut_addr field" >&5 +echo "configure:3624: checking whether utmp have ut_addr field" >&5 cat > conftest.$ac_ext < EOF @@ -3640,9 +3641,9 @@ rm -f conftest* echo $ac_n "checking whether you have incompatible SIGINFO macro""... $ac_c" 1>&6 -echo "configure:3644: checking whether you have incompatible SIGINFO macro" >&5 +echo "configure:3645: checking whether you have incompatible SIGINFO macro" >&5 cat > conftest.$ac_ext < SIGINFO(p,1) @@ -3663,7 +3664,7 @@ echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6 -echo "configure:3667: checking for crypt in -lc" >&5 +echo "configure:3668: checking for crypt in -lc" >&5 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3671,7 +3672,7 @@ ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3701,7 +3702,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3705: checking for crypt in -lcrypt" >&5 +echo "configure:3706: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3709,7 +3710,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3750,7 +3751,7 @@ fi echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:3754: checking for getspnam in -lsec" >&5 +echo "configure:3755: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3758,7 +3759,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3797,7 +3798,7 @@ fi echo $ac_n "checking for get_process_stats in -lseq""... $ac_c" 1>&6 -echo "configure:3801: checking for get_process_stats in -lseq" >&5 +echo "configure:3802: checking for get_process_stats in -lseq" >&5 ac_lib_var=`echo seq'_'get_process_stats | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3805,7 +3806,7 @@ ac_save_LIBS="$LIBS" LIBS="-lseq $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3844,7 +3845,7 @@ fi echo $ac_n "checking for bcopy in -lbsd""... $ac_c" 1>&6 -echo "configure:3848: checking for bcopy in -lbsd" >&5 +echo "configure:3849: checking for bcopy in -lbsd" >&5 ac_lib_var=`echo bsd'_'bcopy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3852,7 +3853,7 @@ ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3892,7 +3893,7 @@ if test -z "$no_libnsl"; then echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3896: checking for main in -lnsl" >&5 +echo "configure:3897: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3900,14 +3901,14 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3937,7 +3938,7 @@ fi if test -n "$test_libinet"; then echo $ac_n "checking for inet_network in -linet""... $ac_c" 1>&6 -echo "configure:3941: checking for inet_network in -linet" >&5 +echo "configure:3942: checking for inet_network in -linet" >&5 ac_lib_var=`echo inet'_'inet_network | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3945,7 +3946,7 @@ ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3986,7 +3987,7 @@ fi if test -z "$no_libsocket"; then echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:3990: checking for socket in -lsocket" >&5 +echo "configure:3991: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3994,7 +3995,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4035,7 +4036,7 @@ fi if test -z "$no_libsun"; then echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 -echo "configure:4039: checking for getpwnam in -lsun" >&5 +echo "configure:4040: checking for getpwnam in -lsun" >&5 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4043,7 +4044,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4084,7 +4085,7 @@ fi if test -z "$no_libbsd"; then echo $ac_n "checking for openpty in -lbsd""... $ac_c" 1>&6 -echo "configure:4088: checking for openpty in -lbsd" >&5 +echo "configure:4089: checking for openpty in -lbsd" >&5 ac_lib_var=`echo bsd'_'openpty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4092,7 +4093,7 @@ ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4132,7 +4133,7 @@ fi echo $ac_n "checking for login in -lutil""... $ac_c" 1>&6 -echo "configure:4136: checking for login in -lutil" >&5 +echo "configure:4137: checking for login in -lutil" >&5 ac_lib_var=`echo util'_'login | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4140,7 +4141,7 @@ ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4180,12 +4181,12 @@ for ac_func in vhangup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4184: checking for $ac_func" >&5 +echo "configure:4185: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4238,12 +4239,12 @@ for ac_func in setsid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4242: checking for $ac_func" >&5 +echo "configure:4243: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4295,12 +4296,12 @@ for ac_func in gettimeofday times getrusage ftruncate revoke makeutx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4299: checking for $ac_func" >&5 +echo "configure:4300: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4350,12 +4351,12 @@ for ac_func in strchr memcpy setlogin openpty _getpty clock fchmod ulimit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4354: checking for $ac_func" >&5 +echo "configure:4355: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4405,12 +4406,12 @@ for ac_func in gethostname getdtablesize umask innetgr initgroups setpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4409: checking for $ac_func" >&5 +echo "configure:4410: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4460,12 +4461,12 @@ for ac_func in setpgid daemon waitpid ttyslot authenticate getpt isastream do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4464: checking for $ac_func" >&5 +echo "configure:4465: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4516,12 +4517,12 @@ for ac_func in strerror memmove remove random putenv crypt socketpair snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4520: checking for $ac_func" >&5 +echo "configure:4521: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4572,7 +4573,7 @@ echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:4576: checking whether ln -s works" >&5 +echo "configure:4577: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4603,7 +4604,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4607: checking for a BSD compatible install" >&5 +echo "configure:4608: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4655,7 +4656,7 @@ # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4659: checking for $ac_word" >&5 +echo "configure:4660: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4685,7 +4686,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4689: checking for $ac_word" >&5 +echo "configure:4690: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4719,7 +4720,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4723: checking for $ac_word" >&5 +echo "configure:4724: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4754,7 +4755,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4758: checking for X" >&5 +echo "configure:4759: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4816,12 +4817,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4890,14 +4891,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5003,17 +5004,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:5007: checking whether -R must be followed by a space" >&5 +echo "configure:5008: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -5029,14 +5030,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -5068,7 +5069,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5072: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5073: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5076,7 +5077,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5109,7 +5110,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:5113: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5114: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5117,7 +5118,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5157,12 +5158,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5161: checking for gethostbyname" >&5 +echo "configure:5162: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5206,7 +5207,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5210: checking for gethostbyname in -lnsl" >&5 +echo "configure:5211: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5214,7 +5215,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5255,12 +5256,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5259: checking for connect" >&5 +echo "configure:5260: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5304,7 +5305,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5308: checking for connect in -lsocket" >&5 +echo "configure:5309: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5312,7 +5313,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5347,12 +5348,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5351: checking for remove" >&5 +echo "configure:5352: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5396,7 +5397,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5400: checking for remove in -lposix" >&5 +echo "configure:5401: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5404,7 +5405,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5439,12 +5440,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5443: checking for shmat" >&5 +echo "configure:5444: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5488,7 +5489,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5492: checking for shmat in -lipc" >&5 +echo "configure:5493: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5496,7 +5497,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5540,7 +5541,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5544: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:5545: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5548,7 +5549,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5587,7 +5588,7 @@ # Extract the first word of "passwd", so it can be a program name with args. set dummy passwd; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5591: checking for $ac_word" >&5 +echo "configure:5592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PASSWD_PATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5625,7 +5626,7 @@ # Extract the first word of "xauth", so it can be a program name with args. set dummy xauth; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5629: checking for $ac_word" >&5 +echo "configure:5630: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XAUTH_PATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5669,7 +5670,7 @@ X_PROGRAMS="ssh-askpass" fi echo $ac_n "checking for X11 unix domain socket directory""... $ac_c" 1>&6 -echo "configure:5673: checking for X11 unix domain socket directory" >&5 +echo "configure:5674: checking for X11 unix domain socket directory" >&5 if test '!' -d /tmp/.X11-unix; then if test -d /var/X/.X11-unix; then @@ -5698,7 +5699,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5702: checking for $ac_word" >&5 +echo "configure:5703: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5739,12 +5740,12 @@ for ac_func in getpseudotty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5743: checking for $ac_func" >&5 +echo "configure:5744: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5792,7 +5793,7 @@ done echo $ac_n "checking for pseudo ttys""... $ac_c" 1>&6 -echo "configure:5796: checking for pseudo ttys" >&5 +echo "configure:5797: checking for pseudo ttys" >&5 if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes then cat >> confdefs.h <<\EOF @@ -5832,7 +5833,7 @@ fi echo $ac_n "checking for /etc/default/login""... $ac_c" 1>&6 -echo "configure:5836: checking for /etc/default/login" >&5 +echo "configure:5837: checking for /etc/default/login" >&5 if test -f /etc/default/login; then cat >> confdefs.h <<\EOF #define HAVE_ETC_DEFAULT_LOGIN 1 @@ -5845,7 +5846,7 @@ if test -z "$no_shadows_password_checking"; then echo $ac_n "checking for shadow passwords""... $ac_c" 1>&6 -echo "configure:5849: checking for shadow passwords" >&5 +echo "configure:5850: checking for shadow passwords" >&5 if test -f /etc/shadow; then # If we don't have shadow.h, this might be some nonstandard # kludging... So better check it out. @@ -5859,7 +5860,7 @@ # have getspent in a system library. However, a libshadow.a library # contaning these is publicly available. echo $ac_n "checking for getspent in -lshadow""... $ac_c" 1>&6 -echo "configure:5863: checking for getspent in -lshadow" >&5 +echo "configure:5864: checking for getspent in -lshadow" >&5 ac_lib_var=`echo shadow'_'getspent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5867,7 +5868,7 @@ ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5906,9 +5907,9 @@ fi echo $ac_n "checking whether spwd have sp_expire field""... $ac_c" 1>&6 -echo "configure:5910: checking whether spwd have sp_expire field" >&5 +echo "configure:5911: checking whether spwd have sp_expire field" >&5 cat > conftest.$ac_ext < EOF @@ -5927,9 +5928,9 @@ rm -f conftest* echo $ac_n "checking whether spwd have sp_inact field""... $ac_c" 1>&6 -echo "configure:5931: checking whether spwd have sp_inact field" >&5 +echo "configure:5932: checking whether spwd have sp_inact field" >&5 cat > conftest.$ac_ext < EOF @@ -5968,7 +5969,7 @@ fi echo $ac_n "checking location of mail spool files""... $ac_c" 1>&6 -echo "configure:5972: checking location of mail spool files" >&5 +echo "configure:5973: checking location of mail spool files" >&5 for dir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail FILE do if test "$dir" = "FILE"; then @@ -6007,7 +6008,7 @@ done echo $ac_n "checking location of utmp""... $ac_c" 1>&6 -echo "configure:6011: checking location of utmp" >&5 +echo "configure:6012: checking location of utmp" >&5 if test -f /var/run/utmp; then cat >> confdefs.h <<\EOF #define SSH_UTMP "/var/run/utmp" @@ -6043,7 +6044,7 @@ fi echo $ac_n "checking location of wtmp""... $ac_c" 1>&6 -echo "configure:6047: checking location of wtmp" >&5 +echo "configure:6048: checking location of wtmp" >&5 if test -f /var/log/wtmp; then cat >> confdefs.h <<\EOF #define SSH_WTMP "/var/log/wtmp" @@ -6077,7 +6078,7 @@ fi echo $ac_n "checking location of lastlog""... $ac_c" 1>&6 -echo "configure:6081: checking location of lastlog" >&5 +echo "configure:6082: checking location of lastlog" >&5 if test -f /var/log/lastlog || test -d /var/log/lastlog; then cat >> confdefs.h <<\EOF #define SSH_LASTLOG "/var/log/lastlog" @@ -6132,7 +6133,7 @@ fi echo $ac_n "checking whether $LASTLOG is a directory""... $ac_c" 1>&6 -echo "configure:6136: checking whether $LASTLOG is a directory" >&5 +echo "configure:6137: checking whether $LASTLOG is a directory" >&5 if test -d $LASTLOG then echo "$ac_t""yes" 1>&6 @@ -6145,7 +6146,7 @@ fi echo $ac_n "checking whether to include the IDEA encryption algorithm""... $ac_c" 1>&6 -echo "configure:6149: checking whether to include the IDEA encryption algorithm" >&5 +echo "configure:6150: checking whether to include the IDEA encryption algorithm" >&5 # Check whether --with-idea or --without-idea was given. if test "${with_idea+set}" = set; then withval="$with_idea" @@ -6179,7 +6180,7 @@ echo $ac_n "checking whether to include the Blowfish encryption algorithm""... $ac_c" 1>&6 -echo "configure:6183: checking whether to include the Blowfish encryption algorithm" >&5 +echo "configure:6184: checking whether to include the Blowfish encryption algorithm" >&5 # Check whether --with-blowfish or --without-blowfish was given. if test "${with_blowfish+set}" = set; then withval="$with_blowfish" @@ -6206,7 +6207,7 @@ echo $ac_n "checking whether to include the DES encryption algorithm""... $ac_c" 1>&6 -echo "configure:6210: checking whether to include the DES encryption algorithm" >&5 +echo "configure:6211: checking whether to include the DES encryption algorithm" >&5 # Check whether --with-des or --without-des was given. if test "${with_des+set}" = set; then withval="$with_des" @@ -6229,7 +6230,7 @@ echo $ac_n "checking whether to include the ARCFOUR encryption algorithm""... $ac_c" 1>&6 -echo "configure:6233: checking whether to include the ARCFOUR encryption algorithm" >&5 +echo "configure:6234: checking whether to include the ARCFOUR encryption algorithm" >&5 # Check whether --with-arcfour or --without-arcfour was given. if test "${with_arcfour+set}" = set; then withval="$with_arcfour" @@ -6252,7 +6253,7 @@ echo $ac_n "checking whether to include the none encryption algorithm""... $ac_c" 1>&6 -echo "configure:6256: checking whether to include the none encryption algorithm" >&5 +echo "configure:6257: checking whether to include the none encryption algorithm" >&5 # Check whether --with-none or --without-none was given. if test "${with_none+set}" = set; then withval="$with_none" @@ -6275,7 +6276,7 @@ echo $ac_n "checking whether to use login""... $ac_c" 1>&6 -echo "configure:6279: checking whether to use login" >&5 +echo "configure:6280: checking whether to use login" >&5 # Check whether --with-login or --without-login was given. if test "${with_login+set}" = set; then withval="$with_login" @@ -6290,7 +6291,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6294: checking for $ac_word" >&5 +echo "configure:6295: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PATH_LOGIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6349,7 +6350,7 @@ echo $ac_n "checking whether to use rsh""... $ac_c" 1>&6 -echo "configure:6353: checking whether to use rsh" >&5 +echo "configure:6354: checking whether to use rsh" >&5 # Check whether --with-rsh or --without-rsh was given. if test "${with_rsh+set}" = set; then withval="$with_rsh" @@ -6364,7 +6365,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6368: checking for $ac_word" >&5 +echo "configure:6369: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RSH_PATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6416,7 +6417,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6420: checking for $ac_word" >&5 +echo "configure:6421: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RSH_PATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6465,7 +6466,7 @@ # Code to permit setting default path for users (alden@math.ohio-state.edu) echo $ac_n "checking default path""... $ac_c" 1>&6 -echo "configure:6469: checking default path" >&5 +echo "configure:6470: checking default path" >&5 # Check whether --with-path or --without-path was given. if test "${with_path+set}" = set; then withval="$with_path" @@ -6488,7 +6489,7 @@ echo $ac_n "checking etcdir""... $ac_c" 1>&6 -echo "configure:6492: checking etcdir" >&5 +echo "configure:6493: checking etcdir" >&5 # Check whether --with-etcdir or --without-etcdir was given. if test "${with_etcdir+set}" = set; then withval="$with_etcdir" @@ -6513,7 +6514,7 @@ echo $ac_n "checking whether to use nologin.allow file to override nologin""... $ac_c" 1>&6 -echo "configure:6517: checking whether to use nologin.allow file to override nologin" >&5 +echo "configure:6518: checking whether to use nologin.allow file to override nologin" >&5 # Check whether --with-nologin-allow or --without-nologin-allow was given. if test "${with_nologin_allow+set}" = set; then withval="$with_nologin_allow" @@ -6543,7 +6544,7 @@ echo $ac_n "checking whether to support SecurID""... $ac_c" 1>&6 -echo "configure:6547: checking whether to support SecurID" >&5 +echo "configure:6548: checking whether to support SecurID" >&5 # Check whether --with-securid or --without-securid was given. if test "${with_securid+set}" = set; then withval="$with_securid" @@ -6586,7 +6587,7 @@ echo $ac_n "checking whether to support TIS authentication server""... $ac_c" 1>&6 -echo "configure:6590: checking whether to support TIS authentication server" >&5 +echo "configure:6591: checking whether to support TIS authentication server" >&5 # Check whether --with-tis or --without-tis was given. if test "${with_tis+set}" = set; then withval="$with_tis" @@ -6616,40 +6617,138 @@ fi -echo $ac_n "checking whether to use Kerberos""... $ac_c" 1>&6 -echo "configure:6621: checking whether to use Kerberos" >&5 -# Check whether --with-kerberos5 or --without-kerberos5 was given. -if test "${with_kerberos5+set}" = set; then - withval="$with_kerberos5" +echo $ac_n "checking whether to use Kerberos v4""... $ac_c" 1>&6 +echo "configure:6622: checking whether to use Kerberos v4" >&5 +# Check whether --with-krb4 or --without-krb4 was given. +if test "${with_krb4+set}" = set; then + withval="$with_krb4" case "$withval" in yes) - with_kerberos5=/usr/local + with_krb4=/usr/kerberos ;; esac else - with_kerberos5=no + with_krb4=no fi -case "$with_kerberos5" in +case "$with_krb4" in no) echo "$ac_t""no" 1>&6 ;; *) echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF -#define KERBEROS 1 +#define KRB4 1 EOF + KERBEROS_ROOT="$with_krb4" + KERBEROS_INCS="-I${KERBEROS_ROOT}/include" + KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes" + KERBEROS_OBJS="auth-kerberos.o" + echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 +echo "configure:6651: checking for dn_expand in -lresolv" >&5 +ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + KERBEROS_LIBS="$KERBEROS_LIBS -lresolv" +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking whether AFS lifetime conversion routines are present""... $ac_c" 1>&6 +echo "configure:6691: checking whether AFS lifetime conversion routines are present" >&5 + keeplibs="$LIBS" + keepcflags="$CFLAGS" + LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS" + CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS" + cat > conftest.$ac_ext < +int main() { + krb_life_to_time(10, 10); +; return 0; } +EOF +if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_KRB_LIFE_TO_TIME 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + LIBS="$keeplibs" + CFLAGS="$keepcflags" + ;; +esac + +echo $ac_n "checking whether to use Kerberos v5""... $ac_c" 1>&6 +echo "configure:6724: checking whether to use Kerberos v5" >&5 +# Check whether --with-krb5 or --without-krb5 was given. +if test "${with_krb5+set}" = set; then + withval="$with_krb5" + case "$withval" in + yes) + with_krb5=/usr/local + ;; + esac +else + with_krb5=no + +fi + +case "$with_krb5" in + no) + echo "$ac_t""no" 1>&6 + ;; + *) + echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define KRB5 1 EOF - KERBEROS_ROOT="$with_kerberos5" + KERBEROS_ROOT="$with_krb5" KERBEROS_INCS="-I${KERBEROS_ROOT}/include" KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:6653: checking for dbm_open in -lndbm" >&5 +echo "configure:6752: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6657,7 +6756,7 @@ ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6692,40 +6791,66 @@ ;; esac - - - - -echo $ac_n "checking whether to enable passing the Kerberos TGT""... $ac_c" 1>&6 -echo "configure:6701: checking whether to enable passing the Kerberos TGT" >&5 -# Check whether --enable-kerberos-tgt-passing or --disable-kerberos-tgt-passing was given. -if test "${enable_kerberos_tgt_passing+set}" = set; then - enableval="$enable_kerberos_tgt_passing" - case "$enableval" in - no) - echo "$ac_t""no" 1>&6 - ;; - *) - if test "$with_kerberos5" = no ; then +echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 +echo "configure:6796: checking whether to use AFS" >&5 +# Check whether --with-afs or --without-afs was given. +if test "${with_afs+set}" = set; then + withval="$with_afs" + if test "$with_afs" = no; then echo "$ac_t""no" 1>&6 - echo "configure: warning: "Passing Kerberos TGT requires Kerberos5 support."" 1>&2 else echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define KERBEROS_TGT_PASSING 1 + cat >> confdefs.h <<\EOF +#define AFS 1 EOF + if test "$with_krb4" = no; then + echo "$ac_t""no" 1>&6 + echo "configure: warning: "AFS requires Kerberos v4 support."" 1>&2 + else + KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs" + if test -n "$os_aix"; then + KERBEROS_LIBS="${KERBEROS_LIBS} -lld" fi + fi +fi + +fi + + +echo $ac_n "checking whether to use Hesiod""... $ac_c" 1>&6 +echo "configure:6823: checking whether to use Hesiod" >&5 +# Check whether --with-hesiod or --without-hesiod was given. +if test "${with_hesiod+set}" = set; then + withval="$with_hesiod" + case "$withval" in + yes) + with_hesiod=/usr/local/athena ;; esac else - echo "$ac_t""no" 1>&6 + with_hesiod=no fi +case "$with_hesiod" in +no) + echo "$ac_t""no" 1>&6 + ;; +*) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HESIOD 1 +EOF + + HESIOD_ROOT="$with_hesiod" + HESIOD_INCS="-I${HESIOD_ROOT}/include" + HESIOD_LIBS="-L${HESIOD_ROOT}/lib -lhesiod" + ;; +esac echo $ac_n "checking whether to use libwrap""... $ac_c" 1>&6 -echo "configure:6729: checking whether to use libwrap" >&5 +echo "configure:6854: checking whether to use libwrap" >&5 # Check whether --with-libwrap or --without-libwrap was given. if test "${with_libwrap+set}" = set; then withval="$with_libwrap" @@ -6736,7 +6861,7 @@ yes) echo "$ac_t""yes" 1>&6 echo $ac_n "checking for request_init in -lwrap""... $ac_c" 1>&6 -echo "configure:6740: checking for request_init in -lwrap" >&5 +echo "configure:6865: checking for request_init in -lwrap" >&5 ac_lib_var=`echo wrap'_'request_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6744,7 +6869,7 @@ ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6799,14 +6924,14 @@ OLDLIBS="$LIBS" LIBS="$WRAPLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then : else echo "configure: failed program was:" >&5 @@ -6827,7 +6952,7 @@ echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6 -echo "configure:6831: checking whether to support SOCKS" >&5 +echo "configure:6956: checking whether to support SOCKS" >&5 # Check whether --with-socks or --without-socks was given. if test "${with_socks+set}" = set; then withval="$with_socks" @@ -6838,7 +6963,7 @@ yes) echo "$ac_t""yes" 1>&6 echo $ac_n "checking for SOCKSconnect in -lsocks5""... $ac_c" 1>&6 -echo "configure:6842: checking for SOCKSconnect in -lsocks5" >&5 +echo "configure:6967: checking for SOCKSconnect in -lsocks5" >&5 ac_lib_var=`echo socks5'_'SOCKSconnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6846,7 +6971,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocks5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6879,7 +7004,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for Rconnect in -lsocks""... $ac_c" 1>&6 -echo "configure:6883: checking for Rconnect in -lsocks" >&5 +echo "configure:7008: checking for Rconnect in -lsocks" >&5 ac_lib_var=`echo socks'_'Rconnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6887,7 +7012,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocks $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6934,7 +7059,7 @@ if test "x$socks" = "x"; then echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6 -echo "configure:6938: checking whether to support SOCKS5" >&5 +echo "configure:7063: checking whether to support SOCKS5" >&5 # Check whether --with-socks5 or --without-socks5 was given. if test "${with_socks5+set}" = set; then withval="$with_socks5" @@ -6968,14 +7093,14 @@ TMPLIBS="$LIBS" LIBS="$LIBS $KERBEROS_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then : else echo "configure: failed program was:" >&5 @@ -6996,7 +7121,7 @@ if test "x$socks" = "x"; then echo $ac_n "checking whether to support SOCKS4""... $ac_c" 1>&6 -echo "configure:7000: checking whether to support SOCKS4" >&5 +echo "configure:7125: checking whether to support SOCKS4" >&5 # Check whether --with-socks4 or --without-socks4 was given. if test "${with_socks4+set}" = set; then withval="$with_socks4" @@ -7016,14 +7141,14 @@ fi LIBS="$withval $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then : else echo "configure: failed program was:" >&5 @@ -7150,7 +7275,7 @@ fi echo $ac_n "checking whether to use rsaref""... $ac_c" 1>&6 -echo "configure:7154: checking whether to use rsaref" >&5 +echo "configure:7279: checking whether to use rsaref" >&5 # Check whether --with-rsaref or --without-rsaref was given. if test "${with_rsaref+set}" = set; then withval="$with_rsaref" @@ -7184,7 +7309,7 @@ # This allows group writeability in userfile_check_owner_permissions() echo $ac_n "checking whether to allow group writeability""... $ac_c" 1>&6 -echo "configure:7188: checking whether to allow group writeability" >&5 +echo "configure:7313: checking whether to allow group writeability" >&5 # Check whether --enable-group-writeability or --disable-group-writeability was given. if test "${enable_group_writeability+set}" = set; then enableval="$enable_group_writeability" @@ -7200,7 +7325,7 @@ echo $ac_n "checking whether to disable forwardings in server""... $ac_c" 1>&6 -echo "configure:7204: checking whether to disable forwardings in server" >&5 +echo "configure:7329: checking whether to disable forwardings in server" >&5 # Check whether --enable-server-port-forwardings or --disable-server-port-forwardings was given. if test "${enable_server_port_forwardings+set}" = set; then enableval="$enable_server_port_forwardings" @@ -7222,7 +7347,7 @@ echo $ac_n "checking whether to disable forwardings in client""... $ac_c" 1>&6 -echo "configure:7226: checking whether to disable forwardings in client" >&5 +echo "configure:7351: checking whether to disable forwardings in client" >&5 # Check whether --enable-client-port-forwardings or --disable-client-port-forwardings was given. if test "${enable_client_port_forwardings+set}" = set; then enableval="$enable_client_port_forwardings" @@ -7244,7 +7369,7 @@ echo $ac_n "checking whether to disable X11 forwarding in server""... $ac_c" 1>&6 -echo "configure:7248: checking whether to disable X11 forwarding in server" >&5 +echo "configure:7373: checking whether to disable X11 forwarding in server" >&5 # Check whether --enable-server-x11-forwarding or --disable-server-x11-forwarding was given. if test "${enable_server_x11_forwarding+set}" = set; then enableval="$enable_server_x11_forwarding" @@ -7266,7 +7391,7 @@ echo $ac_n "checking whether to disable X11 forwarding in client""... $ac_c" 1>&6 -echo "configure:7270: checking whether to disable X11 forwarding in client" >&5 +echo "configure:7395: checking whether to disable X11 forwarding in client" >&5 # Check whether --enable-client-x11-forwarding or --disable-client-x11-forwarding was given. if test "${enable_client_x11_forwarding+set}" = set; then enableval="$enable_client_x11_forwarding" @@ -7288,7 +7413,7 @@ echo $ac_n "checking whether to install ssh as suid root""... $ac_c" 1>&6 -echo "configure:7292: checking whether to install ssh as suid root" >&5 +echo "configure:7417: checking whether to install ssh as suid root" >&5 # Check whether --enable-suid-ssh or --disable-suid-ssh was given. if test "${enable_suid_ssh+set}" = set; then enableval="$enable_suid_ssh" @@ -7309,7 +7434,7 @@ echo $ac_n "checking whether to enable TCP_NODELAY""... $ac_c" 1>&6 -echo "configure:7313: checking whether to enable TCP_NODELAY" >&5 +echo "configure:7438: checking whether to enable TCP_NODELAY" >&5 # Check whether --enable-tcp-nodelay or --disable-tcp-nodelay was given. if test "${enable_tcp_nodelay+set}" = set; then enableval="$enable_tcp_nodelay" @@ -7335,7 +7460,7 @@ echo $ac_n "checking whether to enable SO_LINGER""... $ac_c" 1>&6 -echo "configure:7339: checking whether to enable SO_LINGER" >&5 +echo "configure:7464: checking whether to enable SO_LINGER" >&5 # Check whether --enable-so-linger or --disable-so-linger was given. if test "${enable_so_linger+set}" = set; then enableval="$enable_so_linger" @@ -7357,7 +7482,7 @@ echo $ac_n "checking whether to include scp statistics at all""... $ac_c" 1>&6 -echo "configure:7361: checking whether to include scp statistics at all" >&5 +echo "configure:7486: checking whether to include scp statistics at all" >&5 # Check whether --with-scp-stats or --without-scp-stats was given. if test "${with_scp_stats+set}" = set; then withval="$with_scp_stats" @@ -7383,7 +7508,7 @@ echo $ac_n "checking whether to enable scp statistics""... $ac_c" 1>&6 -echo "configure:7387: checking whether to enable scp statistics" >&5 +echo "configure:7512: checking whether to enable scp statistics" >&5 # Check whether --enable-scp-stats or --disable-scp-stats was given. if test "${enable_scp_stats+set}" = set; then enableval="$enable_scp_stats" @@ -7409,7 +7534,7 @@ echo $ac_n "checking whether to enable scp statistics for all files""... $ac_c" 1>&6 -echo "configure:7413: checking whether to enable scp statistics for all files" >&5 +echo "configure:7538: checking whether to enable scp statistics for all files" >&5 # Check whether --enable-all-scp-stats or --disable-all-scp-stats was given. if test "${enable_all_scp_stats+set}" = set; then enableval="$enable_all_scp_stats" @@ -7445,7 +7570,7 @@ PIDDIR="/var/run" echo $ac_n "checking where to put sshd.pid""... $ac_c" 1>&6 -echo "configure:7449: checking where to put sshd.pid" >&5 +echo "configure:7574: checking where to put sshd.pid" >&5 if test '!' -d $PIDDIR; then PIDDIR="$ETCDIR" fi @@ -7641,6 +7766,9 @@ s%@KERBEROS_INCS@%$KERBEROS_INCS%g s%@KERBEROS_LIBS@%$KERBEROS_LIBS%g s%@KERBEROS_OBJS@%$KERBEROS_OBJS%g +s%@HESIOD_ROOT@%$HESIOD_ROOT%g +s%@HESIOD_INCS@%$HESIOD_INCS%g +s%@HESIOD_LIBS@%$HESIOD_LIBS%g s%@WRAPLIBS@%$WRAPLIBS%g s%@subdirs@%$subdirs%g s%@ETCDIR@%$ETCDIR%g diff -r -u -N ssh-1.2.27/configure.in ssh-1.2.27-pl1/configure.in --- ssh-1.2.27/configure.in Wed May 12 13:20:02 1999 +++ ssh-1.2.27-pl1/configure.in Fri Jul 30 11:30:18 1999 @@ -14,6 +14,11 @@ AC_CONFIG_HEADER(config.h) AC_PREREQ(2.10) +# SSH DES and AFS/Kerberos DES conflict. Yes, this is bogus. +if test -f $srcdir/des.h; then + mv -f $srcdir/des.h $srcdir/ssh-des.h +fi + # So many systems seem to need this that it is better do it here automatically. LIBS="-L/usr/local/lib $LIBS" @@ -42,11 +47,12 @@ ;; *-*-solaris*) # solaris stuff. appro@fy.chalmers.se - AC_DEFINE(SECURE_RPC) - AC_DEFINE(SECURE_NFS) +# this stuff breaks AFS/Kerberos. YUCK. +# AC_DEFINE(SECURE_RPC) +# AC_DEFINE(SECURE_NFS) # NIS+ is forced so that we don't have to recompile # if we move to NIS+. appro@fy.chalmers.se - AC_DEFINE(NIS_PLUS) +# AC_DEFINE(NIS_PLUS) ;; *-*-sunos*) os_sunos=yes @@ -370,7 +376,7 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(unistd.h rusage.h sys/time.h lastlog.h utmp.h shadow.h) -AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h machine/endian.h) +AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h sys/filio.h machine/endian.h) AC_CHECK_HEADERS(paths.h usersec.h utime.h netinet/in_systm.h) AC_CHECK_HEADERS(netinet/in_system.h netinet/ip.h netinet/tcp.h ulimit.h) AC_CHECK_HEADERS(sys/resource.h login_cap.h sys/stream.h sys/conf.h) @@ -912,55 +918,117 @@ AC_MSG_RESULT(no) ) -AC_MSG_CHECKING(whether to use Kerberos) -AC_ARG_WITH(kerberos5, -[ --with-kerberos5=[KRB_PREFIX] Compile in Kerberos5 support.], +AC_MSG_CHECKING(whether to use Kerberos v4) +AC_ARG_WITH(krb4, +[ --with-krb4[=PATH] Compile in Kerberos v4 support.], [ case "$withval" in yes) - with_kerberos5=/usr/local + with_krb4=/usr/kerberos ;; esac ], -[ with_kerberos5=no ] +[ with_krb4=no ] ) -case "$with_kerberos5" in +case "$with_krb4" in no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(yes) - AC_DEFINE(KERBEROS) - AC_DEFINE(KRB5) - KERBEROS_ROOT="$with_kerberos5" + AC_DEFINE(KRB4) + KERBEROS_ROOT="$with_krb4" KERBEROS_INCS="-I${KERBEROS_ROOT}/include" - KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" - AC_CHECK_LIB(ndbm, dbm_open, KERBEROS_LIBS="$KERBEROS_LIBS -lndbm") + KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes" KERBEROS_OBJS="auth-kerberos.o" + AC_CHECK_LIB(resolv, dn_expand, KERBEROS_LIBS="$KERBEROS_LIBS -lresolv") + dnl Check whether or not the AFS lifetime conversion routines exist. + AC_MSG_CHECKING(whether AFS lifetime conversion routines are present) + keeplibs="$LIBS" + keepcflags="$CFLAGS" + LIBS="-L${KERBEROS_ROOT}/lib -lkrb -ldes $LIBS" + CFLAGS="-I${KERBEROS_ROOT}/include $CFLAGS" + AC_TRY_LINK([#include ], [ krb_life_to_time(10, 10);], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KRB_LIFE_TO_TIME)], + [AC_MSG_RESULT(no)]) + LIBS="$keeplibs" + CFLAGS="$keepcflags" ;; esac -AC_SUBST(KERBEROS_ROOT) -AC_SUBST(KERBEROS_INCS) -AC_SUBST(KERBEROS_LIBS) -AC_SUBST(KERBEROS_OBJS) - -AC_MSG_CHECKING(whether to enable passing the Kerberos TGT) -AC_ARG_ENABLE(kerberos-tgt-passing, -[ --enable-kerberos-tgt-passing Pass Kerberos ticket-granting-ticket.], -[ case "$enableval" in + +AC_MSG_CHECKING(whether to use Kerberos v5) +AC_ARG_WITH(krb5, +[ --with-krb5[=PATH] Compile in Kerberos v5 support.], +[ case "$withval" in + yes) + with_krb5=/usr/local + ;; + esac ], +[ with_krb5=no ] +) +case "$with_krb5" in no) AC_MSG_RESULT(no) ;; *) - if test "$with_kerberos5" = no ; then + AC_MSG_RESULT(yes) + AC_DEFINE(KRB5) + KERBEROS_ROOT="$with_krb5" + KERBEROS_INCS="-I${KERBEROS_ROOT}/include" + KERBEROS_LIBS="-L${KERBEROS_ROOT}/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" + AC_CHECK_LIB(ndbm, dbm_open, KERBEROS_LIBS="$KERBEROS_LIBS -lndbm") + KERBEROS_OBJS="auth-kerberos.o" + ;; +esac + +AC_MSG_CHECKING(whether to use AFS) +AC_ARG_WITH(afs, +[ --with-afs Compile in AFS support (requires KTH krb4).], +if test "$with_afs" = no; then AC_MSG_RESULT(no) - AC_MSG_WARN("Passing Kerberos TGT requires Kerberos5 support.") else AC_MSG_RESULT(yes) - AC_DEFINE(KERBEROS_TGT_PASSING) + AC_DEFINE(AFS) + if test "$with_krb4" = no; then + AC_MSG_RESULT(no) + AC_MSG_WARN("AFS requires Kerberos v4 support.") + else + KERBEROS_LIBS="${KERBEROS_LIBS} -lkafs" + if test -n "$os_aix"; then + KERBEROS_LIBS="${KERBEROS_LIBS} -lld" fi + fi +fi +) +AC_SUBST(KERBEROS_ROOT)dnl +AC_SUBST(KERBEROS_INCS)dnl +AC_SUBST(KERBEROS_LIBS)dnl +AC_SUBST(KERBEROS_OBJS)dnl + +AC_MSG_CHECKING(whether to use Hesiod) +AC_ARG_WITH(hesiod, +[ --with-hesiod[=PATH] Compile in Hesiod support.], +[ case "$withval" in + yes) + with_hesiod=/usr/local/athena ;; esac ], - AC_MSG_RESULT(no) +[ with_hesiod=no ] ) +case "$with_hesiod" in +no) + AC_MSG_RESULT(no) + ;; +*) + AC_MSG_RESULT(yes) + AC_DEFINE(HESIOD) + HESIOD_ROOT="$with_hesiod" + HESIOD_INCS="-I${HESIOD_ROOT}/include" + HESIOD_LIBS="-L${HESIOD_ROOT}/lib -lhesiod" + ;; +esac +AC_SUBST(HESIOD_ROOT)dnl +AC_SUBST(HESIOD_INCS)dnl +AC_SUBST(HESIOD_LIBS)dnl AC_MSG_CHECKING(whether to use libwrap) AC_ARG_WITH(libwrap, diff -r -u -N ssh-1.2.27/des.c ssh-1.2.27-pl1/des.c --- ssh-1.2.27/des.c Wed May 12 13:19:25 1999 +++ ssh-1.2.27-pl1/des.c Fri Jul 30 11:18:27 1999 @@ -38,7 +38,7 @@ #include "includes.h" #include "getput.h" -#include "des.h" +#include "ssh-des.h" /* Table for key generation. This used to be in sk.h. */ /* Copyright (C) 1993 Eric Young - see README for more details */ @@ -400,7 +400,7 @@ /* This part is based on code that used to be in ecb_enc.c. */ /* Copyright (C) 1993 Eric Young - see README for more details */ -void des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, +void ssh_des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, int encrypt) { register word32 t,u; @@ -452,7 +452,7 @@ #define HPERM_OP(a,t,n,m) ((t)=((((a)<<(16-(n)))^(a))&(m)),\ (a)=(a)^(t)^(t>>(16-(n)))) -void des_set_key(unsigned char *key, DESContext *ks) +void ssh_des_set_key(unsigned char *key, DESContext *ks) { register word32 c, d, t, s, shifts; register int i; @@ -507,7 +507,7 @@ } } -void des_cbc_encrypt(DESContext *ks, unsigned char *iv, +void ssh_des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, const unsigned char *src, unsigned int len) { @@ -523,7 +523,7 @@ { iv0 ^= GET_32BIT_LSB_FIRST(src + i); iv1 ^= GET_32BIT_LSB_FIRST(src + i + 4); - des_encrypt(iv0, iv1, out, ks, 1); + ssh_des_encrypt(iv0, iv1, out, ks, 1); iv0 = out[0]; iv1 = out[1]; PUT_32BIT_LSB_FIRST(dest + i, iv0); @@ -533,7 +533,7 @@ PUT_32BIT_LSB_FIRST(iv + 4, iv1); } -void des_cbc_decrypt(DESContext *ks, unsigned char *iv, +void ssh_des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, const unsigned char *src, unsigned int len) { @@ -549,7 +549,7 @@ { d0 = GET_32BIT_LSB_FIRST(src + i); d1 = GET_32BIT_LSB_FIRST(src + i + 4); - des_encrypt(d0, d1, out, ks, 0); + ssh_des_encrypt(d0, d1, out, ks, 0); iv0 ^= out[0]; iv1 ^= out[1]; PUT_32BIT_LSB_FIRST(dest + i, iv0); @@ -561,38 +561,38 @@ PUT_32BIT_LSB_FIRST(iv + 4, iv1); } -void des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, +void ssh_des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, DESContext *ks2, unsigned char *iv2, DESContext *ks3, unsigned char *iv3, unsigned char *dest, const unsigned char *src, unsigned int len) { - des_cbc_encrypt(ks1, iv1, dest, src, len); - des_cbc_decrypt(ks2, iv2, dest, dest, len); - des_cbc_encrypt(ks3, iv3, dest, dest, len); + ssh_des_cbc_encrypt(ks1, iv1, dest, src, len); + ssh_des_cbc_decrypt(ks2, iv2, dest, dest, len); + ssh_des_cbc_encrypt(ks3, iv3, dest, dest, len); } -void des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, +void ssh_des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, DESContext *ks2, unsigned char *iv2, DESContext *ks3, unsigned char *iv3, unsigned char *dest, const unsigned char *src, unsigned int len) { - des_cbc_decrypt(ks3, iv3, dest, src, len); - des_cbc_encrypt(ks2, iv2, dest, dest, len); - des_cbc_decrypt(ks1, iv1, dest, dest, len); + ssh_des_cbc_decrypt(ks3, iv3, dest, src, len); + ssh_des_cbc_encrypt(ks2, iv2, dest, dest, len); + ssh_des_cbc_decrypt(ks1, iv1, dest, dest, len); } -#ifdef DES_TEST +#ifdef SSH_DES_TEST -void des_encrypt_buf(DESContext *ks, unsigned char *out, +void ssh_des_encrypt_buf(DESContext *ks, unsigned char *out, const unsigned char *in, int encrypt) { word32 in0, in1, output[0]; in0 = GET_32BIT_LSB_FIRST(in); in1 = GET_32BIT_LSB_FIRST(in + 4); - des_encrypt(in0, in1, output, ks, encrypt); + ssh_des_encrypt(in0, in1, output, ks, encrypt); PUT_32BIT_LSB_FIRST(out, output[0]); PUT_32BIT_LSB_FIRST(out + 4, output[1]); } @@ -634,15 +634,15 @@ } result[i] = value; } - des_set_key(key, &ks); - des_encrypt_buf(&ks, output, data, 1); + ssh_des_set_key(key, &ks); + ssh_des_encrypt_buf(&ks, output, data, 1); if (memcmp(output, result, 8) != 0) fprintf(stderr, "Encrypt failed: %s", line); - des_encrypt_buf(&ks, output, result, 0); + ssh_des_encrypt_buf(&ks, output, result, 0); if (memcmp(output, data, 8) != 0) fprintf(stderr, "Decrypt failed: %s", line); } exit(0); } -#endif /* DES_TEST */ +#endif /* SSH_DES_TEST */ diff -r -u -N ssh-1.2.27/des.h ssh-1.2.27-pl1/des.h --- ssh-1.2.27/des.h Wed May 12 13:19:25 1999 +++ ssh-1.2.27-pl1/des.h Fri Jul 30 11:18:27 1999 @@ -25,8 +25,8 @@ * $Endlog$ */ -#ifndef DES_H -#define DES_H +#ifndef SSH_DES_H +#define SSH_DES_H typedef struct { @@ -35,40 +35,40 @@ /* Sets the des key for the context. Initializes the context. The least significant bit of each byte of the key is ignored as parity. */ -void des_set_key(unsigned char *key, DESContext *ks); +void ssh_des_set_key(unsigned char *key, DESContext *ks); /* Encrypts 32 bits in l,r, and stores the result in output[0] and output[1]. Performs encryption if encrypt is non-zero, and decryption if it is zero. - The key context must have been initialized previously with des_set_key. */ -void des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, + The key context must have been initialized previously with ssh_des_set_key. */ +void ssh_des_encrypt(word32 l, word32 r, word32 *output, DESContext *ks, int encrypt); /* Encrypts len bytes from src to dest in CBC modes. Len must be a multiple of 8. iv will be modified at end to a value suitable for continuing encryption. */ -void des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, +void ssh_des_cbc_encrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, const unsigned char *src, unsigned int len); /* Decrypts len bytes from src to dest in CBC modes. Len must be a multiple of 8. iv will be modified at end to a value suitable for continuing decryption. */ -void des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, +void ssh_des_cbc_decrypt(DESContext *ks, unsigned char *iv, unsigned char *dest, const unsigned char *src, unsigned int len); /* Encrypts in CBC mode using triple-DES. */ -void des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, +void ssh_des_3cbc_encrypt(DESContext *ks1, unsigned char *iv1, DESContext *ks2, unsigned char *iv2, DESContext *ks3, unsigned char *iv3, unsigned char *dest, const unsigned char *src, unsigned int len); /* Decrypts in CBC mode using triple-DES. */ -void des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, +void ssh_des_3cbc_decrypt(DESContext *ks1, unsigned char *iv1, DESContext *ks2, unsigned char *iv2, DESContext *ks3, unsigned char *iv3, unsigned char *dest, const unsigned char *src, unsigned int len); -#endif /* DES_H */ +#endif /* SSH_DES_H */ diff -r -u -N ssh-1.2.27/log-server.c ssh-1.2.27-pl1/log-server.c --- ssh-1.2.27/log-server.c Wed May 12 13:19:26 1999 +++ ssh-1.2.27-pl1/log-server.c Fri Jul 30 11:18:27 1999 @@ -265,9 +265,12 @@ { struct fatal_cleanup *cu, *next_cu; static int fatal_called = 0; -#ifdef KERBEROS +#if defined(KRB4) || defined(KRB5) extern char *ticket; -#endif +#ifdef AFS + extern char *xauthfile; +#endif /* AFS */ +#endif /* KRB4 || KRB5 */ if (!fatal_called) { @@ -281,19 +284,27 @@ (unsigned long)cu->proc, (unsigned long)cu->context); (*cu->proc)(cu->context); } -#ifdef KERBEROS +#if defined(KRB4) || defined(KRB5) /* If you forwarded a ticket you get one shot for proper authentication. */ /* If tgt was passed unlink file */ if (ticket) { if (strcmp(ticket,"none")) +#ifdef KRB5 /* ticket -> FILE:path */ unlink(ticket + 5); +#else /* KRB4 */ + unlink(ticket); +#endif else ticket = NULL; } -#endif /* KERBEROS */ +#ifdef AFS + /* If local XAUTHORITY was created, remove it. */ + if (xauthfile) unlink(xauthfile); +#endif /* AFS */ +#endif /* KRB4 || KRB5 */ } } diff -r -u -N ssh-1.2.27/radix.c ssh-1.2.27-pl1/radix.c --- ssh-1.2.27/radix.c Thu Jan 1 01:00:00 1970 +++ ssh-1.2.27-pl1/radix.c Fri Jul 30 11:18:27 1999 @@ -0,0 +1,267 @@ +/* + radix.c + + base-64 encoding pinched from lynx2-7-2, who pinched it from rpem. + Originally written by Mark Riordan 12 August 1990 and 17 Feb 1991 + and placed in the public domain. + + dugsong@UMICH.EDU +*/ + +#include "includes.h" + +#ifdef AFS +#include +#include + +char six2pr[64] = { + 'A','B','C','D','E','F','G','H','I','J','K','L','M', + 'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', + 'a','b','c','d','e','f','g','h','i','j','k','l','m', + 'n','o','p','q','r','s','t','u','v','w','x','y','z', + '0','1','2','3','4','5','6','7','8','9','+','/' +}; + +unsigned char pr2six[256]; + +int uuencode(unsigned char *bufin, unsigned int nbytes, char *bufcoded) +{ + /* ENC is the basic 1 character encoding function to make a char printing */ +#define ENC(c) six2pr[c] + + register char *outptr = bufcoded; + unsigned int i; + + for (i=0; i> 2); /* c1 */ + *(outptr++) = ENC(((*bufin << 4) & 060) | ((bufin[1] >> 4) & 017)); /*c2*/ + *(outptr++) = ENC(((bufin[1] << 2) & 074) | ((bufin[2] >> 6) & 03));/*c3*/ + *(outptr++) = ENC(bufin[2] & 077); /* c4 */ + bufin += 3; + } + if (i == nbytes+1) { + outptr[-1] = '='; + } else if (i == nbytes+2) { + outptr[-1] = '='; + outptr[-2] = '='; + } + *outptr = '\0'; + return(outptr - bufcoded); +} + +int uudecode(char *bufcoded, unsigned char *bufplain, int outbufsize) +{ + /* single character decode */ +#define DEC(c) pr2six[c] +#define MAXVAL 63 + + static int first = 1; + int nbytesdecoded, j; + register char *bufin = bufcoded; + register unsigned char *bufout = bufplain; + register int nprbytes; + + /* If this is the first call, initialize the mapping table. */ + if (first) { + first = 0; + for(j=0; j<256; j++) pr2six[j] = MAXVAL+1; + for(j=0; j<64; j++) pr2six[(unsigned char)six2pr[j]] = (unsigned char)j; + } + + /* Strip leading whitespace. */ + while (*bufcoded==' ' || *bufcoded == '\t') bufcoded++; + + /* Figure out how many characters are in the input buffer. + If this would decode into more bytes than would fit into + the output buffer, adjust the number of input bytes downwards. */ + bufin = bufcoded; + while (pr2six[(unsigned char)*(bufin++)] <= MAXVAL); + nprbytes = bufin - bufcoded - 1; + nbytesdecoded = ((nprbytes+3)/4) * 3; + if (nbytesdecoded > outbufsize) + nprbytes = (outbufsize*4)/3; + + bufin = bufcoded; + + while (nprbytes > 0) { + *(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4); + *(bufout++) = (unsigned char) (DEC(bufin[1]) << 4 | DEC(bufin[2]) >> 2); + *(bufout++) = (unsigned char) (DEC(bufin[2]) << 6 | DEC(bufin[3])); + bufin += 4; + nprbytes -= 4; + } + if (nprbytes & 03) { + if (pr2six[bufin[-2]] > MAXVAL) + nbytesdecoded -= 2; + else + nbytesdecoded -= 1; + } + return(nbytesdecoded); +} + +typedef unsigned char my_u_char; +typedef unsigned int my_u_int32_t; +typedef unsigned short my_u_short; + +/* Nasty macros from BIND-4.9.2 */ + +#define GETSHORT(s, cp) { \ + register my_u_char *t_cp = (my_u_char*)(cp); \ + (s) = (((my_u_short)t_cp[0]) << 8) \ + | (((my_u_short)t_cp[1])) \ + ; \ + (cp) += 2; \ +} + +#define GETLONG(l, cp) { \ + register my_u_char *t_cp = (my_u_char*)(cp); \ + (l) = (((my_u_int32_t)t_cp[0]) << 24) \ + | (((my_u_int32_t)t_cp[1]) << 16) \ + | (((my_u_int32_t)t_cp[2]) << 8) \ + | (((my_u_int32_t)t_cp[3])) \ + ; \ + (cp) += 4; \ +} + +#define PUTSHORT(s, cp) { \ + register my_u_short t_s = (my_u_short)(s); \ + register my_u_char *t_cp = (my_u_char*)(cp); \ + *t_cp++ = t_s >> 8; \ + *t_cp = t_s; \ + (cp) += 2; \ +} + +#define PUTLONG(l, cp) { \ + register my_u_int32_t t_l = (my_u_int32_t)(l); \ + register my_u_char *t_cp = (my_u_char*)(cp); \ + *t_cp++ = t_l >> 24; \ + *t_cp++ = t_l >> 16; \ + *t_cp++ = t_l >> 8; \ + *t_cp = t_l; \ + (cp) += 4; \ +} + +#define GETSTRING(s, p, p_l) { \ + register char* p_targ = (p) + p_l; \ + register char* s_c = (s); \ + register char* p_c = (p); \ + while (*p_c && (p_c < p_targ)) { \ + *s_c++ = *p_c++; \ + } \ + if (p_c == p_targ) { \ + return 1; \ + } \ + *s_c = *p_c++; \ + (p_l) = (p_l) - (p_c - (p)); \ + (p) = p_c; \ +} + + +int creds_to_radix(CREDENTIALS *creds, unsigned char *buf) +{ + char *p, *s; + int len; + char temp[2048]; + + p = temp; + *p++ = 1; /* version */ + s = creds->service; while (*s) *p++ = *s++; *p++ = *s; + s = creds->instance; while (*s) *p++ = *s++; *p++ = *s; + s = creds->realm; while (*s) *p++ = *s++; *p++ = *s; + + s = creds->pname; while (*s) *p++ = *s++; *p++ = *s; + s = creds->pinst; while (*s) *p++ = *s++; *p++ = *s; + /* Null string to repeat the realm. */ + *p++ = '\0'; + + PUTLONG(creds->issue_date,p); + { + unsigned long endTime ; +#ifdef HAVE_KRB_LIFE_TO_TIME + endTime = (unsigned long)krb_life_to_time(creds->issue_date, + creds->lifetime); +#else /* !HAVE_KRB_LIFE_TO_TIME */ + endTime = creds->issue_date + ((unsigned char)(creds->lifetime))*5*60; +#endif /* !HAVE_KRB_LIFE_TO_TIME */ + PUTLONG(endTime,p); + } + + memcpy(p,&creds->session, sizeof(creds->session)); + p += sizeof(creds->session); + + PUTSHORT(creds->kvno,p); + PUTLONG(creds->ticket_st.length,p); + + memcpy(p,creds->ticket_st.dat, creds->ticket_st.length); + p += creds->ticket_st.length; + len = p - temp; + + return(uuencode(temp, len, buf)); +} + +int radix_to_creds(char *buf, CREDENTIALS *creds) +{ + + char *p, *s; + int len, tl, status; + char version; + char temp[2048]; + + if (!(len = uudecode(buf, temp, sizeof(temp)))) + return 0; + + p = temp; + + /* check version and length! */ + if (len < 1) return 0; + version = *p; p++; len--; + + GETSTRING(creds->service, p, len); + GETSTRING(creds->instance, p, len); + GETSTRING(creds->realm, p, len); + + GETSTRING(creds->pname, p, len); + GETSTRING(creds->pinst, p, len); + /* Ignore possibly different realm. */ + while (*p && len) p++, len--; + if (len == 0) return 0; + p++, len--; + + /* Enough space for remaining fixed-length parts? */ + if (len < (4 + 4 + sizeof(creds->session) + 2 + 4)) + return 0; + + GETLONG(creds->issue_date,p); + len -= 4; + { + unsigned long endTime; + GETLONG(endTime,p); + len -= 4; +#ifdef HAVE_KRB_LIFE_TO_TIME + creds->lifetime = krb_time_to_life(creds->issue_date, endTime); +#else + creds->lifetime = ((endTime - creds->issue_date) + 5*60 - 1) / (5*60); +#endif + } + + memcpy(&creds->session, p, sizeof(creds->session)); + p += sizeof(creds->session); + len -= sizeof(creds->session); + + GETSHORT(creds->kvno,p); + len -= 2; + GETLONG(creds->ticket_st.length,p); + len -= 4; + + tl = creds->ticket_st.length; + if (tl < 0 || tl > len || tl > sizeof(creds->ticket_st.dat)) + return 0; + + memcpy(creds->ticket_st.dat, p, tl); + p += tl; + len -= tl; + + return 1; +} + +#endif /* AFS */ diff -r -u -N ssh-1.2.27/readconf.c ssh-1.2.27-pl1/readconf.c --- ssh-1.2.27/readconf.c Wed May 12 13:19:27 1999 +++ ssh-1.2.27-pl1/readconf.c Fri Jul 30 11:18:27 1999 @@ -170,6 +170,9 @@ oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, oBatchMode, oStrictHostKeyChecking, oCompression, oCompressionLevel, oKeepAlives, oUsePrivilegedPort, oKerberosAuthentication, +#ifdef AFS + oAFSTokenPassing, +#endif /* AFS */ oKerberosTgtPassing, oClearAllForwardings, oNumberOfPasswordPrompts, oXauthPath, oGatewayPorts, oPasswordPromptLogin, oPasswordPromptHost } OpCodes; @@ -213,6 +216,9 @@ { "useprivilegedport", oUsePrivilegedPort }, { "kerberosauthentication", oKerberosAuthentication }, { "kerberostgtpassing", oKerberosTgtPassing }, +#ifdef AFS + { "afstokenpassing", oAFSTokenPassing }, +#endif /* AFS */ { "clearallforwardings", oClearAllForwardings }, { "numberofpasswordprompts", oNumberOfPasswordPrompts }, { "xauthlocation", oXauthPath }, @@ -354,6 +360,12 @@ intptr = &options->kerberos_tgt_passing; goto parse_flag; +#ifdef AFS + case oAFSTokenPassing: + intptr = &options->afs_token_passing; + goto parse_flag; +#endif /* AFS */ + case oFallBackToRsh: intptr = &options->fallback_to_rsh; goto parse_flag; @@ -678,6 +690,9 @@ options->rsa_authentication = -1; options->kerberos_authentication = -1; options->kerberos_tgt_passing = -1; +#ifdef AFS + options->afs_token_passing = -1; +#endif /* AFS */ options->tis_authentication = -1; options->password_authentication = -1; options->rhosts_rsa_authentication = -1; @@ -724,17 +739,19 @@ if (options->rsa_authentication == -1) options->rsa_authentication = 1; if (options->kerberos_authentication == -1) -#if defined(KERBEROS) && defined(KRB5) +#if defined(KRB4) || defined(KRB5) options->kerberos_authentication = 1; -#else /* defined(KERBEROS) && defined(KRB5) */ +#else options->kerberos_authentication = 0; -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* defined(KRB4) || defined(KRB5) */ if (options->kerberos_tgt_passing == -1) -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5) +#if defined(AFS) options->kerberos_tgt_passing = 1; -#else /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */ + if (options->afs_token_passing == -1) + options->afs_token_passing = 1; +#else options->kerberos_tgt_passing = 0; -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */ +#endif /* AFS */ if (options->tis_authentication == -1) options->tis_authentication = 0; if (options->password_authentication == -1) diff -r -u -N ssh-1.2.27/readconf.h ssh-1.2.27-pl1/readconf.h --- ssh-1.2.27/readconf.h Wed May 12 13:19:27 1999 +++ ssh-1.2.27-pl1/readconf.h Fri Jul 30 11:18:27 1999 @@ -85,6 +85,9 @@ int rsa_authentication; /* Try RSA authentication. */ int kerberos_authentication; /* Try Kerberos authentication. */ int kerberos_tgt_passing; /* Try Kerberos tgt passing. */ +#ifdef AFS + int afs_token_passing; /* Try AFS token passing. */ +#endif /* AFS */ int tis_authentication; /* Try TIS authsrv authentication. */ int password_authentication; /* Try password authentication. */ int fallback_to_rsh; /* Use rsh if cannot connect with ssh. */ diff -r -u -N ssh-1.2.27/scp.c ssh-1.2.27-pl1/scp.c --- ssh-1.2.27/scp.c Wed May 12 13:19:28 1999 +++ ssh-1.2.27-pl1/scp.c Fri Jul 30 11:18:27 1999 @@ -180,6 +180,11 @@ #define STDERR_FILENO 2 #endif +#ifdef AFS +/* This is set to non-zero to disable authentication forwarding. */ +int nofwd = 0; +#endif /* AFS */ + /* This is set to non-zero to enable verbose mode. */ int verbose = 0; @@ -305,6 +310,10 @@ args[i++] = "-P"; if (batchmode) args[i++] = "-oBatchMode yes"; +#ifdef AFS + if (nofwd) + args[i++] = "-k"; +#endif /* AFS */ if (cipher != NULL) { args[i++] = "-c"; @@ -441,7 +450,11 @@ statistics = 0; fflag = tflag = 0; +#ifdef AFS + while ((ch = getopt(argc, argv, "kaAqQdfprtvBCL1c:i:P:o:S:")) != EOF) +#else while ((ch = getopt(argc, argv, "aAqQdfprtvBCL1c:i:P:o:S:")) != EOF) +#endif /* AFS */ switch(ch) { /* User-visible flags. */ case 'S': ssh_program = optarg; @@ -490,6 +503,11 @@ case 'r': iamrecursive = 1; break; +#ifdef AFS + case 'k': + nofwd = 1; + break; +#endif /* AFS */ /* Server options. */ case 'd': targetshouldbedirectory = 1; diff -r -u -N ssh-1.2.27/servconf.c ssh-1.2.27-pl1/servconf.c --- ssh-1.2.27/servconf.c Wed May 12 13:19:28 1999 +++ ssh-1.2.27-pl1/servconf.c Fri Jul 30 11:18:27 1999 @@ -106,6 +106,12 @@ options->kerberos_authentication = -1; options->kerberos_or_local_passwd = -1; options->kerberos_tgt_passing = -1; +#if defined(KRB4) + options->kerberos_ticket_cleanup = -1; +#endif /* KRB4 */ +#ifdef AFS + options->afs_token_passing = -1; +#endif options->tis_authentication = -1; options->allow_tcp_forwarding = -1; options->password_authentication = -1; @@ -190,19 +196,27 @@ if (options->rsa_authentication == -1) options->rsa_authentication = 1; if (options->kerberos_authentication == -1) -#if defined(KERBEROS) && defined(KRB5) +#if defined(KRB4) || defined(KRB5) options->kerberos_authentication = 1; -#else /* defined(KERBEROS) && defined(KRB5) */ +#else options->kerberos_authentication = 0; -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* defined(KRB4 || KRB5 */ if (options->kerberos_or_local_passwd == -1) options->kerberos_or_local_passwd = 0; if (options->kerberos_tgt_passing == -1) -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5) +#if defined(AFS) || defined(KRB5) options->kerberos_tgt_passing = 1; -#else /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */ +#else options->kerberos_tgt_passing = 0; -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */ +#endif /* AFS || KRB5 */ +#if defined(KRB4) + if (options->kerberos_ticket_cleanup == -1) + options->kerberos_ticket_cleanup = 1; +#endif /* KRB4 */ +#ifdef AFS + if (options->afs_token_passing == -1) + options->afs_token_passing = 1; +#endif /* AFS */ if (options->allow_tcp_forwarding == -1) options->allow_tcp_forwarding = 1; if (options->tis_authentication == -1) @@ -249,7 +263,14 @@ sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sPidFile, sForcedPasswd, sForcedEmptyPasswd, sUmask, sSilentDeny, sIdleTimeout, sUseLogin, sKerberosAuthentication, sKerberosOrLocalPasswd, - sKerberosTgtPassing, sAllowTcpForwarding, sAllowUsers, sDenyUsers, + sKerberosTgtPassing, +#ifdef KRB4 + sKerberosTicketCleanup, +#ifdef AFS + sAFSTokenPassing, +#endif /* AFS */ +#endif /* KRB4 */ + sAllowTcpForwarding, sAllowUsers, sDenyUsers, sXauthPath, sCheckMail, sDenyGroups, sAllowGroups, sIgnoreRootRhosts, sAllowSHosts, sDenySHosts, sPasswordExpireWarningDays, sAccountExpireWarningDays @@ -313,6 +334,12 @@ { "kerberosauthentication", sKerberosAuthentication }, { "kerberosorlocalpasswd", sKerberosOrLocalPasswd }, { "kerberostgtpassing", sKerberosTgtPassing }, +#ifdef KRB4 + { "kerberosticketcleanup", sKerberosTicketCleanup }, +#endif +#ifdef AFS + { "afstokenpassing", sAFSTokenPassing }, +#endif { "allowtcpforwarding", sAllowTcpForwarding }, { "xauthlocation", sXauthPath }, { "checkmail", sCheckMail }, @@ -571,6 +598,18 @@ case sKerberosTgtPassing: intptr = &options->kerberos_tgt_passing; goto parse_flag; + +#ifdef KRB4 + case sKerberosTicketCleanup: + intptr = &options->kerberos_ticket_cleanup; + goto parse_flag; +#endif /* KRB4 */ + +#ifdef AFS + case sAFSTokenPassing: + intptr = &options->afs_token_passing; + goto parse_flag; +#endif /* AFS */ case sAllowTcpForwarding: intptr = &options->allow_tcp_forwarding; diff -r -u -N ssh-1.2.27/servconf.h ssh-1.2.27-pl1/servconf.h --- ssh-1.2.27/servconf.h Wed May 12 13:19:28 1999 +++ ssh-1.2.27-pl1/servconf.h Fri Jul 30 11:18:27 1999 @@ -111,6 +111,12 @@ password authentication mechanism, such as SecurID or /etc/passwd */ int kerberos_tgt_passing; /* If true, permit Kerberos tgt passing. */ +#ifdef KRB4 + int kerberos_ticket_cleanup; /* If true, destroy ticket file on logout. */ +#endif /* KRB4 */ +#ifdef AFS + int afs_token_passing; /* If true, permit AFS token passing. */ +#endif /* AFS */ int allow_tcp_forwarding; int tis_authentication; /* If true, permit TIS authsrv auth. */ int password_authentication; /* If true, permit password authentication. */ diff -r -u -N ssh-1.2.27/ssh.1.in ssh-1.2.27-pl1/ssh.1.in --- ssh-1.2.27/ssh.1.in Wed May 12 13:19:30 1999 +++ ssh-1.2.27-pl1/ssh.1.in Fri Jul 30 11:18:27 1999 @@ -470,7 +470,7 @@ .ne 3 .TP .B \-k -Disables forwarding of the kerberos tickets. This may +Disables forwarding of Kerberos tickets / AFS tokens. This may also be specified on a per-host basis in the configuration file. .ne 3 .TP @@ -770,11 +770,15 @@ .TP .B KerberosAuthentication -Specifies whether Kerberos V5 authentication will be used. +Specifies whether Kerberos authentication will be used. .TP .B KerberosTgtPassing -Specifies whether a Kerberos V5 TGT will be forwarded to the server. +Specifies whether a Kerberos TGT will be forwarded to the server. + +.TP +.B AFSTokenPassing +Specifies whether an AFS token will be forwarded to the server. .TP .B LocalForward diff -r -u -N ssh-1.2.27/ssh.c ssh-1.2.27-pl1/ssh.c --- ssh-1.2.27/ssh.c Wed May 12 13:19:28 1999 +++ ssh-1.2.27-pl1/ssh.c Fri Jul 30 11:18:27 1999 @@ -280,9 +280,9 @@ fprintf(stderr, " -l user Log in using this user name.\n"); fprintf(stderr, " -n Redirect input from /dev/null.\n"); fprintf(stderr, " -a Disable authentication agent forwarding.\n"); -#if defined(KERBEROS_TGT_PASSING) && defined(KRB5) - fprintf(stderr, " -k Disable Kerberos ticket passing.\n"); -#endif /* defined(KERBEROS_TGT_PASSING) && defined(KRB5) */ +#ifdef AFS + fprintf(stderr, " -k Disable Kerberos ticket and AFS token passing.\n"); +#endif /* AFS */ #ifndef SSH_NO_X11_FORWARDING fprintf(stderr, " -x Disable X11 connection forwarding.\n"); #endif @@ -541,6 +541,9 @@ case 'k': options.kerberos_tgt_passing = 0; +#ifdef AFS + options.afs_token_passing = 0; +#endif /* AFS */ break; case 'i': diff -r -u -N ssh-1.2.27/ssh.h ssh-1.2.27-pl1/ssh.h --- ssh-1.2.27/ssh.h Wed May 12 13:19:28 1999 +++ ssh-1.2.27-pl1/ssh.h Fri Jul 30 11:18:27 1999 @@ -176,6 +176,16 @@ #include "randoms.h" #include "cipher.h" +#ifdef HESIOD +#include + +#define getpwnam(a) hes_getpwnam(a) +#define getpwuid(a) hes_getpwuid(a) + +extern struct passwd *hes_getpwnam(const char *name); +extern struct passwd *hes_getpwuid(uid_t uid); +#endif /* HESIOD */ + /* The default cipher used if IDEA is not supported by the remote host. It is recommended that this be one of the mandatory ciphers (DES, 3DES), though that is not required. */ @@ -307,12 +317,13 @@ protocol.) */ #define SSH_SESSION_KEY_LENGTH 32 -#ifdef KERBEROS #ifdef KRB5 #include -#define KRB_SERVICE_NAME "host" +#define KRB5_SERVICE_NAME "host" #endif /* KRB5 */ -#endif /* KERBEROS */ +#ifdef KRB4 +#define KRB4_SERVICE_NAME "rcmd" +#endif /* KRB4 */ /* Authentication methods. New types can be added, but old types should not be removed for compatibility. The maximum allowed value is 31. */ @@ -336,6 +347,10 @@ /* If you add new methods add them after this using random number between 16-31 so if someone else adds also new methods you dont use same number. */ +#ifdef AFS +#define SSH_PASS_AFS_TOKEN 21 +#endif /* AFS */ + /* Protocol flags. These are bit masks. */ #define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */ @@ -410,7 +425,9 @@ /* If ou add new messages add them starting from something after 64, better to use some random number between 64-127 so if someone else adds something else you dont use same numbers */ - +#ifdef AFS +#define SSH_CMSG_HAVE_AFS_TOKEN 65 +#endif /* AFS */ /* define this and debug() will print local hostname */ #define LOCAL_HOSTNAME_IN_DEBUG 1 @@ -479,12 +496,12 @@ /* Tries to authenticate the user using password. Returns true if authentication succeeds. */ -#if defined(KERBEROS) && defined(KRB5) +#ifdef KRB5 int auth_password(const char *server_user, const char *password, krb5_principal client); -#else /* defined(KERBEROS) && defined(KRB5) */ +#else /* KRB5 */ int auth_password(const char *server_user, const char *password); -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* KRB5 */ /* Performs the RSA authentication dialog with the client. This returns 0 if the client could not be authenticated, and 1 if authentication was diff -r -u -N ssh-1.2.27/sshconnect.c ssh-1.2.27-pl1/sshconnect.c --- ssh-1.2.27/sshconnect.c Wed May 12 13:19:29 1999 +++ ssh-1.2.27-pl1/sshconnect.c Fri Jul 30 12:27:29 1999 @@ -215,7 +215,6 @@ #include "userfile.h" #include "emulate.h" -#ifdef KERBEROS #ifdef KRB5 #include @@ -223,7 +222,19 @@ krb5_context ssh_context = 0; krb5_auth_context auth_context = 0; #endif /* KRB5 */ -#endif /* KERBEROS */ + +#ifdef KRB4 +#include +#ifdef AFS +#if defined(HAVE_SYS_IOCTL_H) && SunOS != 4 +#include +#endif +#ifdef HAVE_SYS_FILIO_H +#include +#endif +#include +#endif /* AFS */ +#endif /* KRB4 */ /* Session id for the current session. */ unsigned char session_id[16]; @@ -932,10 +943,9 @@ return 0; } -#ifdef KERBEROS +#ifdef KRB5 int try_kerberos_authentication(void) { -#ifdef KRB5 char *remotehost; krb5_data auth; krb5_error_code r; @@ -1084,15 +1094,118 @@ krb5_free_ap_rep_enc_part(ssh_context, repl); return(ret_stat); +} #endif /* KRB5 */ + +#ifdef KRB4 +int try_kerberos_authentication() +{ + KTEXT_ST auth; /* Kerberos data */ + char *reply; + char inst[INST_SZ]; + char *realm; + char *service; + CREDENTIALS cred; + int r, type; + Key_schedule schedule; + u_long checksum, cksum; + MSG_DAT msg_data; + struct sockaddr_in local, foreign; + struct stat st; + + /* Don't do anything if we don't have any tickets. */ + if (stat(tkt_string(), &st) < 0) return 0; + + strncpy(inst, (char *) krb_get_phost(get_canonical_hostname()), INST_SZ); + + realm = (char *)krb_realmofhost(get_canonical_hostname()); + if (!realm) { + debug("Kerberos V4: no realm for %s", get_canonical_hostname()); + return 0; + } + /* This can really be anything. */ + checksum = (u_long) getpid(); + + if (r = krb_mk_req(&auth, KRB4_SERVICE_NAME, inst, realm, checksum)) { + debug("Kerberos V4 krb_mk_req failed: %s", krb_err_txt[r]); + return 0; + } + /* Get session key to decrypt the server's reply with. */ + if (r = krb_get_cred(KRB4_SERVICE_NAME, inst, realm, &cred)) { + debug("get_cred failed: %s", krb_err_txt[r]); + return 0; + } + des_key_sched((des_cblock *)cred.session, schedule); + + /* Send authentication info to server. */ + packet_start(SSH_CMSG_AUTH_KERBEROS); + packet_put_string((char *)auth.dat, auth.length); + packet_send(); + packet_write_wait(); + + /* zero the buffer */ + (void) memset(auth.dat, 0, MAX_KTXT_LEN); + + r = sizeof(local); + memset(&local, 0, sizeof(local)); + if (getsockname(packet_get_connection_in(), + (struct sockaddr *) &local, &r) < 0) + debug("getsockname failed: %.100s", strerror(errno)); + + r = sizeof(foreign); + memset(&foreign, 0, sizeof(foreign)); + if (getpeername(packet_get_connection_in(), + (struct sockaddr *)&foreign, &r) < 0) + debug("getpeername failed: %.100s", strerror(errno)); + + /* Get server reply. */ + type = packet_read(); + switch(type) { + + case SSH_SMSG_FAILURE: /* Should really be SSH_SMSG_AUTH_KERBEROS_FAILURE */ + debug("Kerberos V4 authentication failed."); + return 0; + break; + + case SSH_SMSG_AUTH_KERBEROS_RESPONSE: /* SSH_SMSG_AUTH_KERBEROS_SUCCESS */ + debug("Kerberos V4 authentication accepted."); + + /* Get server's response. */ + reply = packet_get_string((unsigned int *)&auth.length); + memcpy(auth.dat, reply, auth.length); + xfree(reply); + + /* If his response isn't properly encrypted with the session key, + and the decrypted checksum fails to match, he's bogus. Bail out. */ + if (r = krb_rd_priv(auth.dat, auth.length, schedule, &cred.session, + &foreign, &local, &msg_data)) { + debug("Kerberos V4 krb_rd_priv failed: %s", krb_err_txt[r]); + packet_disconnect("Kerberos V4 challenge failed!"); + } + /* fetch the (incremented) checksum that we supplied in the request */ + (void)memcpy((char *)&cksum, (char *)msg_data.app_data, sizeof(cksum)); + cksum = ntohl(cksum); + + /* If it matches, we're golden. */ + if (cksum == checksum + 1) { + debug("Kerberos V4 challenge successful."); + return 1; + } + else + packet_disconnect("Kerberos V4 challenge failed!"); + break; + + default: + packet_disconnect("Protocol error on Kerberos V4 response: %d", type); + } } -#endif /* KERBEROS */ +#endif /* KRB4 */ + -#ifdef KERBEROS_TGT_PASSING /* Forward our local Kerberos tgt to the server. */ +#ifdef KRB5 int send_kerberos_tgt(void) { -#ifdef KRB5 char *remotehost; krb5_principal client; krb5_principal server; @@ -1172,22 +1285,117 @@ krb5_free_principal(ssh_context, client); krb5_free_principal(ssh_context, server); - type = packet_read(); - if (type == SSH_SMSG_SUCCESS) - { - debug("Kerberos V5 TGT passing was successful."); - return 1; - } - else - if (type != SSH_SMSG_FAILURE) - packet_disconnect("Protocol error on Kerberos tgt response: %d", type); - else - debug("Kerberos V5 TGT passing failed."); - - return 0; + return 1; +} #endif /* KRB5 */ + +#ifdef AFS +int send_kerberos_tgt() +{ + CREDENTIALS *creds; + char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ]; + int r, type; + unsigned char buffer[8192]; + struct stat st; + + /* Don't do anything if we don't have any tickets. */ + if (stat(tkt_string(), &st) < 0) return 0; + + creds = xmalloc(sizeof(CREDENTIALS)); + + if ((r=krb_get_tf_fullname(TKT_FILE,pname,pinst,prealm)) != KSUCCESS) { + debug("Kerberos V4 tf_fullname failed: %s",krb_err_txt[r]); + return 0; + } + if ((r=krb_get_cred("krbtgt", prealm, prealm, creds)) != GC_OK) { + debug("Kerberos V4 get_cred failed: %s", krb_err_txt[r]); + return 0; + } + if (time(0) > +#ifdef HAVE_KRB_LIFE_TO_TIME + (unsigned long)krb_life_to_time(creds->issue_date, creds->lifetime)) { +#else + (creds->issue_date + ((unsigned char)creds->lifetime * 5 * 60))) { +#endif /* HAVE_KRB_LIFE_TO_TIME */ + debug("Kerberos V4 ticket expired: %s", TKT_FILE); + return 0; + } + + creds_to_radix(creds, buffer); + xfree(creds); + + packet_start(SSH_CMSG_HAVE_KERBEROS_TGT); + packet_put_string((char *)buffer, strlen(buffer)); + packet_send(); + packet_write_wait(); + + return 1; } -#endif /* KERBEROS_TGT_PASSING */ + +/* Forwards our AFS tokens to the server. */ +void send_afs_tokens(void) +{ + CREDENTIALS creds; + struct ViceIoctl parms; + struct ClearToken ct; + int i, type; + int len; + char buf[2048], *p, *server_cell; + unsigned char buffer[8192]; + + /* Move over ktc_GetToken, here's something leaner. */ + for (i = 0; i < 100; i++) { /* just in case */ + parms.in = (char *)&i; + parms.in_size = sizeof(i); + parms.out = buf; + parms.out_size = sizeof(buf); + if (k_pioctl(0, VIOCGETTOK, &parms, 0) != 0) break; + p = buf; + + /* Get secret token. */ + memcpy(&creds.ticket_st.length, p, sizeof(unsigned int)); + if (creds.ticket_st.length > MAX_KTXT_LEN) break; + p += sizeof(unsigned int); + memcpy(creds.ticket_st.dat, p, creds.ticket_st.length); + p += creds.ticket_st.length; + + /* Get clear token. */ + memcpy(&len, p, sizeof(len)); + if (len != sizeof(struct ClearToken)) break; + p += sizeof(len); + memcpy(&ct, p, len); + p += len; + p += sizeof(len); /* primary flag */ + server_cell = p; + + /* Flesh out our credentials. */ + strcpy(creds.service, "afs"); + creds.instance[0] = '\0'; + strncpy(creds.realm, server_cell, REALM_SZ); + memcpy(creds.session, ct.HandShakeKey, DES_KEY_SZ); + creds.issue_date = ct.BeginTimestamp; + creds.lifetime = krb_time_to_life(creds.issue_date, ct.EndTimestamp); + creds.kvno = ct.AuthHandle; + snprintf(creds.pname, sizeof(creds.pname), "AFS ID %d", ct.ViceId); + creds.pinst[0] = '\0'; + + /* Encode token, ship it off. */ + if (!creds_to_radix(&creds, buffer)) break; + packet_start(SSH_CMSG_HAVE_AFS_TOKEN); + packet_put_string((char *)buffer, strlen(buffer)); + packet_send(); + packet_write_wait(); + + /* Roger, Roger. Clearance, Clarence. What's your vector, Victor? */ + type = packet_read(); + + if (type == SSH_SMSG_FAILURE) + debug("AFS token for cell %s rejected.", server_cell); + else if (type != SSH_SMSG_SUCCESS) + packet_disconnect("Protocol error on AFS token response: %d", type); + } +} +#endif /* AFS */ /* Waits for the server identification string, and sends our own identification string. */ @@ -1285,14 +1493,12 @@ unsigned char check_bytes[8]; unsigned int supported_ciphers, supported_authentications, protocol_flags; HostStatus host_status; -#ifdef KERBEROS #ifdef KRB5 char *kuser; krb5_ccache ccache; krb5_error_code problem; krb5_principal client; -#endif -#endif +#endif /* KRB5 */ /* Convert the user-supplied hostname into all lowercase. */ host = xstrdup(orighost); @@ -1595,7 +1801,6 @@ debug("Received encrypted confirmation."); -#ifdef KERBEROS #ifdef KRB5 if (!ssh_context) { @@ -1629,7 +1834,6 @@ debug("Kerberos V5: could not get default ccache."); } #endif /* KRB5 */ -#endif /* KERBEROS */ /* Send the name of the user to log in as on the server. */ packet_start(SSH_CMSG_USER); @@ -1647,24 +1851,39 @@ packet_disconnect("Protocol error: got %d in response to SSH_CMSG_USER", type); -#ifdef KERBEROS_TGT_PASSING +#if defined(KRB5) || defined(AFS) /* Try Kerberos tgt passing if the server supports it. */ if ((supported_authentications & (1 << SSH_PASS_KERBEROS_TGT)) && options->kerberos_tgt_passing) { if (options->cipher == SSH_CIPHER_NONE) log_msg("WARNING: Encryption is disabled! Ticket will be transmitted in the clear!"); - (void)send_kerberos_tgt(); + if (send_kerberos_tgt()) + { + type = packet_read(); + if (type == SSH_SMSG_FAILURE) + debug("Kerberos TGT passing failed."); + else if (type != SSH_SMSG_SUCCESS) + packet_disconnect("Protocol error on Kerberos tgt response: %d", type); + } } -#endif /* KERBEROS_TGT_PASSING */ +#endif /* KRB5 || AFS */ + +#ifdef AFS + /* Try AFS token passing if the server supports it. */ + if ((supported_authentications & (1 << SSH_PASS_AFS_TOKEN)) && + options->afs_token_passing && k_hasafs()) { + if (options->cipher == SSH_CIPHER_NONE) + log_msg("WARNING: Encryption is disabled! Token will be transmitted in the clear!"); + send_afs_tokens(); + } +#endif /* AFS */ -#ifdef KERBEROS -#ifdef KRB5 +#if defined(KRB4) || defined(KRB5) if ((supported_authentications & (1 << SSH_AUTH_KERBEROS)) && options->kerberos_authentication) { - debug("Trying Kerberos V5 authentication."); -#endif + debug("Trying Kerberos authentication."); if (try_kerberos_authentication()) { /* The server should respond with success or failure. */ type = packet_read(); @@ -1673,10 +1892,8 @@ if (type != SSH_SMSG_FAILURE) packet_disconnect("Protocol error: got %d in response to Kerberos auth", type); } -#ifdef KRB5 } -#endif -#endif /* KERBEROS */ +#endif /* KRB4 || KRB5 */ /* Use rhosts authentication if running in privileged socket and we do not wish to remain anonymous. */ diff -r -u -N ssh-1.2.27/sshd.8.in ssh-1.2.27-pl1/sshd.8.in --- ssh-1.2.27/sshd.8.in Wed May 12 13:19:31 1999 +++ ssh-1.2.27-pl1/sshd.8.in Fri Jul 30 11:18:27 1999 @@ -529,10 +529,10 @@ .TP .B KerberosAuthentication -Specifies whether Kerberos V5 authentication is allowed. This can +Specifies whether Kerberos authentication is allowed. This can be in the form of a Kerberos ticket, or if PasswordAuthentication is yes, the password provided by the user will be validated through -the Kerberos KDC or DCE Security Server. Default is yes. +the Kerberos KDC / AFS kaserver / DCE Security Server. Default is yes. .TP .B KerberosOrLocalPasswd @@ -542,8 +542,18 @@ .TP .B KerberosTgtPassing -Specifies whether a Kerberos V5 TGT may be forwarded to the server. +Specifies whether a Kerberos TGT may be forwarded to the server. Default is yes. + +.TP +.B AFSTokenPassing +Specifies whether an AFS token may be forwarded to the server. +Default is yes. + +.TP +.B KerberosTicketCleanup +Specifies whether to automatically destroy the user's Kerberos v4 +ticket cache file on logout. Default is yes. .TP .B KeyRegenerationInterval diff -r -u -N ssh-1.2.27/sshd.c ssh-1.2.27-pl1/sshd.c --- ssh-1.2.27/sshd.c Wed May 12 13:19:29 1999 +++ ssh-1.2.27-pl1/sshd.c Fri Jul 30 21:41:35 1999 @@ -537,15 +537,26 @@ #define O_NOCTTY 0 #endif -#ifdef KERBEROS #ifdef KRB5 #include /* Global the contexts */ krb5_context ssh_context = 0; krb5_auth_context auth_context = 0; #endif /* KRB5 */ -char *ticket = "none\0"; -#endif /* KERBEROS */ + +#ifdef KRB4 +#include +#include +#ifdef AFS +#include +/* Local Xauthority file. */ +char *xauthfile = NULL; +#endif /* AFS */ +#endif /* KRB4 */ + +#if defined(KRB5) || defined(KRB4) +char *ticket = NULL; +#endif /* KRB5 || KRB4 */ /* Server configuration options. */ ServerOptions options; @@ -649,7 +660,6 @@ const char *display, const char *auth_proto, const char *auth_data, const char *ttyname); - /* Signal handler for SIGHUP. Sshd execs itself when it receives SIGHUP; the effect is to reread the configuration file (and to regenerate the server key). */ @@ -1115,7 +1125,6 @@ /* Arrange SIGCHLD to be caught. */ signal(SIGCHLD, main_sigchld_handler); -#ifdef KERBEROS #ifdef KRB5 /* Initialize contexts and setup replay cache */ if (!ssh_context) @@ -1128,7 +1137,6 @@ krb5_init_ets(ssh_context); } #endif -#endif /* Stay listening for connections until the system crashes or the daemon is killed with a signal. */ @@ -1407,6 +1415,16 @@ /* Try to remove authentication socket and directory */ auth_delete_socket(NULL); +#ifdef KRB4 + /* Cleanup user's ticket cache file. */ + if (options.kerberos_ticket_cleanup) + (void) dest_tkt(); +#ifdef AFS + /* Cleanup user's local Xauthority file. */ + if (xauthfile) unlink(xauthfile); +#endif /* AFS */ +#endif /* KRB4 */ + /* The connection has been terminated. */ log_msg("Closing connection to %.100s", get_remote_ipaddr()); packet_close(); @@ -1470,17 +1488,17 @@ if (options.tis_authentication) auth_mask |= 1 << SSH_AUTH_TIS; #endif -#ifdef KERBEROS -#ifdef KRB5 +#if defined(KRB4) || defined(KRB5) if (options.kerberos_authentication) auth_mask |= 1 << SSH_AUTH_KERBEROS; #endif -#endif -#ifdef KERBEROS_TGT_PASSING -#ifdef KRB5 +#if defined(AFS) || defined(KRB5) if (options.kerberos_tgt_passing) auth_mask |= 1 << SSH_PASS_KERBEROS_TGT; #endif +#ifdef AFS + if (options.afs_token_passing) + auth_mask |= 1 << SSH_PASS_AFS_TOKEN; #endif if (options.password_authentication) auth_mask |= 1 << SSH_AUTH_PASSWORD; @@ -1677,7 +1695,7 @@ /* XXX No days_before_password_expires calculation here */ } #endif /* HAVE_USERSEC_H */ -#ifdef HAVE_ETC_SHADOW +#if defined(HAVE_ETC_SHADOW) && !defined(KRB4) && !defined(KRB5) { struct spwd *sp; @@ -2039,7 +2057,7 @@ } } - /* Check whether logins are deneid for this group. */ + /* Check whether logins are denied for this group. */ grp = getgrgid(pwd->pw_gid); if (grp) group = grp->gr_name; @@ -2151,11 +2169,11 @@ unsigned int client_host_key_bits; MP_INT client_host_key_e, client_host_key_n; int password_attempts = 0; -#if defined(KERBEROS) && defined(KRB5) +#ifdef KRB5 char kuser[256]; krb5_principal client = 0, tkt_client = 0; krb5_data krb5data; -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* KRB5 */ #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H) login_cap_t *lc; const char *hostname; @@ -2167,10 +2185,18 @@ ipaddr = get_remote_ipaddr(); #endif /* HAVE_LOGIN_CAP_H */ +#ifdef AFS + /* If machine has AFS, set process authentication group. */ + if (k_hasafs()) { + k_setpag(); + k_unlog(); + } +#endif /* AFS */ + if (strlen(user) > 255) do_authentication_fail_loop(); -#if defined(KERBEROS) && defined(KRB5) +#ifdef KRB5 /* For KRB5 allow the user to input fully qualified name i.e. "username@realm" as the local user name. Then use this name to call out to krb5_aname_to_localname to find if there is a localname @@ -2203,7 +2229,7 @@ } else krb5_parse_name(ssh_context, user, &client); -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* KRB5 */ /* Verify that the user is a valid user. We disallow usernames starting with any characters that are commonly used to start NIS entries. */ @@ -2241,11 +2267,11 @@ debug("Attempting authentication for %.100s.", user); -#if defined (KERBEROS) && defined (KRB5) + /* If the user has no password, accept authentication immediately. */ +#ifdef KRB5 if (!options.kerberos_authentication && options.password_authentication && auth_password(user, "", 0)) -#else /* defined(KERBEROS) && defined(KRB5) */ - /* If the user has no password, accept authentication immediately. */ +#else /* KRB5 */ #if defined (HAVE_SIA) /* For SIA, only call auth_password() here if the user really has no password. Otherwise, the call would generate misleading @@ -2254,9 +2280,13 @@ if (options.password_authentication && sia_no_password(user) && auth_password(user, "")) #else /* defined(HAVE_SIA) */ - if (options.password_authentication && auth_password(user, "")) + if (options.password_authentication && +#ifdef KRB4 + options.kerberos_or_local_passwd && +#endif /* KRB4 */ + auth_password(user, "")) #endif /* defined(HAVE_SIA) */ -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* KRB5 */ { /* Authentication with empty password succeeded. */ debug("Login for user %.100s accepted without authentication.", user); @@ -2281,19 +2311,22 @@ /* Process the packet. */ switch (type) { -#ifdef KERBEROS_TGT_PASSING -#ifdef KRB5 +#if defined(KRB5) || defined(AFS) case SSH_CMSG_HAVE_KERBEROS_TGT: +#ifdef KRB5 if (!options.kerberos_tgt_passing || (!(options.kerberos_authentication || options.password_authentication || options.rsa_authentication))) +#else /* KRB5 */ + if (!options.kerberos_tgt_passing) +#endif /* KRB5 */ { packet_get_all(); log_msg("Kerberos tgt passing disabled."); break; } - +#ifdef KRB5 /* Accept Kerberos tgt. */ krb5data.data = packet_get_string((unsigned int *) &krb5data.length); @@ -2303,12 +2336,36 @@ debug("Kerberos tgt REFUSED for %.100s", user); } free(krb5data.data); -#endif - continue; -#endif /* KERBEROS_TGT_PASSING */ +#else /* KRB5 */ + { + /* Accept Kerberos tgt. */ + char *tgt = packet_get_string(NULL); + if (!auth_kerberos_tgt(pw, tgt)) + debug("Kerberos tgt REFUSED for %s", user); + xfree(tgt); + } +#endif /* KRB5 */ + continue; +#endif /* KRB5 || AFS */ -#ifdef KERBEROS -#ifdef KRB5 +#ifdef AFS + case SSH_CMSG_HAVE_AFS_TOKEN: + if (!k_hasafs() || !options.afs_token_passing) { + packet_get_all(); + log_msg("AFS token passing disabled."); + break; + } + else { + /* Accept AFS token. */ + char *token_string = packet_get_string(NULL); + if (!auth_afs_token(user, pw->pw_uid, token_string)) + debug("AFS token REFUSED for %s", user); + xfree(token_string); + continue; + } +#endif /* AFS */ + +#if defined(KRB4) || defined(KRB5) case SSH_CMSG_AUTH_KERBEROS: if (!options.kerberos_authentication) { @@ -2316,6 +2373,7 @@ log_msg("Kerberos authentication disabled."); break; } +#ifdef KRB5 /* Try Kerberos authentication. */ krb5data.data = packet_get_string((unsigned int *) &krb5data.length); if (auth_kerberos(user, &krb5data, &tkt_client)) @@ -2347,11 +2405,31 @@ } free(tkt_user); } +#else /* !KRB5 XXX - how to make these coexist? */ + else { + /* Try Kerberos v4 authentication. */ + KTEXT_ST auth; + char *tkt_user = NULL; + char *kdata = packet_get_string((unsigned int *)&auth.length); + + memcpy(auth.dat, kdata, auth.length); + xfree(kdata); + + if (auth_krb4(user, &auth, &tkt_user)) { + /* Client has successfully authenticated to us. */ + log_msg("Kerberos authentication accepted %s for account " + "%.100s from %.200s", tkt_user, user, + get_canonical_hostname()); + authentication_type = SSH_AUTH_KERBEROS; + authenticated = 1; + xfree(tkt_user); + break; + } + log_msg("Kerberos authentication failed for account " + "%.100s from %.200s", user, get_canonical_hostname()); + } #endif /* KRB5 */ - debug("Kerberos authentication failed for %.100s from %.200s", - user, get_canonical_hostname()); - break; -#endif /* KERBEROS */ +#endif /* KRB5 || KRB4 */ case SSH_CMSG_AUTH_RHOSTS: if (!options.rhosts_authentication) @@ -2657,11 +2735,11 @@ password_attempts++; /* Try authentication with the password. */ -#if defined(KERBEROS) && defined(KRB5) +#ifdef KRB5 if (auth_password(user, password, client)) -#else /* defined(KERBEROS) && defined(KRB5) */ +#else /* KRB5 */ if (auth_password(user, password)) -#endif /* defined(KERBEROS) && defined(KRB5) */ +#endif /* KRB5 */ { /* Successful authentication. */ /* Clear the password from memory. */ @@ -2688,7 +2766,7 @@ if (authenticated) break; -#ifdef KERBEROS +#if defined(KRB5) /* If you forwarded a ticket you get one shot for proper authentication. */ /* If tgt was passed unlink file */ @@ -2699,7 +2777,7 @@ else ticket = NULL; } -#endif /* KERBEROS */ +#endif /* KRB5 */ /* Send a message indicating that the authentication attempt failed. */ packet_start(SSH_SMSG_FAILURE); @@ -2965,6 +3043,21 @@ display = x11_create_display_inet(screen); if (!display) goto fail; +#ifdef AFS + /* Setup to have a local .Xauthority, if homedir is in AFS. */ + { + struct stat st; + char cell[64], *xauthdir = "/ticket"; + + if (k_hasafs() && k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0) { + xauthfile = xmalloc(MAXPATHLEN); + if (stat(xauthdir, &st) < 0) + xauthdir = "/tmp"; + snprintf(xauthfile, MAXPATHLEN, "%s/Xauth%d_%d", xauthdir, + pw->pw_uid, getpid()); + } + } +#endif /* AFS */ break; #else /* XAUTH_PATH */ /* No xauth program; we won't accept forwarding with spoofing. */ @@ -4184,6 +4277,19 @@ real_shell = login_getcapstr(lc, "shell", (char*)shell, (char*)shell); login_close(lc); #endif /* HAVE_LOGIN_CAP_H */ + +#ifdef AFS + /* Try to get AFS tokens for the local cell. */ + if (k_hasafs()) { + char cell[64]; + + if (k_afs_cell_of_file(user_dir, cell, sizeof(cell)) == 0) + krb_afslog(cell, 0); + + krb_afslog(0, 0); + } +#endif /* AFS */ + /* Initialize the environment if not already done. In the first part we allocate space for all environment variables. */ if (env == NULL) @@ -4290,13 +4396,21 @@ } #endif -#ifdef KERBEROS - /* Set KRBTKFILE to point to our ticket */ + /* Set KRBTKFILE to point to our ticket. */ #ifdef KRB5 if (ticket) child_set_env(&env, &envsize, "KRB5CCNAME", ticket); #endif /* KRB5 */ -#endif /* KERBEROS */ +#ifdef KRB4 /* XXX - how to make these coexist? */ + if (ticket) + child_set_env(&env, &envsize, "KRBTKFILE", ticket); + +#ifdef AFS + /* Set XAUTHORITY to a local file, if homedir is in AFS. */ + if (xauthfile) + child_set_env(&env, &envsize, "XAUTHORITY", xauthfile); +#endif /* AFS */ +#endif /* KRB4 */ /* Set variable for forwarded authentication connection, if we have one. */ if (auth_get_socket_name() != NULL)