sync with netbsd tree changes.
- more strict prototypes, include necessary headers
- use paths.h/pathnames.h decls
- size_t typecase to int -> u_long
25 files changed:
[clientloop.c]
remove confusing callback code
- (djm) Add CVS Id's to files that we have missed
[clientloop.c]
remove confusing callback code
- (djm) Add CVS Id's to files that we have missed
+ - (bal) OpenBSD Sync (more):
+ - itojun@cvs.openbsd.org 2001/02/08 19:30:52
+ sync with netbsd tree changes.
+ - more strict prototypes, include necessary headers
+ - use paths.h/pathnames.h decls
+ - size_t typecase to int -> u_long
20010208
- (djm) Don't delete external askpass program in make uninstall target.
20010208
- (djm) Don't delete external askpass program in make uninstall target.
-RCSID("$OpenBSD: auth-rhosts.c,v 1.20 2001/02/03 10:08:36 markus Exp $");
+RCSID("$OpenBSD: auth-rhosts.c,v 1.21 2001/02/08 19:30:51 itojun Exp $");
#include "packet.h"
#include "xmalloc.h"
#include "packet.h"
#include "xmalloc.h"
#include "log.h"
#include "servconf.h"
#include "canohost.h"
#include "log.h"
#include "servconf.h"
#include "canohost.h"
/*
* This function processes an rhosts-style file (.rhosts, .shosts, or
/*
* This function processes an rhosts-style file (.rhosts, .shosts, or
/* If not logging in as superuser, try /etc/hosts.equiv and shosts.equiv. */
if (pw->pw_uid != 0) {
/* If not logging in as superuser, try /etc/hosts.equiv and shosts.equiv. */
if (pw->pw_uid != 0) {
- if (check_rhosts_file("/etc/hosts.equiv", hostname, ipaddr, client_user,
+ if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr, client_user,
pw->pw_name)) {
packet_send_debug("Accepted for %.100s [%.100s] by /etc/hosts.equiv.",
hostname, ipaddr);
pw->pw_name)) {
packet_send_debug("Accepted for %.100s [%.100s] by /etc/hosts.equiv.",
hostname, ipaddr);
-RCSID("$OpenBSD: authfile.c,v 1.26 2001/01/28 22:27:05 stevesk Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.27 2001/02/08 19:30:51 itojun Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include "key.h"
#include "ssh.h"
#include "log.h"
#include "key.h"
#include "ssh.h"
#include "log.h"
/* Version identification string for identity files. */
static const char authfile_id_string[] =
/* Version identification string for identity files. */
static const char authfile_id_string[] =
-RCSID("$OpenBSD: canohost.c,v 1.20 2001/02/03 10:08:37 markus Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.21 2001/02/08 19:30:51 itojun Exp $");
#include "packet.h"
#include "xmalloc.h"
#include "log.h"
#include "packet.h"
#include "xmalloc.h"
#include "log.h"
void check_ip_options(int socket, char *ipaddr);
void check_ip_options(int socket, char *ipaddr);
-RCSID("$OpenBSD: cli.c,v 1.7 2001/02/04 15:32:23 stevesk Exp $");
+RCSID("$OpenBSD: cli.c,v 1.8 2001/02/08 19:30:51 itojun Exp $");
#include "xmalloc.h"
#include "log.h"
#include "xmalloc.h"
#include "log.h"
static int cli_input = -1;
static int cli_output = -1;
static int cli_input = -1;
static int cli_output = -1;
cli_input = STDIN_FILENO;
cli_output = STDERR_FILENO;
} else {
cli_input = STDIN_FILENO;
cli_output = STDERR_FILENO;
} else {
- cli_input = cli_output = open("/dev/tty", O_RDWR);
+ cli_input = cli_output = open(_PATH_TTY, O_RDWR);
if (cli_input < 0)
fatal("You have no controlling tty. Cannot read passphrase.");
}
if (cli_input < 0)
fatal("You have no controlling tty. Cannot read passphrase.");
}
{
if (!cli_from_stdin && cli_input >= 0)
close(cli_input);
{
if (!cli_from_stdin && cli_input >= 0)
close(cli_input);
{
intr = 1;
}
static void
{
intr = 1;
}
static void
{
sigemptyset(&nset);
sigaddset(&nset, SIGTSTP);
{
sigemptyset(&nset);
sigaddset(&nset, SIGTSTP);
{
if (echo_modified != 0) {
tcsetattr(cli_input, TCSANOW, &otio);
{
if (echo_modified != 0) {
tcsetattr(cli_input, TCSANOW, &otio);
-RCSID("$OpenBSD: clientloop.c,v 1.48 2001/02/06 22:43:02 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.49 2001/02/08 19:30:51 itojun Exp $");
#include "ssh.h"
#include "ssh1.h"
#include "ssh.h"
#include "ssh1.h"
/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */
void
/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */
void
{
if (!in_raw_mode)
return;
{
if (!in_raw_mode)
return;
/* Puts the user\'s terminal in raw mode. */
void
/* Puts the user\'s terminal in raw mode. */
void
/* Restores stdin to blocking mode. */
void
/* Restores stdin to blocking mode. */
void
+leave_non_blocking(void)
{
if (in_non_blocking_mode) {
(void) fcntl(fileno(stdin), F_SETFL, 0);
{
if (in_non_blocking_mode) {
(void) fcntl(fileno(stdin), F_SETFL, 0);
/* Puts stdin terminal in non-blocking mode. */
void
/* Puts stdin terminal in non-blocking mode. */
void
+enter_non_blocking(void)
{
in_non_blocking_mode = 1;
(void) fcntl(fileno(stdin), F_SETFL, O_NONBLOCK);
{
in_non_blocking_mode = 1;
(void) fcntl(fileno(stdin), F_SETFL, O_NONBLOCK);
{
struct timeval tv;
gettimeofday(&tv, NULL);
{
struct timeval tv;
gettimeofday(&tv, NULL);
-client_check_initial_eof_on_stdin()
+client_check_initial_eof_on_stdin(void)
-client_make_packets_from_stdin_data()
+client_make_packets_from_stdin_data(void)
-client_check_window_change()
+client_check_window_change(void)
-client_process_buffered_input_packets()
+client_process_buffered_input_packets(void)
{
dispatch_run(DISPATCH_NONBLOCK, &quit_pending, NULL);
}
{
dispatch_run(DISPATCH_NONBLOCK, &quit_pending, NULL);
}
-client_init_dispatch_20()
+client_init_dispatch_20(void)
{
dispatch_init(&dispatch_protocol_error);
dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
{
dispatch_init(&dispatch_protocol_error);
dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust);
}
void
dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust);
}
void
-client_init_dispatch_13()
+client_init_dispatch_13(void)
{
dispatch_init(NULL);
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_close);
{
dispatch_init(NULL);
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_close);
&x11_input_open : &deny_input_open);
}
void
&x11_input_open : &deny_input_open);
}
void
-client_init_dispatch_15()
+client_init_dispatch_15(void)
{
client_init_dispatch_13();
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof);
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, & channel_input_oclose);
}
void
{
client_init_dispatch_13();
dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof);
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, & channel_input_oclose);
}
void
+client_init_dispatch(void)
{
if (compat20)
client_init_dispatch_20();
{
if (compat20)
client_init_dispatch_20();
-RCSID("$OpenBSD: compress.c,v 1.12 2001/01/21 19:05:48 markus Exp $");
+RCSID("$OpenBSD: compress.c,v 1.13 2001/02/08 19:30:51 itojun Exp $");
#include "log.h"
#include "buffer.h"
#include "zlib.h"
#include "log.h"
#include "buffer.h"
#include "zlib.h"
static z_stream incoming_stream;
static z_stream outgoing_stream;
static z_stream incoming_stream;
static z_stream outgoing_stream;
-RCSID("$OpenBSD: hmac.c,v 1.6 2001/01/21 19:05:49 markus Exp $");
+RCSID("$OpenBSD: hmac.c,v 1.7 2001/02/08 19:30:51 itojun Exp $");
#include "xmalloc.h"
#include "getput.h"
#include "xmalloc.h"
#include "getput.h"
#include <openssl/hmac.h>
#include <openssl/hmac.h>
u_char *
hmac(
EVP_MD *evp_md,
u_char *
hmac(
EVP_MD *evp_md,
-/* $OpenBSD: hostfile.h,v 1.6 2001/01/29 01:58:16 niklas Exp $ */
+/* $OpenBSD: hostfile.h,v 1.7 2001/02/08 19:30:51 itojun Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
#ifndef HOSTFILE_H
#define HOSTFILE_H
#ifndef HOSTFILE_H
#define HOSTFILE_H
+int
+auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n);
+
/*
* Checks whether the given host is already in the list of our known hosts.
* Returns HOST_OK if the host is known and has the specified key, HOST_NEW
/*
* Checks whether the given host is already in the list of our known hosts.
* Returns HOST_OK if the host is known and has the specified key, HOST_NEW
-RCSID("$OpenBSD: kex.c,v 1.19 2001/02/04 15:32:23 stevesk Exp $");
+RCSID("$OpenBSD: kex.c,v 1.20 2001/02/08 19:30:51 itojun Exp $");
#include <openssl/crypto.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/bio.h>
return (dh_new_group_asc(gen, group1));
}
return (dh_new_group_asc(gen, group1));
}
void
dump_digest(u_char *digest, int len)
{
void
dump_digest(u_char *digest, int len)
{
}
fprintf(stderr, "\n");
}
}
fprintf(stderr, "\n");
}
-RCSID("$OpenBSD: mpaux.c,v 1.15 2000/12/19 23:17:57 markus Exp $");
+RCSID("$OpenBSD: mpaux.c,v 1.16 2001/02/08 19:30:52 itojun Exp $");
#include <openssl/bn.h>
#include "getput.h"
#include <openssl/bn.h>
#include "getput.h"
void
compute_session_id(u_char session_id[16],
u_char cookie[8],
void
compute_session_id(u_char session_id[16],
u_char cookie[8],
-RCSID("$OpenBSD: packet.c,v 1.48 2001/02/04 15:32:24 stevesk Exp $");
+RCSID("$OpenBSD: packet.c,v 1.49 2001/02/08 19:30:52 itojun Exp $");
#include "xmalloc.h"
#include "buffer.h"
#include "xmalloc.h"
#include "buffer.h"
{
char buf[8], *cp;
int i, padding, len;
{
char buf[8], *cp;
int i, padding, len;
* Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)
*/
void
* Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)
*/
void
{
u_char *macbuf = NULL;
char *cp;
{
u_char *macbuf = NULL;
char *cp;
-RCSID("$OpenBSD: pty.c,v 1.20 2001/01/21 19:05:53 markus Exp $");
+RCSID("$OpenBSD: pty.c,v 1.22 2001/02/08 19:30:52 itojun Exp $");
#ifdef HAVE_UTIL_H
# include <util.h>
#ifdef HAVE_UTIL_H
# include <util.h>
/* First disconnect from the old controlling tty. */
#ifdef TIOCNOTTY
/* First disconnect from the old controlling tty. */
#ifdef TIOCNOTTY
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+ fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
if (fd >= 0) {
(void) ioctl(fd, TIOCNOTTY, NULL);
close(fd);
if (fd >= 0) {
(void) ioctl(fd, TIOCNOTTY, NULL);
close(fd);
* Verify that we are successfully disconnected from the controlling
* tty.
*/
* Verify that we are successfully disconnected from the controlling
* tty.
*/
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+ fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
if (fd >= 0) {
error("Failed to disconnect from controlling tty.");
close(fd);
if (fd >= 0) {
error("Failed to disconnect from controlling tty.");
close(fd);
#endif /* USE_VHANGUP */
}
/* Verify that we now have a controlling tty. */
#endif /* USE_VHANGUP */
}
/* Verify that we now have a controlling tty. */
- fd = open("/dev/tty", O_WRONLY);
+ fd = open(_PATH_TTY, O_WRONLY);
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));
-RCSID("$OpenBSD: readpass.c,v 1.13 2001/01/21 19:05:54 markus Exp $");
+RCSID("$OpenBSD: readpass.c,v 1.14 2001/02/08 19:30:52 itojun Exp $");
#include "xmalloc.h"
#include "cli.h"
#include "xmalloc.h"
#include "cli.h"
/*
* Reads a passphrase from /dev/tty with echo turned off. Returns the
/*
* Reads a passphrase from /dev/tty with echo turned off. Returns the
-RCSID("$OpenBSD: scp.c,v 1.55 2001/02/08 14:38:54 deraadt Exp $");
+RCSID("$OpenBSD: scp.c,v 1.56 2001/02/08 19:30:52 itojun Exp $");
#include "xmalloc.h"
#include "atomicio.h"
#include "xmalloc.h"
#include "atomicio.h"
#define CMDNEEDS 64
char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
#define CMDNEEDS 64
char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
+int main(int, char *[]);
int response(void);
void rsource(char *, struct stat *);
void sink(int, char *[]);
void source(int, char *[]);
void tolocal(int, char *[]);
int response(void);
void rsource(char *, struct stat *);
void sink(int, char *[]);
void source(int, char *[]);
void tolocal(int, char *[]);
+char *cleanhostname(char *);
void toremote(char *, int, char *[]);
void usage(void);
void toremote(char *, int, char *[]);
void usage(void);
{
static pid_t pgrp = -1;
int ctty_pgrp;
{
static pid_t pgrp = -1;
int ctty_pgrp;
-RCSID("$OpenBSD: serverloop.c,v 1.45 2001/02/04 15:32:25 stevesk Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.46 2001/02/08 19:30:52 itojun Exp $");
#include "xmalloc.h"
#include "packet.h"
#include "xmalloc.h"
#include "packet.h"
-make_packets_from_stderr_data()
+make_packets_from_stderr_data(void)
-make_packets_from_stdout_data()
+make_packets_from_stdout_data(void)
* This is used when the program terminates.
*/
void
* This is used when the program terminates.
*/
void
{
/* Send any buffered stdout data to the client. */
if (buffer_len(&stdout_buffer) > 0) {
{
/* Send any buffered stdout data to the client. */
if (buffer_len(&stdout_buffer) > 0) {
-process_buffered_input_packets()
+process_buffered_input_packets(void)
{
dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
}
{
dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
}
-server_init_dispatch_20()
+server_init_dispatch_20(void)
{
debug("server_init_dispatch_20");
dispatch_init(&dispatch_protocol_error);
{
debug("server_init_dispatch_20");
dispatch_init(&dispatch_protocol_error);
dispatch_set(SSH2_MSG_GLOBAL_REQUEST, &server_input_global_request);
}
void
dispatch_set(SSH2_MSG_GLOBAL_REQUEST, &server_input_global_request);
}
void
-server_init_dispatch_13()
+server_init_dispatch_13(void)
{
debug("server_init_dispatch_13");
dispatch_init(NULL);
{
debug("server_init_dispatch_13");
dispatch_init(NULL);
dispatch_set(SSH_MSG_PORT_OPEN, &channel_input_port_open);
}
void
dispatch_set(SSH_MSG_PORT_OPEN, &channel_input_port_open);
}
void
-server_init_dispatch_15()
+server_init_dispatch_15(void)
{
server_init_dispatch_13();
debug("server_init_dispatch_15");
{
server_init_dispatch_13();
debug("server_init_dispatch_15");
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, &channel_input_oclose);
}
void
dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, &channel_input_oclose);
}
void
+server_init_dispatch(void)
{
if (compat20)
server_init_dispatch_20();
{
if (compat20)
server_init_dispatch_20();
-RCSID("$OpenBSD: session.c,v 1.52 2001/02/03 10:08:37 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.55 2001/02/08 19:30:52 itojun Exp $");
#include "ssh.h"
#include "ssh1.h"
#include "ssh.h"
#include "ssh1.h"
#include "login.h"
#include "serverloop.h"
#include "canohost.h"
#include "login.h"
#include "serverloop.h"
#include "canohost.h"
#ifdef WITH_IRIX_PROJECT
#include <proj.h>
#ifdef WITH_IRIX_PROJECT
#include <proj.h>
-RCSID("$OpenBSD: ssh-dss.c,v 1.5 2001/02/04 15:32:25 stevesk Exp $");
+RCSID("$OpenBSD: ssh-dss.c,v 1.6 2001/02/08 19:30:52 itojun Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
#include "compat.h"
#include "log.h"
#include "key.h"
#include "compat.h"
#include "log.h"
#include "key.h"
#define INTBLOB_LEN 20
#define SIGBLOB_LEN (2*INTBLOB_LEN)
#define INTBLOB_LEN 20
#define SIGBLOB_LEN (2*INTBLOB_LEN)
-RCSID("$OpenBSD: ssh-rsa.c,v 1.5 2001/01/21 19:05:58 markus Exp $");
+RCSID("$OpenBSD: ssh-rsa.c,v 1.6 2001/02/08 19:30:52 itojun Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include "buffer.h"
#include "bufaux.h"
#include "key.h"
#include "buffer.h"
#include "bufaux.h"
#include "key.h"
/* RSASSA-PKCS1-v1_5 (PKCS #1 v2.0 signature) with SHA1 */
int
/* RSASSA-PKCS1-v1_5 (PKCS #1 v2.0 signature) with SHA1 */
int
-RCSID("$OpenBSD: ssh.c,v 1.88 2001/02/04 15:32:26 stevesk Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.93 2001/02/08 19:30:52 itojun Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/err.h>
/* Prints a help message to the user. This function never returns. */
void
/* Prints a help message to the user. This function never returns. */
void
{
fprintf(stderr, "Usage: %s [options] host [command]\n", __progname);
fprintf(stderr, "Options:\n");
fprintf(stderr, " -l user Log in using this user name.\n");
{
fprintf(stderr, "Usage: %s [options] host [command]\n", __progname);
fprintf(stderr, "Options:\n");
fprintf(stderr, " -l user Log in using this user name.\n");
- fprintf(stderr, " -n Redirect input from /dev/null.\n");
+ fprintf(stderr, " -n Redirect input from " _PATH_DEVNULL ".\n");
fprintf(stderr, " -A Enable authentication agent forwarding.\n");
fprintf(stderr, " -a Disable authentication agent forwarding.\n");
#ifdef AFS
fprintf(stderr, " -A Enable authentication agent forwarding.\n");
fprintf(stderr, " -a Disable authentication agent forwarding.\n");
#ifdef AFS
if (options.xauth_location) {
/* Try to get Xauthority information for the display. */
if (options.xauth_location) {
/* Try to get Xauthority information for the display. */
- snprintf(line, sizeof line, "%.100s list %.200s 2>/dev/null",
+ snprintf(line, sizeof line, "%.100s list %.200s 2>" _PATH_DEVNULL,
options.xauth_location, getenv("DISPLAY"));
f = popen(line, "r");
if (f && fgets(line, sizeof(line), f) &&
options.xauth_location, getenv("DISPLAY"));
f = popen(line, "r");
if (f && fgets(line, sizeof(line), f) &&
int in, out, err;
if (stdin_null_flag) {
int in, out, err;
if (stdin_null_flag) {
- in = open("/dev/null", O_RDONLY);
+ in = open(_PATH_DEVNULL, O_RDONLY);
} else {
in = dup(STDIN_FILENO);
}
} else {
in = dup(STDIN_FILENO);
}
-RCSID("$OpenBSD: sshconnect.c,v 1.93 2001/02/04 15:32:26 stevesk Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.95 2001/02/08 19:30:52 itojun Exp $");
* identification string.
*/
void
* identification string.
*/
void
-ssh_exchange_identification()
+ssh_exchange_identification(void)
{
char buf[256], remote_version[256]; /* must be same size! */
int remote_major, remote_minor, i, mismatch;
{
char buf[256], remote_version[256]; /* must be same size! */
int remote_major, remote_minor, i, mismatch;
if (isatty(STDIN_FILENO))
f = stdin;
else
if (isatty(STDIN_FILENO))
f = stdin;
else
- f = fopen("/dev/tty", "rw");
+ f = fopen(_PATH_TTY, "rw");
-RCSID("$OpenBSD: sshconnect1.c,v 1.22 2001/02/03 10:08:37 markus Exp $");
+RCSID("$OpenBSD: sshconnect1.c,v 1.24 2001/02/08 19:30:52 itojun Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
* authenticate using the agent.
*/
int
* authenticate using the agent.
*/
int
-try_agent_authentication()
+try_agent_authentication(void)
{
int type;
char *comment;
{
int type;
char *comment;
-try_kerberos_authentication()
+try_kerberos_authentication(void)
{
KTEXT_ST auth; /* Kerberos data */
char *reply;
{
KTEXT_ST auth; /* Kerberos data */
char *reply;
{
CREDENTIALS *creds;
char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ];
{
CREDENTIALS *creds;
char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ];
* Note that the client code is not tied to s/key or TIS.
*/
int
* Note that the client code is not tied to s/key or TIS.
*/
int
-try_challenge_reponse_authentication()
+try_challenge_reponse_authentication(void)
{
int type, i;
int payload_len;
{
int type, i;
int payload_len;
-RCSID("$OpenBSD: sshd.c,v 1.163 2001/02/04 23:56:23 deraadt Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.165 2001/02/08 19:30:53 itojun Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/bn.h>
* Restarts the server.
*/
void
* Restarts the server.
*/
void
{
log("Received SIGHUP; restarting.");
close_listen_socks();
{
log("Received SIGHUP; restarting.");
close_listen_socks();
/* Disconnect from the controlling tty. */
#ifdef TIOCNOTTY
/* Disconnect from the controlling tty. */
#ifdef TIOCNOTTY
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+ fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
if (fd >= 0) {
(void) ioctl(fd, TIOCNOTTY, NULL);
close(fd);
if (fd >= 0) {
(void) ioctl(fd, TIOCNOTTY, NULL);
close(fd);
len = BN_num_bytes(session_key_int);
if (len < 0 || len > sizeof(session_key)) {
error("do_connection: bad session key len from %s: "
len = BN_num_bytes(session_key_int);
if (len < 0 || len > sizeof(session_key)) {
error("do_connection: bad session key len from %s: "
- "session_key_int %d > sizeof(session_key) %d",
- get_remote_ipaddr(), len, (int)sizeof(session_key));
+ "session_key_int %d > sizeof(session_key) %lu",
+ get_remote_ipaddr(), len, (u_long)sizeof(session_key));
rsafail++;
} else {
memset(session_key, 0, sizeof(session_key));
rsafail++;
} else {
memset(session_key, 0, sizeof(session_key));
-RCSID("$OpenBSD: tildexpand.c,v 1.10 2001/01/21 19:06:01 markus Exp $");
+RCSID("$OpenBSD: tildexpand.c,v 1.11 2001/02/08 19:30:53 itojun Exp $");
#include "xmalloc.h"
#include "log.h"
#include "xmalloc.h"
#include "log.h"
/*
* Expands tildes in the file name. Returns data allocated by xmalloc.
/*
* Expands tildes in the file name. Returns data allocated by xmalloc.
-/* $OpenBSD: uuencode.c,v 1.8 2000/12/19 23:17:59 markus Exp $ */
+/* $OpenBSD: uuencode.c,v 1.10 2001/02/08 19:30:53 itojun Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
#include "includes.h"
#include "xmalloc.h"
#include "includes.h"
#include "xmalloc.h"
-RCSID("$OpenBSD: uuencode.c,v 1.8 2000/12/19 23:17:59 markus Exp $");
+RCSID("$OpenBSD: uuencode.c,v 1.10 2001/02/08 19:30:53 itojun Exp $");
int
uuencode(u_char *src, u_int srclength,
int
uuencode(u_char *src, u_int srclength,