#include <netinet/in.h> /* For struct sockaddr_in */
#include <pwd.h> /* For struct pw */
#include <stdarg.h> /* For va_list */
-
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
#include "rsa.h"
#include "cipher.h"
*/
#define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID"
+/*
+ * Default path to ssh-askpass used by ssh-add,
+ * environment variable for overwriting the default location
+ */
+#ifndef SSH_ASKPASS_DEFAULT
+# define SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass"
+#endif
+#define SSH_ASKPASS_ENV "SSH_ASKPASS"
+
/*
* Force host key length and server key length to differ by at least this
* many bits. This is to make double encryption with rsaref work.
*/
int
ssh_connect(const char *host, struct sockaddr_in * hostaddr,
- int port, int connection_attempts,
+ u_short port, int connection_attempts,
int anonymous, uid_t original_real_uid,
const char *proxy_command);
* error.
*/
void
-channel_request_local_forwarding(int port, const char *host,
- int remote_port);
+channel_request_local_forwarding(u_short port, const char *host,
+ u_short remote_port, int gateway_ports);
/*
* Initiate forwarding of connections to port "port" on remote host through
* permitted.
*/
void
-channel_request_remote_forwarding(int port, const char *host,
- int remote_port);
+channel_request_remote_forwarding(u_short port, const char *host,
+ u_short remote_port);
/*
* Permits opening to any host/port in SSH_MSG_PORT_OPEN. This is usually
* Returns a suitable value for the DISPLAY variable, or NULL if an error
* occurs.
*/
-char *x11_create_display_inet(int screen);
+char *x11_create_display_inet(int screen, int x11_display_offset);
/*
* This is called when SSH_SMSG_X11_OPEN is received. The packet contains
struct envstring *next;
char *s;
};
+
+/*
+ * Ensure all of data on socket comes through. f==read || f==write
+ */
+int atomicio(int (*f)(), int fd, void *s, size_t n);
+
#ifdef KRB4
#include <krb.h>
-
/*
* Performs Kerberos v4 mutual authentication with the client. This returns 0
* if the client could not be authenticated, and 1 if authentication was
int auth_krb4(const char *server_user, KTEXT auth, char **client);
int krb4_init(uid_t uid);
void krb4_cleanup_proc(void *ignore);
+int auth_krb4_password(struct passwd * pw, const char *password);
#ifdef AFS
#include <kafs.h>
#ifdef SKEY
#include <skey.h>
char *skey_fake_keyinfo(char *username);
+int auth_skey_password(struct passwd * pw, const char *password);
#endif /* SKEY */
+#ifdef USE_PAM
+#include "auth-pam.h"
+#endif /* USE_PAM */
+
+#ifdef HAVE_DANTE
+/*
+ * The following defines map the normal socket operations to SOCKSified
+ * versions coming from the Dante SOCKS package.
+ */
+#define accept Raccept
+#define bind Rbind
+#define bindresvport Rbindresvport
+#define connect Rconnect
+#define gethostbyname Rgethostbyname
+#define gethostbyname2 Rgethostbyname2
+#define getpeername Rgetpeername
+#define getsockname Rgetsockname
+#define read Rread
+#define readv Rreadv
+#define recv Rrecv
+#define recvmsg Rrecvmsg
+#define recvfrom Rrecvfrom
+#define rresvport Rrresvport
+#define send Rsend
+#define sendmsg Rsendmsg
+#define sendto Rsendto
+#define write Rwrite
+#define writev Rwritev
+int Raccept (int, struct sockaddr *, socklen_t *);
+int Rbind (int, const struct sockaddr *, socklen_t);
+int Rbindresvport(int , struct sockaddr_in *);
+int Rconnect (int, const struct sockaddr *, socklen_t);
+struct hostent *Rgethostbyname(const char *);
+struct hostent *Rgethostbyname2(const char *, int);
+int Rgetpeername (int, struct sockaddr *, socklen_t *);
+int Rgetsockname (int, struct sockaddr *, socklen_t *);
+ssize_t Rread(int , void *, size_t );
+ssize_t Rreadv(int d, const struct iovec *iov, int iovcnt);
+ssize_t Rrecv (int, void *, size_t, int);
+ssize_t Rrecvfrom (int, void *, size_t, int, struct sockaddr *,
+ socklen_t *);
+ssize_t Rsend (int, const void *, size_t, int);
+ssize_t Rsendmsg (int, const struct msghdr *, int);
+ssize_t Rsendto (int, const void *,
+ size_t, int, const struct sockaddr *, socklen_t);
+ssize_t Rwrite(int , const void *, size_t );
+ssize_t Rwritev(int , const struct iovec *, int );
+#endif /* HAVE_DANTE */
+
#endif /* SSH_H */