summaryrefslogtreecommitdiff
path: root/ssh.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-01-14 15:45:46 +1100
committerDamien Miller <djm@mindrot.org>2000-01-14 15:45:46 +1100
commit34132e54cbd221d17d373fc54f4e3f7b85727f7f (patch)
tree7c73917b1082ff91786f9e02d25b853bedd1d472 /ssh.h
parent25e4256ad4f453d8a7c1866243ec1984f859b1de (diff)
- Merged OpenBSD IPv6 patch:
- [sshd.c sshd.8 sshconnect.c ssh.h ssh.c servconf.h servconf.c scp.1] [scp.c packet.h packet.c login.c log.c canohost.c channels.c] [hostfile.c sshd_config] ipv6 support: mostly gethostbyname->getaddrinfo/getnameinfo, new features: sshd allows multiple ListenAddress and Port options. note that libwrap is not IPv6-ready. (based on patches from fujiwara@rcac.tdi.co.jp) - [ssh.c canohost.c] more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo, from itojun@ - [channels.c] listen on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE) - [packet.h] allow auth-kerberos for IPv4 only - [scp.1 sshd.8 servconf.h scp.c] document -4, -6, and 'ssh -L 2022/::1/22' - [ssh.c] 'ssh @host' is illegal (null user name), from karsten@gedankenpolizei.de - [sshconnect.c] better error message - [sshd.c] allow auth-kerberos for IPv4 only - Big IPv6 merge: - Cleanup overrun in sockaddr copying on RHL 6.1 - Replacements for getaddrinfo, getnameinfo, etc based on versions from patch from KIKUCHI Takahiro <kick@kyoto.wide.ad.jp> - Replacement for missing structures on systems that lack IPv6 - record_login needed to know about AF_INET6 addresses - Borrowed more code from OpenBSD: rresvport_af and requisites
Diffstat (limited to 'ssh.h')
-rw-r--r--ssh.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/ssh.h b/ssh.h
index ddc6fe073..0f3302a69 100644
--- a/ssh.h
+++ b/ssh.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: ssh.h,v 1.23 1999/12/30 04:50:55 damien Exp $"); */ 16/* RCSID("$Id: ssh.h,v 1.24 2000/01/14 04:45:52 damien Exp $"); */
17 17
18#ifndef SSH_H 18#ifndef SSH_H
19#define SSH_H 19#define SSH_H
@@ -21,6 +21,8 @@
21#include <netinet/in.h> /* For struct sockaddr_in */ 21#include <netinet/in.h> /* For struct sockaddr_in */
22#include <pwd.h> /* For struct pw */ 22#include <pwd.h> /* For struct pw */
23#include <stdarg.h> /* For va_list */ 23#include <stdarg.h> /* For va_list */
24#include <sys/socket.h> /* For struct sockaddr_storage */
25#include "fake-socket.h" /* For struct sockaddr_storage */
24#ifdef HAVE_SYS_SELECT_H 26#ifdef HAVE_SYS_SELECT_H
25# include <sys/select.h> 27# include <sys/select.h>
26#endif 28#endif
@@ -284,7 +286,7 @@ get_last_login_time(uid_t uid, const char *logname,
284 */ 286 */
285void 287void
286record_login(int pid, const char *ttyname, const char *user, uid_t uid, 288record_login(int pid, const char *ttyname, const char *user, uid_t uid,
287 const char *host, struct sockaddr_in * addr); 289 const char *host, struct sockaddr *addr);
288 290
289/* 291/*
290 * Records that the user has logged out. This does many thigs normally done 292 * Records that the user has logged out. This does many thigs normally done
@@ -304,7 +306,7 @@ void record_logout(int pid, const char *ttyname);
304 * packet_set_connection for the connection. 306 * packet_set_connection for the connection.
305 */ 307 */
306int 308int
307ssh_connect(const char *host, struct sockaddr_in * hostaddr, 309ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
308 u_short port, int connection_attempts, 310 u_short port, int connection_attempts,
309 int anonymous, uid_t original_real_uid, 311 int anonymous, uid_t original_real_uid,
310 const char *proxy_command); 312 const char *proxy_command);
@@ -320,7 +322,7 @@ ssh_connect(const char *host, struct sockaddr_in * hostaddr,
320 322
321void 323void
322ssh_login(int host_key_valid, RSA * host_key, const char *host, 324ssh_login(int host_key_valid, RSA * host_key, const char *host,
323 struct sockaddr_in * hostaddr, uid_t original_real_uid); 325 struct sockaddr * hostaddr, uid_t original_real_uid);
324 326
325/*------------ Definitions for various authentication methods. -------*/ 327/*------------ Definitions for various authentication methods. -------*/
326 328
@@ -380,8 +382,10 @@ const char *get_remote_ipaddr(void);
380/* Returns the port number of the peer of the socket. */ 382/* Returns the port number of the peer of the socket. */
381int get_peer_port(int sock); 383int get_peer_port(int sock);
382 384
383/* Returns the port number of the remote host. */ 385/* Returns the port number of the remote/local host. */
384int get_remote_port(void); 386int get_remote_port(void);
387int get_local_port(void);
388
385 389
386/* 390/*
387 * Tries to match the host name (which must be in all lowercase) against the 391 * Tries to match the host name (which must be in all lowercase) against the
@@ -741,6 +745,9 @@ char *skey_fake_keyinfo(char *username);
741int auth_skey_password(struct passwd * pw, const char *password); 745int auth_skey_password(struct passwd * pw, const char *password);
742#endif /* SKEY */ 746#endif /* SKEY */
743 747
748/* AF_UNSPEC or AF_INET or AF_INET6 */
749extern int IPv4or6;
750
744#ifdef USE_PAM 751#ifdef USE_PAM
745#include "auth-pam.h" 752#include "auth-pam.h"
746#endif /* USE_PAM */ 753#endif /* USE_PAM */