summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-09-30 04:10:27 +0000
committerderaadt <deraadt@openbsd.org>1999-09-30 04:10:27 +0000
commit153effca9947f578430e82fdc52a1dab2da96166 (patch)
tree9a2cdd603babcbf19d7a6374a58270c7485a7a2a /usr.bin/ssh
parentMake sure 'model' and 'step' are initialized, even for non-cpuid chips. (diff)
downloadwireguard-openbsd-153effca9947f578430e82fdc52a1dab2da96166.tar.xz
wireguard-openbsd-153effca9947f578430e82fdc52a1dab2da96166.zip
rely on paths.h more
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/config.h16
-rw-r--r--usr.bin/ssh/login.c38
-rw-r--r--usr.bin/ssh/ssh.c12
-rw-r--r--usr.bin/ssh/sshd.c22
4 files changed, 9 insertions, 79 deletions
diff --git a/usr.bin/ssh/config.h b/usr.bin/ssh/config.h
index 0c9545a60ee..a31e7e0052b 100644
--- a/usr.bin/ssh/config.h
+++ b/usr.bin/ssh/config.h
@@ -120,21 +120,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
/* Define to use RSAREF. */
/* #undef RSAREF */
-/* Define this to be the path of the rsh program to support executing rsh. */
-#define RSH_PATH "/usr/bin/rsh"
-
/* Define this to be the path of the xauth program. */
#define XAUTH_PATH "/usr/X11R6/bin/xauth"
-/* Default path for utmp. Determined by configure. */
-#define SSH_UTMP "/var/run/utmp"
-
-/* Default path for wtmp. Determined by configure. */
-#define SSH_WTMP "/var/log/wtmp"
-
-/* Default path for lastlog. Determined by configure. */
-#define SSH_LASTLOG "/var/log/lastlog"
-
/* This is defined if we found a lastlog file. The presence of lastlog.h
alone is not a sufficient indicator (at least newer BSD systems have
lastlog but no lastlog.h. */
@@ -150,10 +138,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
/* Defined if mail goes to $HOME/newmail instead of a global mail spool. */
/* #undef HAVE_TILDE_NEWMAIL */
-/* Define this to be the default user path if you don't like the default.
- See the --with-path=<path> configure option. */
-/* #undef DEFAULT_PATH */
-
/* Define this if O_NONBLOCK does not work on your system (e.g., Ultrix). */
/* #undef O_NONBLOCK_BROKEN */
diff --git a/usr.bin/ssh/login.c b/usr.bin/ssh/login.c
index f1e2883f32e..29d98bc5d6c 100644
--- a/usr.bin/ssh/login.c
+++ b/usr.bin/ssh/login.c
@@ -18,7 +18,7 @@ on a tty.
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.3 1999/09/29 21:14:16 deraadt Exp $");
+RCSID("$Id: login.c,v 1.4 1999/09/30 04:10:28 deraadt Exp $");
#ifdef HAVE_LIBUTIL_LOGIN
#include <util.h>
@@ -50,18 +50,8 @@ unsigned long get_last_login_time(uid_t uid, const char *name,
char lastlogfile[500];
int fd;
-#ifdef _PATH_LASTLOG
snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
_PATH_LASTLOG, name);
-#else
-#ifdef LASTLOG_FILE
- snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
- LASTLOG_FILE, name);
-#else
- snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
- SSH_LASTLOG, name);
-#endif
-#endif
buf[0] = '\0';
@@ -101,15 +91,7 @@ unsigned long get_last_login_time(uid_t uid, const char *logname,
char *lastlog;
int fd;
-#ifdef _PATH_LASTLOG
lastlog = _PATH_LASTLOG;
-#else
-#ifdef LASTLOG_FILE
- lastlog = LASTLOG_FILE;
-#else
- lastlog = SSH_LASTLOG;
-#endif
-#endif
buf[0] = '\0';
@@ -222,18 +204,8 @@ void record_login(int pid, const char *ttyname, const char *user, uid_t uid,
#endif
/* Figure out the file names. */
-#ifdef _PATH_UTMP
utmp = _PATH_UTMP;
wtmp = _PATH_WTMP;
-#else
-#ifdef UTMP_FILE
- utmp = UTMP_FILE;
- wtmp = WTMP_FILE;
-#else
- utmp = SSH_UTMP;
- wtmp = SSH_WTMP;
-#endif
-#endif
#ifdef HAVE_LIBUTIL_LOGIN
login(&u);
@@ -318,15 +290,7 @@ void record_login(int pid, const char *ttyname, const char *user, uid_t uid,
#if defined(HAVE_LASTLOG_H) || defined(HAVE_LASTLOG)
-#ifdef _PATH_LASTLOG
lastlog = _PATH_LASTLOG;
-#else
-#ifdef LASTLOG_FILE
- lastlog = LASTLOG_FILE;
-#else
- lastlog = SSH_LASTLOG;
-#endif
-#endif
/* Update lastlog unless actually recording a logout. */
if (strcmp(user, "") != 0)
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 043c3ff94ac..65a9a3e1af2 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -18,7 +18,7 @@ Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada.
*/
#include "includes.h"
-RCSID("$Id: ssh.c,v 1.12 1999/09/29 21:15:54 deraadt Exp $");
+RCSID("$Id: ssh.c,v 1.13 1999/09/30 04:10:28 deraadt Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -131,14 +131,13 @@ usage()
void
rsh_connect(char *host, char *user, Buffer *command)
{
-#ifdef RSH_PATH
char *args[10];
int i;
log("Using rsh. WARNING: Connection will not be encrypted.");
/* Build argument list for rsh. */
i = 0;
- args[i++] = RSH_PATH;
+ args[i++] = _PATH_RSH;
args[i++] = host; /* may have to come after user on some systems */
if (user)
{
@@ -161,12 +160,9 @@ rsh_connect(char *host, char *user, Buffer *command)
}
fprintf(stderr, "\n");
}
- execv(RSH_PATH, args);
- perror(RSH_PATH);
+ execv(_PATH_RSH, args);
+ perror(_PATH_RSH);
exit(1);
-#else /* RSH_PATH */
- fatal("Rsh not available.");
-#endif /* RSH_PATH */
}
/* Main program for the ssh client. */
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 8f5583db89f..600c4879fb0 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -18,7 +18,7 @@ agent connections.
*/
#include "includes.h"
-RCSID("$Id: sshd.c,v 1.8 1999/09/29 22:08:13 dugsong Exp $");
+RCSID("$Id: sshd.c,v 1.9 1999/09/30 04:10:29 deraadt Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -47,20 +47,6 @@ int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
#endif /* LIBWRAP */
-#ifdef _PATH_BSHELL
-#define DEFAULT_SHELL _PATH_BSHELL
-#else
-#define DEFAULT_SHELL "/bin/sh"
-#endif
-
-#ifndef DEFAULT_PATH
-#ifdef _PATH_USERPATH
-#define DEFAULT_PATH _PATH_USERPATH
-#else
-#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bin/X11:/usr/local/bin"
-#endif
-#endif /* DEFAULT_PATH */
-
#ifndef O_NOCTTY
#define O_NOCTTY 0
#endif
@@ -2004,7 +1990,7 @@ void read_etc_default_login(char ***env, unsigned int *envsize,
if (def != NULL)
child_set_env(env, envsize, "PATH", def);
else
- child_set_env(env, envsize, "PATH", DEFAULT_PATH);
+ child_set_env(env, envsize, "PATH", _PATH_STDPATH);
/* Set TZ if TIMEZONE is defined and we haven't inherited a value
for TZ. */
@@ -2123,7 +2109,7 @@ void do_child(const char *command, struct passwd *pw, const char *term,
/* Get the shell from the password data. An empty shell field is legal,
and means /bin/sh. */
- shell = (pw->pw_shell[0] == '\0') ? DEFAULT_SHELL : pw->pw_shell;
+ shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
#ifdef AFS
/* Try to get AFS tokens for the local cell. */
@@ -2147,7 +2133,7 @@ void do_child(const char *command, struct passwd *pw, const char *term,
child_set_env(&env, &envsize, "USER", pw->pw_name);
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
child_set_env(&env, &envsize, "HOME", pw->pw_dir);
- child_set_env(&env, &envsize, "PATH", DEFAULT_PATH);
+ child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
/* Let it inherit timezone if we have one. */
if (getenv("TZ"))