PERFORCE change 81333 for review
soc-bushman
soc-bushman at FreeBSD.org
Tue Aug 2 13:18:39 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=81333
Change 81333 by soc-bushman at soc-bushman_stinger on 2005/08/02 13:18:09
openssh port completely finished. USE_AUTOCONF_VER added, USE_NSSWITCH condition added
Affected files ...
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth-rh-rsa.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth2-hostbased.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth2.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/configure#2 delete
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/hostfile.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/hostfile.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/key.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth-rh.rsa.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth2-hostbased.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-config.h.in#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-configure.ac#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-hostfile.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-hostfile.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-sshconnect.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/Makefile#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/batch.patch#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/gss-serv.c.patch#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth-pam.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth-rh.rsa.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth1.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth2-hostbased.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth2.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-clientloop.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-config.h.in#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-configure#2 delete
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-configure.ac#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-fake-rfc2553.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-hostfile.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-hostfile.h#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-loginrec.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-regress-test-exec.sh#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-session.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshconnect.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshd.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshd_config#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshpty.c#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/servconf.c.patch#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/sshd.sh#2 edit
.. //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/sshconnect.c#2 edit
Differences ...
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth-rh-rsa.c#2 (text+ko) ====
@@ -40,13 +40,13 @@
if (!auth_rhosts(pw, cuser))
return 0;
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
host_status = check_key_in_nsswitch(pw, client_host_key, chost);
if (host_status == HOST_NEW)
host_status = check_key_in_user_hostfile(pw, client_host_key, chost,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, client_host_key,
chost, _PATH_SSH_SYSTEM_HOSTFILE,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth.c#2 (text+ko) ====
@@ -397,7 +397,7 @@
return expand_filename(options.authorized_keys_file2, pw);
}
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
/* return ok if key exists in sysfile or userfile */
HostStatus
check_key_in_user_hostfile(struct passwd *pw, Key *key, const char *host,
@@ -455,7 +455,7 @@
"ok" : "not found", host);
return host_status;
}
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* return ok if key exists in sysfile or userfile */
HostStatus
check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
@@ -493,7 +493,7 @@
"ok" : "not found", host);
return host_status;
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/*
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth.h#2 (text+ko) ====
@@ -170,18 +170,18 @@
int
secure_filename(FILE *, const char *, struct passwd *, char *, size_t);
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
HostStatus
check_key_in_user_hostfile(struct passwd *, Key *, const char *,
const char *);
HostStatus
check_key_in_nsswitch(struct passwd *, Key *, const char *);
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
HostStatus
check_key_in_hostfiles(struct passwd *, Key *, const char *,
const char *, const char *);
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* hostkey handling */
Key *get_hostkey_by_index(int);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth2-hostbased.c#2 (text+ko) ====
@@ -161,7 +161,7 @@
}
debug2("userauth_hostbased: access allowed by auth_rhosts2");
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
host_status = check_key_in_nsswitch(pw, key, lookup);
if (host_status == HOST_NEW) {
@@ -174,7 +174,7 @@
options.ignore_user_known_hosts ? NULL :
_PATH_SSH_USER_HOSTFILE2);
}
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, key, lookup,
_PATH_SSH_SYSTEM_HOSTFILE,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
@@ -185,7 +185,7 @@
_PATH_SSH_SYSTEM_HOSTFILE2,
options.ignore_user_known_hosts ? NULL :
_PATH_SSH_USER_HOSTFILE2);
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
return (host_status == HOST_OK);
}
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/auth2.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/hostfile.c#2 (text+ko) ====
@@ -38,26 +38,26 @@
#include "includes.h"
RCSID("$OpenBSD: hostfile.c,v 1.34 2005/03/10 22:01:05 deraadt Exp $");
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
#include <sys/types.h>
#include <nsswitch.h>
#include <stdarg.h>
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include <resolv.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
#include "packet.h"
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
#include "pathnames.h"
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include "match.h"
#include "key.h"
#include "hostfile.h"
#include "log.h"
#include "xmalloc.h"
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
#ifndef NSDB_SSH_HOSTKEYS
#define NSDB_SSH_HOSTKEYS "ssh_hostkeys"
@@ -203,7 +203,7 @@
else
return (0);
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
static int
extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/hostfile.h#2 (text+ko) ====
@@ -30,7 +30,7 @@
char *host_hash(const char *, const char *, u_int);
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
/*
* Nsswitch declarations
* Here 2 functions are defined. Both are equivalents of the correspondent
@@ -41,6 +41,6 @@
void nsswitch_set_system_hostfiles(char *, char *);
HostStatus nsswitch_check_host(const char *, const Key *, Key *);
int nsswitch_lookup_key_by_type(const char *, int, Key *);
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#endif
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/key.h#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth-rh.rsa.c#2 (text+ko) ====
@@ -4,18 +4,18 @@
if (!auth_rhosts(pw, cuser))
return 0;
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_status = check_key_in_nsswitch(pw, client_host_key, chost);
+
+ if (host_status == HOST_NEW)
+ host_status = check_key_in_user_hostfile(pw, client_host_key, chost,
+ options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, client_host_key,
chost, _PATH_SSH_SYSTEM_HOSTFILE,
- options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
+ options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-+#endif
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
return (host_status == HOST_OK);
}
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth.c#2 (text+ko) ====
@@ -22,7 +22,7 @@
return expand_filename(options.authorized_keys_file2, pw);
}
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+/* return ok if key exists in sysfile or userfile */
+HostStatus
+check_key_in_user_hostfile(struct passwd *pw, Key *key, const char *host,
@@ -80,7 +80,7 @@
+ "ok" : "not found", host);
+ return host_status;
+}
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* return ok if key exists in sysfile or userfile */
HostStatus
check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
@@ -88,7 +88,7 @@
"ok" : "not found", host);
return host_status;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/*
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth.h#2 (text+ko) ====
@@ -4,18 +4,18 @@
int
secure_filename(FILE *, const char *, struct passwd *, char *, size_t);
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+HostStatus
+check_key_in_user_hostfile(struct passwd *, Key *, const char *,
+ const char *);
+
+HostStatus
+check_key_in_nsswitch(struct passwd *, Key *, const char *);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
HostStatus
check_key_in_hostfiles(struct passwd *, Key *, const char *,
const char *, const char *);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* hostkey handling */
Key *get_hostkey_by_index(int);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-auth2-hostbased.c#2 (text+ko) ====
@@ -4,7 +4,7 @@
}
debug2("userauth_hostbased: access allowed by auth_rhosts2");
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_status = check_key_in_nsswitch(pw, key, lookup);
+
+ if (host_status == HOST_NEW) {
@@ -17,7 +17,7 @@
+ options.ignore_user_known_hosts ? NULL :
+ _PATH_SSH_USER_HOSTFILE2);
+ }
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, key, lookup,
_PATH_SSH_SYSTEM_HOSTFILE,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
@@ -25,7 +25,7 @@
_PATH_SSH_SYSTEM_HOSTFILE2,
options.ignore_user_known_hosts ? NULL :
_PATH_SSH_USER_HOSTFILE2);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
return (host_status == HOST_OK);
}
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-config.h.in#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-configure.ac#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-hostfile.c#2 (text+ko) ====
@@ -4,26 +4,26 @@
#include "includes.h"
RCSID("$OpenBSD: hostfile.c,v 1.34 2005/03/10 22:01:05 deraadt Exp $");
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+#include <sys/types.h>
+#include <nsswitch.h>
+#include <stdarg.h>
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include <resolv.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
#include "packet.h"
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+#include "pathnames.h"
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include "match.h"
#include "key.h"
#include "hostfile.h"
#include "log.h"
#include "xmalloc.h"
+
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+
+#ifndef NSDB_SSH_HOSTKEYS
+#define NSDB_SSH_HOSTKEYS "ssh_hostkeys"
@@ -169,7 +169,7 @@
+ else
+ return (0);
+}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
static int
extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-hostfile.h#2 (text+ko) ====
@@ -4,7 +4,7 @@
char *host_hash(const char *, const char *, u_int);
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+/*
+ * Nsswitch declarations
+ * Here 2 functions are defined. Both are equivalents of the correspondent
@@ -15,6 +15,6 @@
+void nsswitch_set_system_hostfiles(char *, char *);
+HostStatus nsswitch_check_host(const char *, const Key *, Key *);
+int nsswitch_lookup_key_by_type(const char *, int, Key *);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
+
#endif
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/patches/patch-sshconnect.c#2 (text+ko) ====
@@ -4,11 +4,11 @@
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
if (host_status == HOST_NEW) {
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_file = "nsswitch";
+ host_line = 0;
+ host_status = nsswitch_check_host(host, host_key, file_key);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_file = system_hostfile;
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
@@ -20,11 +20,11 @@
ip_status = check_host_in_hostfile(ip_file, ip, host_key,
ip_key, &ip_line);
if (ip_status == HOST_NEW) {
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ ip_file = "nsswitch";
+ ip_line = 0;
+ ip_status = nsswitch_check_host(ip, host_key, ip_key);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
ip_file = system_hostfile;
ip_status = check_host_in_hostfile(ip_file, ip,
host_key, ip_key, &ip_line);
@@ -36,7 +36,7 @@
return (ret);
}
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+static int
+show_key_from_nsswitch(const char *host, int keytype)
+{
@@ -58,7 +58,7 @@
+ key_free(found);
+ return (ret);
+}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
+
/* print all known host keys for a given host, but skip keys of given type */
static int
@@ -68,34 +68,34 @@
if (type[i] == key->type)
continue;
+
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ if (show_key_from_nsswitch(host, type[i])) {
+ found = 1;
+ continue;
+ }
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.user_hostfile2, host, type[i])) {
found = 1;
continue;
}
-+#ifndef HAVE_NSDISPATCH
++#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.system_hostfile2, host, type[i])) {
found = 1;
continue;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
if (show_key_from_file(options.user_hostfile, host, type[i])) {
found = 1;
continue;
}
-+#ifndef HAVE_NSDISPATCH
++#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (show_key_from_file(options.system_hostfile, host, type[i])) {
found = 1;
continue;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
debug2("no key of type %d for host %s", type[i], host);
}
return (found);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/Makefile#2 (text+ko) ====
@@ -52,6 +52,9 @@
ETCOLD= ${PREFIX}/etc
PORTABLE_SUFFIX= -portable
+USE_AUTOCONF_VER= 253
+AUTOCONF_ARGS+= -o configure configure.ac
+
.if exists(/usr/include/security/pam_modules.h)
CONFIGURE_ARGS+= --with-pam
.endif
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/batch.patch#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/gss-serv.c.patch#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth-pam.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth-rh.rsa.c#2 (text+ko) ====
@@ -4,18 +4,18 @@
if (!auth_rhosts(pw, cuser))
return 0;
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_status = check_key_in_nsswitch(pw, client_host_key, chost);
+
+ if (host_status == HOST_NEW)
+ host_status = check_key_in_user_hostfile(pw, client_host_key, chost,
+ options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, client_host_key,
chost, _PATH_SSH_SYSTEM_HOSTFILE,
- options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
+ options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-+#endif
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
return (host_status == HOST_OK);
}
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth.c#2 (text+ko) ====
@@ -22,7 +22,7 @@
return expand_filename(options.authorized_keys_file2, pw);
}
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+/* return ok if key exists in sysfile or userfile */
+HostStatus
+check_key_in_user_hostfile(struct passwd *pw, Key *key, const char *host,
@@ -80,7 +80,7 @@
+ "ok" : "not found", host);
+ return host_status;
+}
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* return ok if key exists in sysfile or userfile */
HostStatus
check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
@@ -88,7 +88,7 @@
"ok" : "not found", host);
return host_status;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/*
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth.h#2 (text+ko) ====
@@ -4,18 +4,18 @@
int
secure_filename(FILE *, const char *, struct passwd *, char *, size_t);
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+HostStatus
+check_key_in_user_hostfile(struct passwd *, Key *, const char *,
+ const char *);
+
+HostStatus
+check_key_in_nsswitch(struct passwd *, Key *, const char *);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
HostStatus
check_key_in_hostfiles(struct passwd *, Key *, const char *,
const char *, const char *);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* hostkey handling */
Key *get_hostkey_by_index(int);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth1.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth2-hostbased.c#2 (text+ko) ====
@@ -4,7 +4,7 @@
}
debug2("userauth_hostbased: access allowed by auth_rhosts2");
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_status = check_key_in_nsswitch(pw, key, lookup);
+
+ if (host_status == HOST_NEW) {
@@ -17,7 +17,7 @@
+ options.ignore_user_known_hosts ? NULL :
+ _PATH_SSH_USER_HOSTFILE2);
+ }
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_status = check_key_in_hostfiles(pw, key, lookup,
_PATH_SSH_SYSTEM_HOSTFILE,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
@@ -25,7 +25,7 @@
_PATH_SSH_SYSTEM_HOSTFILE2,
options.ignore_user_known_hosts ? NULL :
_PATH_SSH_USER_HOSTFILE2);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
return (host_status == HOST_OK);
}
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-auth2.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-clientloop.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-config.h.in#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-configure.ac#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-fake-rfc2553.h#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-hostfile.c#2 (text+ko) ====
@@ -4,26 +4,26 @@
#include "includes.h"
RCSID("$OpenBSD: hostfile.c,v 1.34 2005/03/10 22:01:05 deraadt Exp $");
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+#include <sys/types.h>
+#include <nsswitch.h>
+#include <stdarg.h>
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include <resolv.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
#include "packet.h"
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+#include "pathnames.h"
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
#include "match.h"
#include "key.h"
#include "hostfile.h"
#include "log.h"
#include "xmalloc.h"
+
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+
+#ifndef NSDB_SSH_HOSTKEYS
+#define NSDB_SSH_HOSTKEYS "ssh_hostkeys"
@@ -169,7 +169,7 @@
+ else
+ return (0);
+}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
static int
extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-hostfile.h#2 (text+ko) ====
@@ -4,7 +4,7 @@
char *host_hash(const char *, const char *, u_int);
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+/*
+ * Nsswitch declarations
+ * Here 2 functions are defined. Both are equivalents of the correspondent
@@ -15,6 +15,6 @@
+void nsswitch_set_system_hostfiles(char *, char *);
+HostStatus nsswitch_check_host(const char *, const Key *, Key *);
+int nsswitch_lookup_key_by_type(const char *, int, Key *);
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
+
#endif
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-loginrec.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-regress-test-exec.sh#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-session.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshconnect.c#2 (text+ko) ====
@@ -4,11 +4,11 @@
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
if (host_status == HOST_NEW) {
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ host_file = "nsswitch";
+ host_line = 0;
+ host_status = nsswitch_check_host(host, host_key, file_key);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_file = system_hostfile;
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
@@ -20,11 +20,11 @@
ip_status = check_host_in_hostfile(ip_file, ip, host_key,
ip_key, &ip_line);
if (ip_status == HOST_NEW) {
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ ip_file = "nsswitch";
+ ip_line = 0;
+ ip_status = nsswitch_check_host(ip, host_key, ip_key);
-+#else /* HAVE_NSDISPATCH */
++#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
ip_file = system_hostfile;
ip_status = check_host_in_hostfile(ip_file, ip,
host_key, ip_key, &ip_line);
@@ -36,7 +36,7 @@
return (ret);
}
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+static int
+show_key_from_nsswitch(const char *host, int keytype)
+{
@@ -58,7 +58,7 @@
+ key_free(found);
+ return (ret);
+}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
+
/* print all known host keys for a given host, but skip keys of given type */
static int
@@ -68,34 +68,34 @@
if (type[i] == key->type)
continue;
+
-+#ifdef HAVE_NSDISPATCH
++#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
+ if (show_key_from_nsswitch(host, type[i])) {
+ found = 1;
+ continue;
+ }
-+#endif /* HAVE_NSDISPATCH */
++#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.user_hostfile2, host, type[i])) {
found = 1;
continue;
}
-+#ifndef HAVE_NSDISPATCH
++#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.system_hostfile2, host, type[i])) {
found = 1;
continue;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
if (show_key_from_file(options.user_hostfile, host, type[i])) {
found = 1;
continue;
}
-+#ifndef HAVE_NSDISPATCH
++#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (show_key_from_file(options.system_hostfile, host, type[i])) {
found = 1;
continue;
}
-+#endif /* HAVE_NSDISPATCH */
++#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
debug2("no key of type %d for host %s", type[i], host);
}
return (found);
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshd.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshd_config#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/patch-sshpty.c#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/servconf.c.patch#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/port/files/sshd.sh#2 (text+ko) ====
==== //depot/projects/soc2005/nsswitch_cached/tests/ssh_hostkeys_test/sshconnect.c#2 (text+ko) ====
@@ -637,11 +637,11 @@
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
if (host_status == HOST_NEW) {
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
host_file = "nsswitch";
host_line = 0;
host_status = nsswitch_check_host(host, host_key, file_key);
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
host_file = system_hostfile;
host_status = check_host_in_hostfile(host_file, host, host_key,
file_key, &host_line);
@@ -658,11 +658,11 @@
ip_status = check_host_in_hostfile(ip_file, ip, host_key,
ip_key, &ip_line);
if (ip_status == HOST_NEW) {
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
ip_file = "nsswitch";
ip_line = 0;
ip_status = nsswitch_check_host(ip, host_key, ip_key);
-#else /* HAVE_NSDISPATCH */
+#else /* HAVE_NSDISPATCH && USE_NSSWITCH */
ip_file = system_hostfile;
ip_status = check_host_in_hostfile(ip_file, ip,
host_key, ip_key, &ip_line);
@@ -1020,7 +1020,7 @@
return (ret);
}
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
static int
show_key_from_nsswitch(const char *host, int keytype)
{
@@ -1042,7 +1042,7 @@
key_free(found);
return (ret);
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
/* print all known host keys for a given host, but skip keys of given type */
static int
@@ -1055,34 +1055,34 @@
if (type[i] == key->type)
continue;
-#ifdef HAVE_NSDISPATCH
+#if defined (HAVE_NSDISPATCH) && defined (USE_NSSWITCH)
if (show_key_from_nsswitch(host, type[i])) {
found = 1;
continue;
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* HAVE_NSDISPATCH && USE_NSSWITCH */
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.user_hostfile2, host, type[i])) {
found = 1;
continue;
}
-#ifndef HAVE_NSDISPATCH
+#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (type[i] != KEY_RSA1 &&
show_key_from_file(options.system_hostfile2, host, type[i])) {
found = 1;
continue;
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
if (show_key_from_file(options.user_hostfile, host, type[i])) {
found = 1;
continue;
}
-#ifndef HAVE_NSDISPATCH
+#if !( defined (HAVE_NSDISPATCH)) || !( defined (USE_NSSWITCH))
if (show_key_from_file(options.system_hostfile, host, type[i])) {
found = 1;
continue;
}
-#endif /* HAVE_NSDISPATCH */
+#endif /* !HAVE_NSDISPATCH || !USE_NSSWITCH */
debug2("no key of type %d for host %s", type[i], host);
}
return (found);
More information about the p4-projects
mailing list