make install patch

Picked up lost bit of OpenBSD update to ssh.h

Fix compile warning in new pam_env stuff
This commit is contained in:
Damien Miller 1999-10-29 10:21:15 +10:00
parent 9438816a5c
commit 5eeedae9fe
3 changed files with 32 additions and 20 deletions

View File

@ -4,13 +4,14 @@ exec_prefix=${prefix}
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
libdir=${exec_prefix}/lib
mandir=${prefix}/man
CC=gcc
OPT_FLAGS=-g
CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"${prefix}/etc\" -DHAVE_CONFIG_H
TARGETS=bin/libopenssh.a bin/openssh bin/opensshd bin/openssh-add bin/openssh-keygen bin/openssh-agent bin/openscp
TARGETS=bin/libssh.a bin/ssh bin/sshd bin/ssh-add bin/ssh-keygen bin/ssh-agent bin/scp
LFLAGS=-L./bin
LIBS=-lopenssh -lpam -ldl -lpwdb -lz -lutil -lcrypto
LIBS=-lssh -lpam -ldl -lpwdb -lz -lutil -lcrypto
AR=ar
RANLIB=ranlib
@ -24,32 +25,32 @@ OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
all: $(OBJS) $(TARGETS)
bin/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
bin/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
[ -d bin ] || mkdir bin
$(AR) rv $@ $^
$(RANLIB) $@
bin/openssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
bin/ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
bin/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
bin/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
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
bin/openscp: scp.o
bin/scp: scp.o
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
bin/openssh-add: ssh-add.o log-client.o
bin/ssh-add: ssh-add.o log-client.o
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
bin/openssh-agent: ssh-agent.o log-client.o
bin/ssh-agent: ssh-agent.o log-client.o
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
bin/openssh-keygen: ssh-keygen.o log-client.o
bin/ssh-keygen: ssh-keygen.o log-client.o
[ -d bin ] || mkdir bin
$(CC) -o $@ $^ $(LFLAGS) $(LIBS)
@ -59,14 +60,21 @@ clean:
install:
install -d $(bindir)
install -d $(sbindir)
install -d $(libdir)
install -c bin/openssh $(bindir)/openssh
install -c bin/openscp $(bindir)/openscp
install -c bin/openssh-add $(bindir)/openssh-add
install -c bin/openssh-agent $(bindir)/openssh-agent
install -c bin/openssh-keygen $(bindir)/openssh-keygen
install -c bin/opensshd $(sbindir)/opensshd
install -c bin/libopenssh.a $(libdir)/libopenssh.a
install -d $(mandir)
install -d $(mandir)/man1
install -d $(mandir)/man8
install -s -c bin/ssh $(bindir)/ssh
install -s -c bin/scp $(bindir)/scp
install -s -c bin/ssh-add $(bindir)/ssh-add
install -s -c bin/ssh-agent $(bindir)/ssh-agent
install -s -c bin/ssh-keygen $(bindir)/ssh-keygen
install -s -c bin/sshd $(sbindir)/sshd
install -m644 -c ssh.1 $(mandir)/man1/ssh.1
install -m644 -c scp.1 $(mandir)/man1/scp.1
install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
install -m644 -c sshd.8 $(mandir)/man8/sshd.8
distclean: clean
rm -f Makefile config.h *~

6
ssh.h
View File

@ -13,7 +13,7 @@ Generic header file for ssh.
*/
/* RCSID("$Id: ssh.h,v 1.4 1999/10/28 23:18:29 damien Exp $"); */
/* RCSID("$Id: ssh.h,v 1.5 1999/10/29 00:21:15 damien Exp $"); */
#ifndef SSH_H
#define SSH_H
@ -137,6 +137,10 @@ only by root, whereas ssh_config should be world-readable. */
authentication socket. */
#define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
/* Name of the environment variable containing the pathname of the
authentication socket. */
#define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID"
/* 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. */
#define SSH_KEY_BITS_RESERVED 128

4
sshd.c
View File

@ -18,7 +18,7 @@ agent connections.
*/
#include "includes.h"
RCSID("$Id: sshd.c,v 1.6 1999/10/28 23:57:31 damien Exp $");
RCSID("$Id: sshd.c,v 1.7 1999/10/29 00:21:15 damien Exp $");
#include "xmalloc.h"
#include "rsa.h"
@ -2333,7 +2333,7 @@ void do_child(const char *command, struct passwd *pw, const char *term,
{
char *equal_sign, var_name[256], var_val[256];
long this_var;
char **pam_env = pam_getenvlist(pamh);
char **pam_env = pam_getenvlist((pam_handle_t *)pamh);
for(this_var = 0; pam_env && pam_env[this_var]; this_var++)
{
if(strlen(pam_env[this_var]) < sizeof(var_name))