Last active
December 17, 2015 05:39
-
-
Save metacollin/5559677 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git openssh-6.2p13/Makefile.in openssh-6.2p1/Makefile.in | |
index d327787..0c60b96 100644 | |
--- openssh-6.2p13/Makefile.in | |
+++ openssh-6.2p1/Makefile.in | |
@@ -37,7 +37,7 @@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \ | |
-D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ | |
-D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ | |
-D_PATH_SSH_PIDDIR=\"$(piddir)\" \ | |
- -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" | |
+ -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ | |
CC=@CC@ | |
LD=@LD@ | |
@@ -59,6 +59,7 @@ ENT=@ENT@ | |
XAUTH_PATH=@XAUTH_PATH@ | |
LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ | |
EXEEXT=@EXEEXT@ | |
+KEYCHAIN_LDFLAGS=@KEYCHAIN_LDFLAGS@ | |
MANFMT=@MANFMT@ | |
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) | |
@@ -94,6 +95,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ | |
roaming_common.o roaming_serv.o \ | |
sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \ | |
sandbox-seccomp-filter.o | |
+ | |
+KEYCHAINOBJS=keychain.o | |
MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out | |
MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 | |
@@ -127,6 +130,7 @@ all: $(CONFIGFILES) $(MANPAGES) $(TARGETS) | |
$(LIBSSH_OBJS): Makefile.in config.h | |
$(SSHOBJS): Makefile.in config.h | |
$(SSHDOBJS): Makefile.in config.h | |
+$(KEYCHAINOBJS): Makefile.in config.h | |
.c.o: | |
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< | |
@@ -140,8 +144,8 @@ libssh.a: $(LIBSSH_OBJS) | |
$(AR) rv $@ $(LIBSSH_OBJS) | |
$(RANLIB) $@ | |
-ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) | |
- $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS) | |
+ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) $(KEYCHAINOBJS) | |
+ $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) $(KEYCHAIN_LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS) | |
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) | |
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) | |
@@ -149,11 +153,11 @@ sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) | |
scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o | |
$(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
-ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o | |
- $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
+ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o $(KEYCHAINOBJS) | |
+ $(LD) -o $@ ssh-add.o $(KEYCHAINOBJS) $(LDFLAGS) $(KEYCHAIN_LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
-ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o | |
- $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
+ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o $(KEYCHAINOBJS) | |
+ $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(KEYCHAINOBJS) $(LDFLAGS) $(KEYCHAIN_LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o | |
$(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
diff --git openssh-6.2p13/authfd.c openssh-6.2p1/authfd.c | |
index f037e83..e81e6dc 100644 | |
--- openssh-6.2p13/authfd.c | |
+++ openssh-6.2p1/authfd.c | |
@@ -689,6 +689,30 @@ ssh_remove_all_identities(AuthenticationConnection *auth, int version) | |
return decode_reply(type); | |
} | |
+/* | |
+ * Adds identities using passphrases stored in the keychain. This call is not | |
+ * meant to be used by normal applications. | |
+ */ | |
+ | |
+int | |
+ssh_add_from_keychain(AuthenticationConnection *auth) | |
+{ | |
+ Buffer msg; | |
+ int type; | |
+ | |
+ buffer_init(&msg); | |
+ buffer_put_char(&msg, SSH_AGENTC_ADD_FROM_KEYCHAIN); | |
+ | |
+ if (ssh_request_reply(auth, &msg, &msg) == 0) { | |
+ buffer_free(&msg); | |
+ return 0; | |
+ } | |
+ type = buffer_get_char(&msg); | |
+ buffer_free(&msg); | |
+ return decode_reply(type); | |
+} | |
+ | |
+ | |
int | |
decode_reply(int type) | |
{ | |
diff --git openssh-6.2p13/authfd.h openssh-6.2p1/authfd.h | |
index 2582a27..0e6208b 100644 | |
--- openssh-6.2p13/authfd.h | |
+++ openssh-6.2p1/authfd.h | |
@@ -49,6 +49,9 @@ | |
#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25 | |
#define SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26 | |
+/* keychain */ | |
+#define SSH_AGENTC_ADD_FROM_KEYCHAIN 27 | |
+ | |
#define SSH_AGENT_CONSTRAIN_LIFETIME 1 | |
#define SSH_AGENT_CONSTRAIN_CONFIRM 2 | |
diff --git openssh-6.2p13/config.h.in openssh-6.2p1/config.h.in | |
index ea3591a..afa17c8 100644 | |
--- openssh-6.2p13/config.h.in | |
+++ openssh-6.2p1/config.h.in | |
@@ -820,6 +820,9 @@ | |
/* Define to 1 if you have the <security/pam_appl.h> header file. */ | |
#undef HAVE_SECURITY_PAM_APPL_H | |
+/* Define to 1 if you have the <Security/Security.h> header file. */ | |
+#undef HAVE_SECURITY_SECURITY_H | |
+ | |
/* Define to 1 if you have the `sendmsg' function. */ | |
#undef HAVE_SENDMSG | |
@@ -1569,6 +1572,11 @@ | |
/* Define if xauth is found in your path */ | |
#undef XAUTH_PATH | |
+/* Enable large inode numbers on Mac OS X 10.5. */ | |
+#ifndef _DARWIN_USE_64_BIT_INODE | |
+# define _DARWIN_USE_64_BIT_INODE 1 | |
+#endif | |
+ | |
/* Number of bits in a file offset, on hosts where this is settable. */ | |
#undef _FILE_OFFSET_BITS | |
diff --git openssh-6.2p1/config.h.in~ openssh-6.2p1/config.h.in~ | |
new file mode 100644 | |
index 0000000..ea3591a | |
--- /dev/null | |
+++ openssh-6.2p1/config.h.in~ | |
@@ -0,0 +1,1597 @@ | |
+/* config.h.in. Generated from configure.ac by autoheader. */ | |
+ | |
+/* Define if building universal (internal helper macro) */ | |
+#undef AC_APPLE_UNIVERSAL_BUILD | |
+ | |
+/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address | |
+ */ | |
+#undef AIX_GETNAMEINFO_HACK | |
+ | |
+/* Define if your AIX loginfailed() function takes 4 arguments (AIX >= 5.2) */ | |
+#undef AIX_LOGINFAILED_4ARG | |
+ | |
+/* System only supports IPv4 audit records */ | |
+#undef AU_IPv4 | |
+ | |
+/* Define if your resolver libs need this for getrrsetbyname */ | |
+#undef BIND_8_COMPAT | |
+ | |
+/* The system has incomplete BSM API */ | |
+#undef BROKEN_BSM_API | |
+ | |
+/* Define if cmsg_type is not passed correctly */ | |
+#undef BROKEN_CMSG_TYPE | |
+ | |
+/* getaddrinfo is broken (if present) */ | |
+#undef BROKEN_GETADDRINFO | |
+ | |
+/* getgroups(0,NULL) will return -1 */ | |
+#undef BROKEN_GETGROUPS | |
+ | |
+/* FreeBSD glob does not do what we need */ | |
+#undef BROKEN_GLOB | |
+ | |
+/* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */ | |
+#undef BROKEN_INET_NTOA | |
+ | |
+/* ia_uinfo routines not supported by OS yet */ | |
+#undef BROKEN_LIBIAF | |
+ | |
+/* Ultrix mmap can't map files */ | |
+#undef BROKEN_MMAP | |
+ | |
+/* Define if your struct dirent expects you to allocate extra space for d_name | |
+ */ | |
+#undef BROKEN_ONE_BYTE_DIRENT_D_NAME | |
+ | |
+/* Can't do comparisons on readv */ | |
+#undef BROKEN_READV_COMPARISON | |
+ | |
+/* Define if you have a broken realpath. */ | |
+#undef BROKEN_REALPATH | |
+ | |
+/* Needed for NeXT */ | |
+#undef BROKEN_SAVED_UIDS | |
+ | |
+/* Define if your setregid() is broken */ | |
+#undef BROKEN_SETREGID | |
+ | |
+/* Define if your setresgid() is broken */ | |
+#undef BROKEN_SETRESGID | |
+ | |
+/* Define if your setresuid() is broken */ | |
+#undef BROKEN_SETRESUID | |
+ | |
+/* Define if your setreuid() is broken */ | |
+#undef BROKEN_SETREUID | |
+ | |
+/* LynxOS has broken setvbuf() implementation */ | |
+#undef BROKEN_SETVBUF | |
+ | |
+/* QNX shadow support is broken */ | |
+#undef BROKEN_SHADOW_EXPIRE | |
+ | |
+/* Define if your snprintf is busted */ | |
+#undef BROKEN_SNPRINTF | |
+ | |
+/* FreeBSD strnvis does not do what we need */ | |
+#undef BROKEN_STRNVIS | |
+ | |
+/* tcgetattr with ICANON may hang */ | |
+#undef BROKEN_TCGETATTR_ICANON | |
+ | |
+/* updwtmpx is broken (if present) */ | |
+#undef BROKEN_UPDWTMPX | |
+ | |
+/* Define if you have BSD auth support */ | |
+#undef BSD_AUTH | |
+ | |
+/* Define if you want to specify the path to your lastlog file */ | |
+#undef CONF_LASTLOG_FILE | |
+ | |
+/* Define if you want to specify the path to your utmp file */ | |
+#undef CONF_UTMP_FILE | |
+ | |
+/* Define if you want to specify the path to your wtmpx file */ | |
+#undef CONF_WTMPX_FILE | |
+ | |
+/* Define if you want to specify the path to your wtmp file */ | |
+#undef CONF_WTMP_FILE | |
+ | |
+/* Define if your platform needs to skip post auth file descriptor passing */ | |
+#undef DISABLE_FD_PASSING | |
+ | |
+/* Define if you don't want to use lastlog */ | |
+#undef DISABLE_LASTLOG | |
+ | |
+/* Define if you don't want to use your system's login() call */ | |
+#undef DISABLE_LOGIN | |
+ | |
+/* Define if you don't want to use pututline() etc. to write [uw]tmp */ | |
+#undef DISABLE_PUTUTLINE | |
+ | |
+/* Define if you don't want to use pututxline() etc. to write [uw]tmpx */ | |
+#undef DISABLE_PUTUTXLINE | |
+ | |
+/* Define if you want to disable shadow passwords */ | |
+#undef DISABLE_SHADOW | |
+ | |
+/* Define if you don't want to use utmp */ | |
+#undef DISABLE_UTMP | |
+ | |
+/* Define if you don't want to use utmpx */ | |
+#undef DISABLE_UTMPX | |
+ | |
+/* Define if you don't want to use wtmp */ | |
+#undef DISABLE_WTMP | |
+ | |
+/* Define if you don't want to use wtmpx */ | |
+#undef DISABLE_WTMPX | |
+ | |
+/* Enable for PKCS#11 support */ | |
+#undef ENABLE_PKCS11 | |
+ | |
+/* File names may not contain backslash characters */ | |
+#undef FILESYSTEM_NO_BACKSLASH | |
+ | |
+/* fsid_t has member val */ | |
+#undef FSID_HAS_VAL | |
+ | |
+/* fsid_t has member __val */ | |
+#undef FSID_HAS___VAL | |
+ | |
+/* Define to 1 if the `getpgrp' function requires zero arguments. */ | |
+#undef GETPGRP_VOID | |
+ | |
+/* Conflicting defs for getspnam */ | |
+#undef GETSPNAM_CONFLICTING_DEFS | |
+ | |
+/* Define if your system glob() function has the GLOB_ALTDIRFUNC extension */ | |
+#undef GLOB_HAS_ALTDIRFUNC | |
+ | |
+/* Define if your system glob() function has gl_matchc options in glob_t */ | |
+#undef GLOB_HAS_GL_MATCHC | |
+ | |
+/* Define if your system glob() function has gl_statv options in glob_t */ | |
+#undef GLOB_HAS_GL_STATV | |
+ | |
+/* Define this if you want GSSAPI support in the version 2 protocol */ | |
+#undef GSSAPI | |
+ | |
+/* Define if you want to use shadow password expire field */ | |
+#undef HAS_SHADOW_EXPIRE | |
+ | |
+/* Define if your system uses access rights style file descriptor passing */ | |
+#undef HAVE_ACCRIGHTS_IN_MSGHDR | |
+ | |
+/* Define if you have ut_addr in utmp.h */ | |
+#undef HAVE_ADDR_IN_UTMP | |
+ | |
+/* Define if you have ut_addr in utmpx.h */ | |
+#undef HAVE_ADDR_IN_UTMPX | |
+ | |
+/* Define if you have ut_addr_v6 in utmp.h */ | |
+#undef HAVE_ADDR_V6_IN_UTMP | |
+ | |
+/* Define if you have ut_addr_v6 in utmpx.h */ | |
+#undef HAVE_ADDR_V6_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the `arc4random' function. */ | |
+#undef HAVE_ARC4RANDOM | |
+ | |
+/* Define to 1 if you have the `arc4random_buf' function. */ | |
+#undef HAVE_ARC4RANDOM_BUF | |
+ | |
+/* Define to 1 if you have the `arc4random_uniform' function. */ | |
+#undef HAVE_ARC4RANDOM_UNIFORM | |
+ | |
+/* Define to 1 if you have the `asprintf' function. */ | |
+#undef HAVE_ASPRINTF | |
+ | |
+/* OpenBSD's gcc has bounded */ | |
+#undef HAVE_ATTRIBUTE__BOUNDED__ | |
+ | |
+/* Have attribute nonnull */ | |
+#undef HAVE_ATTRIBUTE__NONNULL__ | |
+ | |
+/* OpenBSD's gcc has sentinel */ | |
+#undef HAVE_ATTRIBUTE__SENTINEL__ | |
+ | |
+/* Define to 1 if you have the `aug_get_machine' function. */ | |
+#undef HAVE_AUG_GET_MACHINE | |
+ | |
+/* Define to 1 if you have the `b64_ntop' function. */ | |
+#undef HAVE_B64_NTOP | |
+ | |
+/* Define to 1 if you have the `b64_pton' function. */ | |
+#undef HAVE_B64_PTON | |
+ | |
+/* Define if you have the basename function. */ | |
+#undef HAVE_BASENAME | |
+ | |
+/* Define to 1 if you have the `bcopy' function. */ | |
+#undef HAVE_BCOPY | |
+ | |
+/* Define to 1 if you have the `bindresvport_sa' function. */ | |
+#undef HAVE_BINDRESVPORT_SA | |
+ | |
+/* Define to 1 if you have the `BN_is_prime_ex' function. */ | |
+#undef HAVE_BN_IS_PRIME_EX | |
+ | |
+/* Define to 1 if you have the <bsd/libutil.h> header file. */ | |
+#undef HAVE_BSD_LIBUTIL_H | |
+ | |
+/* Define to 1 if you have the <bsm/audit.h> header file. */ | |
+#undef HAVE_BSM_AUDIT_H | |
+ | |
+/* Define to 1 if you have the <bstring.h> header file. */ | |
+#undef HAVE_BSTRING_H | |
+ | |
+/* Define to 1 if you have the `clock' function. */ | |
+#undef HAVE_CLOCK | |
+ | |
+/* define if you have clock_t data type */ | |
+#undef HAVE_CLOCK_T | |
+ | |
+/* Define to 1 if you have the `closefrom' function. */ | |
+#undef HAVE_CLOSEFROM | |
+ | |
+/* Define if gai_strerror() returns const char * */ | |
+#undef HAVE_CONST_GAI_STRERROR_PROTO | |
+ | |
+/* Define if your system uses ancillary data style file descriptor passing */ | |
+#undef HAVE_CONTROL_IN_MSGHDR | |
+ | |
+/* Define to 1 if you have the <crypto/sha2.h> header file. */ | |
+#undef HAVE_CRYPTO_SHA2_H | |
+ | |
+/* Define to 1 if you have the <crypt.h> header file. */ | |
+#undef HAVE_CRYPT_H | |
+ | |
+/* Define if you are on Cygwin */ | |
+#undef HAVE_CYGWIN | |
+ | |
+/* Define if your libraries define daemon() */ | |
+#undef HAVE_DAEMON | |
+ | |
+/* Define to 1 if you have the declaration of `authenticate', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_AUTHENTICATE | |
+ | |
+/* Define to 1 if you have the declaration of `GLOB_NOMATCH', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_GLOB_NOMATCH | |
+ | |
+/* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE', | |
+ and to 0 if you don't. */ | |
+#undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE | |
+ | |
+/* Define to 1 if you have the declaration of `h_errno', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_H_ERRNO | |
+ | |
+/* Define to 1 if you have the declaration of `loginfailed', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_LOGINFAILED | |
+ | |
+/* Define to 1 if you have the declaration of `loginrestrictions', and to 0 if | |
+ you don't. */ | |
+#undef HAVE_DECL_LOGINRESTRICTIONS | |
+ | |
+/* Define to 1 if you have the declaration of `loginsuccess', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_LOGINSUCCESS | |
+ | |
+/* Define to 1 if you have the declaration of `MAXSYMLINKS', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_MAXSYMLINKS | |
+ | |
+/* Define to 1 if you have the declaration of `offsetof', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_OFFSETOF | |
+ | |
+/* Define to 1 if you have the declaration of `O_NONBLOCK', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_O_NONBLOCK | |
+ | |
+/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_PASSWDEXPIRED | |
+ | |
+/* Define to 1 if you have the declaration of `setauthdb', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_SETAUTHDB | |
+ | |
+/* Define to 1 if you have the declaration of `SHUT_RD', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL_SHUT_RD | |
+ | |
+/* Define to 1 if you have the declaration of `writev', and to 0 if you don't. | |
+ */ | |
+#undef HAVE_DECL_WRITEV | |
+ | |
+/* Define to 1 if you have the declaration of `_getlong', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL__GETLONG | |
+ | |
+/* Define to 1 if you have the declaration of `_getshort', and to 0 if you | |
+ don't. */ | |
+#undef HAVE_DECL__GETSHORT | |
+ | |
+/* Define if you have /dev/ptmx */ | |
+#undef HAVE_DEV_PTMX | |
+ | |
+/* Define if you have /dev/ptc */ | |
+#undef HAVE_DEV_PTS_AND_PTC | |
+ | |
+/* Define to 1 if you have the <dirent.h> header file. */ | |
+#undef HAVE_DIRENT_H | |
+ | |
+/* Define to 1 if you have the `dirfd' function. */ | |
+#undef HAVE_DIRFD | |
+ | |
+/* Define to 1 if you have the `dirname' function. */ | |
+#undef HAVE_DIRNAME | |
+ | |
+/* Define to 1 if you have the `DSA_generate_parameters_ex' function. */ | |
+#undef HAVE_DSA_GENERATE_PARAMETERS_EX | |
+ | |
+/* Define to 1 if you have the <elf.h> header file. */ | |
+#undef HAVE_ELF_H | |
+ | |
+/* Define to 1 if you have the <endian.h> header file. */ | |
+#undef HAVE_ENDIAN_H | |
+ | |
+/* Define to 1 if you have the `endutent' function. */ | |
+#undef HAVE_ENDUTENT | |
+ | |
+/* Define to 1 if you have the `endutxent' function. */ | |
+#undef HAVE_ENDUTXENT | |
+ | |
+/* Define if your system has /etc/default/login */ | |
+#undef HAVE_ETC_DEFAULT_LOGIN | |
+ | |
+/* Define if libcrypto has EVP_CIPHER_CTX_ctrl */ | |
+#undef HAVE_EVP_CIPHER_CTX_CTRL | |
+ | |
+/* Define to 1 if you have the `EVP_sha256' function. */ | |
+#undef HAVE_EVP_SHA256 | |
+ | |
+/* Define if you have ut_exit in utmp.h */ | |
+#undef HAVE_EXIT_IN_UTMP | |
+ | |
+/* Define to 1 if you have the `fchmod' function. */ | |
+#undef HAVE_FCHMOD | |
+ | |
+/* Define to 1 if you have the `fchown' function. */ | |
+#undef HAVE_FCHOWN | |
+ | |
+/* Use F_CLOSEM fcntl for closefrom */ | |
+#undef HAVE_FCNTL_CLOSEM | |
+ | |
+/* Define to 1 if you have the <fcntl.h> header file. */ | |
+#undef HAVE_FCNTL_H | |
+ | |
+/* Define to 1 if you have the <features.h> header file. */ | |
+#undef HAVE_FEATURES_H | |
+ | |
+/* Define to 1 if you have the <floatingpoint.h> header file. */ | |
+#undef HAVE_FLOATINGPOINT_H | |
+ | |
+/* Define to 1 if you have the `fmt_scaled' function. */ | |
+#undef HAVE_FMT_SCALED | |
+ | |
+/* Define to 1 if you have the `freeaddrinfo' function. */ | |
+#undef HAVE_FREEADDRINFO | |
+ | |
+/* Define to 1 if the system has the type `fsblkcnt_t'. */ | |
+#undef HAVE_FSBLKCNT_T | |
+ | |
+/* Define to 1 if the system has the type `fsfilcnt_t'. */ | |
+#undef HAVE_FSFILCNT_T | |
+ | |
+/* Define to 1 if you have the `fstatvfs' function. */ | |
+#undef HAVE_FSTATVFS | |
+ | |
+/* Define to 1 if you have the `futimes' function. */ | |
+#undef HAVE_FUTIMES | |
+ | |
+/* Define to 1 if you have the `gai_strerror' function. */ | |
+#undef HAVE_GAI_STRERROR | |
+ | |
+/* Define to 1 if you have the `getaddrinfo' function. */ | |
+#undef HAVE_GETADDRINFO | |
+ | |
+/* Define to 1 if you have the `getaudit' function. */ | |
+#undef HAVE_GETAUDIT | |
+ | |
+/* Define to 1 if you have the `getaudit_addr' function. */ | |
+#undef HAVE_GETAUDIT_ADDR | |
+ | |
+/* Define to 1 if you have the `getcwd' function. */ | |
+#undef HAVE_GETCWD | |
+ | |
+/* Define to 1 if you have the `getgrouplist' function. */ | |
+#undef HAVE_GETGROUPLIST | |
+ | |
+/* Define to 1 if you have the `getgrset' function. */ | |
+#undef HAVE_GETGRSET | |
+ | |
+/* Define to 1 if you have the `getlastlogxbyname' function. */ | |
+#undef HAVE_GETLASTLOGXBYNAME | |
+ | |
+/* Define to 1 if you have the `getluid' function. */ | |
+#undef HAVE_GETLUID | |
+ | |
+/* Define to 1 if you have the `getnameinfo' function. */ | |
+#undef HAVE_GETNAMEINFO | |
+ | |
+/* Define to 1 if you have the `getopt' function. */ | |
+#undef HAVE_GETOPT | |
+ | |
+/* Define to 1 if you have the <getopt.h> header file. */ | |
+#undef HAVE_GETOPT_H | |
+ | |
+/* Define if your getopt(3) defines and uses optreset */ | |
+#undef HAVE_GETOPT_OPTRESET | |
+ | |
+/* Define if your libraries define getpagesize() */ | |
+#undef HAVE_GETPAGESIZE | |
+ | |
+/* Define to 1 if you have the `getpeereid' function. */ | |
+#undef HAVE_GETPEEREID | |
+ | |
+/* Define to 1 if you have the `getpeerucred' function. */ | |
+#undef HAVE_GETPEERUCRED | |
+ | |
+/* Define to 1 if you have the `getpgid' function. */ | |
+#undef HAVE_GETPGID | |
+ | |
+/* Define to 1 if you have the `getpgrp' function. */ | |
+#undef HAVE_GETPGRP | |
+ | |
+/* Define to 1 if you have the `getpwanam' function. */ | |
+#undef HAVE_GETPWANAM | |
+ | |
+/* Define to 1 if you have the `getrlimit' function. */ | |
+#undef HAVE_GETRLIMIT | |
+ | |
+/* Define if getrrsetbyname() exists */ | |
+#undef HAVE_GETRRSETBYNAME | |
+ | |
+/* Define to 1 if you have the `getrusage' function. */ | |
+#undef HAVE_GETRUSAGE | |
+ | |
+/* Define to 1 if you have the `getseuserbyname' function. */ | |
+#undef HAVE_GETSEUSERBYNAME | |
+ | |
+/* Define to 1 if you have the `gettimeofday' function. */ | |
+#undef HAVE_GETTIMEOFDAY | |
+ | |
+/* Define to 1 if you have the `getttyent' function. */ | |
+#undef HAVE_GETTTYENT | |
+ | |
+/* Define to 1 if you have the `getutent' function. */ | |
+#undef HAVE_GETUTENT | |
+ | |
+/* Define to 1 if you have the `getutid' function. */ | |
+#undef HAVE_GETUTID | |
+ | |
+/* Define to 1 if you have the `getutline' function. */ | |
+#undef HAVE_GETUTLINE | |
+ | |
+/* Define to 1 if you have the `getutxent' function. */ | |
+#undef HAVE_GETUTXENT | |
+ | |
+/* Define to 1 if you have the `getutxid' function. */ | |
+#undef HAVE_GETUTXID | |
+ | |
+/* Define to 1 if you have the `getutxline' function. */ | |
+#undef HAVE_GETUTXLINE | |
+ | |
+/* Define to 1 if you have the `getutxuser' function. */ | |
+#undef HAVE_GETUTXUSER | |
+ | |
+/* Define to 1 if you have the `get_default_context_with_level' function. */ | |
+#undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL | |
+ | |
+/* Define to 1 if you have the `glob' function. */ | |
+#undef HAVE_GLOB | |
+ | |
+/* Define to 1 if you have the <glob.h> header file. */ | |
+#undef HAVE_GLOB_H | |
+ | |
+/* Define to 1 if you have the `group_from_gid' function. */ | |
+#undef HAVE_GROUP_FROM_GID | |
+ | |
+/* Define to 1 if you have the <gssapi_generic.h> header file. */ | |
+#undef HAVE_GSSAPI_GENERIC_H | |
+ | |
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */ | |
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H | |
+ | |
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */ | |
+#undef HAVE_GSSAPI_GSSAPI_H | |
+ | |
+/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */ | |
+#undef HAVE_GSSAPI_GSSAPI_KRB5_H | |
+ | |
+/* Define to 1 if you have the <gssapi.h> header file. */ | |
+#undef HAVE_GSSAPI_H | |
+ | |
+/* Define to 1 if you have the <gssapi_krb5.h> header file. */ | |
+#undef HAVE_GSSAPI_KRB5_H | |
+ | |
+/* Define if HEADER.ad exists in arpa/nameser.h */ | |
+#undef HAVE_HEADER_AD | |
+ | |
+/* Define to 1 if you have the `HMAC_CTX_init' function. */ | |
+#undef HAVE_HMAC_CTX_INIT | |
+ | |
+/* Define if you have ut_host in utmp.h */ | |
+#undef HAVE_HOST_IN_UTMP | |
+ | |
+/* Define if you have ut_host in utmpx.h */ | |
+#undef HAVE_HOST_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the <iaf.h> header file. */ | |
+#undef HAVE_IAF_H | |
+ | |
+/* Define to 1 if you have the <ia.h> header file. */ | |
+#undef HAVE_IA_H | |
+ | |
+/* Define if you have ut_id in utmp.h */ | |
+#undef HAVE_ID_IN_UTMP | |
+ | |
+/* Define if you have ut_id in utmpx.h */ | |
+#undef HAVE_ID_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the `inet_aton' function. */ | |
+#undef HAVE_INET_ATON | |
+ | |
+/* Define to 1 if you have the `inet_ntoa' function. */ | |
+#undef HAVE_INET_NTOA | |
+ | |
+/* Define to 1 if you have the `inet_ntop' function. */ | |
+#undef HAVE_INET_NTOP | |
+ | |
+/* Define to 1 if you have the `innetgr' function. */ | |
+#undef HAVE_INNETGR | |
+ | |
+/* define if you have int64_t data type */ | |
+#undef HAVE_INT64_T | |
+ | |
+/* Define to 1 if you have the <inttypes.h> header file. */ | |
+#undef HAVE_INTTYPES_H | |
+ | |
+/* define if you have intxx_t data type */ | |
+#undef HAVE_INTXX_T | |
+ | |
+/* Define to 1 if the system has the type `in_addr_t'. */ | |
+#undef HAVE_IN_ADDR_T | |
+ | |
+/* Define to 1 if the system has the type `in_port_t'. */ | |
+#undef HAVE_IN_PORT_T | |
+ | |
+/* Define if you have isblank(3C). */ | |
+#undef HAVE_ISBLANK | |
+ | |
+/* Define to 1 if you have the <lastlog.h> header file. */ | |
+#undef HAVE_LASTLOG_H | |
+ | |
+/* Define if you want ldns support */ | |
+#undef HAVE_LDNS | |
+ | |
+/* Define to 1 if you have the <libaudit.h> header file. */ | |
+#undef HAVE_LIBAUDIT_H | |
+ | |
+/* Define to 1 if you have the `bsm' library (-lbsm). */ | |
+#undef HAVE_LIBBSM | |
+ | |
+/* Define to 1 if you have the `crypt' library (-lcrypt). */ | |
+#undef HAVE_LIBCRYPT | |
+ | |
+/* Define to 1 if you have the `dl' library (-ldl). */ | |
+#undef HAVE_LIBDL | |
+ | |
+/* Define to 1 if you have the <libgen.h> header file. */ | |
+#undef HAVE_LIBGEN_H | |
+ | |
+/* Define if system has libiaf that supports set_id */ | |
+#undef HAVE_LIBIAF | |
+ | |
+/* Define to 1 if you have the `network' library (-lnetwork). */ | |
+#undef HAVE_LIBNETWORK | |
+ | |
+/* Define to 1 if you have the `nsl' library (-lnsl). */ | |
+#undef HAVE_LIBNSL | |
+ | |
+/* Define to 1 if you have the `pam' library (-lpam). */ | |
+#undef HAVE_LIBPAM | |
+ | |
+/* Define to 1 if you have the `socket' library (-lsocket). */ | |
+#undef HAVE_LIBSOCKET | |
+ | |
+/* Define to 1 if you have the <libutil.h> header file. */ | |
+#undef HAVE_LIBUTIL_H | |
+ | |
+/* Define to 1 if you have the `xnet' library (-lxnet). */ | |
+#undef HAVE_LIBXNET | |
+ | |
+/* Define to 1 if you have the `z' library (-lz). */ | |
+#undef HAVE_LIBZ | |
+ | |
+/* Define to 1 if you have the <limits.h> header file. */ | |
+#undef HAVE_LIMITS_H | |
+ | |
+/* Define to 1 if you have the <linux/audit.h> header file. */ | |
+#undef HAVE_LINUX_AUDIT_H | |
+ | |
+/* Define to 1 if you have the <linux/filter.h> header file. */ | |
+#undef HAVE_LINUX_FILTER_H | |
+ | |
+/* Define to 1 if you have the <linux/if_tun.h> header file. */ | |
+#undef HAVE_LINUX_IF_TUN_H | |
+ | |
+/* Define to 1 if you have the <linux/seccomp.h> header file. */ | |
+#undef HAVE_LINUX_SECCOMP_H | |
+ | |
+/* Define to 1 if you have the `login' function. */ | |
+#undef HAVE_LOGIN | |
+ | |
+/* Define to 1 if you have the <login_cap.h> header file. */ | |
+#undef HAVE_LOGIN_CAP_H | |
+ | |
+/* Define to 1 if you have the `login_getcapbool' function. */ | |
+#undef HAVE_LOGIN_GETCAPBOOL | |
+ | |
+/* Define to 1 if you have the <login.h> header file. */ | |
+#undef HAVE_LOGIN_H | |
+ | |
+/* Define to 1 if you have the `logout' function. */ | |
+#undef HAVE_LOGOUT | |
+ | |
+/* Define to 1 if you have the `logwtmp' function. */ | |
+#undef HAVE_LOGWTMP | |
+ | |
+/* Define to 1 if the system has the type `long double'. */ | |
+#undef HAVE_LONG_DOUBLE | |
+ | |
+/* Define to 1 if the system has the type `long long'. */ | |
+#undef HAVE_LONG_LONG | |
+ | |
+/* Define to 1 if you have the <maillock.h> header file. */ | |
+#undef HAVE_MAILLOCK_H | |
+ | |
+/* Define to 1 if you have the `md5_crypt' function. */ | |
+#undef HAVE_MD5_CRYPT | |
+ | |
+/* Define if you want to allow MD5 passwords */ | |
+#undef HAVE_MD5_PASSWORDS | |
+ | |
+/* Define to 1 if you have the `memmove' function. */ | |
+#undef HAVE_MEMMOVE | |
+ | |
+/* Define to 1 if you have the <memory.h> header file. */ | |
+#undef HAVE_MEMORY_H | |
+ | |
+/* Define to 1 if you have the `mkdtemp' function. */ | |
+#undef HAVE_MKDTEMP | |
+ | |
+/* Define to 1 if you have the `mmap' function. */ | |
+#undef HAVE_MMAP | |
+ | |
+/* define if you have mode_t data type */ | |
+#undef HAVE_MODE_T | |
+ | |
+/* Some systems put nanosleep outside of libc */ | |
+#undef HAVE_NANOSLEEP | |
+ | |
+/* Define to 1 if you have the <ndir.h> header file. */ | |
+#undef HAVE_NDIR_H | |
+ | |
+/* Define to 1 if you have the <netdb.h> header file. */ | |
+#undef HAVE_NETDB_H | |
+ | |
+/* Define to 1 if you have the <netgroup.h> header file. */ | |
+#undef HAVE_NETGROUP_H | |
+ | |
+/* Define to 1 if you have the <net/if_tun.h> header file. */ | |
+#undef HAVE_NET_IF_TUN_H | |
+ | |
+/* Define if you are on NeXT */ | |
+#undef HAVE_NEXT | |
+ | |
+/* Define to 1 if you have the `ngetaddrinfo' function. */ | |
+#undef HAVE_NGETADDRINFO | |
+ | |
+/* Define to 1 if you have the `nsleep' function. */ | |
+#undef HAVE_NSLEEP | |
+ | |
+/* Define to 1 if you have the `ogetaddrinfo' function. */ | |
+#undef HAVE_OGETADDRINFO | |
+ | |
+/* Define if you have an old version of PAM which takes only one argument to | |
+ pam_strerror */ | |
+#undef HAVE_OLD_PAM | |
+ | |
+/* Define to 1 if you have the `openlog_r' function. */ | |
+#undef HAVE_OPENLOG_R | |
+ | |
+/* Define to 1 if you have the `openpty' function. */ | |
+#undef HAVE_OPENPTY | |
+ | |
+/* Define if your ssl headers are included with #include <openssl/header.h> */ | |
+#undef HAVE_OPENSSL | |
+ | |
+/* Define if you have Digital Unix Security Integration Architecture */ | |
+#undef HAVE_OSF_SIA | |
+ | |
+/* Define to 1 if you have the `pam_getenvlist' function. */ | |
+#undef HAVE_PAM_GETENVLIST | |
+ | |
+/* Define to 1 if you have the <pam/pam_appl.h> header file. */ | |
+#undef HAVE_PAM_PAM_APPL_H | |
+ | |
+/* Define to 1 if you have the `pam_putenv' function. */ | |
+#undef HAVE_PAM_PUTENV | |
+ | |
+/* Define to 1 if you have the <paths.h> header file. */ | |
+#undef HAVE_PATHS_H | |
+ | |
+/* Define if you have ut_pid in utmp.h */ | |
+#undef HAVE_PID_IN_UTMP | |
+ | |
+/* define if you have pid_t data type */ | |
+#undef HAVE_PID_T | |
+ | |
+/* Define to 1 if you have the `poll' function. */ | |
+#undef HAVE_POLL | |
+ | |
+/* Define to 1 if you have the <poll.h> header file. */ | |
+#undef HAVE_POLL_H | |
+ | |
+/* Define to 1 if you have the `prctl' function. */ | |
+#undef HAVE_PRCTL | |
+ | |
+/* Define if you have /proc/$pid/fd */ | |
+#undef HAVE_PROC_PID | |
+ | |
+/* Define to 1 if you have the `pstat' function. */ | |
+#undef HAVE_PSTAT | |
+ | |
+/* Define to 1 if you have the <pty.h> header file. */ | |
+#undef HAVE_PTY_H | |
+ | |
+/* Define to 1 if you have the `pututline' function. */ | |
+#undef HAVE_PUTUTLINE | |
+ | |
+/* Define to 1 if you have the `pututxline' function. */ | |
+#undef HAVE_PUTUTXLINE | |
+ | |
+/* Define if your password has a pw_change field */ | |
+#undef HAVE_PW_CHANGE_IN_PASSWD | |
+ | |
+/* Define if your password has a pw_class field */ | |
+#undef HAVE_PW_CLASS_IN_PASSWD | |
+ | |
+/* Define if your password has a pw_expire field */ | |
+#undef HAVE_PW_EXPIRE_IN_PASSWD | |
+ | |
+/* Define to 1 if you have the `readpassphrase' function. */ | |
+#undef HAVE_READPASSPHRASE | |
+ | |
+/* Define to 1 if you have the <readpassphrase.h> header file. */ | |
+#undef HAVE_READPASSPHRASE_H | |
+ | |
+/* Define to 1 if you have the `realpath' function. */ | |
+#undef HAVE_REALPATH | |
+ | |
+/* Define to 1 if you have the `recvmsg' function. */ | |
+#undef HAVE_RECVMSG | |
+ | |
+/* sys/resource.h has RLIMIT_NPROC */ | |
+#undef HAVE_RLIMIT_NPROC | |
+ | |
+/* Define to 1 if you have the <rpc/types.h> header file. */ | |
+#undef HAVE_RPC_TYPES_H | |
+ | |
+/* Define to 1 if you have the `rresvport_af' function. */ | |
+#undef HAVE_RRESVPORT_AF | |
+ | |
+/* Define to 1 if you have the `RSA_generate_key_ex' function. */ | |
+#undef HAVE_RSA_GENERATE_KEY_EX | |
+ | |
+/* Define to 1 if you have the `RSA_get_default_method' function. */ | |
+#undef HAVE_RSA_GET_DEFAULT_METHOD | |
+ | |
+/* Define to 1 if you have the <sandbox.h> header file. */ | |
+#undef HAVE_SANDBOX_H | |
+ | |
+/* Define to 1 if you have the `sandbox_init' function. */ | |
+#undef HAVE_SANDBOX_INIT | |
+ | |
+/* define if you have sa_family_t data type */ | |
+#undef HAVE_SA_FAMILY_T | |
+ | |
+/* Define if you have SecureWare-based protected password database */ | |
+#undef HAVE_SECUREWARE | |
+ | |
+/* Define to 1 if you have the <security/pam_appl.h> header file. */ | |
+#undef HAVE_SECURITY_PAM_APPL_H | |
+ | |
+/* Define to 1 if you have the `sendmsg' function. */ | |
+#undef HAVE_SENDMSG | |
+ | |
+/* Define to 1 if you have the `setauthdb' function. */ | |
+#undef HAVE_SETAUTHDB | |
+ | |
+/* Define to 1 if you have the `setdtablesize' function. */ | |
+#undef HAVE_SETDTABLESIZE | |
+ | |
+/* Define to 1 if you have the `setegid' function. */ | |
+#undef HAVE_SETEGID | |
+ | |
+/* Define to 1 if you have the `setenv' function. */ | |
+#undef HAVE_SETENV | |
+ | |
+/* Define to 1 if you have the `seteuid' function. */ | |
+#undef HAVE_SETEUID | |
+ | |
+/* Define to 1 if you have the `setgroupent' function. */ | |
+#undef HAVE_SETGROUPENT | |
+ | |
+/* Define to 1 if you have the `setgroups' function. */ | |
+#undef HAVE_SETGROUPS | |
+ | |
+/* Define to 1 if you have the `setlinebuf' function. */ | |
+#undef HAVE_SETLINEBUF | |
+ | |
+/* Define to 1 if you have the `setlogin' function. */ | |
+#undef HAVE_SETLOGIN | |
+ | |
+/* Define to 1 if you have the `setluid' function. */ | |
+#undef HAVE_SETLUID | |
+ | |
+/* Define to 1 if you have the `setpassent' function. */ | |
+#undef HAVE_SETPASSENT | |
+ | |
+/* Define to 1 if you have the `setpcred' function. */ | |
+#undef HAVE_SETPCRED | |
+ | |
+/* Define to 1 if you have the `setproctitle' function. */ | |
+#undef HAVE_SETPROCTITLE | |
+ | |
+/* Define to 1 if you have the `setregid' function. */ | |
+#undef HAVE_SETREGID | |
+ | |
+/* Define to 1 if you have the `setresgid' function. */ | |
+#undef HAVE_SETRESGID | |
+ | |
+/* Define to 1 if you have the `setresuid' function. */ | |
+#undef HAVE_SETRESUID | |
+ | |
+/* Define to 1 if you have the `setreuid' function. */ | |
+#undef HAVE_SETREUID | |
+ | |
+/* Define to 1 if you have the `setrlimit' function. */ | |
+#undef HAVE_SETRLIMIT | |
+ | |
+/* Define to 1 if you have the `setsid' function. */ | |
+#undef HAVE_SETSID | |
+ | |
+/* Define to 1 if you have the `setutent' function. */ | |
+#undef HAVE_SETUTENT | |
+ | |
+/* Define to 1 if you have the `setutxdb' function. */ | |
+#undef HAVE_SETUTXDB | |
+ | |
+/* Define to 1 if you have the `setutxent' function. */ | |
+#undef HAVE_SETUTXENT | |
+ | |
+/* Define to 1 if you have the `setvbuf' function. */ | |
+#undef HAVE_SETVBUF | |
+ | |
+/* Define to 1 if you have the `set_id' function. */ | |
+#undef HAVE_SET_ID | |
+ | |
+/* Define to 1 if you have the `SHA256_Update' function. */ | |
+#undef HAVE_SHA256_UPDATE | |
+ | |
+/* Define to 1 if you have the <sha2.h> header file. */ | |
+#undef HAVE_SHA2_H | |
+ | |
+/* Define to 1 if you have the <shadow.h> header file. */ | |
+#undef HAVE_SHADOW_H | |
+ | |
+/* Define to 1 if you have the `sigaction' function. */ | |
+#undef HAVE_SIGACTION | |
+ | |
+/* Define to 1 if you have the `sigvec' function. */ | |
+#undef HAVE_SIGVEC | |
+ | |
+/* Define to 1 if the system has the type `sig_atomic_t'. */ | |
+#undef HAVE_SIG_ATOMIC_T | |
+ | |
+/* define if you have size_t data type */ | |
+#undef HAVE_SIZE_T | |
+ | |
+/* Define to 1 if you have the `snprintf' function. */ | |
+#undef HAVE_SNPRINTF | |
+ | |
+/* Define to 1 if you have the `socketpair' function. */ | |
+#undef HAVE_SOCKETPAIR | |
+ | |
+/* Have PEERCRED socket option */ | |
+#undef HAVE_SO_PEERCRED | |
+ | |
+/* define if you have ssize_t data type */ | |
+#undef HAVE_SSIZE_T | |
+ | |
+/* Fields in struct sockaddr_storage */ | |
+#undef HAVE_SS_FAMILY_IN_SS | |
+ | |
+/* Define to 1 if you have the `statfs' function. */ | |
+#undef HAVE_STATFS | |
+ | |
+/* Define to 1 if you have the `statvfs' function. */ | |
+#undef HAVE_STATVFS | |
+ | |
+/* Define to 1 if you have the <stddef.h> header file. */ | |
+#undef HAVE_STDDEF_H | |
+ | |
+/* Define to 1 if you have the <stdint.h> header file. */ | |
+#undef HAVE_STDINT_H | |
+ | |
+/* Define to 1 if you have the <stdlib.h> header file. */ | |
+#undef HAVE_STDLIB_H | |
+ | |
+/* Define to 1 if you have the `strdup' function. */ | |
+#undef HAVE_STRDUP | |
+ | |
+/* Define to 1 if you have the `strerror' function. */ | |
+#undef HAVE_STRERROR | |
+ | |
+/* Define to 1 if you have the `strftime' function. */ | |
+#undef HAVE_STRFTIME | |
+ | |
+/* Silly mkstemp() */ | |
+#undef HAVE_STRICT_MKSTEMP | |
+ | |
+/* Define to 1 if you have the <strings.h> header file. */ | |
+#undef HAVE_STRINGS_H | |
+ | |
+/* Define to 1 if you have the <string.h> header file. */ | |
+#undef HAVE_STRING_H | |
+ | |
+/* Define to 1 if you have the `strlcat' function. */ | |
+#undef HAVE_STRLCAT | |
+ | |
+/* Define to 1 if you have the `strlcpy' function. */ | |
+#undef HAVE_STRLCPY | |
+ | |
+/* Define to 1 if you have the `strmode' function. */ | |
+#undef HAVE_STRMODE | |
+ | |
+/* Define to 1 if you have the `strnlen' function. */ | |
+#undef HAVE_STRNLEN | |
+ | |
+/* Define to 1 if you have the `strnvis' function. */ | |
+#undef HAVE_STRNVIS | |
+ | |
+/* Define to 1 if you have the `strptime' function. */ | |
+#undef HAVE_STRPTIME | |
+ | |
+/* Define to 1 if you have the `strsep' function. */ | |
+#undef HAVE_STRSEP | |
+ | |
+/* Define to 1 if you have the `strtoll' function. */ | |
+#undef HAVE_STRTOLL | |
+ | |
+/* Define to 1 if you have the `strtonum' function. */ | |
+#undef HAVE_STRTONUM | |
+ | |
+/* Define to 1 if you have the `strtoul' function. */ | |
+#undef HAVE_STRTOUL | |
+ | |
+/* Define to 1 if you have the `strtoull' function. */ | |
+#undef HAVE_STRTOULL | |
+ | |
+/* define if you have struct addrinfo data type */ | |
+#undef HAVE_STRUCT_ADDRINFO | |
+ | |
+/* define if you have struct in6_addr data type */ | |
+#undef HAVE_STRUCT_IN6_ADDR | |
+ | |
+/* define if you have struct sockaddr_in6 data type */ | |
+#undef HAVE_STRUCT_SOCKADDR_IN6 | |
+ | |
+/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ | |
+#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID | |
+ | |
+/* define if you have struct sockaddr_storage data type */ | |
+#undef HAVE_STRUCT_SOCKADDR_STORAGE | |
+ | |
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */ | |
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE | |
+ | |
+/* Define to 1 if the system has the type `struct timespec'. */ | |
+#undef HAVE_STRUCT_TIMESPEC | |
+ | |
+/* define if you have struct timeval */ | |
+#undef HAVE_STRUCT_TIMEVAL | |
+ | |
+/* Define to 1 if you have the `swap32' function. */ | |
+#undef HAVE_SWAP32 | |
+ | |
+/* Define to 1 if you have the `sysconf' function. */ | |
+#undef HAVE_SYSCONF | |
+ | |
+/* Define if you have syslen in utmpx.h */ | |
+#undef HAVE_SYSLEN_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the <sys/audit.h> header file. */ | |
+#undef HAVE_SYS_AUDIT_H | |
+ | |
+/* Define to 1 if you have the <sys/bitypes.h> header file. */ | |
+#undef HAVE_SYS_BITYPES_H | |
+ | |
+/* Define to 1 if you have the <sys/bsdtty.h> header file. */ | |
+#undef HAVE_SYS_BSDTTY_H | |
+ | |
+/* Define to 1 if you have the <sys/cdefs.h> header file. */ | |
+#undef HAVE_SYS_CDEFS_H | |
+ | |
+/* Define to 1 if you have the <sys/dir.h> header file. */ | |
+#undef HAVE_SYS_DIR_H | |
+ | |
+/* Define if your system defines sys_errlist[] */ | |
+#undef HAVE_SYS_ERRLIST | |
+ | |
+/* Define to 1 if you have the <sys/mman.h> header file. */ | |
+#undef HAVE_SYS_MMAN_H | |
+ | |
+/* Define to 1 if you have the <sys/mount.h> header file. */ | |
+#undef HAVE_SYS_MOUNT_H | |
+ | |
+/* Define to 1 if you have the <sys/ndir.h> header file. */ | |
+#undef HAVE_SYS_NDIR_H | |
+ | |
+/* Define if your system defines sys_nerr */ | |
+#undef HAVE_SYS_NERR | |
+ | |
+/* Define to 1 if you have the <sys/poll.h> header file. */ | |
+#undef HAVE_SYS_POLL_H | |
+ | |
+/* Define to 1 if you have the <sys/prctl.h> header file. */ | |
+#undef HAVE_SYS_PRCTL_H | |
+ | |
+/* Define to 1 if you have the <sys/pstat.h> header file. */ | |
+#undef HAVE_SYS_PSTAT_H | |
+ | |
+/* Define to 1 if you have the <sys/ptms.h> header file. */ | |
+#undef HAVE_SYS_PTMS_H | |
+ | |
+/* Define to 1 if you have the <sys/select.h> header file. */ | |
+#undef HAVE_SYS_SELECT_H | |
+ | |
+/* Define to 1 if you have the <sys/statvfs.h> header file. */ | |
+#undef HAVE_SYS_STATVFS_H | |
+ | |
+/* Define to 1 if you have the <sys/stat.h> header file. */ | |
+#undef HAVE_SYS_STAT_H | |
+ | |
+/* Define to 1 if you have the <sys/stream.h> header file. */ | |
+#undef HAVE_SYS_STREAM_H | |
+ | |
+/* Define to 1 if you have the <sys/stropts.h> header file. */ | |
+#undef HAVE_SYS_STROPTS_H | |
+ | |
+/* Define to 1 if you have the <sys/strtio.h> header file. */ | |
+#undef HAVE_SYS_STRTIO_H | |
+ | |
+/* Force use of sys/syslog.h on Ultrix */ | |
+#undef HAVE_SYS_SYSLOG_H | |
+ | |
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */ | |
+#undef HAVE_SYS_SYSMACROS_H | |
+ | |
+/* Define to 1 if you have the <sys/timers.h> header file. */ | |
+#undef HAVE_SYS_TIMERS_H | |
+ | |
+/* Define to 1 if you have the <sys/time.h> header file. */ | |
+#undef HAVE_SYS_TIME_H | |
+ | |
+/* Define to 1 if you have the <sys/types.h> header file. */ | |
+#undef HAVE_SYS_TYPES_H | |
+ | |
+/* Define to 1 if you have the <sys/un.h> header file. */ | |
+#undef HAVE_SYS_UN_H | |
+ | |
+/* Define to 1 if you have the `tcgetpgrp' function. */ | |
+#undef HAVE_TCGETPGRP | |
+ | |
+/* Define to 1 if you have the `tcsendbreak' function. */ | |
+#undef HAVE_TCSENDBREAK | |
+ | |
+/* Define to 1 if you have the `time' function. */ | |
+#undef HAVE_TIME | |
+ | |
+/* Define to 1 if you have the <time.h> header file. */ | |
+#undef HAVE_TIME_H | |
+ | |
+/* Define if you have ut_time in utmp.h */ | |
+#undef HAVE_TIME_IN_UTMP | |
+ | |
+/* Define if you have ut_time in utmpx.h */ | |
+#undef HAVE_TIME_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the `timingsafe_bcmp' function. */ | |
+#undef HAVE_TIMINGSAFE_BCMP | |
+ | |
+/* Define to 1 if you have the <tmpdir.h> header file. */ | |
+#undef HAVE_TMPDIR_H | |
+ | |
+/* Define to 1 if you have the `truncate' function. */ | |
+#undef HAVE_TRUNCATE | |
+ | |
+/* Define to 1 if you have the <ttyent.h> header file. */ | |
+#undef HAVE_TTYENT_H | |
+ | |
+/* Define if you have ut_tv in utmp.h */ | |
+#undef HAVE_TV_IN_UTMP | |
+ | |
+/* Define if you have ut_tv in utmpx.h */ | |
+#undef HAVE_TV_IN_UTMPX | |
+ | |
+/* Define if you have ut_type in utmp.h */ | |
+#undef HAVE_TYPE_IN_UTMP | |
+ | |
+/* Define if you have ut_type in utmpx.h */ | |
+#undef HAVE_TYPE_IN_UTMPX | |
+ | |
+/* Define to 1 if you have the <ucred.h> header file. */ | |
+#undef HAVE_UCRED_H | |
+ | |
+/* define if you have uintxx_t data type */ | |
+#undef HAVE_UINTXX_T | |
+ | |
+/* Define to 1 if you have the <unistd.h> header file. */ | |
+#undef HAVE_UNISTD_H | |
+ | |
+/* Define to 1 if you have the `unsetenv' function. */ | |
+#undef HAVE_UNSETENV | |
+ | |
+/* Define to 1 if the system has the type `unsigned long long'. */ | |
+#undef HAVE_UNSIGNED_LONG_LONG | |
+ | |
+/* Define to 1 if you have the `updwtmp' function. */ | |
+#undef HAVE_UPDWTMP | |
+ | |
+/* Define to 1 if you have the `updwtmpx' function. */ | |
+#undef HAVE_UPDWTMPX | |
+ | |
+/* Define to 1 if you have the <usersec.h> header file. */ | |
+#undef HAVE_USERSEC_H | |
+ | |
+/* Define to 1 if you have the `user_from_uid' function. */ | |
+#undef HAVE_USER_FROM_UID | |
+ | |
+/* Define to 1 if you have the `usleep' function. */ | |
+#undef HAVE_USLEEP | |
+ | |
+/* Define to 1 if you have the <util.h> header file. */ | |
+#undef HAVE_UTIL_H | |
+ | |
+/* Define to 1 if you have the `utimes' function. */ | |
+#undef HAVE_UTIMES | |
+ | |
+/* Define to 1 if you have the <utime.h> header file. */ | |
+#undef HAVE_UTIME_H | |
+ | |
+/* Define to 1 if you have the `utmpname' function. */ | |
+#undef HAVE_UTMPNAME | |
+ | |
+/* Define to 1 if you have the `utmpxname' function. */ | |
+#undef HAVE_UTMPXNAME | |
+ | |
+/* Define to 1 if you have the <utmpx.h> header file. */ | |
+#undef HAVE_UTMPX_H | |
+ | |
+/* Define to 1 if you have the <utmp.h> header file. */ | |
+#undef HAVE_UTMP_H | |
+ | |
+/* define if you have u_char data type */ | |
+#undef HAVE_U_CHAR | |
+ | |
+/* define if you have u_int data type */ | |
+#undef HAVE_U_INT | |
+ | |
+/* define if you have u_int64_t data type */ | |
+#undef HAVE_U_INT64_T | |
+ | |
+/* define if you have u_intxx_t data type */ | |
+#undef HAVE_U_INTXX_T | |
+ | |
+/* Define to 1 if you have the `vasprintf' function. */ | |
+#undef HAVE_VASPRINTF | |
+ | |
+/* Define if va_copy exists */ | |
+#undef HAVE_VA_COPY | |
+ | |
+/* Define to 1 if you have the `vhangup' function. */ | |
+#undef HAVE_VHANGUP | |
+ | |
+/* Define to 1 if you have the <vis.h> header file. */ | |
+#undef HAVE_VIS_H | |
+ | |
+/* Define to 1 if you have the `vsnprintf' function. */ | |
+#undef HAVE_VSNPRINTF | |
+ | |
+/* Define to 1 if you have the `waitpid' function. */ | |
+#undef HAVE_WAITPID | |
+ | |
+/* Define to 1 if you have the `_getlong' function. */ | |
+#undef HAVE__GETLONG | |
+ | |
+/* Define to 1 if you have the `_getpty' function. */ | |
+#undef HAVE__GETPTY | |
+ | |
+/* Define to 1 if you have the `_getshort' function. */ | |
+#undef HAVE__GETSHORT | |
+ | |
+/* Define if you have struct __res_state _res as an extern */ | |
+#undef HAVE__RES_EXTERN | |
+ | |
+/* Define to 1 if you have the `__b64_ntop' function. */ | |
+#undef HAVE___B64_NTOP | |
+ | |
+/* Define to 1 if you have the `__b64_pton' function. */ | |
+#undef HAVE___B64_PTON | |
+ | |
+/* Define if compiler implements __FUNCTION__ */ | |
+#undef HAVE___FUNCTION__ | |
+ | |
+/* Define if libc defines __progname */ | |
+#undef HAVE___PROGNAME | |
+ | |
+/* Fields in struct sockaddr_storage */ | |
+#undef HAVE___SS_FAMILY_IN_SS | |
+ | |
+/* Define if __va_copy exists */ | |
+#undef HAVE___VA_COPY | |
+ | |
+/* Define if compiler implements __func__ */ | |
+#undef HAVE___func__ | |
+ | |
+/* Define this if you are using the Heimdal version of Kerberos V5 */ | |
+#undef HEIMDAL | |
+ | |
+/* Define if you need to use IP address instead of hostname in $DISPLAY */ | |
+#undef IPADDR_IN_DISPLAY | |
+ | |
+/* Detect IPv4 in IPv6 mapped addresses and treat as IPv4 */ | |
+#undef IPV4_IN_IPV6 | |
+ | |
+/* Define if your system choked on IP TOS setting */ | |
+#undef IP_TOS_IS_BROKEN | |
+ | |
+/* Define if you want Kerberos 5 support */ | |
+#undef KRB5 | |
+ | |
+/* Define if pututxline updates lastlog too */ | |
+#undef LASTLOG_WRITE_PUTUTXLINE | |
+ | |
+/* Define if you want TCP Wrappers support */ | |
+#undef LIBWRAP | |
+ | |
+/* Define to whatever link() returns for "not supported" if it doesn't return | |
+ EOPNOTSUPP. */ | |
+#undef LINK_OPNOTSUPP_ERRNO | |
+ | |
+/* Adjust Linux out-of-memory killer */ | |
+#undef LINUX_OOM_ADJUST | |
+ | |
+/* max value of long long calculated by configure */ | |
+#undef LLONG_MAX | |
+ | |
+/* min value of long long calculated by configure */ | |
+#undef LLONG_MIN | |
+ | |
+/* Account locked with pw(1) */ | |
+#undef LOCKED_PASSWD_PREFIX | |
+ | |
+/* String used in /etc/passwd to denote locked account */ | |
+#undef LOCKED_PASSWD_STRING | |
+ | |
+/* String used in /etc/passwd to denote locked account */ | |
+#undef LOCKED_PASSWD_SUBSTR | |
+ | |
+/* Some versions of /bin/login need the TERM supplied on the commandline */ | |
+#undef LOGIN_NEEDS_TERM | |
+ | |
+/* Some systems need a utmpx entry for /bin/login to work */ | |
+#undef LOGIN_NEEDS_UTMPX | |
+ | |
+/* Define if your login program cannot handle end of options ("--") */ | |
+#undef LOGIN_NO_ENDOPT | |
+ | |
+/* If your header files don't define LOGIN_PROGRAM, then use this (detected) | |
+ from environment and PATH */ | |
+#undef LOGIN_PROGRAM_FALLBACK | |
+ | |
+/* Set this to your mail directory if you do not have _PATH_MAILDIR */ | |
+#undef MAIL_DIRECTORY | |
+ | |
+/* Define on *nto-qnx systems */ | |
+#undef MISSING_FD_MASK | |
+ | |
+/* Define on *nto-qnx systems */ | |
+#undef MISSING_HOWMANY | |
+ | |
+/* Define on *nto-qnx systems */ | |
+#undef MISSING_NFDBITS | |
+ | |
+/* Need setpgrp to acquire controlling tty */ | |
+#undef NEED_SETPGRP | |
+ | |
+/* compiler does not accept __attribute__ on return types */ | |
+#undef NO_ATTRIBUTE_ON_RETURN_TYPE | |
+ | |
+/* Define if the concept of ports only accessible to superusers isn't known */ | |
+#undef NO_IPPORT_RESERVED_CONCEPT | |
+ | |
+/* Define if you don't want to use lastlog in session.c */ | |
+#undef NO_SSH_LASTLOG | |
+ | |
+/* Define if X11 doesn't support AF_UNIX sockets on that system */ | |
+#undef NO_X11_UNIX_SOCKETS | |
+ | |
+/* Define if EVP_DigestUpdate returns void */ | |
+#undef OPENSSL_EVP_DIGESTUPDATE_VOID | |
+ | |
+/* libcrypto includes complete ECC support */ | |
+#undef OPENSSL_HAS_ECC | |
+ | |
+/* libcrypto has EVP AES CTR */ | |
+#undef OPENSSL_HAVE_EVPCTR | |
+ | |
+/* libcrypto has EVP AES GCM */ | |
+#undef OPENSSL_HAVE_EVPGCM | |
+ | |
+/* libcrypto is missing AES 192 and 256 bit functions */ | |
+#undef OPENSSL_LOBOTOMISED_AES | |
+ | |
+/* Define if you want OpenSSL's internally seeded PRNG only */ | |
+#undef OPENSSL_PRNG_ONLY | |
+ | |
+/* Define to the address where bug reports for this package should be sent. */ | |
+#undef PACKAGE_BUGREPORT | |
+ | |
+/* Define to the full name of this package. */ | |
+#undef PACKAGE_NAME | |
+ | |
+/* Define to the full name and version of this package. */ | |
+#undef PACKAGE_STRING | |
+ | |
+/* Define to the one symbol short name of this package. */ | |
+#undef PACKAGE_TARNAME | |
+ | |
+/* Define to the home page for this package. */ | |
+#undef PACKAGE_URL | |
+ | |
+/* Define to the version of this package. */ | |
+#undef PACKAGE_VERSION | |
+ | |
+/* Define if you are using Solaris-derived PAM which passes pam_messages to | |
+ the conversation function with an extra level of indirection */ | |
+#undef PAM_SUN_CODEBASE | |
+ | |
+/* Work around problematic Linux PAM modules handling of PAM_TTY */ | |
+#undef PAM_TTY_KLUDGE | |
+ | |
+/* must supply username to passwd */ | |
+#undef PASSWD_NEEDS_USERNAME | |
+ | |
+/* System dirs owned by bin (uid 2) */ | |
+#undef PLATFORM_SYS_DIR_UID | |
+ | |
+/* Port number of PRNGD/EGD random number socket */ | |
+#undef PRNGD_PORT | |
+ | |
+/* Location of PRNGD/EGD random number socket */ | |
+#undef PRNGD_SOCKET | |
+ | |
+/* read(1) can return 0 for a non-closed fd */ | |
+#undef PTY_ZEROREAD | |
+ | |
+/* Sandbox using Darwin sandbox_init(3) */ | |
+#undef SANDBOX_DARWIN | |
+ | |
+/* no privsep sandboxing */ | |
+#undef SANDBOX_NULL | |
+ | |
+/* Sandbox using setrlimit(2) */ | |
+#undef SANDBOX_RLIMIT | |
+ | |
+/* Sandbox using seccomp filter */ | |
+#undef SANDBOX_SECCOMP_FILTER | |
+ | |
+/* setrlimit RLIMIT_FSIZE works */ | |
+#undef SANDBOX_SKIP_RLIMIT_FSIZE | |
+ | |
+/* Sandbox using systrace(4) */ | |
+#undef SANDBOX_SYSTRACE | |
+ | |
+/* Specify the system call convention in use */ | |
+#undef SECCOMP_AUDIT_ARCH | |
+ | |
+/* Define if your platform breaks doing a seteuid before a setuid */ | |
+#undef SETEUID_BREAKS_SETUID | |
+ | |
+/* The size of `int', as computed by sizeof. */ | |
+#undef SIZEOF_INT | |
+ | |
+/* The size of `long int', as computed by sizeof. */ | |
+#undef SIZEOF_LONG_INT | |
+ | |
+/* The size of `long long int', as computed by sizeof. */ | |
+#undef SIZEOF_LONG_LONG_INT | |
+ | |
+/* The size of `short int', as computed by sizeof. */ | |
+#undef SIZEOF_SHORT_INT | |
+ | |
+/* Define if you want S/Key support */ | |
+#undef SKEY | |
+ | |
+/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */ | |
+#undef SKEYCHALLENGE_4ARG | |
+ | |
+/* Define as const if snprintf() can declare const char *fmt */ | |
+#undef SNPRINTF_CONST | |
+ | |
+/* Define to a Set Process Title type if your system is supported by | |
+ bsd-setproctitle.c */ | |
+#undef SPT_TYPE | |
+ | |
+/* Define if sshd somehow reacquires a controlling TTY after setsid() */ | |
+#undef SSHD_ACQUIRES_CTTY | |
+ | |
+/* Define if pam_chauthtok wants real uid set to the unpriv'ed user */ | |
+#undef SSHPAM_CHAUTHTOK_NEEDS_RUID | |
+ | |
+/* Use audit debugging module */ | |
+#undef SSH_AUDIT_EVENTS | |
+ | |
+/* Windows is sensitive to read buffer size */ | |
+#undef SSH_IOBUFSZ | |
+ | |
+/* non-privileged user for privilege separation */ | |
+#undef SSH_PRIVSEP_USER | |
+ | |
+/* Use tunnel device compatibility to OpenBSD */ | |
+#undef SSH_TUN_COMPAT_AF | |
+ | |
+/* Open tunnel devices the FreeBSD way */ | |
+#undef SSH_TUN_FREEBSD | |
+ | |
+/* Open tunnel devices the Linux tun/tap way */ | |
+#undef SSH_TUN_LINUX | |
+ | |
+/* No layer 2 tunnel support */ | |
+#undef SSH_TUN_NO_L2 | |
+ | |
+/* Open tunnel devices the OpenBSD way */ | |
+#undef SSH_TUN_OPENBSD | |
+ | |
+/* Prepend the address family to IP tunnel traffic */ | |
+#undef SSH_TUN_PREPEND_AF | |
+ | |
+/* Define to 1 if you have the ANSI C header files. */ | |
+#undef STDC_HEADERS | |
+ | |
+/* Define if you want a different $PATH for the superuser */ | |
+#undef SUPERUSER_PATH | |
+ | |
+/* syslog_r function is safe to use in in a signal handler */ | |
+#undef SYSLOG_R_SAFE_IN_SIGHAND | |
+ | |
+/* Support passwords > 8 chars */ | |
+#undef UNIXWARE_LONG_PASSWORDS | |
+ | |
+/* Specify default $PATH */ | |
+#undef USER_PATH | |
+ | |
+/* Define this if you want to use libkafs' AFS support */ | |
+#undef USE_AFS | |
+ | |
+/* Use BSM audit module */ | |
+#undef USE_BSM_AUDIT | |
+ | |
+/* Use btmp to log bad logins */ | |
+#undef USE_BTMP | |
+ | |
+/* Use libedit for sftp */ | |
+#undef USE_LIBEDIT | |
+ | |
+/* Use Linux audit module */ | |
+#undef USE_LINUX_AUDIT | |
+ | |
+/* Enable OpenSSL engine support */ | |
+#undef USE_OPENSSL_ENGINE | |
+ | |
+/* Define if you want to enable PAM support */ | |
+#undef USE_PAM | |
+ | |
+/* Use PIPES instead of a socketpair() */ | |
+#undef USE_PIPES | |
+ | |
+/* Define if you have Solaris process contracts */ | |
+#undef USE_SOLARIS_PROCESS_CONTRACTS | |
+ | |
+/* Define if you have Solaris projects */ | |
+#undef USE_SOLARIS_PROJECTS | |
+ | |
+/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */ | |
+#undef WITH_ABBREV_NO_TTY | |
+ | |
+/* Define if you want to enable AIX4's authenticate function */ | |
+#undef WITH_AIXAUTHENTICATE | |
+ | |
+/* Define if you have/want arrays (cluster-wide session managment, not C | |
+ arrays) */ | |
+#undef WITH_IRIX_ARRAY | |
+ | |
+/* Define if you want IRIX audit trails */ | |
+#undef WITH_IRIX_AUDIT | |
+ | |
+/* Define if you want IRIX kernel jobs */ | |
+#undef WITH_IRIX_JOBS | |
+ | |
+/* Define if you want IRIX project management */ | |
+#undef WITH_IRIX_PROJECT | |
+ | |
+/* Define if you want SELinux support. */ | |
+#undef WITH_SELINUX | |
+ | |
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most | |
+ significant byte first (like Motorola and SPARC, unlike Intel). */ | |
+#if defined AC_APPLE_UNIVERSAL_BUILD | |
+# if defined __BIG_ENDIAN__ | |
+# define WORDS_BIGENDIAN 1 | |
+# endif | |
+#else | |
+# ifndef WORDS_BIGENDIAN | |
+# undef WORDS_BIGENDIAN | |
+# endif | |
+#endif | |
+ | |
+/* Define if xauth is found in your path */ | |
+#undef XAUTH_PATH | |
+ | |
+/* Number of bits in a file offset, on hosts where this is settable. */ | |
+#undef _FILE_OFFSET_BITS | |
+ | |
+/* Define for large files, on AIX-style hosts. */ | |
+#undef _LARGE_FILES | |
+ | |
+/* log for bad login attempts */ | |
+#undef _PATH_BTMP | |
+ | |
+/* Full path of your "passwd" program */ | |
+#undef _PATH_PASSWD_PROG | |
+ | |
+/* Specify location of ssh.pid */ | |
+#undef _PATH_SSH_PIDDIR | |
+ | |
+/* Define if we don't have struct __res_state in resolv.h */ | |
+#undef __res_state | |
+ | |
+/* Define to `__inline__' or `__inline' if that's what the C compiler | |
+ calls it, or to nothing if 'inline' is not supported under any name. */ | |
+#ifndef __cplusplus | |
+#undef inline | |
+#endif | |
+ | |
+/* type to use in place of socklen_t if not defined */ | |
+#undef socklen_t | |
diff --git openssh-6.2p13/configure openssh-6.2p1/configure | |
index c36bb19..f2db577 100755 | |
--- openssh-6.2p13/configure | |
+++ openssh-6.2p1/configure | |
@@ -1,14 +1,12 @@ | |
#! /bin/sh | |
# From configure.ac Revision: 1.518 . | |
# Guess values for system-dependent variables and create Makefiles. | |
-# Generated by GNU Autoconf 2.68 for OpenSSH Portable. | |
+# Generated by GNU Autoconf 2.69 for OpenSSH Portable. | |
# | |
# Report bugs to <[email protected]>. | |
# | |
# | |
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software | |
-# Foundation, Inc. | |
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
# | |
# | |
# This configure script is free software; the Free Software Foundation | |
@@ -137,6 +135,31 @@ export LANGUAGE | |
# CDPATH. | |
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
+# Use a proper internal environment variable to ensure we don't fall | |
+ # into an infinite loop, continuously re-executing ourselves. | |
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
+ _as_can_reexec=no; export _as_can_reexec; | |
+ # We cannot yet assume a decent shell, so we have to provide a | |
+# neutralization value for shells without unset; and this also | |
+# works around shells that cannot unset nonexistent variables. | |
+# Preserve -v and -x to the replacement shell. | |
+BASH_ENV=/dev/null | |
+ENV=/dev/null | |
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
+case $- in # (((( | |
+ *v*x* | *x*v* ) as_opts=-vx ;; | |
+ *v* ) as_opts=-v ;; | |
+ *x* ) as_opts=-x ;; | |
+ * ) as_opts= ;; | |
+esac | |
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
+# Admittedly, this is quite paranoid, since all the known shells bail | |
+# out after a failed `exec'. | |
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
+as_fn_exit 255 | |
+ fi | |
+ # We don't want this to propagate to other subprocesses. | |
+ { _as_can_reexec=; unset _as_can_reexec;} | |
if test "x$CONFIG_SHELL" = x; then | |
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
emulate sh | |
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
else | |
exitcode=1; echo positional parameters were not saved. | |
fi | |
-test x\$exitcode = x0 || exit 1" | |
+test x\$exitcode = x0 || exit 1 | |
+test -x / || exit 1" | |
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
@@ -215,21 +239,25 @@ IFS=$as_save_IFS | |
if test "x$CONFIG_SHELL" != x; then : | |
- # We cannot yet assume a decent shell, so we have to provide a | |
- # neutralization value for shells without unset; and this also | |
- # works around shells that cannot unset nonexistent variables. | |
- # Preserve -v and -x to the replacement shell. | |
- BASH_ENV=/dev/null | |
- ENV=/dev/null | |
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
- export CONFIG_SHELL | |
- case $- in # (((( | |
- *v*x* | *x*v* ) as_opts=-vx ;; | |
- *v* ) as_opts=-v ;; | |
- *x* ) as_opts=-x ;; | |
- * ) as_opts= ;; | |
- esac | |
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} | |
+ export CONFIG_SHELL | |
+ # We cannot yet assume a decent shell, so we have to provide a | |
+# neutralization value for shells without unset; and this also | |
+# works around shells that cannot unset nonexistent variables. | |
+# Preserve -v and -x to the replacement shell. | |
+BASH_ENV=/dev/null | |
+ENV=/dev/null | |
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
+case $- in # (((( | |
+ *v*x* | *x*v* ) as_opts=-vx ;; | |
+ *v* ) as_opts=-v ;; | |
+ *x* ) as_opts=-x ;; | |
+ * ) as_opts= ;; | |
+esac | |
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
+# Admittedly, this is quite paranoid, since all the known shells bail | |
+# out after a failed `exec'. | |
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
+exit 255 | |
fi | |
if test x$as_have_required = xno; then : | |
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" | | |
} # as_fn_mkdir_p | |
+ | |
+# as_fn_executable_p FILE | |
+# ----------------------- | |
+# Test if FILE is an executable regular file. | |
+as_fn_executable_p () | |
+{ | |
+ test -f "$1" && test -x "$1" | |
+} # as_fn_executable_p | |
# as_fn_append VAR VALUE | |
# ---------------------- | |
# Append the text in VALUE to the end of the definition contained in VAR. Take | |
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits | |
chmod +x "$as_me.lineno" || | |
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have | |
+ # already done that, so ensure we don't try to do so again and fall | |
+ # in an infinite loop. This has already happened in practice. | |
+ _as_can_reexec=no; export _as_can_reexec | |
# Don't try to exec as it changes $[0], causing all sort of problems | |
# (the dirname of $[0] is not the place where we might find the | |
# original and so on. Autoconf is especially sensitive to this). | |
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then | |
# ... but there are two gotchas: | |
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
- # In both cases, we have to default to `cp -p'. | |
+ # In both cases, we have to default to `cp -pR'. | |
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
elif ln conf$$.file conf$$ 2>/dev/null; then | |
as_ln_s=ln | |
else | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
fi | |
else | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
fi | |
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
rmdir conf$$.dir 2>/dev/null | |
@@ -508,28 +548,8 @@ else | |
as_mkdir_p=false | |
fi | |
-if test -x / >/dev/null 2>&1; then | |
- as_test_x='test -x' | |
-else | |
- if ls -dL / >/dev/null 2>&1; then | |
- as_ls_L_option=L | |
- else | |
- as_ls_L_option= | |
- fi | |
- as_test_x=' | |
- eval sh -c '\'' | |
- if test -d "$1"; then | |
- test -d "$1/."; | |
- else | |
- case $1 in #( | |
- -*)set "./$1";; | |
- esac; | |
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
- ???[sx]*):;;*)false;;esac;fi | |
- '\'' sh | |
- ' | |
-fi | |
-as_executable_p=$as_test_x | |
+as_test_x='test -x' | |
+as_executable_p=as_fn_executable_p | |
# Sed expression to map a string onto a valid CPP name. | |
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
@@ -606,6 +626,7 @@ ac_includes_default="\ | |
ac_subst_vars='LTLIBOBJS | |
LIBOBJS | |
TEST_SSH_IPV6 | |
+KEYCHAIN_LDFLAGS | |
piddir | |
user_path | |
mansubdir | |
@@ -760,6 +781,7 @@ enable_libutil | |
enable_pututline | |
enable_pututxline | |
with_lastlog | |
+with_keychain | |
' | |
ac_precious_vars='build_alias | |
host_alias | |
@@ -1225,8 +1247,6 @@ target=$target_alias | |
if test "x$host_alias" != x; then | |
if test "x$build_alias" = x; then | |
cross_compiling=maybe | |
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. | |
- If a cross compiler is detected then cross compile mode will be used" >&2 | |
elif test "x$build_alias" != "x$host_alias"; then | |
cross_compiling=yes | |
fi | |
@@ -1440,6 +1460,7 @@ Optional Packages: | |
--with-bsd-auth Enable BSD auth support | |
--with-pid-dir=PATH Specify location of ssh.pid file | |
--with-lastlog=FILE|DIR specify lastlog location common locations | |
+ --with-keychain=apple Use Mac OS X Keychain | |
Some influential environment variables: | |
CC C compiler command | |
@@ -1518,9 +1539,9 @@ test -n "$ac_init_help" && exit $ac_status | |
if $ac_init_version; then | |
cat <<\_ACEOF | |
OpenSSH configure Portable | |
-generated by GNU Autoconf 2.68 | |
+generated by GNU Autoconf 2.69 | |
-Copyright (C) 2010 Free Software Foundation, Inc. | |
+Copyright (C) 2012 Free Software Foundation, Inc. | |
This configure script is free software; the Free Software Foundation | |
gives unlimited permission to copy, distribute and modify it. | |
_ACEOF | |
@@ -1752,7 +1773,7 @@ $as_echo "$ac_try_echo"; } >&5 | |
test ! -s conftest.err | |
} && test -s conftest$ac_exeext && { | |
test "$cross_compiling" = yes || | |
- $as_test_x conftest$ac_exeext | |
+ test -x conftest$ac_exeext | |
}; then : | |
ac_retval=0 | |
else | |
@@ -2000,7 +2021,8 @@ int | |
main () | |
{ | |
static int test_array [1 - 2 * !(($2) >= 0)]; | |
-test_array [0] = 0 | |
+test_array [0] = 0; | |
+return test_array [0]; | |
; | |
return 0; | |
@@ -2016,7 +2038,8 @@ int | |
main () | |
{ | |
static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
-test_array [0] = 0 | |
+test_array [0] = 0; | |
+return test_array [0]; | |
; | |
return 0; | |
@@ -2042,7 +2065,8 @@ int | |
main () | |
{ | |
static int test_array [1 - 2 * !(($2) < 0)]; | |
-test_array [0] = 0 | |
+test_array [0] = 0; | |
+return test_array [0]; | |
; | |
return 0; | |
@@ -2058,7 +2082,8 @@ int | |
main () | |
{ | |
static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
-test_array [0] = 0 | |
+test_array [0] = 0; | |
+return test_array [0]; | |
; | |
return 0; | |
@@ -2092,7 +2117,8 @@ int | |
main () | |
{ | |
static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
-test_array [0] = 0 | |
+test_array [0] = 0; | |
+return test_array [0]; | |
; | |
return 0; | |
@@ -2222,7 +2248,7 @@ This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by OpenSSH $as_me Portable, which was | |
-generated by GNU Autoconf 2.68. Invocation command line was | |
+generated by GNU Autoconf 2.69. Invocation command line was | |
$ $0 $@ | |
@@ -2602,7 +2628,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -2642,7 +2668,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_ac_ct_CC="gcc" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -2695,7 +2721,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_CC="${ac_tool_prefix}cc" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -2736,7 +2762,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
ac_prog_rejected=yes | |
continue | |
@@ -2794,7 +2820,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -2838,7 +2864,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_ac_ct_CC="$ac_prog" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -3284,8 +3310,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
/* end confdefs.h. */ | |
#include <stdarg.h> | |
#include <stdio.h> | |
-#include <sys/types.h> | |
-#include <sys/stat.h> | |
+struct stat; | |
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
struct buf { int x; }; | |
FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
@@ -3625,7 +3650,7 @@ do | |
for ac_prog in grep ggrep; do | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
+ as_fn_executable_p "$ac_path_GREP" || continue | |
# Check for GNU ac_path_GREP and select it if it is found. | |
# Check for GNU $ac_path_GREP | |
case `"$ac_path_GREP" --version 2>&1` in | |
@@ -3691,7 +3716,7 @@ do | |
for ac_prog in egrep; do | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
+ as_fn_executable_p "$ac_path_EGREP" || continue | |
# Check for GNU ac_path_EGREP and select it if it is found. | |
# Check for GNU $ac_path_EGREP | |
case `"$ac_path_EGREP" --version 2>&1` in | |
@@ -4112,7 +4137,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_AWK="$ac_prog" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4290,7 +4315,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4330,7 +4355,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_ac_ct_RANLIB="ranlib" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4402,7 +4427,7 @@ case $as_dir/ in #(( | |
# by default. | |
for ac_prog in ginstall scoinst install; do | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
if test $ac_prog = install && | |
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
# AIX install. It has an incompatible calling convention. | |
@@ -4477,7 +4502,7 @@ do | |
for ac_prog in egrep; do | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
+ as_fn_executable_p "$ac_path_EGREP" || continue | |
# Check for GNU ac_path_EGREP and select it if it is found. | |
# Check for GNU $ac_path_EGREP | |
case `"$ac_path_EGREP" --version 2>&1` in | |
@@ -4543,7 +4568,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4583,7 +4608,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4623,7 +4648,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4665,7 +4690,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4708,7 +4733,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4749,7 +4774,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4790,7 +4815,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4830,7 +4855,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4870,7 +4895,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4910,7 +4935,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4950,7 +4975,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -4990,7 +5015,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5030,7 +5055,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5086,7 +5111,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5127,7 +5152,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5166,7 +5191,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5393,6 +5418,8 @@ _ACEOF | |
esac | |
rm -rf conftest* | |
fi | |
+ | |
+ | |
fi | |
@@ -5427,7 +5454,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -5475,7 +5502,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -9155,7 +9182,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -9198,7 +9225,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -15394,7 +15421,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -15996,7 +16023,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -16279,7 +16306,7 @@ do | |
IFS=$as_save_IFS | |
test -z "$as_dir" && as_dir=. | |
for ac_exec_ext in '' $ac_executable_extensions; do | |
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" | |
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
break 2 | |
@@ -17051,6 +17078,47 @@ if test ! -z "$blibpath" ; then | |
$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;} | |
fi | |
+ | |
+# Check whether --with-keychain was given. | |
+if test "${with_keychain+set}" = set; then : | |
+ withval=$with_keychain; | |
+ case "$withval" in | |
+ apple|no) | |
+ KEYCHAIN=$withval | |
+ ;; | |
+ *) | |
+ as_fn_error $? "invalid keychain type: $withval" "$LINENO" 5 | |
+ ;; | |
+ esac | |
+ | |
+ | |
+fi | |
+ | |
+if test ! -z "$KEYCHAIN" -a "$KEYCHAIN" != "no"; then | |
+ case "$KEYCHAIN" in | |
+ apple) | |
+ for ac_header in Security/Security.h | |
+do : | |
+ ac_fn_c_check_header_mongrel "$LINENO" "Security/Security.h" "ac_cv_header_Security_Security_h" "$ac_includes_default" | |
+if test "x$ac_cv_header_Security_Security_h" = xyes; then : | |
+ cat >>confdefs.h <<_ACEOF | |
+#define HAVE_SECURITY_SECURITY_H 1 | |
+_ACEOF | |
+ | |
+ CPPFLAGS="$CPPFLAGS -D__APPLE_KEYCHAIN__" | |
+ KEYCHAIN_LDFLAGS="-framework Security -framework CoreFoundation" | |
+ | |
+ | |
+else | |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Security framework not found. Disabling Mac OS X Keychain support." >&5 | |
+$as_echo "$as_me: WARNING: Security framework not found. Disabling Mac OS X Keychain support." >&2;} | |
+fi | |
+ | |
+done | |
+ | |
+ ;; | |
+ esac | |
+fi | |
ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" " | |
#ifdef HAVE_SYS_TYPES_H | |
#include <sys/types.h> | |
@@ -17531,16 +17599,16 @@ if (echo >conf$$.file) 2>/dev/null; then | |
# ... but there are two gotchas: | |
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
- # In both cases, we have to default to `cp -p'. | |
+ # In both cases, we have to default to `cp -pR'. | |
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
elif ln conf$$.file conf$$ 2>/dev/null; then | |
as_ln_s=ln | |
else | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
fi | |
else | |
- as_ln_s='cp -p' | |
+ as_ln_s='cp -pR' | |
fi | |
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
rmdir conf$$.dir 2>/dev/null | |
@@ -17600,28 +17668,16 @@ else | |
as_mkdir_p=false | |
fi | |
-if test -x / >/dev/null 2>&1; then | |
- as_test_x='test -x' | |
-else | |
- if ls -dL / >/dev/null 2>&1; then | |
- as_ls_L_option=L | |
- else | |
- as_ls_L_option= | |
- fi | |
- as_test_x=' | |
- eval sh -c '\'' | |
- if test -d "$1"; then | |
- test -d "$1/."; | |
- else | |
- case $1 in #( | |
- -*)set "./$1";; | |
- esac; | |
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
- ???[sx]*):;;*)false;;esac;fi | |
- '\'' sh | |
- ' | |
-fi | |
-as_executable_p=$as_test_x | |
+ | |
+# as_fn_executable_p FILE | |
+# ----------------------- | |
+# Test if FILE is an executable regular file. | |
+as_fn_executable_p () | |
+{ | |
+ test -f "$1" && test -x "$1" | |
+} # as_fn_executable_p | |
+as_test_x='test -x' | |
+as_executable_p=as_fn_executable_p | |
# Sed expression to map a string onto a valid CPP name. | |
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
@@ -17643,7 +17699,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
# values after options handling. | |
ac_log=" | |
This file was extended by OpenSSH $as_me Portable, which was | |
-generated by GNU Autoconf 2.68. Invocation command line was | |
+generated by GNU Autoconf 2.69. Invocation command line was | |
CONFIG_FILES = $CONFIG_FILES | |
CONFIG_HEADERS = $CONFIG_HEADERS | |
@@ -17705,10 +17761,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
ac_cs_version="\\ | |
OpenSSH config.status Portable | |
-configured by $0, generated by GNU Autoconf 2.68, | |
+configured by $0, generated by GNU Autoconf 2.69, | |
with options \\"\$ac_cs_config\\" | |
-Copyright (C) 2010 Free Software Foundation, Inc. | |
+Copyright (C) 2012 Free Software Foundation, Inc. | |
This config.status script is free software; the Free Software Foundation | |
gives unlimited permission to copy, distribute and modify it." | |
@@ -17798,7 +17854,7 @@ fi | |
_ACEOF | |
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
if \$ac_cs_recheck; then | |
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
shift | |
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
CONFIG_SHELL='$SHELL' | |
diff --git openssh-6.2p13/configure.ac openssh-6.2p1/configure.ac | |
index 88dd29e..dd2ad1c 100644 | |
--- openssh-6.2p13/configure.ac | |
+++ openssh-6.2p1/configure.ac | |
@@ -4473,6 +4473,31 @@ if test ! -z "$blibpath" ; then | |
AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile]) | |
fi | |
+AC_ARG_WITH(keychain, | |
+ [ --with-keychain=apple Use Mac OS X Keychain], | |
+ [ | |
+ case "$withval" in | |
+ apple|no) | |
+ KEYCHAIN=$withval | |
+ ;; | |
+ *) | |
+ AC_MSG_ERROR(invalid keychain type: $withval) | |
+ ;; | |
+ esac | |
+ ] | |
+) | |
+if test ! -z "$KEYCHAIN" -a "$KEYCHAIN" != "no"; then | |
+ case "$KEYCHAIN" in | |
+ apple) | |
+ AC_CHECK_HEADERS(Security/Security.h, [ | |
+ CPPFLAGS="$CPPFLAGS -D__APPLE_KEYCHAIN__" | |
+ KEYCHAIN_LDFLAGS="-framework Security -framework CoreFoundation" | |
+ AC_SUBST(KEYCHAIN_LDFLAGS) | |
+ ], | |
+ AC_MSG_WARN([Security framework not found. Disabling Mac OS X Keychain support.])) | |
+ ;; | |
+ esac | |
+fi | |
AC_CHECK_MEMBER([struct lastlog.ll_line], [], [ | |
if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then | |
AC_DEFINE([DISABLE_LASTLOG]) | |
diff --git openssh-6.2p1/keychain.c openssh-6.2p1/keychain.c | |
new file mode 100644 | |
index 0000000..4ba0323 | |
--- /dev/null | |
+++ openssh-6.2p1/keychain.c | |
@@ -0,0 +1,838 @@ | |
+/* | |
+ * Copyright (c) 2007 Apple Inc. All rights reserved. | |
+ * | |
+ * @APPLE_BSD_LICENSE_HEADER_START@ | |
+ * | |
+ * Redistribution and use in source and binary forms, with or without | |
+ * modification, are permitted provided that the following conditions | |
+ * are met: | |
+ * | |
+ * 1. Redistributions of source code must retain the above copyright | |
+ * notice, this list of conditions and the following disclaimer. | |
+ * 2. Redistributions in binary form must reproduce the above copyright | |
+ * notice, this list of conditions and the following disclaimer in the | |
+ * documentation and/or other materials provided with the distribution. | |
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of its | |
+ * contributors may be used to endorse or promote products derived from | |
+ * this software without specific prior written permission. | |
+ * | |
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | |
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | |
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
+ * | |
+ * @APPLE_BSD_LICENSE_HEADER_END@ | |
+ */ | |
+ | |
+#include "includes.h" | |
+ | |
+#include <stdio.h> | |
+#include <string.h> | |
+ | |
+#include "xmalloc.h" | |
+#include "key.h" | |
+#include "authfd.h" | |
+#include "authfile.h" | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+ | |
+#include <CoreFoundation/CoreFoundation.h> | |
+#include <Security/Security.h> | |
+ | |
+/* Our Security/SecPassword.h is not yet API, so I will define the constants that I am using here. */ | |
+enum SEC_PASSWORD_OPTS { | |
+kSecPasswordGet = 1<<0, // Get password from keychain or user | |
+kSecPasswordSet = 1<<1, // Set password (passed in if kSecPasswordGet not set, otherwise from user) | |
+kSecPasswordFail = 1<<2, // Wrong password (ignore item in keychain and flag error) | |
+}; | |
+ | |
+#endif | |
+ | |
+/* | |
+ * Platform-specific helper functions. | |
+ */ | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+ | |
+static int get_boolean_preference(const char *key, int default_value, | |
+ int foreground) | |
+{ | |
+ int value = default_value; | |
+ CFStringRef keyRef = NULL; | |
+ CFPropertyListRef valueRef = NULL; | |
+ | |
+ keyRef = CFStringCreateWithCString(NULL, key, kCFStringEncodingUTF8); | |
+ if (keyRef != NULL) | |
+ valueRef = CFPreferencesCopyAppValue(keyRef, | |
+ CFSTR("org.openbsd.openssh")); | |
+ if (valueRef != NULL) | |
+ if (CFGetTypeID(valueRef) == CFBooleanGetTypeID()) | |
+ value = CFBooleanGetValue(valueRef); | |
+ else if (foreground) | |
+ fprintf(stderr, "Ignoring nonboolean %s preference.\n", key); | |
+ | |
+ if (keyRef) | |
+ CFRelease(keyRef); | |
+ if (valueRef) | |
+ CFRelease(valueRef); | |
+ | |
+ return value; | |
+} | |
+ | |
+#endif | |
+ | |
+/* | |
+ * Store the passphrase for a given identity in the keychain. | |
+ */ | |
+void | |
+store_in_keychain(const char *filename, const char *passphrase) | |
+{ | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+ | |
+ /* | |
+ * store_in_keychain | |
+ * Mac OS X implementation | |
+ */ | |
+ | |
+ CFStringRef cfstr_relative_filename = NULL; | |
+ CFURLRef cfurl_relative_filename = NULL, cfurl_filename = NULL; | |
+ CFStringRef cfstr_filename = NULL; | |
+ CFDataRef cfdata_filename = NULL; | |
+ CFIndex filename_len; | |
+ UInt8 *label = NULL; | |
+ UInt8 *utf8_filename; | |
+ OSStatus rv; | |
+ SecKeychainItemRef itemRef = NULL; | |
+ SecTrustedApplicationRef apps[] = {NULL, NULL, NULL}; | |
+ CFArrayRef trustedlist = NULL; | |
+ SecAccessRef initialAccess = NULL; | |
+ | |
+ /* Bail out if KeychainIntegration preference is -bool NO */ | |
+ if (get_boolean_preference("KeychainIntegration", 1, 1) == 0) { | |
+ fprintf(stderr, "Keychain integration is disabled.\n"); | |
+ goto err; | |
+ } | |
+ | |
+ /* Interpret filename with the correct encoding. */ | |
+ if ((cfstr_relative_filename = | |
+ CFStringCreateWithFileSystemRepresentation(NULL, filename)) == NULL) | |
+ { | |
+ fprintf(stderr, "CFStringCreateWithFileSystemRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_relative_filename = CFURLCreateWithFileSystemPath(NULL, | |
+ cfstr_relative_filename, kCFURLPOSIXPathStyle, false)) == NULL) { | |
+ fprintf(stderr, "CFURLCreateWithFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_filename = CFURLCopyAbsoluteURL(cfurl_relative_filename)) == | |
+ NULL) { | |
+ fprintf(stderr, "CFURLCopyAbsoluteURL failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfstr_filename = CFURLCopyFileSystemPath(cfurl_filename, | |
+ kCFURLPOSIXPathStyle)) == NULL) { | |
+ fprintf(stderr, "CFURLCopyFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfdata_filename = CFStringCreateExternalRepresentation(NULL, | |
+ cfstr_filename, kCFStringEncodingUTF8, 0)) == NULL) { | |
+ fprintf(stderr, "CFStringCreateExternalRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ filename_len = CFDataGetLength(cfdata_filename); | |
+ if ((label = xmalloc(filename_len + 5)) == NULL) { | |
+ fprintf(stderr, "xmalloc failed\n"); | |
+ goto err; | |
+ } | |
+ memcpy(label, "SSH: ", 5); | |
+ utf8_filename = label + 5; | |
+ CFDataGetBytes(cfdata_filename, CFRangeMake(0, filename_len), | |
+ utf8_filename); | |
+ | |
+ /* Check if we already have this passphrase. */ | |
+ rv = SecKeychainFindGenericPassword(NULL, 3, "SSH", filename_len, | |
+ (char *)utf8_filename, NULL, NULL, &itemRef); | |
+ if (rv == errSecItemNotFound) { | |
+ /* Add a new keychain item. */ | |
+ SecKeychainAttribute attrs[] = { | |
+ {kSecLabelItemAttr, filename_len + 5, label}, | |
+ {kSecServiceItemAttr, 3, "SSH"}, | |
+ {kSecAccountItemAttr, filename_len, utf8_filename} | |
+ }; | |
+ SecKeychainAttributeList attrList = | |
+ {sizeof(attrs) / sizeof(attrs[0]), attrs}; | |
+ if (SecTrustedApplicationCreateFromPath("/usr/bin/ssh-agent", | |
+ &apps[0]) != noErr || | |
+ SecTrustedApplicationCreateFromPath("/usr/bin/ssh-add", | |
+ &apps[1]) != noErr || | |
+ SecTrustedApplicationCreateFromPath("/usr/bin/ssh", | |
+ &apps[2]) != noErr) { | |
+ fprintf(stderr, "SecTrustedApplicationCreateFromPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((trustedlist = CFArrayCreate(NULL, (const void **)apps, | |
+ sizeof(apps) / sizeof(apps[0]), &kCFTypeArrayCallBacks)) == | |
+ NULL) { | |
+ fprintf(stderr, "CFArrayCreate failed\n"); | |
+ goto err; | |
+ } | |
+ if (SecAccessCreate(cfstr_filename, trustedlist, | |
+ &initialAccess) != noErr) { | |
+ fprintf(stderr, "SecAccessCreate failed\n"); | |
+ goto err; | |
+ } | |
+ if (SecKeychainItemCreateFromContent( | |
+ kSecGenericPasswordItemClass, &attrList, strlen(passphrase), | |
+ passphrase, NULL, initialAccess, NULL) == noErr) | |
+ fprintf(stderr, "Passphrase stored in keychain: %s\n", filename); | |
+ else | |
+ fprintf(stderr, "Could not create keychain item\n"); | |
+ } else if (rv == noErr) { | |
+ /* Update an existing keychain item. */ | |
+ if (SecKeychainItemModifyAttributesAndData(itemRef, NULL, | |
+ strlen(passphrase), passphrase) == noErr) | |
+ fprintf(stderr, "Passphrase updated in keychain: %s\n", filename); | |
+ else | |
+ fprintf(stderr, "Could not modify keychain item\n"); | |
+ } else | |
+ fprintf(stderr, "Could not access keychain\n"); | |
+ | |
+err: /* Clean up. */ | |
+ if (cfstr_relative_filename) | |
+ CFRelease(cfstr_relative_filename); | |
+ if (cfurl_relative_filename) | |
+ CFRelease(cfurl_relative_filename); | |
+ if (cfurl_filename) | |
+ CFRelease(cfurl_filename); | |
+ if (cfstr_filename) | |
+ CFRelease(cfstr_filename); | |
+ if (cfdata_filename) | |
+ CFRelease(cfdata_filename); | |
+ if (label) | |
+ xfree(label); | |
+ if (itemRef) | |
+ CFRelease(itemRef); | |
+ if (apps[0]) | |
+ CFRelease(apps[0]); | |
+ if (apps[1]) | |
+ CFRelease(apps[1]); | |
+ if (apps[2]) | |
+ CFRelease(apps[2]); | |
+ if (trustedlist) | |
+ CFRelease(trustedlist); | |
+ if (initialAccess) | |
+ CFRelease(initialAccess); | |
+ | |
+#else | |
+ | |
+ /* | |
+ * store_in_keychain | |
+ * no keychain implementation | |
+ */ | |
+ | |
+ fprintf(stderr, "Keychain is not available on this system\n"); | |
+ | |
+#endif | |
+ | |
+} | |
+ | |
+/* | |
+ * Remove the passphrase for a given identity from the keychain. | |
+ */ | |
+void | |
+remove_from_keychain(const char *filename) | |
+{ | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+ | |
+ /* | |
+ * remove_from_keychain | |
+ * Mac OS X implementation | |
+ */ | |
+ | |
+ CFStringRef cfstr_relative_filename = NULL; | |
+ CFURLRef cfurl_relative_filename = NULL, cfurl_filename = NULL; | |
+ CFStringRef cfstr_filename = NULL; | |
+ CFDataRef cfdata_filename = NULL; | |
+ CFIndex filename_len; | |
+ const UInt8 *utf8_filename; | |
+ OSStatus rv; | |
+ SecKeychainItemRef itemRef = NULL; | |
+ | |
+ /* Bail out if KeychainIntegration preference is -bool NO */ | |
+ if (get_boolean_preference("KeychainIntegration", 1, 1) == 0) { | |
+ fprintf(stderr, "Keychain integration is disabled.\n"); | |
+ goto err; | |
+ } | |
+ | |
+ /* Interpret filename with the correct encoding. */ | |
+ if ((cfstr_relative_filename = | |
+ CFStringCreateWithFileSystemRepresentation(NULL, filename)) == NULL) | |
+ { | |
+ fprintf(stderr, "CFStringCreateWithFileSystemRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_relative_filename = CFURLCreateWithFileSystemPath(NULL, | |
+ cfstr_relative_filename, kCFURLPOSIXPathStyle, false)) == NULL) { | |
+ fprintf(stderr, "CFURLCreateWithFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_filename = CFURLCopyAbsoluteURL(cfurl_relative_filename)) == | |
+ NULL) { | |
+ fprintf(stderr, "CFURLCopyAbsoluteURL failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfstr_filename = CFURLCopyFileSystemPath(cfurl_filename, | |
+ kCFURLPOSIXPathStyle)) == NULL) { | |
+ fprintf(stderr, "CFURLCopyFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfdata_filename = CFStringCreateExternalRepresentation(NULL, | |
+ cfstr_filename, kCFStringEncodingUTF8, 0)) == NULL) { | |
+ fprintf(stderr, "CFStringCreateExternalRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ filename_len = CFDataGetLength(cfdata_filename); | |
+ utf8_filename = CFDataGetBytePtr(cfdata_filename); | |
+ | |
+ /* Check if we already have this passphrase. */ | |
+ rv = SecKeychainFindGenericPassword(NULL, 3, "SSH", filename_len, | |
+ (const char *)utf8_filename, NULL, NULL, &itemRef); | |
+ if (rv == noErr) { | |
+ /* Remove the passphrase from the keychain. */ | |
+ if (SecKeychainItemDelete(itemRef) == noErr) | |
+ fprintf(stderr, "Passphrase removed from keychain: %s\n", filename); | |
+ else | |
+ fprintf(stderr, "Could not remove keychain item\n"); | |
+ } else if (rv != errSecItemNotFound) | |
+ fprintf(stderr, "Could not access keychain\n"); | |
+ | |
+err: /* Clean up. */ | |
+ if (cfstr_relative_filename) | |
+ CFRelease(cfstr_relative_filename); | |
+ if (cfurl_relative_filename) | |
+ CFRelease(cfurl_relative_filename); | |
+ if (cfurl_filename) | |
+ CFRelease(cfurl_filename); | |
+ if (cfstr_filename) | |
+ CFRelease(cfstr_filename); | |
+ if (cfdata_filename) | |
+ CFRelease(cfdata_filename); | |
+ if (itemRef) | |
+ CFRelease(itemRef); | |
+ | |
+#else | |
+ | |
+ /* | |
+ * remove_from_keychain | |
+ * no keychain implementation | |
+ */ | |
+ | |
+ fprintf(stderr, "Keychain is not available on this system\n"); | |
+ | |
+#endif | |
+ | |
+} | |
+ | |
+/* | |
+ * Add identities to ssh-agent using passphrases stored in the keychain. | |
+ * Returns zero on success and nonzero on failure. | |
+ * add_identity is a callback into ssh-agent. It takes a filename and a | |
+ * passphrase, and attempts to add the identity to the agent. It returns | |
+ * zero on success and nonzero on failure. | |
+ */ | |
+int | |
+add_identities_using_keychain(int (*add_identity)(const char *, const char *)) | |
+{ | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+ | |
+ /* | |
+ * add_identities_using_keychain | |
+ * Mac OS X implementation | |
+ */ | |
+ | |
+ OSStatus rv; | |
+ SecKeychainSearchRef searchRef; | |
+ SecKeychainItemRef itemRef; | |
+ UInt32 length; | |
+ void *data; | |
+ CFIndex maxsize; | |
+ | |
+ /* Bail out if KeychainIntegration preference is -bool NO */ | |
+ if (get_boolean_preference("KeychainIntegration", 1, 0) == 0) | |
+ return 0; | |
+ | |
+ /* Search for SSH passphrases in the keychain */ | |
+ SecKeychainAttribute attrs[] = { | |
+ {kSecServiceItemAttr, 3, "SSH"} | |
+ }; | |
+ SecKeychainAttributeList attrList = | |
+ {sizeof(attrs) / sizeof(attrs[0]), attrs}; | |
+ if ((rv = SecKeychainSearchCreateFromAttributes(NULL, | |
+ kSecGenericPasswordItemClass, &attrList, &searchRef)) != noErr) | |
+ return 0; | |
+ | |
+ /* Iterate through the search results. */ | |
+ while ((rv = SecKeychainSearchCopyNext(searchRef, &itemRef)) == noErr) { | |
+ UInt32 tag = kSecAccountItemAttr; | |
+ UInt32 format = kSecFormatUnknown; | |
+ SecKeychainAttributeInfo info = {1, &tag, &format}; | |
+ SecKeychainAttributeList *itemAttrList = NULL; | |
+ CFStringRef cfstr_filename = NULL; | |
+ char *filename = NULL; | |
+ char *passphrase = NULL; | |
+ | |
+ /* Retrieve filename and passphrase. */ | |
+ if ((rv = SecKeychainItemCopyAttributesAndData(itemRef, &info, | |
+ NULL, &itemAttrList, &length, &data)) != noErr) | |
+ goto err; | |
+ if (itemAttrList->count != 1) | |
+ goto err; | |
+ cfstr_filename = CFStringCreateWithBytes(NULL, | |
+ itemAttrList->attr->data, itemAttrList->attr->length, | |
+ kCFStringEncodingUTF8, true); | |
+ maxsize = CFStringGetMaximumSizeOfFileSystemRepresentation( | |
+ cfstr_filename); | |
+ if ((filename = xmalloc(maxsize)) == NULL) | |
+ goto err; | |
+ if (CFStringGetFileSystemRepresentation(cfstr_filename, | |
+ filename, maxsize) == false) | |
+ goto err; | |
+ if ((passphrase = xmalloc(length + 1)) == NULL) | |
+ goto err; | |
+ memcpy(passphrase, data, length); | |
+ passphrase[length] = '\0'; | |
+ | |
+ /* Add the identity. */ | |
+ add_identity(filename, passphrase); | |
+ | |
+err: /* Clean up. */ | |
+ if (itemRef) | |
+ CFRelease(itemRef); | |
+ if (cfstr_filename) | |
+ CFRelease(cfstr_filename); | |
+ if (filename) | |
+ xfree(filename); | |
+ if (passphrase) | |
+ xfree(passphrase); | |
+ if (itemAttrList) | |
+ SecKeychainItemFreeAttributesAndData(itemAttrList, | |
+ data); | |
+ } | |
+ | |
+ CFRelease(searchRef); | |
+ | |
+ return 0; | |
+ | |
+#else | |
+ | |
+ /* | |
+ * add_identities_using_keychain | |
+ * no implementation | |
+ */ | |
+ | |
+ return 1; | |
+ | |
+#endif | |
+ | |
+} | |
+ | |
+/* | |
+ * Prompt the user for a key's passphrase. The user will be offered the option | |
+ * of storing the passphrase in their keychain. Returns the passphrase | |
+ * (which the caller is responsible for xfreeing), or NULL if this function | |
+ * fails or is not implemented. If this function is not implemented, ssh will | |
+ * fall back on the standard read_passphrase function, and the user will need | |
+ * to use ssh-add -K to add their keys to the keychain. | |
+ */ | |
+char * | |
+keychain_read_passphrase(const char *filename, int oAskPassGUI) | |
+{ | |
+ /* | |
+ * keychain_read_passphrase | |
+ * Mac OS X implementation | |
+ */ | |
+ #if defined(__APPLE_KEYCHAIN__) | |
+ | |
+ CFStringRef cfstr_relative_filename = NULL; | |
+ CFURLRef cfurl_relative_filename = NULL, cfurl_filename = NULL; | |
+ CFStringRef cfstr_filename = NULL; | |
+ CFDataRef cfdata_filename = NULL; | |
+ CFIndex filename_len; | |
+ UInt8 *label = NULL; | |
+ UInt8 *utf8_filename; | |
+ SecPasswordRef passRef = NULL; | |
+ SecTrustedApplicationRef apps[] = {NULL, NULL, NULL}; | |
+ CFArrayRef trustedlist = NULL; | |
+ SecAccessRef initialAccess = NULL; | |
+ CFURLRef path = NULL; | |
+ CFStringRef pathFinal = NULL; | |
+ CFURLRef bundle_url = NULL; | |
+ CFBundleRef bundle = NULL; | |
+ CFStringRef promptTemplate = NULL, prompt = NULL; | |
+ UInt32 length; | |
+ const void *data; | |
+ AuthenticationConnection *ac = NULL; | |
+ char *result = NULL; | |
+ | |
+ /* Bail out if KeychainIntegration preference is -bool NO */ | |
+ if (get_boolean_preference("KeychainIntegration", 1, 1) == 0) | |
+ goto err; | |
+ | |
+ /* Bail out if the user set AskPassGUI preference to -bool NO */ | |
+ if (get_boolean_preference("AskPassGUI", 1, 1) == 0 || oAskPassGUI == 0) | |
+ goto err; | |
+ | |
+ /* Bail out if we can't communicate with ssh-agent */ | |
+ if ((ac = ssh_get_authentication_connection()) == NULL) | |
+ goto err; | |
+ | |
+ /* Interpret filename with the correct encoding. */ | |
+ if ((cfstr_relative_filename = | |
+ CFStringCreateWithFileSystemRepresentation(NULL, filename)) == NULL) | |
+ { | |
+ fprintf(stderr, "CFStringCreateWithFileSystemRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_relative_filename = CFURLCreateWithFileSystemPath(NULL, | |
+ cfstr_relative_filename, kCFURLPOSIXPathStyle, false)) == NULL) { | |
+ fprintf(stderr, "CFURLCreateWithFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfurl_filename = CFURLCopyAbsoluteURL(cfurl_relative_filename)) == | |
+ NULL) { | |
+ fprintf(stderr, "CFURLCopyAbsoluteURL failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfstr_filename = CFURLCopyFileSystemPath(cfurl_filename, | |
+ kCFURLPOSIXPathStyle)) == NULL) { | |
+ fprintf(stderr, "CFURLCopyFileSystemPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((cfdata_filename = CFStringCreateExternalRepresentation(NULL, | |
+ cfstr_filename, kCFStringEncodingUTF8, 0)) == NULL) { | |
+ fprintf(stderr, "CFStringCreateExternalRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ filename_len = CFDataGetLength(cfdata_filename); | |
+ if ((label = xmalloc(filename_len + 5)) == NULL) { | |
+ fprintf(stderr, "xmalloc failed\n"); | |
+ goto err; | |
+ } | |
+ memcpy(label, "SSH: ", 5); | |
+ utf8_filename = label + 5; | |
+ CFDataGetBytes(cfdata_filename, CFRangeMake(0, filename_len), | |
+ utf8_filename); | |
+ | |
+ /* Build a SecPasswordRef. */ | |
+ SecKeychainAttribute searchAttrs[] = { | |
+ {kSecServiceItemAttr, 3, "SSH"}, | |
+ {kSecAccountItemAttr, filename_len, utf8_filename} | |
+ }; | |
+ SecKeychainAttributeList searchAttrList = | |
+ {sizeof(searchAttrs) / sizeof(searchAttrs[0]), searchAttrs}; | |
+ SecKeychainAttribute attrs[] = { | |
+ {kSecLabelItemAttr, filename_len + 5, label}, | |
+ {kSecServiceItemAttr, 3, "SSH"}, | |
+ {kSecAccountItemAttr, filename_len, utf8_filename} | |
+ }; | |
+ SecKeychainAttributeList attrList = | |
+ {sizeof(attrs) / sizeof(attrs[0]), attrs}; | |
+ if (SecGenericPasswordCreate(&searchAttrList, &attrList, &passRef) != | |
+ noErr) { | |
+ fprintf(stderr, "SecGenericPasswordCreate failed\n"); | |
+ goto err; | |
+ } | |
+ if (SecTrustedApplicationCreateFromPath("/usr/bin/ssh-agent", &apps[0]) | |
+ != noErr || | |
+ SecTrustedApplicationCreateFromPath("/usr/bin/ssh-add", &apps[1]) | |
+ != noErr || | |
+ SecTrustedApplicationCreateFromPath("/usr/bin/ssh", &apps[2]) | |
+ != noErr) { | |
+ fprintf(stderr, "SecTrustedApplicationCreateFromPath failed\n"); | |
+ goto err; | |
+ } | |
+ if ((trustedlist = CFArrayCreate(NULL, (const void **)apps, | |
+ sizeof(apps) / sizeof(apps[0]), &kCFTypeArrayCallBacks)) == NULL) { | |
+ fprintf(stderr, "CFArrayCreate failed\n"); | |
+ goto err; | |
+ } | |
+ if (SecAccessCreate(cfstr_filename, trustedlist, &initialAccess) | |
+ != noErr) { | |
+ fprintf(stderr, "SecAccessCreate failed\n"); | |
+ goto err; | |
+ } | |
+ if (SecPasswordSetInitialAccess(passRef, initialAccess) != noErr) { | |
+ fprintf(stderr, "SecPasswordSetInitialAccess failed\n"); | |
+ goto err; | |
+ } | |
+ | |
+ /* Request the passphrase from the user. */ | |
+ if ((path = CFURLCreateFromFileSystemRepresentation(NULL, | |
+ (UInt8 *)filename, strlen(filename), false)) == NULL) { | |
+ fprintf(stderr, "CFURLCreateFromFileSystemRepresentation failed\n"); | |
+ goto err; | |
+ } | |
+ if ((pathFinal = CFURLCopyLastPathComponent(path)) == NULL) { | |
+ fprintf(stderr, "CFURLCopyLastPathComponent failed\n"); | |
+ goto err; | |
+ } | |
+ if (!((bundle_url = CFURLCreateWithFileSystemPath(NULL, | |
+ CFSTR("/System/Library/CoreServices/"), kCFURLPOSIXPathStyle, true)) | |
+ != NULL && (bundle = CFBundleCreate(NULL, bundle_url)) != NULL && | |
+ (promptTemplate = CFCopyLocalizedStringFromTableInBundle( | |
+ CFSTR("Enter your password for the SSH key \"%@\"."), | |
+ CFSTR("OpenSSH"), bundle, "Text of the dialog asking the user for" | |
+ "their passphrase. The %@ will be replaced with the filename of a" | |
+ "specific key.")) != NULL) && | |
+ (promptTemplate = CFStringCreateCopy(NULL, | |
+ CFSTR("Enter your password for the SSH key \"%@\"."))) == NULL) { | |
+ fprintf(stderr, "CFStringCreateCopy failed\n"); | |
+ goto err; | |
+ } | |
+ if ((prompt = CFStringCreateWithFormat(NULL, NULL, promptTemplate, | |
+ pathFinal)) == NULL) { | |
+ fprintf(stderr, "CFStringCreateWithFormat failed\n"); | |
+ goto err; | |
+ } | |
+ switch (SecPasswordAction(passRef, prompt, | |
+ kSecPasswordGet|kSecPasswordFail, &length, &data)) { | |
+ case noErr: | |
+ result = xmalloc(length + 1); | |
+ memcpy(result, data, length); | |
+ result[length] = '\0'; | |
+ | |
+ /* Save password in keychain if requested. */ | |
+ if (noErr != SecPasswordAction(passRef, CFSTR(""), kSecPasswordSet, &length, &data)) | |
+ fprintf(stderr, "Saving password to keychain failed\n"); | |
+ | |
+ /* Add password to agent. */ | |
+ char *comment = NULL; | |
+ Key *private = key_load_private(filename, result, &comment); | |
+ if (NULL == private) | |
+ break; | |
+ if (ssh_add_identity_constrained(ac, private, comment, 0, 0)) | |
+ fprintf(stderr, "Identity added: %s (%s)\n", filename, comment); | |
+ else | |
+ fprintf(stderr, "Could not add identity: %s\n", filename); | |
+ xfree(comment); | |
+ key_free(private); | |
+ break; | |
+ case errAuthorizationCanceled: | |
+ result = xmalloc(1); | |
+ *result = '\0'; | |
+ break; | |
+ default: | |
+ goto err; | |
+ } | |
+ | |
+err: /* Clean up. */ | |
+ if (cfstr_relative_filename) | |
+ CFRelease(cfstr_relative_filename); | |
+ if (cfurl_relative_filename) | |
+ CFRelease(cfurl_relative_filename); | |
+ if (cfurl_filename) | |
+ CFRelease(cfurl_filename); | |
+ if (cfstr_filename) | |
+ CFRelease(cfstr_filename); | |
+ if (cfdata_filename) | |
+ CFRelease(cfdata_filename); | |
+ if (label) | |
+ xfree(label); | |
+ if (passRef) | |
+ CFRelease(passRef); | |
+ if (apps[0]) | |
+ CFRelease(apps[0]); | |
+ if (apps[1]) | |
+ CFRelease(apps[1]); | |
+ if (apps[2]) | |
+ CFRelease(apps[2]); | |
+ if (trustedlist) | |
+ CFRelease(trustedlist); | |
+ if (initialAccess) | |
+ CFRelease(initialAccess); | |
+ if (path) | |
+ CFRelease(path); | |
+ if (pathFinal) | |
+ CFRelease(pathFinal); | |
+ if (bundle_url) | |
+ CFRelease(bundle_url); | |
+ if (bundle) | |
+ CFRelease(bundle); | |
+ if (promptTemplate) | |
+ CFRelease(promptTemplate); | |
+ if (prompt) | |
+ CFRelease(prompt); | |
+ if (ac) | |
+ ssh_close_authentication_connection(ac); | |
+ | |
+ return result; | |
+ | |
+#else | |
+ | |
+ /* | |
+ * keychain_read_passphrase | |
+ * no implementation | |
+ */ | |
+ | |
+ return NULL; | |
+ | |
+#endif | |
+ | |
+} | |
+ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+volatile sig_atomic_t keychain_thread_active = 0; | |
+ | |
+OSStatus | |
+keychain_lock_callback(SecKeychainEvent event, SecKeychainCallbackInfo *info, void *context) | |
+{ | |
+ SecKeychainRef login_keychain = NULL; | |
+ OSStatus retval = noErr; | |
+ | |
+ /* Only care about login keychain */ | |
+ retval = SecKeychainCopyDefault(&login_keychain); | |
+ if (retval != noErr) { | |
+ debug("keychain_lock_callback: Unable to get login keychain, doing nothing."); | |
+ goto cleanup; | |
+ } | |
+ if (!CFEqual(info->keychain, login_keychain)) { | |
+ goto cleanup; | |
+ } | |
+ | |
+ AuthenticationConnection *ac = ssh_get_authentication_connection(); | |
+ if (NULL == ac) { | |
+ error("keychain_lock_callback: Unable to get authentication connection."); | |
+ goto cleanup; | |
+ } | |
+ | |
+ /* Silently remove all identitites */ | |
+ debug("keychain_lock_callback: Removing all identities."); | |
+ if (0 != ssh_remove_all_identities(ac, 1)) | |
+ debug("keychain_lock_callback: Failed to remove all v1 identities."); | |
+ | |
+ if (0 != ssh_remove_all_identities(ac, 2)) | |
+ debug("keychain_lock_callback: Failed to remove all v2 identities."); | |
+ | |
+ ssh_close_authentication_connection(ac); | |
+ | |
+cleanup: | |
+ if (login_keychain) | |
+ CFRelease(login_keychain); | |
+ | |
+ return errSecSuccess; | |
+} | |
+ | |
+OSStatus | |
+keychain_unlock_callback(SecKeychainEvent event, SecKeychainCallbackInfo *info, void *context) | |
+{ | |
+ OSStatus ret = errSecSuccess; | |
+ Boolean state = false; | |
+ SecKeychainRef login_keychain = NULL; | |
+ | |
+ /* Only care about login keychain */ | |
+ ret = SecKeychainCopyDefault(&login_keychain); | |
+ if (ret != noErr) { | |
+ debug("keychain_lock_callback: Unable to get login keychain."); | |
+ goto cleanup; | |
+ } | |
+ if (!CFEqual(info->keychain, login_keychain)) { | |
+ goto cleanup; | |
+ } | |
+ | |
+ /* No user interaction for keychain actions */ | |
+ ret = SecKeychainGetUserInteractionAllowed(&state); | |
+ if (errSecSuccess != ret) | |
+ debug("keychain_unlock_callback: Unable to determine if user interaction is allowed."); | |
+ | |
+ if (state) { | |
+ debug("keychain_unlock_callback: Temporarily denying user interaction."); | |
+ ret = SecKeychainSetUserInteractionAllowed(false); | |
+ if (errSecSuccess != ret) | |
+ error("Keychain unlocked callback: Unable deny user interaction."); | |
+ } | |
+ | |
+ /* Silently add all identities from keychain */ | |
+ debug("keychain_unlock_callback: Adding all identities from keychain, no user interaction."); | |
+ AuthenticationConnection *ac = ssh_get_authentication_connection(); | |
+ if (NULL == ac) { | |
+ error("keychain_unlock_callback: Unable to get authentication connection."); | |
+ goto cleanup; | |
+ } | |
+ ssh_add_from_keychain(ac); | |
+ ssh_close_authentication_connection(ac); | |
+ | |
+ /* Set user interaction state back */ | |
+ if (state) { | |
+ debug("keychain_unlock_callback: Restoring user interaction."); | |
+ ret = SecKeychainSetUserInteractionAllowed(state); | |
+ if (errSecSuccess != ret) | |
+ error("keychain_unlock_callback: Unable to restore user interaction."); | |
+ } | |
+ | |
+cleanup: | |
+ if (login_keychain) | |
+ CFRelease(login_keychain); | |
+ | |
+ return errSecSuccess; | |
+} | |
+ | |
+void | |
+keychain_thread_timer_callback(CFRunLoopTimerRef timer, void *info) | |
+{ | |
+ /* Will get here every kCFAbsoluteTimeIntervalSince1904 seconds. */ | |
+} | |
+ | |
+void* | |
+keychain_thread_main(void *msg) | |
+{ | |
+ OSStatus ret; | |
+ | |
+ CFRunLoopTimerRef timer = CFRunLoopTimerCreate(kCFAllocatorDefault, | |
+ CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1904, | |
+ kCFAbsoluteTimeIntervalSince1904, | |
+ 0, 0, keychain_thread_timer_callback, NULL); | |
+ if (NULL == timer) | |
+ error("keychain_thread_main: Cannot create timer for runloop."); | |
+ | |
+ CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode); | |
+ | |
+ ret = SecKeychainAddCallback(&keychain_lock_callback, kSecLockEventMask, NULL); | |
+ if (errSecSuccess != ret) | |
+ error("keychain_thread_main: Unable to add keychain lock callback."); | |
+ | |
+ SecKeychainAddCallback(&keychain_unlock_callback, kSecUnlockEventMask, NULL); | |
+ if (errSecSuccess != ret) | |
+ error("keychain_thread_main: Unable to add keychain unlock callback."); | |
+ | |
+ CFRunLoopRun(); | |
+ /* NEVER REACHED */ | |
+ | |
+ return NULL; | |
+} | |
+ | |
+/* Start the keychain thread. */ | |
+void | |
+keychain_thread_init() | |
+{ | |
+ if (!keychain_thread_active) { | |
+ int ret; | |
+ pthread_t thread; | |
+ | |
+ keychain_thread_active = 1; | |
+ ret = pthread_create(&thread, NULL, &keychain_thread_main, (void*)"keychain-notification-thread"); | |
+ if (0 != ret) | |
+ error("keychain_thread_init: pthread_create failed for keychain notification thread."); | |
+ } | |
+} | |
+ | |
+#endif | |
diff --git openssh-6.2p1/keychain.h openssh-6.2p1/keychain.h | |
new file mode 100644 | |
index 0000000..3ab1a6b | |
--- /dev/null | |
+++ openssh-6.2p1/keychain.h | |
@@ -0,0 +1,45 @@ | |
+/* | |
+ * Copyright (c) 2007 Apple Inc. All rights reserved. | |
+ * | |
+ * @APPLE_BSD_LICENSE_HEADER_START@ | |
+ * | |
+ * Redistribution and use in source and binary forms, with or without | |
+ * modification, are permitted provided that the following conditions | |
+ * are met: | |
+ * | |
+ * 1. Redistributions of source code must retain the above copyright | |
+ * notice, this list of conditions and the following disclaimer. | |
+ * 2. Redistributions in binary form must reproduce the above copyright | |
+ * notice, this list of conditions and the following disclaimer in the | |
+ * documentation and/or other materials provided with the distribution. | |
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of its | |
+ * contributors may be used to endorse or promote products derived from | |
+ * this software without specific prior written permission. | |
+ * | |
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | |
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | |
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
+ * | |
+ * @APPLE_BSD_LICENSE_HEADER_END@ | |
+ */ | |
+ | |
+/* | |
+ * KEYCHAIN indicates that keychain functionality is present. | |
+ * KEYCHAIN_* indicates the implementation to use, and implies KEYCHAIN. | |
+ */ | |
+#if defined(__APPLE_KEYCHAIN__) | |
+#define KEYCHAIN | |
+#endif | |
+ | |
+void store_in_keychain(const char *filename, const char *passphrase); | |
+void remove_from_keychain(const char *filename); | |
+int add_identities_using_keychain( | |
+ int (*add_identity)(const char *, const char *)); | |
+char *keychain_read_passphrase(const char *filename, int oAskPassGUI); | |
diff --git openssh-6.2p1/openssh.patch openssh-6.2p1/openssh.patch | |
new file mode 100644 | |
index 0000000..e69de29 | |
diff --git openssh-6.2p13/readconf.c openssh-6.2p1/readconf.c | |
index 097bb05..5acc67c 100644 | |
--- openssh-6.2p13/readconf.c | |
+++ openssh-6.2p1/readconf.c | |
@@ -134,6 +134,9 @@ typedef enum { | |
oHashKnownHosts, | |
oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, | |
oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ oAskPassGUI, | |
+#endif | |
oKexAlgorithms, oIPQoS, oRequestTTY, | |
oDeprecated, oUnsupported | |
} OpCodes; | |
@@ -243,6 +246,9 @@ static struct { | |
#else | |
{ "zeroknowledgepasswordauthentication", oUnsupported }, | |
#endif | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ { "askpassgui", oAskPassGUI }, | |
+#endif | |
{ "kexalgorithms", oKexAlgorithms }, | |
{ "ipqos", oIPQoS }, | |
{ "requesttty", oRequestTTY }, | |
@@ -1002,6 +1008,11 @@ parse_int: | |
case oVisualHostKey: | |
intptr = &options->visual_host_key; | |
goto parse_flag; | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ case oAskPassGUI: | |
+ intptr = &options->ask_pass_gui; | |
+ goto parse_flag; | |
+#endif | |
case oIPQoS: | |
arg = strdelim(&s); | |
@@ -1200,6 +1211,9 @@ initialize_options(Options * options) | |
options->use_roaming = -1; | |
options->visual_host_key = -1; | |
options->zero_knowledge_password_authentication = -1; | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ options->ask_pass_gui = -1; | |
+#endif | |
options->ip_qos_interactive = -1; | |
options->ip_qos_bulk = -1; | |
options->request_tty = -1; | |
@@ -1361,6 +1375,10 @@ fill_default_options(Options * options) | |
options->visual_host_key = 0; | |
if (options->zero_knowledge_password_authentication == -1) | |
options->zero_knowledge_password_authentication = 0; | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (options->ask_pass_gui == -1) | |
+ options->ask_pass_gui = 1; | |
+#endif | |
if (options->ip_qos_interactive == -1) | |
options->ip_qos_interactive = IPTOS_LOWDELAY; | |
if (options->ip_qos_bulk == -1) | |
diff --git openssh-6.2p13/readconf.h openssh-6.2p1/readconf.h | |
index be30ee0..d42b6d9 100644 | |
--- openssh-6.2p13/readconf.h | |
+++ openssh-6.2p1/readconf.h | |
@@ -131,7 +131,10 @@ typedef struct { | |
char *local_command; | |
int permit_local_command; | |
int visual_host_key; | |
- | |
+ | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ int ask_pass_gui; | |
+#endif | |
int use_roaming; | |
int request_tty; | |
diff --git openssh-6.2p13/ssh-add.c openssh-6.2p1/ssh-add.c | |
index 0080847..65306d7 100644 | |
--- openssh-6.2p13/ssh-add.c | |
+++ openssh-6.2p1/ssh-add.c | |
@@ -62,6 +62,7 @@ | |
#include "authfile.h" | |
#include "pathnames.h" | |
#include "misc.h" | |
+#include "keychain.h" | |
/* argv0 */ | |
extern char *__progname; | |
@@ -94,14 +95,33 @@ clear_pass(void) | |
pass = NULL; | |
} | |
} | |
+#ifdef __APPLE_KEYCHAIN__ | |
+static int | |
+add_from_keychain(AuthenticationConnection *ac) | |
+{ | |
+ if (ssh_add_from_keychain(ac) == 0) | |
+ return -1; | |
+ | |
+ fprintf(stderr, "Added keychain identities.\n"); | |
+ return 0; | |
+} | |
+#endif | |
+ | |
+#ifdef __APPLE_KEYCHAIN__ | |
static int | |
-delete_file(AuthenticationConnection *ac, const char *filename, int key_only) | |
+delete_file(AuthenticationConnection *ac, int keychain, const char *filename, int key_only) | |
+#else | |
+static int delete_file(AuthenticationConnection *ac, const char *filename, int key_only) | |
+#endif | |
{ | |
Key *public = NULL, *cert = NULL; | |
char *certpath = NULL, *comment = NULL; | |
int ret = -1; | |
- | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (keychain) | |
+ remove_from_keychain(filename); | |
+#endif | |
public = key_load_public(filename, &comment); | |
if (public == NULL) { | |
printf("Bad key file %s\n", filename); | |
@@ -164,7 +184,11 @@ delete_all(AuthenticationConnection *ac) | |
} | |
static int | |
+#ifdef __APPLE_KEYCHAIN__ | |
+add_file(AuthenticationConnection *ac, const char *filename, int keychain, int key_only) | |
+#else | |
add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |
+#endif | |
{ | |
Key *private, *cert; | |
char *comment = NULL; | |
@@ -201,11 +225,21 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |
/* At first, try empty passphrase */ | |
private = key_parse_private(&keyblob, filename, "", &comment); | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (keychain && private != NULL) | |
+ store_in_keychain(filename, ""); | |
+#endif | |
if (comment == NULL) | |
comment = xstrdup(filename); | |
/* try last */ | |
- if (private == NULL && pass != NULL) | |
+ if (private == NULL && pass != NULL) { | |
private = key_parse_private(&keyblob, filename, pass, NULL); | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ private = key_parse_private(&keyblob, filename, pass, NULL); | |
+ if (keychain && private != NULL) | |
+ store_in_keychain(filename, pass); | |
+#endif | |
+ } | |
if (private == NULL) { | |
/* clear passphrase since it did not work */ | |
clear_pass(); | |
@@ -221,8 +255,13 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |
} | |
private = key_parse_private(&keyblob, filename, pass, | |
&comment); | |
- if (private != NULL) | |
+ if (private != NULL) { | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (keychain) | |
+ store_in_keychain(filename, pass); | |
+#endif | |
break; | |
+ } | |
clear_pass(); | |
snprintf(msg, sizeof msg, | |
"Bad passphrase, try again for %.200s: ", comment); | |
@@ -376,14 +415,26 @@ lock_agent(AuthenticationConnection *ac, int lock) | |
} | |
static int | |
+#ifdef __APPLE_KEYCHAIN__ | |
+do_file(AuthenticationConnection *ac, int deleting, int keychain, int key_only, char *file) | |
+#else | |
do_file(AuthenticationConnection *ac, int deleting, int key_only, char *file) | |
+#endif | |
{ | |
if (deleting) { | |
- if (delete_file(ac, file, key_only) == -1) | |
+ #ifdef __APPLE_KEYCHAIN__ | |
+ if (delete_file(ac, file, keychain, key_only) == -1) | |
+ return -1; | |
+ } else { | |
+ if (add_file(ac, file, keychain, key_only) == -1) | |
+ return -1; | |
+#else | |
+ if (delete_file(ac, file, key_only) == -1) | |
return -1; | |
} else { | |
if (add_file(ac, file, key_only) == -1) | |
return -1; | |
+#endif | |
} | |
return 0; | |
} | |
@@ -398,6 +449,11 @@ usage(void) | |
fprintf(stderr, " -k Load only keys and not certificates.\n"); | |
fprintf(stderr, " -c Require confirmation to sign using identities\n"); | |
fprintf(stderr, " -t life Set lifetime (in seconds) when adding identities.\n"); | |
+#ifdef KEYCHAIN | |
+ fprintf(stderr, " -a Add all identities stored in your keychain.\n"); | |
+ fprintf(stderr, " -K Store passphrases in your keychain.\n"); | |
+ fprintf(stderr, " With -d, remove passphrases from your keychain.\n"); | |
+#endif | |
fprintf(stderr, " -d Delete identity.\n"); | |
fprintf(stderr, " -D Delete all identities.\n"); | |
fprintf(stderr, " -x Lock agent.\n"); | |
@@ -414,6 +470,9 @@ main(int argc, char **argv) | |
AuthenticationConnection *ac = NULL; | |
char *pkcs11provider = NULL; | |
int i, ch, deleting = 0, ret = 0, key_only = 0; | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ int keychain = 0; | |
+#endif | |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ | |
sanitise_stdfd(); | |
@@ -455,6 +514,15 @@ main(int argc, char **argv) | |
if (delete_all(ac) == -1) | |
ret = 1; | |
goto done; | |
+#ifdef __APPLEY_KEYCHAIN__ | |
+ case 'a': | |
+ if (add_from_keychain(ac) == -1) | |
+ ret = 1; | |
+ goto done; | |
+ case 'K': | |
+ keychain = 1; | |
+ break; | |
+#endif | |
case 's': | |
pkcs11provider = optarg; | |
break; | |
@@ -500,7 +568,11 @@ main(int argc, char **argv) | |
default_files[i]); | |
if (stat(buf, &st) < 0) | |
continue; | |
- if (do_file(ac, deleting, key_only, buf) == -1) | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (do_file(ac, deleting, keychain, key_only, buf) == -1) | |
+#else | |
+ if (do_file(ac, deleting, key_only, buf) == -1) | |
+#endif | |
ret = 1; | |
else | |
count++; | |
@@ -509,7 +581,11 @@ main(int argc, char **argv) | |
ret = 1; | |
} else { | |
for (i = 0; i < argc; i++) { | |
- if (do_file(ac, deleting, key_only, argv[i]) == -1) | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ if (do_file(ac, deleting, keychain, key_only, argv[i]) == -1) | |
+#else | |
+ if (do_file(ac, deleting, key_only, argv[i]) == -1) | |
+#endif | |
ret = 1; | |
} | |
} | |
diff --git openssh-6.2p13/ssh-agent.c openssh-6.2p1/ssh-agent.c | |
index b9498e6..9a72d18 100644 | |
--- openssh-6.2p13/ssh-agent.c | |
+++ openssh-6.2p1/ssh-agent.c | |
@@ -65,6 +65,9 @@ | |
#include <time.h> | |
#include <string.h> | |
#include <unistd.h> | |
+#ifdef __APPLE_LAUNCHD__ | |
+#include <launch.h> | |
+#endif | |
#include "xmalloc.h" | |
#include "ssh.h" | |
@@ -75,6 +78,8 @@ | |
#include "compat.h" | |
#include "log.h" | |
#include "misc.h" | |
+#include "keychain.h" | |
+#include "authfile.h" | |
#ifdef ENABLE_PKCS11 | |
#include "ssh-pkcs11.h" | |
@@ -793,6 +798,67 @@ process_remove_smartcard_key(SocketEntry *e) | |
} | |
#endif /* ENABLE_PKCS11 */ | |
+#ifdef KEYCHAIN | |
+static int | |
+add_identity_callback(const char *filename, const char *passphrase) | |
+{ | |
+ Key *k; | |
+ int version; | |
+ Idtab *tab; | |
+ | |
+ if ((k = key_load_private(filename, passphrase, NULL)) == NULL) | |
+ return 1; | |
+ switch (k->type) { | |
+ case KEY_RSA: | |
+ case KEY_RSA1: | |
+ if (RSA_blinding_on(k->rsa, NULL) != 1) { | |
+ key_free(k); | |
+ return 1; | |
+ } | |
+ break; | |
+ } | |
+ version = k->type == KEY_RSA1 ? 1 : 2; | |
+ tab = idtab_lookup(version); | |
+ if (lookup_identity(k, version) == NULL) { | |
+ Identity *id = xcalloc(1, sizeof(Identity)); | |
+ id->key = k; | |
+ id->comment = xstrdup(filename); | |
+ if (id->comment == NULL) { | |
+ key_free(k); | |
+ return 1; | |
+ } | |
+ TAILQ_INSERT_TAIL(&tab->idlist, id, next); | |
+ tab->nentries++; | |
+ } else { | |
+ key_free(k); | |
+ return 1; | |
+ } | |
+ | |
+ return 0; | |
+} | |
+ | |
+static void | |
+process_add_from_keychain(SocketEntry *e) | |
+{ | |
+ int result; | |
+ | |
+ result = add_identities_using_keychain(&add_identity_callback); | |
+ | |
+ /* Start thread to wait for keychain notifications. */ | |
+ keychain_thread_init(); | |
+ | |
+ /* e will be NULL when ssh-agent adds keys on its own at startup */ | |
+ if (e) { | |
+ buffer_put_int(&e->output, 1); | |
+ buffer_put_char(&e->output, | |
+ result ? SSH_AGENT_FAILURE : SSH_AGENT_SUCCESS); | |
+ } | |
+} | |
+#endif /* KEYCHAIN */ | |
+ | |
+ | |
+ | |
+ | |
/* dispatch incoming messages */ | |
static void | |
@@ -885,6 +951,11 @@ process_message(SocketEntry *e) | |
process_remove_smartcard_key(e); | |
break; | |
#endif /* ENABLE_PKCS11 */ | |
+#ifdef KEYCHAIN | |
+ case SSH_AGENTC_ADD_FROM_KEYCHAIN: | |
+ process_add_from_keychain(e); | |
+ break; | |
+#endif /* KEYCHAIN */ | |
default: | |
/* Unknown message. Respond with failure. */ | |
error("Unknown message %d", type); | |
@@ -1126,7 +1197,11 @@ usage(void) | |
int | |
main(int ac, char **av) | |
{ | |
+#ifdef __APPLE_LAUNCHD__ | |
+ int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0, l_flag = 0; | |
+#else | |
int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0; | |
+#endif | |
int sock, fd, ch, result, saved_errno; | |
u_int nalloc; | |
char *shell, *format, *pidstr, *agentsocket = NULL; | |
@@ -1160,7 +1235,12 @@ main(int ac, char **av) | |
__progname = ssh_get_progname(av[0]); | |
seed_rng(); | |
- while ((ch = getopt(ac, av, "cdksa:t:")) != -1) { | |
+#ifdef __APPLE_LAUNCHD__ | |
+ while ((ch = getopt(ac, av, "cdklsa:t:")) != -1) { | |
+#else | |
+ while ((ch = getopt(ac, av, "cdksa:t:")) != -1) { | |
+#endif | |
+ | |
switch (ch) { | |
case 'c': | |
if (s_flag) | |
@@ -1170,6 +1250,11 @@ main(int ac, char **av) | |
case 'k': | |
k_flag++; | |
break; | |
+#ifdef __APPLE_LAUNCHD__ | |
+ case 'l': | |
+ l_flag++; | |
+ break; | |
+#endif | |
case 's': | |
if (c_flag) | |
usage(); | |
@@ -1195,8 +1280,12 @@ main(int ac, char **av) | |
} | |
ac -= optind; | |
av += optind; | |
- | |
- if (ac > 0 && (c_flag || k_flag || s_flag || d_flag)) | |
+ | |
+#ifdef __APPPLE_LAUNCHD__ | |
+ if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || l_flag)) | |
+#else | |
+ if (ac > 0 && (c_flag || k_flag || s_flag || d_flag)) | |
+#endif | |
usage(); | |
if (ac == 0 && !c_flag && !s_flag) { | |
@@ -1247,6 +1336,54 @@ main(int ac, char **av) | |
socket_dir[0] = '\0'; | |
strlcpy(socket_name, agentsocket, sizeof socket_name); | |
} | |
+#ifdef __APPLE_LAUNCHD__ | |
+ if (l_flag) { | |
+ launch_data_t resp, msg, tmp; | |
+ size_t listeners_i; | |
+ | |
+ msg = launch_data_new_string(LAUNCH_KEY_CHECKIN); | |
+ | |
+ resp = launch_msg(msg); | |
+ | |
+ if (NULL == resp) { | |
+ perror("launch_msg"); | |
+ exit(1); | |
+ } | |
+ launch_data_free(msg); | |
+ switch (launch_data_get_type(resp)) { | |
+ case LAUNCH_DATA_ERRNO: | |
+ errno = launch_data_get_errno(resp); | |
+ perror("launch_msg response"); | |
+ exit(1); | |
+ case LAUNCH_DATA_DICTIONARY: | |
+ break; | |
+ default: | |
+ fprintf(stderr, "launch_msg unknown response"); | |
+ exit(1); | |
+ } | |
+ tmp = launch_data_dict_lookup(resp, LAUNCH_JOBKEY_SOCKETS); | |
+ | |
+ if (NULL == tmp) { | |
+ fprintf(stderr, "no sockets\n"); | |
+ exit(1); | |
+ } | |
+ | |
+ tmp = launch_data_dict_lookup(tmp, "Listeners"); | |
+ | |
+ if (NULL == tmp) { | |
+ fprintf(stderr, "no known listeners\n"); | |
+ exit(1); | |
+ } | |
+ | |
+ for (listeners_i = 0; listeners_i < launch_data_array_get_count(tmp); listeners_i++) { | |
+ launch_data_t obj_at_ind = launch_data_array_get_index(tmp, listeners_i); | |
+ new_socket(AUTH_SOCKET, launch_data_get_fd(obj_at_ind)); | |
+ } | |
+ | |
+ launch_data_free(resp); | |
+ } else { | |
+#endif | |
+ | |
/* | |
* Create socket early so it will exist before command gets run from | |
@@ -1273,6 +1410,17 @@ main(int ac, char **av) | |
perror("listen"); | |
cleanup_exit(1); | |
} | |
+ | |
+#ifdef __APPLE_LAUNCHD__ | |
+ } | |
+#endif | |
+ | |
+#ifdef __APPLE_LAUNCHD__ | |
+ if (l_flag) | |
+ goto skip2; | |
+#endif | |
+ | |
+ | |
/* | |
* Fork, and have the parent execute the command, if any, or present | |
@@ -1345,6 +1493,9 @@ skip: | |
pkcs11_init(0); | |
#endif | |
new_socket(AUTH_SOCKET, sock); | |
+#ifdef KEYCHAIN | |
+skip2: | |
+#endif | |
if (ac > 0) | |
parent_alive_interval = 10; | |
idtab_init(); | |
@@ -1354,6 +1505,9 @@ skip: | |
signal(SIGHUP, cleanup_handler); | |
signal(SIGTERM, cleanup_handler); | |
nalloc = 0; | |
+#ifdef KEYCHAIN | |
+ process_add_from_keychain(NULL); | |
+#endif | |
while (1) { | |
prepare_select(&readsetp, &writesetp, &max_fd, &nalloc, &tvp); | |
diff --git openssh-6.2p13/sshconnect1.c openssh-6.2p1/sshconnect1.c | |
index fd07bbf..f9eaeba 100644 | |
--- openssh-6.2p13/sshconnect1.c | |
+++ openssh-6.2p1/sshconnect1.c | |
@@ -47,6 +47,7 @@ | |
#include "canohost.h" | |
#include "hostfile.h" | |
#include "auth.h" | |
+#include "keychain.h" | |
/* Session id for the current session. */ | |
u_char session_id[16]; | |
@@ -260,6 +261,10 @@ try_rsa_authentication(int idx) | |
snprintf(buf, sizeof(buf), | |
"Enter passphrase for RSA key '%.100s': ", comment); | |
for (i = 0; i < options.number_of_password_prompts; i++) { | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ passphrase = keychain_read_passphrase(comment, options.ask_pass_gui); | |
+ if (passphrase == NULL) | |
+#endif | |
passphrase = read_passphrase(buf, 0); | |
if (strcmp(passphrase, "") != 0) { | |
private = key_load_private_type(KEY_RSA1, | |
diff --git openssh-6.2p13/sshconnect2.c openssh-6.2p1/sshconnect2.c | |
index d6af0b9..8129750 100644 | |
--- openssh-6.2p13/sshconnect2.c | |
+++ openssh-6.2p1/sshconnect2.c | |
@@ -72,7 +72,7 @@ | |
#include "hostfile.h" | |
#include "schnorr.h" | |
#include "jpake.h" | |
- | |
+#include "keychain.h" | |
#ifdef GSSAPI | |
#include "ssh-gss.h" | |
#endif | |
@@ -1333,6 +1333,10 @@ load_identity_file(char *filename, int userprovided) | |
snprintf(prompt, sizeof prompt, | |
"Enter passphrase for key '%.100s': ", filename); | |
for (i = 0; i < options.number_of_password_prompts; i++) { | |
+#ifdef __APPLE_KEYCHAIN__ | |
+ passphrase = keychain_read_passphrase(filename, options.ask_pass_gui); | |
+ if (passphrase == NULL) | |
+#endif | |
passphrase = read_passphrase(prompt, 0); | |
if (strcmp(passphrase, "") != 0) { | |
private = key_load_private_type(KEY_UNSPEC, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment