diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -39,27 +39,31 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.82 2001/01/15 21:40:10 markus Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.84 2001/01/21 19:05:58 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/dsa.h> | ||
46 | #include <openssl/rsa.h> | ||
47 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
48 | 46 | ||
49 | #include "xmalloc.h" | ||
50 | #include "ssh.h" | 47 | #include "ssh.h" |
48 | #include "ssh1.h" | ||
49 | #include "ssh2.h" | ||
50 | #include "compat.h" | ||
51 | #include "cipher.h" | ||
52 | #include "xmalloc.h" | ||
51 | #include "packet.h" | 53 | #include "packet.h" |
52 | #include "buffer.h" | 54 | #include "buffer.h" |
53 | #include "readconf.h" | ||
54 | #include "uidswap.h" | 55 | #include "uidswap.h" |
55 | |||
56 | #include "ssh2.h" | ||
57 | #include "compat.h" | ||
58 | #include "channels.h" | 56 | #include "channels.h" |
59 | #include "key.h" | 57 | #include "key.h" |
60 | #include "authfd.h" | 58 | #include "authfd.h" |
61 | #include "authfile.h" | 59 | #include "authfile.h" |
60 | #include "pathnames.h" | ||
62 | #include "clientloop.h" | 61 | #include "clientloop.h" |
62 | #include "log.h" | ||
63 | #include "readconf.h" | ||
64 | #include "sshconnect.h" | ||
65 | #include "tildexpand.h" | ||
66 | #include "misc.h" | ||
63 | 67 | ||
64 | #ifdef HAVE___PROGNAME | 68 | #ifdef HAVE___PROGNAME |
65 | extern char *__progname; | 69 | extern char *__progname; |
@@ -555,11 +559,11 @@ main(int ac, char **av) | |||
555 | log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0); | 559 | log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0); |
556 | 560 | ||
557 | /* Read per-user configuration file. */ | 561 | /* Read per-user configuration file. */ |
558 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, SSH_USER_CONFFILE); | 562 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_CONFFILE); |
559 | read_config_file(buf, host, &options); | 563 | read_config_file(buf, host, &options); |
560 | 564 | ||
561 | /* Read systemwide configuration file. */ | 565 | /* Read systemwide configuration file. */ |
562 | read_config_file(HOST_CONFIG_FILE, host, &options); | 566 | read_config_file(_PATH_HOST_CONFIG_FILE, host, &options); |
563 | 567 | ||
564 | /* Fill configuration defaults. */ | 568 | /* Fill configuration defaults. */ |
565 | fill_default_options(&options); | 569 | fill_default_options(&options); |
@@ -624,7 +628,7 @@ main(int ac, char **av) | |||
624 | host_private_key = RSA_new(); | 628 | host_private_key = RSA_new(); |
625 | k.type = KEY_RSA1; | 629 | k.type = KEY_RSA1; |
626 | k.rsa = host_private_key; | 630 | k.rsa = host_private_key; |
627 | if (load_private_key(HOST_KEY_FILE, "", &k, NULL)) | 631 | if (load_private_key(_PATH_HOST_KEY_FILE, "", &k, NULL)) |
628 | host_private_key_loaded = 1; | 632 | host_private_key_loaded = 1; |
629 | } | 633 | } |
630 | /* | 634 | /* |
@@ -648,7 +652,7 @@ main(int ac, char **av) | |||
648 | * Now that we are back to our own permissions, create ~/.ssh | 652 | * Now that we are back to our own permissions, create ~/.ssh |
649 | * directory if it doesn\'t already exist. | 653 | * directory if it doesn\'t already exist. |
650 | */ | 654 | */ |
651 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, SSH_USER_DIR); | 655 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_DIR); |
652 | if (stat(buf, &st) < 0) | 656 | if (stat(buf, &st) < 0) |
653 | if (mkdir(buf, 0700) < 0) | 657 | if (mkdir(buf, 0700) < 0) |
654 | error("Could not create directory '%.200s'.", buf); | 658 | error("Could not create directory '%.200s'.", buf); |