summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile42
-rw-r--r--ssh.h6
-rw-r--r--sshd.c4
3 files changed, 32 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index e09e1eb9f..64f389f62 100644
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,14 @@ exec_prefix=${prefix}
4bindir=${exec_prefix}/bin 4bindir=${exec_prefix}/bin
5sbindir=${exec_prefix}/sbin 5sbindir=${exec_prefix}/sbin
6libdir=${exec_prefix}/lib 6libdir=${exec_prefix}/lib
7mandir=${prefix}/man
7 8
8CC=gcc 9CC=gcc
9OPT_FLAGS=-g 10OPT_FLAGS=-g
10CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"${prefix}/etc\" -DHAVE_CONFIG_H 11CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"${prefix}/etc\" -DHAVE_CONFIG_H
11TARGETS=bin/libopenssh.a bin/openssh bin/opensshd bin/openssh-add bin/openssh-keygen bin/openssh-agent bin/openscp 12TARGETS=bin/libssh.a bin/ssh bin/sshd bin/ssh-add bin/ssh-keygen bin/ssh-agent bin/scp
12LFLAGS=-L./bin 13LFLAGS=-L./bin
13LIBS=-lopenssh -lpam -ldl -lpwdb -lz -lutil -lcrypto 14LIBS=-lssh -lpam -ldl -lpwdb -lz -lutil -lcrypto
14AR=ar 15AR=ar
15RANLIB=ranlib 16RANLIB=ranlib
16 17
@@ -24,32 +25,32 @@ OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
24 25
25all: $(OBJS) $(TARGETS) 26all: $(OBJS) $(TARGETS)
26 27
27bin/libopenssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o mpaux.o nchan.o packet.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o helper.o rc4.o mktemp.o strlcpy.o 28bin/libssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o mpaux.o nchan.o packet.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o helper.o rc4.o mktemp.o strlcpy.o
28 [ -d bin ] || mkdir bin 29 [ -d bin ] || mkdir bin
29 $(AR) rv $@ $^ 30 $(AR) rv $@ $^
30 $(RANLIB) $@ 31 $(RANLIB) $@
31 32
32bin/openssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o 33bin/ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
33 [ -d bin ] || mkdir bin 34 [ -d bin ] || mkdir bin
34 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 35 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
35 36
36bin/opensshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o 37bin/sshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o
37 [ -d bin ] || mkdir bin 38 [ -d bin ] || mkdir bin
38 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 39 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
39 40
40bin/openscp: scp.o 41bin/scp: scp.o
41 [ -d bin ] || mkdir bin 42 [ -d bin ] || mkdir bin
42 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 43 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
43 44
44bin/openssh-add: ssh-add.o log-client.o 45bin/ssh-add: ssh-add.o log-client.o
45 [ -d bin ] || mkdir bin 46 [ -d bin ] || mkdir bin
46 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 47 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
47 48
48bin/openssh-agent: ssh-agent.o log-client.o 49bin/ssh-agent: ssh-agent.o log-client.o
49 [ -d bin ] || mkdir bin 50 [ -d bin ] || mkdir bin
50 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 51 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
51 52
52bin/openssh-keygen: ssh-keygen.o log-client.o 53bin/ssh-keygen: ssh-keygen.o log-client.o
53 [ -d bin ] || mkdir bin 54 [ -d bin ] || mkdir bin
54 $(CC) -o $@ $^ $(LFLAGS) $(LIBS) 55 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
55 56
@@ -59,14 +60,21 @@ clean:
59install: 60install:
60 install -d $(bindir) 61 install -d $(bindir)
61 install -d $(sbindir) 62 install -d $(sbindir)
62 install -d $(libdir) 63 install -d $(mandir)
63 install -c bin/openssh $(bindir)/openssh 64 install -d $(mandir)/man1
64 install -c bin/openscp $(bindir)/openscp 65 install -d $(mandir)/man8
65 install -c bin/openssh-add $(bindir)/openssh-add 66 install -s -c bin/ssh $(bindir)/ssh
66 install -c bin/openssh-agent $(bindir)/openssh-agent 67 install -s -c bin/scp $(bindir)/scp
67 install -c bin/openssh-keygen $(bindir)/openssh-keygen 68 install -s -c bin/ssh-add $(bindir)/ssh-add
68 install -c bin/opensshd $(sbindir)/opensshd 69 install -s -c bin/ssh-agent $(bindir)/ssh-agent
69 install -c bin/libopenssh.a $(libdir)/libopenssh.a 70 install -s -c bin/ssh-keygen $(bindir)/ssh-keygen
71 install -s -c bin/sshd $(sbindir)/sshd
72 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
73 install -m644 -c scp.1 $(mandir)/man1/scp.1
74 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
75 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
76 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
77 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
70 78
71distclean: clean 79distclean: clean
72 rm -f Makefile config.h *~ 80 rm -f Makefile config.h *~
diff --git a/ssh.h b/ssh.h
index 8526aa116..aaf74d875 100644
--- a/ssh.h
+++ b/ssh.h
@@ -13,7 +13,7 @@ Generic header file for ssh.
13 13
14*/ 14*/
15 15
16/* RCSID("$Id: ssh.h,v 1.4 1999/10/28 23:18:29 damien Exp $"); */ 16/* RCSID("$Id: ssh.h,v 1.5 1999/10/29 00:21:15 damien Exp $"); */
17 17
18#ifndef SSH_H 18#ifndef SSH_H
19#define SSH_H 19#define SSH_H
@@ -137,6 +137,10 @@ only by root, whereas ssh_config should be world-readable. */
137 authentication socket. */ 137 authentication socket. */
138#define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK" 138#define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
139 139
140/* Name of the environment variable containing the pathname of the
141 authentication socket. */
142#define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID"
143
140/* Force host key length and server key length to differ by at least this 144/* Force host key length and server key length to differ by at least this
141 many bits. This is to make double encryption with rsaref work. */ 145 many bits. This is to make double encryption with rsaref work. */
142#define SSH_KEY_BITS_RESERVED 128 146#define SSH_KEY_BITS_RESERVED 128
diff --git a/sshd.c b/sshd.c
index aad6e9c2f..39dd3675b 100644
--- a/sshd.c
+++ b/sshd.c
@@ -18,7 +18,7 @@ agent connections.
18*/ 18*/
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: sshd.c,v 1.6 1999/10/28 23:57:31 damien Exp $"); 21RCSID("$Id: sshd.c,v 1.7 1999/10/29 00:21:15 damien Exp $");
22 22
23#include "xmalloc.h" 23#include "xmalloc.h"
24#include "rsa.h" 24#include "rsa.h"
@@ -2333,7 +2333,7 @@ void do_child(const char *command, struct passwd *pw, const char *term,
2333 { 2333 {
2334 char *equal_sign, var_name[256], var_val[256]; 2334 char *equal_sign, var_name[256], var_val[256];
2335 long this_var; 2335 long this_var;
2336 char **pam_env = pam_getenvlist(pamh); 2336 char **pam_env = pam_getenvlist((pam_handle_t *)pamh);
2337 for(this_var = 0; pam_env && pam_env[this_var]; this_var++) 2337 for(this_var = 0; pam_env && pam_env[this_var]; this_var++)
2338 { 2338 {
2339 if(strlen(pam_env[this_var]) < sizeof(var_name)) 2339 if(strlen(pam_env[this_var]) < sizeof(var_name))