Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95378f558f | ||
|
|
c8272b46c7 | ||
|
|
eea835b34c | ||
|
|
172d2cb259 | ||
|
|
faca19514c | ||
|
|
1f8d65ae32 | ||
|
|
e629722c72 | ||
|
|
d27b597dc3 | ||
|
|
c349e438f0 | ||
|
|
f4c2106bcf | ||
|
|
1eaa64b66b | ||
|
|
5d90dc6c11 | ||
|
|
3ea0c4d548 | ||
|
|
6c7b75bc87 | ||
|
|
1792f88791 | ||
|
|
64f6dd8373 | ||
|
|
6389950300 | ||
|
|
7474fc7f57 | ||
|
|
e39dbaf064 | ||
|
|
e36bf09cce | ||
|
|
aacf8fa19f | ||
|
|
8dae92a3e9 | ||
|
|
8d46725e43 | ||
|
|
0b814c1e9a | ||
|
|
efff9b959d |
+21
@@ -0,0 +1,21 @@
|
||||
ssh
|
||||
scp
|
||||
sshd
|
||||
ssh-add
|
||||
ssh-keygen
|
||||
ssh-keyscan
|
||||
ssh-agent
|
||||
sftp-server
|
||||
sftp
|
||||
configure
|
||||
config.h.in
|
||||
config.h
|
||||
config.status
|
||||
config.cache
|
||||
config.log
|
||||
stamp-h.in
|
||||
Makefile
|
||||
ssh_prng_cmds
|
||||
*.out
|
||||
*.0
|
||||
buildit.sh
|
||||
@@ -1,5 +1,61 @@
|
||||
20010627
|
||||
- (djm) Pull in fixes from -CURRENT:
|
||||
- (djm) Reintroduce pam_session call for non-pty sessions.
|
||||
- (djm) Remove redundant and incorrect test for max auth attempts in
|
||||
PAM kbdint code. Based on fix from Matthew Melvin
|
||||
<[email protected]>
|
||||
- (markus) Unbreak -R forwarding for protocol 2
|
||||
|
||||
20010617
|
||||
- (djm) Pull in small fix from -CURRENT for session.c:
|
||||
typo, use pid not s->pid, [email protected]
|
||||
|
||||
20010615
|
||||
- (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
|
||||
around grantpt().
|
||||
|
||||
20010614
|
||||
- (bal) Applied X11 Cookie Patch. X11 Cookie behavior has changed to
|
||||
no longer use /tmp/ssh-XXXXX/
|
||||
|
||||
20010528
|
||||
- (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
|
||||
Patch by Corinna Vinschen <[email protected]>
|
||||
|
||||
20010512
|
||||
- (bal) Patch to partial sync up contrib/solaris/ packaging software.
|
||||
Patch by pete <[email protected]>
|
||||
|
||||
20010509
|
||||
- (bal) UseLogin patch for Solaris/UNICOS. Patch by Wayne Davison
|
||||
<[email protected]>
|
||||
- (bal) ./configure support to disable SIA on OSF1. Patch by
|
||||
Chris Adams <[email protected]>
|
||||
- (bal) Updates from the Sony NEWS-OS platform by NAKAJI Hiroyuki
|
||||
<[email protected]>
|
||||
|
||||
20010508
|
||||
- (bal) Fixed configure test for USE_SIA.
|
||||
|
||||
20010506
|
||||
- (djm) Update config.guess and config.sub with latest versions (from
|
||||
ftp://ftp.gnu.org/gnu/config/) to allow configure on ia64-hpux.
|
||||
Suggested by Jason Mader <[email protected]>
|
||||
|
||||
20010504
|
||||
- (bal) Updated Cygwin README by Corinna Vinschen <[email protected]>
|
||||
- (bal) Avoid socket file security issues in ssh-agent for Cygwin.
|
||||
Patch by Egor Duda <[email protected]>
|
||||
|
||||
20010430
|
||||
- (djm) Add .cvsignore files, suggested by Wayne Davison <[email protected]>
|
||||
- (tim) [contrib/caldera/openssh.spec] add Requires line for Caldera 3.1
|
||||
|
||||
20010429
|
||||
- (bal) Updated INSTALL. PCRE moved to a new place.
|
||||
- (djm) Add Theo Schlossnagle's <[email protected]> SecurID patch to contrib/
|
||||
- (djm) Release 2.9p1
|
||||
- (tim) New version of mdoc2man.pl from Mark D. Roth <[email protected]>
|
||||
|
||||
20010427
|
||||
- (bal) Fixed uidswap.c so it should work on non-posix complient systems.
|
||||
@@ -82,7 +138,7 @@
|
||||
fix perl test, fix nroff test, fix Makefile to build outside source tree
|
||||
|
||||
20010420
|
||||
- OpenBSD CVS Sync
|
||||
- OpenBSD CVS Sync
|
||||
- [email protected] 2001/04/18 16:21:05
|
||||
[ssh-keyscan.1]
|
||||
Fix typo reported in PR/1779
|
||||
@@ -5270,4 +5326,4 @@
|
||||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1179 2001/04/28 16:32:10 mouring Exp $
|
||||
$Id: ChangeLog,v 1.1179.2.20 2001/06/27 06:51:00 djm Exp $
|
||||
|
||||
@@ -140,6 +140,9 @@ it if lastlog is installed in a different place.
|
||||
|
||||
--without-lastlog will disable lastlog support entirely.
|
||||
|
||||
--with-sia, --without-sia will enable or disable OSF1's Security
|
||||
Integration Architecture. The default for OSF1 machines is enable.
|
||||
|
||||
--with-kerberos4=PATH will enable Kerberos IV support. You will need
|
||||
to have the Kerberos libraries and header files installed for this
|
||||
to work. Use the optional PATH argument to specify the root of your
|
||||
@@ -227,4 +230,4 @@ Please refer to the "reporting bugs" section of the webpage at
|
||||
http://www.openssh.com/
|
||||
|
||||
|
||||
$Id: INSTALL,v 1.44 2001/04/28 16:32:11 mouring Exp $
|
||||
$Id: INSTALL,v 1.44.2.1 2001/05/08 20:43:01 mouring Exp $
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
/* $Id: acconfig.h,v 1.110 2001/04/05 17:15:08 stevesk Exp $ */
|
||||
/* $Id: acconfig.h,v 1.110.2.1 2001/05/08 20:34:32 mouring Exp $ */
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
@@ -154,6 +154,12 @@
|
||||
/* Define if you don't want to use wtmpx */
|
||||
#undef DISABLE_WTMPX
|
||||
|
||||
/* Some systems need a utmpx entry for /bin/login to work */
|
||||
#undef LOGIN_NEEDS_UTMPX
|
||||
|
||||
/* Some versions of /bin/login need the TERM supplied on the commandline */
|
||||
#undef LOGIN_NEEDS_TERM
|
||||
|
||||
/* Define if you want to specify the path to your lastlog file */
|
||||
#undef CONF_LASTLOG_FILE
|
||||
|
||||
|
||||
+1
-4
@@ -1,5 +1,5 @@
|
||||
#include "includes.h"
|
||||
RCSID("$Id: auth2-pam.c,v 1.10 2001/02/16 02:03:04 djm Exp $");
|
||||
RCSID("$Id: auth2-pam.c,v 1.10.8.1 2001/06/27 06:46:03 djm Exp $");
|
||||
|
||||
#ifdef USE_PAM
|
||||
#include <security/pam_appl.h>
|
||||
@@ -137,9 +137,6 @@ input_userauth_info_response_pam(int type, int plen, void *ctxt)
|
||||
if (authctxt == NULL)
|
||||
fatal("input_userauth_info_response_pam: no authentication context");
|
||||
|
||||
if (authctxt->attempt++ >= AUTH_FAIL_MAX)
|
||||
packet_disconnect("too many failed userauth_requests");
|
||||
|
||||
nresp = packet_get_int(); /* Number of responses. */
|
||||
debug("got %d responses", nresp);
|
||||
|
||||
|
||||
+17
-11
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: channels.c,v 1.109 2001/04/17 12:55:03 markus Exp $");
|
||||
RCSID("$OpenBSD: channels.c,v 1.109.2.2 2001/06/21 23:45:23 jason Exp $");
|
||||
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/dsa.h>
|
||||
@@ -773,8 +773,9 @@ channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset)
|
||||
|
||||
rtype = (c->type == SSH_CHANNEL_RPORT_LISTENER) ?
|
||||
"forwarded-tcpip" : "direct-tcpip";
|
||||
nextstate = (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC :
|
||||
SSH_CHANNEL_OPENING;
|
||||
nextstate = (c->host_port == 0 &&
|
||||
c->type != SSH_CHANNEL_RPORT_LISTENER) ?
|
||||
SSH_CHANNEL_DYNAMIC : SSH_CHANNEL_OPENING;
|
||||
|
||||
addrlen = sizeof(addr);
|
||||
newsock = accept(c->sock, &addr, &addrlen);
|
||||
@@ -2581,10 +2582,17 @@ auth_get_socket_name()
|
||||
/* removes the agent forwarding socket */
|
||||
|
||||
void
|
||||
cleanup_socket(void)
|
||||
auth_sock_cleanup_proc(void *_pw)
|
||||
{
|
||||
unlink(channel_forwarded_auth_socket_name);
|
||||
rmdir(channel_forwarded_auth_socket_dir);
|
||||
struct passwd *pw = _pw;
|
||||
|
||||
if (channel_forwarded_auth_socket_name) {
|
||||
temporarily_use_uid(pw);
|
||||
unlink(channel_forwarded_auth_socket_name);
|
||||
rmdir(channel_forwarded_auth_socket_dir);
|
||||
channel_forwarded_auth_socket_name = NULL;
|
||||
restore_uid();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2623,11 +2631,9 @@ auth_input_request_forwarding(struct passwd * pw)
|
||||
snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d",
|
||||
channel_forwarded_auth_socket_dir, (int) getpid());
|
||||
|
||||
if (atexit(cleanup_socket) < 0) {
|
||||
int saved = errno;
|
||||
cleanup_socket();
|
||||
packet_disconnect("socket: %.100s", strerror(saved));
|
||||
}
|
||||
/* delete agent socket on fatal() */
|
||||
fatal_add_cleanup(auth_sock_cleanup_proc, pw);
|
||||
|
||||
/* Create the socket. */
|
||||
sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (sock < 0)
|
||||
|
||||
@@ -293,6 +293,8 @@ void auth_request_forwarding(void);
|
||||
*/
|
||||
char *auth_get_socket_name(void);
|
||||
|
||||
void auth_sock_cleanup_proc(void *_pw);
|
||||
|
||||
/*
|
||||
* This is called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server.
|
||||
* This starts forwarding authentication requests.
|
||||
|
||||
Vendored
+348
-247
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-05-30'
|
||||
timestamp='2001-04-20'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -32,30 +32,41 @@ version='2000-05-30'
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
# don't specify an explicit build system type.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of this system.
|
||||
Output the configuration name of the system \`$me' is run on.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
-h, --help print this help, then exit
|
||||
-t, --time-stamp print date of last modification, then exit
|
||||
-v, --version print version number, then exit
|
||||
|
||||
Report bugs and patches to <[email protected]>."
|
||||
|
||||
version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
@@ -64,9 +75,7 @@ while test $# -gt 0 ; do
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
echo "$me: invalid option $1$help" >&2
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
@@ -78,19 +87,30 @@ if test $# != 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
CC_FOR_BUILD="$HOST_CC"
|
||||
else
|
||||
if test x"$CC" != x; then
|
||||
CC_FOR_BUILD="$CC"
|
||||
else
|
||||
CC_FOR_BUILD=cc
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
|
||||
if test $? = 0 ; then
|
||||
CC_FOR_BUILD="$c"; break
|
||||
fi
|
||||
done
|
||||
rm -f $dummy.c $dummy.o $dummy.rel
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# ([email protected] 8/24/94.)
|
||||
@@ -100,12 +120,9 @@ fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
@@ -119,7 +136,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-cbm ;;
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
@@ -129,16 +146,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format.
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
@@ -215,7 +240,7 @@ EOF
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
echo m68k-unknown-sysv4
|
||||
exit 0;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
@@ -247,7 +272,7 @@ EOF
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
||||
@@ -383,10 +408,13 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
&& rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
echo powerpc-motorola-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
@@ -434,9 +462,17 @@ EOF
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i?86:AIX:*:*)
|
||||
i*86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
ia64:AIX:*:*)
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
@@ -450,7 +486,7 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
@@ -459,9 +495,9 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
@@ -469,7 +505,7 @@ EOF
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
@@ -495,10 +531,28 @@ EOF
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[34678]??:HP-UX:*:*)
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
@@ -533,11 +587,16 @@ EOF
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ia64-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
@@ -564,7 +623,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
@@ -583,7 +642,7 @@ EOF
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
i?86:OSF1:*:*)
|
||||
i*86:OSF1:*:*)
|
||||
if [ -x /usr/sbin/sysversion ] ; then
|
||||
echo ${UNAME_MACHINE}-unknown-osf1mk
|
||||
else
|
||||
@@ -628,27 +687,28 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
@@ -669,6 +729,9 @@ EOF
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@@ -687,58 +750,41 @@ EOF
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_help_string=`cd /; ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
*ia64)
|
||||
echo "${UNAME_MACHINE}-unknown-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf_i?86)
|
||||
echo "${UNAME_MACHINE}-pc-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
;;
|
||||
sparclinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
armlinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32arm*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
|
||||
exit 0
|
||||
;;
|
||||
armelf_linux*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
m68klinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32ppc | elf32ppclinux)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit 0 ;;
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#if defined(__GLIBC__)
|
||||
extern char __libc_version[];
|
||||
@@ -751,127 +797,127 @@ main(argc, argv)
|
||||
#if defined(__GLIBC__)
|
||||
printf("%s %s\n", __libc_version, __libc_release);
|
||||
#else
|
||||
printf("unkown\n");
|
||||
printf("unknown\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy | grep 1\.99 > /dev/null
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0 ;;
|
||||
alpha:Linux:*:*)
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0) UNAME_MACHINE="alpha" ;;
|
||||
1-0) UNAME_MACHINE="alphaev5" ;;
|
||||
1-1) UNAME_MACHINE="alphaev56" ;;
|
||||
1-101) UNAME_MACHINE="alphapca56" ;;
|
||||
2-303) UNAME_MACHINE="alphaev6" ;;
|
||||
2-307) UNAME_MACHINE="alphaev67" ;;
|
||||
esac
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy | grep 1\.99 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
LIBC="libc1"
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
exit 0 ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_emulations=`cd /; ld --help 2>&1 \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i*86linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
shelf_linux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
elf_i*86)
|
||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||
;;
|
||||
i*86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
elif test "${UNAME_MACHINE}" = "s390"; then
|
||||
echo s390-ibm-linux && exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
case "${UNAME_MACHINE}" in
|
||||
i*86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@@ -895,15 +941,16 @@ EOF
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
@@ -911,7 +958,7 @@ EOF
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
||||
@@ -919,7 +966,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7*)
|
||||
i*86:*:5:7*)
|
||||
# Fixed at (any) Pentium or better
|
||||
UNAME_MACHINE=i586
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
|
||||
@@ -928,7 +975,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
i*86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
@@ -946,7 +993,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*DOS:*:*)
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
@@ -974,7 +1021,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -985,21 +1032,24 @@ EOF
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:*)
|
||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
rs6000:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
|
||||
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -1033,7 +1083,7 @@ EOF
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
news*:NEWS-OS:6*:*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
@@ -1076,15 +1126,52 @@ EOF
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-W:NONSTOP_KERNEL:*:*)
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
echo mips-compaq-nonstopux
|
||||
exit 0 ;;
|
||||
BS2000:POSIX*:*:*)
|
||||
echo bs2000-siemens-sysv
|
||||
exit 0 ;;
|
||||
DS/*:UNIX_System_V:*:*)
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Plan9:*:*)
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
if test "$cputype" = "386"; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
UNAME_MACHINE="$cputype"
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
*:TENEX:*:*)
|
||||
echo pdp10-unknown-tenex
|
||||
exit 0 ;;
|
||||
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
|
||||
echo pdp10-dec-tops20
|
||||
exit 0 ;;
|
||||
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
|
||||
echo pdp10-xkl-tops20
|
||||
exit 0 ;;
|
||||
*:TOPS-20:*:*)
|
||||
echo pdp10-unknown-tops20
|
||||
exit 0 ;;
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1176,11 +1263,24 @@ main ()
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
# if !defined (ultrix)
|
||||
# include <sys/param.h>
|
||||
# if defined (BSD)
|
||||
# if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
# else
|
||||
# if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
@@ -1191,7 +1291,7 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
@@ -1227,8 +1327,9 @@ fi
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
The $version version of this script cannot recognize your system type.
|
||||
Please download the most up to date version of the config scripts:
|
||||
This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/config/
|
||||
|
||||
@@ -1237,7 +1338,7 @@ send the following data and any information you think might be
|
||||
pertinent to <[email protected]> in order to provide the needed
|
||||
information to handle your system.
|
||||
|
||||
config.guess version = $version
|
||||
config.guess timestamp = $timestamp
|
||||
|
||||
uname -m = `(uname -m) 2>/dev/null || echo unknown`
|
||||
uname -r = `(uname -r) 2>/dev/null || echo unknown`
|
||||
@@ -1264,7 +1365,7 @@ exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
||||
Vendored
+111
-61
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-06-10'
|
||||
timestamp='2001-04-20'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -29,7 +29,6 @@ version='2000-06-10'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <[email protected]>.
|
||||
# Please send patches to <[email protected]>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
@@ -61,16 +60,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
Canonicalize a configuration name.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
-h, --help print this help, then exit
|
||||
-t, --time-stamp print date of last modification, then exit
|
||||
-v, --version print version number, then exit
|
||||
|
||||
Report bugs and patches to <[email protected]>."
|
||||
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
@@ -79,9 +92,7 @@ while test $# -gt 0 ; do
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
echo "$me: invalid option $1$help"
|
||||
exit 1 ;;
|
||||
|
||||
*local*)
|
||||
@@ -106,7 +117,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu*)
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -204,30 +215,40 @@ esac
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
|
||||
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
|
||||
| pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| we32k | ns16k | clipper | i370 | sh | sh[34] \
|
||||
| powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp10 | pdp11 \
|
||||
| mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | fr30 | avr)
|
||||
| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
|
||||
| v850 | c4x \
|
||||
| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
|
||||
| pj | pjl | h8500)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
i*86 | x86_64)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
@@ -237,27 +258,30 @@ case $basic_machine in
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
|
||||
| sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
|
||||
| mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
|
||||
| [cjt]90-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-*)
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -294,14 +318,14 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
@@ -348,8 +372,8 @@ case $basic_machine in
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -405,6 +429,10 @@ case $basic_machine in
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
go32)
|
||||
basic_machine=i386-pc
|
||||
os=-go32
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
@@ -480,19 +508,19 @@ case $basic_machine in
|
||||
basic_machine=i370-ibm
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
i*86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
i*86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
i*86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
@@ -504,14 +532,6 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-vsta
|
||||
;;
|
||||
i386-go32 | go32)
|
||||
basic_machine=i386-unknown
|
||||
os=-go32
|
||||
;;
|
||||
i386-mingw32 | mingw32)
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -537,6 +557,10 @@ case $basic_machine in
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -567,7 +591,7 @@ case $basic_machine in
|
||||
os=-coff
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-unknown
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
mvs)
|
||||
@@ -631,6 +655,10 @@ case $basic_machine in
|
||||
basic_machine=i960-intel
|
||||
os=-mon960
|
||||
;;
|
||||
nonstopux)
|
||||
basic_machine=mips-compaq
|
||||
os=-nonstopux
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
@@ -666,28 +694,28 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-ibm
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
@@ -702,6 +730,10 @@ case $basic_machine in
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
pw32)
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -793,6 +825,10 @@ case $basic_machine in
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -888,13 +924,20 @@ case $basic_machine in
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp10)
|
||||
# there are many clones, so DEC is not a safe bet
|
||||
basic_machine=pdp10-unknown
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
sh3 | sh4)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -916,6 +959,9 @@ case $basic_machine in
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*-unknown)
|
||||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
@@ -975,12 +1021,13 @@ case $os in
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit*)
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
case $basic_machine in
|
||||
x86-* | i[34567]86-*)
|
||||
x86-* | i*86-*)
|
||||
;;
|
||||
*)
|
||||
os=-nto$os
|
||||
@@ -1036,7 +1083,7 @@ case $os in
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk)
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
@@ -1073,7 +1120,7 @@ case $os in
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-none)
|
||||
@@ -1107,6 +1154,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
@@ -1215,7 +1265,7 @@ case $basic_machine in
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
f301-fujitsu)
|
||||
f30[01]-fujitsu | f700-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
@@ -1293,7 +1343,7 @@ case $basic_machine in
|
||||
-mpw* | -macos*)
|
||||
vendor=apple
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
vendor=atari
|
||||
;;
|
||||
esac
|
||||
@@ -1306,7 +1356,7 @@ exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
||||
+16
-4
@@ -1,4 +1,4 @@
|
||||
# $Id: configure.in,v 1.282 2001/04/26 04:40:28 tim Exp $
|
||||
# $Id: configure.in,v 1.282.2.4 2001/05/28 17:21:44 tim Exp $
|
||||
|
||||
AC_INIT(ssh.c)
|
||||
|
||||
@@ -153,6 +153,8 @@ mips-sony-bsd|mips-sony-newsos4)
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
|
||||
need_dash_r=1
|
||||
AC_DEFINE(PAM_SUN_CODEBASE)
|
||||
AC_DEFINE(LOGIN_NEEDS_UTMPX)
|
||||
AC_DEFINE(LOGIN_NEEDS_TERM)
|
||||
# hardwire lastlog location (can't detect it on some versions)
|
||||
conf_lastlog_location="/var/adm/lastlog"
|
||||
AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
|
||||
@@ -237,8 +239,18 @@ mips-sony-bsd|mips-sony-newsos4)
|
||||
MANTYPE=man
|
||||
;;
|
||||
*-dec-osf*)
|
||||
if test ! -z "USE_SIA" ; then
|
||||
AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
|
||||
AC_MSG_CHECKING(for Digital Unix SIA)
|
||||
no_osfsia=""
|
||||
AC_ARG_WITH(osfsia,
|
||||
[ --with-osfsia Enable Digital Unix SIA],
|
||||
[
|
||||
if test "x$withval" = "xno" ; then
|
||||
AC_MSG_RESULT(disabled)
|
||||
no_osfsia=1
|
||||
fi
|
||||
],
|
||||
)
|
||||
if test -z "$no_osfsia" ; then
|
||||
if test -f /etc/sia/matrix.conf; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_OSF_SIA)
|
||||
@@ -447,7 +459,7 @@ AC_ARG_WITH(tcp-wrappers,
|
||||
)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
|
||||
AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
|
||||
dnl Checks for time functions
|
||||
AC_CHECK_FUNCS(gettimeofday time)
|
||||
dnl Checks for libutil functions
|
||||
|
||||
+16
-6
@@ -11,9 +11,16 @@ or http proxy which supports the CONNECT method (eg. Squid).
|
||||
In this directory
|
||||
-----------------
|
||||
|
||||
SecurID.diff
|
||||
|
||||
This patch from Theo Schlossnagle <[email protected]> adds SecurID support
|
||||
to portable OpenSSH. Please refer to the text at the start of the patch
|
||||
and to the author's homepage at http://www.omniti.com/~jesus/projects/ for
|
||||
more details.
|
||||
|
||||
chroot.diff:
|
||||
|
||||
Ricardo Cerqueira's <rmcc@clix.pt> patch to enable chrooting using the
|
||||
Ricardo Cerqueira <rmcc@novis.pt> patch to enable chrooting using the
|
||||
wu-ftpd style magic home directories (containing '/./'). More details in
|
||||
the head of the patch itself.
|
||||
|
||||
@@ -24,8 +31,8 @@ your public key to a remote machine's ~/.ssh/authorized_keys file.
|
||||
|
||||
gnome-ssh-askpass:
|
||||
|
||||
A GNOME passphrase requester of my own creation. Compilation instructions
|
||||
are in the top of the file.
|
||||
A GNOME passphrase requester from Damien Miller <[email protected]> with help
|
||||
from several others. Compilation instructions are in the top of the file.
|
||||
|
||||
sshd.pam.generic:
|
||||
|
||||
@@ -42,9 +49,11 @@ Converts mdoc formated manpages into normal manpages. This can be used
|
||||
on Solaris machines to provide manpages that are not preformated.
|
||||
Contributed by Mark D. Roth <[email protected]>
|
||||
|
||||
redhat:
|
||||
redhat/
|
||||
|
||||
RPM spec file an scripts for building Redhat packages
|
||||
Files useful for operation on Redhat Linux systems. NB. it is recommended
|
||||
that you use the prepackaged RPM versions on Redhat, as they have been
|
||||
better tested.
|
||||
|
||||
suse:
|
||||
|
||||
@@ -59,4 +68,5 @@ X11 SSH Askpass:
|
||||
Jim Knoble <[email protected]> has written an excellent X11
|
||||
passphrase requester. This is highly recommended:
|
||||
|
||||
http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/index.html
|
||||
http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
%define askpass 1.2.0
|
||||
|
||||
Name : openssh
|
||||
Version : 2.9p1
|
||||
Version : 2.9p3
|
||||
Release : 1
|
||||
Group : System/Network
|
||||
|
||||
@@ -18,6 +18,9 @@ Packager : Stephan Seyboth <[email protected]>
|
||||
URL : http://www.openssh.com/
|
||||
|
||||
Obsoletes : ssh, ssh-clients, openssh-clients
|
||||
|
||||
# uncomment for >= Caldera 3.1
|
||||
#Requires : SysVinit-scripts >= 1.07
|
||||
|
||||
BuildRoot : /tmp/%{Name}-%{Version}
|
||||
|
||||
@@ -278,4 +281,4 @@ fi
|
||||
* Mon Jan 01 1998 ...
|
||||
Template Version: 1.31
|
||||
|
||||
$Id: openssh.spec,v 1.15 2001/04/27 05:50:49 tim Exp $
|
||||
$Id: openssh.spec,v 1.15.2.3 2001/06/27 06:52:04 djm Exp $
|
||||
|
||||
+40
-38
@@ -1,61 +1,63 @@
|
||||
From: Ricardo Cerqueira <rmcc@clix.pt>
|
||||
From: Ricardo Cerqueira <rmcc@novis.pt>
|
||||
|
||||
A patch to cause sshd to chroot when it encounters the magic token
|
||||
'/./' in a users home directory. The directory portion before the
|
||||
token is the directory to chroot() to, the portion after the
|
||||
token is the user's home directory relative to the new root.
|
||||
|
||||
Index: session.c
|
||||
===================================================================
|
||||
RCS file: /var/cvs/openssh/session.c,v
|
||||
retrieving revision 1.4
|
||||
diff -u -r1.4 session.c
|
||||
--- session.c 2000/04/16 02:31:51 1.4
|
||||
+++ session.c 2000/04/16 02:47:55
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "ssh2.h"
|
||||
#include "auth.h"
|
||||
To apply, execute the following command from the OpenSSH source directory:
|
||||
|
||||
patch -p0 < contrib/chroot.diff
|
||||
|
||||
|
||||
--- session.c Thu Mar 22 01:58:27 2001
|
||||
+++ session.c.chroot Thu Apr 5 12:33:23 2001
|
||||
@@ -93,6 +93,8 @@
|
||||
# include <uinfo.h>
|
||||
#endif
|
||||
|
||||
+#define CHROOT
|
||||
+
|
||||
/* types */
|
||||
|
||||
#define TTYSZ 64
|
||||
@@ -783,6 +785,10 @@
|
||||
@@ -1012,6 +1014,11 @@
|
||||
extern char **environ;
|
||||
struct stat st;
|
||||
char *argv[10];
|
||||
+#ifdef CHROOT
|
||||
+ char *user_dir;
|
||||
+ char *new_root;
|
||||
+ char *user_dir;
|
||||
+ char *new_root;
|
||||
+#endif /* CHROOT */
|
||||
|
||||
#ifndef USE_PAM /* pam_nologin handles this */
|
||||
f = fopen("/etc/nologin", "r");
|
||||
@@ -799,6 +805,26 @@
|
||||
/* Set login name in the kernel. */
|
||||
if (setlogin(pw->pw_name) < 0)
|
||||
error("setlogin failed: %s", strerror(errno));
|
||||
+
|
||||
int do_xauth = s->auth_proto != NULL && s->auth_data != NULL;
|
||||
#ifdef WITH_IRIX_PROJECT
|
||||
prid_t projid;
|
||||
@@ -1095,6 +1102,27 @@
|
||||
exit(1);
|
||||
}
|
||||
endgrent();
|
||||
+
|
||||
+#ifdef CHROOT
|
||||
+ user_dir = xstrdup(pw->pw_dir);
|
||||
+ new_root = user_dir + 1;
|
||||
+ user_dir = xstrdup(pw->pw_dir);
|
||||
+ new_root = user_dir + 1;
|
||||
+
|
||||
+ while((new_root = strchr(new_root, '.')) != NULL) {
|
||||
+ new_root--;
|
||||
+ if(strncmp(new_root, "/./", 3) == 0) {
|
||||
+ *new_root = '\0';
|
||||
+ new_root += 2;
|
||||
+ while((new_root = strchr(new_root, '.')) != NULL) {
|
||||
+ new_root--;
|
||||
+ if(strncmp(new_root, "/./", 3) == 0) {
|
||||
+ *new_root = '\0';
|
||||
+ new_root += 2;
|
||||
+
|
||||
+ if(chroot(user_dir) != 0)
|
||||
+ fatal("Couldn't chroot to user directory %s", user_dir);
|
||||
+ if(chroot(user_dir) != 0)
|
||||
+ fatal("Couldn't chroot to user directory %s", user_dir);
|
||||
+
|
||||
+ pw->pw_dir = new_root;
|
||||
+ break;
|
||||
+ }
|
||||
+ new_root += 2;
|
||||
+ }
|
||||
+ pw->pw_dir = new_root;
|
||||
+ break;
|
||||
+ }
|
||||
+ new_root += 2;
|
||||
+ }
|
||||
+#endif /* CHROOT */
|
||||
|
||||
/* Set uid, gid, and groups. */
|
||||
/* Login(1) does this as well, and it needs uid 0 for the "-h"
|
||||
+
|
||||
# ifdef WITH_IRIX_JOBS
|
||||
jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
|
||||
if (jid == -1) {
|
||||
|
||||
@@ -57,6 +57,13 @@ Install sshd as daemon via SRVANY.EXE (recommended on NT/W2K), via inetd
|
||||
(results in very slow deamon startup!) or from the command line (recommended
|
||||
on 9X/ME).
|
||||
|
||||
If you start sshd as deamon via SRVANY.EXE you will see two
|
||||
sshd processes in the process list unless you give the "-D"
|
||||
option to sshd. That will avoid that sshd detaches from the
|
||||
controlling terminal and it will remain under process control
|
||||
of SRVANY.EXE. That allows easy killing of the service by
|
||||
using the `net stop <servicename>' command.
|
||||
|
||||
If starting via inetd, copy sshd to eg. /usr/sbin/in.sshd and add the
|
||||
following line to your inetd.conf file:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Version of OpenSSH
|
||||
%define oversion 2.9p1
|
||||
%define oversion 2.9p3
|
||||
|
||||
# Version of ssh-askpass
|
||||
%define aversion 1.2.0
|
||||
|
||||
@@ -145,21 +145,28 @@ mkdir -p ${BUILDDIR}/man/man1
|
||||
mkdir -p ${BUILDDIR}/man/man8
|
||||
mkdir -p ${BUILDDIR}/etc
|
||||
mkdir -p ${BUILDDIR}/bin
|
||||
mkdir -p ${BUILDDIR}/libexec
|
||||
mkdir -p ${BUILDDIR}/sbin
|
||||
|
||||
echo "Populating build directories..."
|
||||
cp -p ../../../sshd sbin
|
||||
cp -p ../../../ssh-keygen bin
|
||||
cp -p ../../../ssh-keyscan bin
|
||||
cp -p ../../../ssh bin
|
||||
cp -p ../../../ssh-add bin
|
||||
cp -p ../../../ssh-agent bin
|
||||
cp -p ../../../scp bin
|
||||
cp -p ../../../scp.1 man/man1/scp.1
|
||||
cp -p ../../../ssh-add.1 man/man1/ssh-add.1
|
||||
cp -p ../../../ssh-agent.1 man/man1/ssh-agent.1
|
||||
cp -p ../../../ssh-keygen.1 man/man1/ssh-keygen.1
|
||||
cp -p ../../../ssh.1 man/man1/ssh.1
|
||||
cp -p ../../../sshd.8 man/man8/sshd.8
|
||||
cp -p ../../../scp.1.out man/man1/scp.1
|
||||
cp -p ../../../sftp bin
|
||||
cp -p ../../../sftp.1.out man/man1/sftp.1
|
||||
cp -p ../../../sftp-server libexec/sftp-server
|
||||
cp -p ../../../sftp-server.8.out man/man8/sftp-server.8
|
||||
cp -p ../../../ssh-add.1.out man/man1/ssh-add.1
|
||||
cp -p ../../../ssh-agent.1.out man/man1/ssh-agent.1
|
||||
cp -p ../../../ssh-keygen.1.out man/man1/ssh-keygen.1
|
||||
cp -p ../../../ssh-keyscan.1.out man/man1/ssh-keyscan.1
|
||||
cp -p ../../../ssh.1.out man/man1/ssh.1
|
||||
cp -p ../../../sshd.8.out man/man8/sshd.8
|
||||
cp -p ../../../sshd_config.out etc/sshd_config.default
|
||||
cp -p ../../../ssh_config.out etc/ssh_config.default
|
||||
cp -p ../../../ssh_prng_cmds etc/ssh_prng_cmds.default
|
||||
@@ -182,8 +189,11 @@ ${STRIP} bin/ssh
|
||||
${STRIP} bin/ssh-add
|
||||
${STRIP} bin/ssh-agent
|
||||
${STRIP} bin/ssh-keygen
|
||||
${STRIP} bin/ssh-keyscan
|
||||
${STRIP} sbin/sshd
|
||||
${STRIP} bin/scp
|
||||
${STRIP} bin/sftp
|
||||
${STRIP} libexec/sftp-server
|
||||
|
||||
echo ""
|
||||
echo "Building Package"
|
||||
|
||||
@@ -89,6 +89,26 @@ if [ ! "${UPDATE}" = "1" ]; then
|
||||
else
|
||||
echo "Using existing DSA public/private host key pair for SSH-2."
|
||||
fi
|
||||
if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
|
||||
echo "Creating new RSA public/private host key pair for SSH-2."
|
||||
$INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
|
||||
$INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
|
||||
### If there is *anything* there then leave it, otherwise look
|
||||
### in some reasonable alternate locations before giving up.
|
||||
### It's worth spending some extra time looking for the old one
|
||||
### to avoid a bunch of "host identification has changed" warnings.
|
||||
### Note that some old keys from the commercial SSH2 might not
|
||||
### be compatible, but we don't test for that.
|
||||
if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
|
||||
mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
|
||||
elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
|
||||
mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
|
||||
else
|
||||
${DESTBIN}/ssh-keygen -t rsa -f ${CONFDIR}/ssh_host_rsa_key -N ''
|
||||
fi
|
||||
else
|
||||
echo "Using existing RSA public/private host key pair for SSH-2."
|
||||
fi
|
||||
else
|
||||
echo "Performing an \"update\" installation of OpenSSH."
|
||||
### Okay, this part *is* an update install...so we need to ensure
|
||||
@@ -178,6 +198,26 @@ else
|
||||
else
|
||||
echo "Using existing DSA public/private host key pair for SSH-2."
|
||||
fi
|
||||
if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
|
||||
echo "Creating new RSA public/private host key pair for SSH-2."
|
||||
$INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
|
||||
$INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
|
||||
### If there is *anything* there then leave it, otherwise look
|
||||
### in some reasonable alternate locations before giving up.
|
||||
### It's worth spending some extra time looking for the old one
|
||||
### to avoid a bunch of "host identification has changed" warnings.
|
||||
### Note that some old keys from the commercial SSH2 might not
|
||||
### be compatible, but we don't test for that.
|
||||
if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
|
||||
mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
|
||||
elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
|
||||
mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
|
||||
else
|
||||
${DESTBIN}/ssh-keygen -d -f ${CONFDIR}/ssh_host_rsa_key -N ''
|
||||
fi
|
||||
else
|
||||
echo "Using existing RSA public/private host key pair for SSH-2."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d %%PIDDIR%% ]; then
|
||||
|
||||
@@ -5,11 +5,15 @@ i preremove
|
||||
d none man 0755 root sys
|
||||
d none man/man1 0755 root sys
|
||||
f none man/man1/scp.1 0644 root sys
|
||||
f none man/man1/sftp.1 0644 root sys
|
||||
f none man/man1/ssh-add.1 0644 root sys
|
||||
f none man/man1/ssh-agent.1 0644 root sys
|
||||
f none man/man1/ssh-keygen.1 0644 root sys
|
||||
f none man/man1/ssh-keyscan.1 0644 root sys
|
||||
f none man/man1/ssh.1 0644 root sys
|
||||
s none man/man1/slogin.1=ssh.1
|
||||
d none man/man8 0755 root sys
|
||||
f none man/man8/sftp-server.8 0644 root sys
|
||||
f none man/man8/sshd.8 0644 root sys
|
||||
d none etc 0755 root sys
|
||||
f none etc/sshd_config.default 0644 root sys
|
||||
@@ -20,8 +24,13 @@ f none etc/sshd-initscript 0755 root sys
|
||||
d none bin 0755 root sys
|
||||
f none bin/ssh-keygen 0755 root sys
|
||||
f none bin/ssh 0755 root sys
|
||||
s none bin/slogin=ssh 0755 root sys
|
||||
f none bin/ssh-add 0755 root sys
|
||||
f none bin/ssh-agent 0755 root sys
|
||||
f none bin/ssh-keyscan 0755 root sys
|
||||
f none bin/scp 0755 root sys
|
||||
f none bin/sftp 0755 root sys
|
||||
d none libexec 0755 root sys
|
||||
f none libexec/sftp-server 0755 root sys
|
||||
d none sbin 0755 root sys
|
||||
f none sbin/sshd 0755 root sys
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Summary: OpenSSH, a free Secure Shell (SSH) implementation
|
||||
Name: openssh
|
||||
Version: 2.9p1
|
||||
Version: 2.9p3
|
||||
URL: http://www.openssh.com/
|
||||
Release: 1
|
||||
Source0: openssh-%{version}.tar.gz
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _DEFINES_H
|
||||
#define _DEFINES_H
|
||||
|
||||
/* $Id: defines.h,v 1.62 2001/04/05 17:15:08 stevesk Exp $ */
|
||||
/* $Id: defines.h,v 1.62.2.1 2001/05/09 00:39:19 mouring Exp $ */
|
||||
|
||||
/* Some platforms need this for the _r() functions */
|
||||
#if !defined(_REENTRANT) && !defined(SNI)
|
||||
@@ -92,8 +92,12 @@ enum
|
||||
#endif
|
||||
|
||||
#ifndef NGROUPS_MAX /* Disable groupaccess if NGROUP_MAX is not set */
|
||||
#ifdef NGROUPS
|
||||
#define NGROUPS_MAX NGROUPS
|
||||
#else
|
||||
#define NGROUPS_MAX 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef O_NONBLOCK /* Non Blocking Open */
|
||||
# define O_NONBLOCK 00004
|
||||
|
||||
+22
-1
@@ -163,7 +163,7 @@
|
||||
#include "log.h"
|
||||
#include "atomicio.h"
|
||||
|
||||
RCSID("$Id: loginrec.c,v 1.32 2001/02/22 21:23:21 stevesk Exp $");
|
||||
RCSID("$Id: loginrec.c,v 1.32.4.1 2001/05/08 20:34:33 mouring Exp $");
|
||||
|
||||
#ifdef HAVE_UTIL_H
|
||||
# include <util.h>
|
||||
@@ -443,6 +443,27 @@ login_write (struct logininfo *li)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
int
|
||||
login_utmp_only(struct logininfo *li)
|
||||
{
|
||||
li->type = LTYPE_LOGIN;
|
||||
# ifdef USE_UTMP
|
||||
utmp_write_entry(li);
|
||||
# endif
|
||||
# ifdef USE_WTMP
|
||||
wtmp_write_entry(li);
|
||||
# endif
|
||||
# ifdef USE_UTMPX
|
||||
utmpx_write_entry(li);
|
||||
# endif
|
||||
# ifdef USE_WTMPX
|
||||
wtmpx_write_entry(li);
|
||||
# endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
** getlast_entry: Call low-level functions to retrieve the last login
|
||||
** time.
|
||||
|
||||
+4
-1
@@ -40,7 +40,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/* RCSID("$Id: loginrec.h,v 1.5 2001/02/05 12:42:18 stevesk Exp $"); */
|
||||
/* RCSID("$Id: loginrec.h,v 1.5.8.1 2001/05/08 20:34:33 mouring Exp $"); */
|
||||
|
||||
/**
|
||||
** you should use the login_* calls to work around platform dependencies
|
||||
@@ -110,6 +110,9 @@ void login_set_current_time(struct logininfo *li);
|
||||
/* record the entry */
|
||||
int login_login (struct logininfo *li);
|
||||
int login_logout(struct logininfo *li);
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
int login_utmp_only(struct logininfo *li);
|
||||
#endif
|
||||
|
||||
/** End of public functions */
|
||||
|
||||
|
||||
+301
-75
@@ -40,18 +40,28 @@ use strict;
|
||||
|
||||
my ($name, $date, $id);
|
||||
my ($line);
|
||||
my ($optlist, $nospace, $enum, $synopsis);
|
||||
my ($optlist, $oldoptlist, $nospace, $enum, $synopsis);
|
||||
my ($reference, $block, $ext, $extopt, $literal);
|
||||
my (@refauthors, $reftitle, $refissue, $refdate, $refopt);
|
||||
|
||||
|
||||
$optlist = 0; ### 1 = bullet, 2 = enum, 3 = tag
|
||||
$optlist = 0; ### 1 = bullet, 2 = enum, 3 = tag, 4 = item
|
||||
$oldoptlist = 0;
|
||||
$nospace = 0;
|
||||
$synopsis = 0;
|
||||
$reference = 0;
|
||||
$block = 0;
|
||||
$ext = 0;
|
||||
$extopt = 0;
|
||||
$literal = 0;
|
||||
|
||||
while ($line = <STDIN>)
|
||||
{
|
||||
if ($line !~ /^\./)
|
||||
{
|
||||
print $line;
|
||||
print ".br\n"
|
||||
if ($literal);
|
||||
next;
|
||||
}
|
||||
|
||||
@@ -70,13 +80,12 @@ while ($line = <STDIN>)
|
||||
sub ParseMacro # ($line)
|
||||
{
|
||||
my ($line) = @_;
|
||||
my (@words, $retval, $option, $parens, $arg);
|
||||
my (@words, $retval, $option, $parens);
|
||||
|
||||
@words = split(/\s+/, $line);
|
||||
$retval = '';
|
||||
$option = 0;
|
||||
$parens = 0;
|
||||
$arg = 0;
|
||||
|
||||
# print('@words = ', scalar(@words), ': ', join(' ', @words), "\n");
|
||||
|
||||
@@ -85,9 +94,39 @@ sub ParseMacro # ($line)
|
||||
# print "WORD: $_\n";
|
||||
|
||||
next
|
||||
if (/^(Li|Pf|X[oc])$/);
|
||||
if (/^(Li|Pf)$/);
|
||||
|
||||
if (/^Ns/)
|
||||
if (/^Xo$/)
|
||||
{
|
||||
$ext = 1;
|
||||
$retval .= ' '
|
||||
if ($retval ne '' && $retval !~ m/[\n ]$/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Xc$/)
|
||||
{
|
||||
$ext = 0;
|
||||
$retval .= "\n"
|
||||
if (! $extopt);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Bd$/)
|
||||
{
|
||||
$literal = 1
|
||||
if ($words[0] eq '-literal');
|
||||
$retval .= "\n";
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Ed$/)
|
||||
{
|
||||
$literal = 0;
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Ns$/)
|
||||
{
|
||||
$nospace = 1
|
||||
if (! $nospace);
|
||||
@@ -95,43 +134,78 @@ sub ParseMacro # ($line)
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^No/)
|
||||
if (/^No$/)
|
||||
{
|
||||
$retval =~ s/ $//;
|
||||
$retval .= shift @words;
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Dq$/) {
|
||||
$retval .= '``' . (shift @words) . '\'\'';
|
||||
if (/^Dq$/)
|
||||
{
|
||||
$retval .= '``';
|
||||
do
|
||||
{
|
||||
$retval .= (shift @words) . ' ';
|
||||
}
|
||||
while (@words > 0 && $words[0] !~ m/^[\.,]/);
|
||||
$retval =~ s/ $//;
|
||||
$retval .= '\'\'';
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(Sq|Ql)$/) {
|
||||
if (/^(Sq|Ql)$/)
|
||||
{
|
||||
$retval .= '`' . (shift @words) . '\'';
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
# if (/^Ic$/)
|
||||
# {
|
||||
# $retval .= '\\fB' . shift(@words) . '\\fP';
|
||||
# next;
|
||||
# }
|
||||
|
||||
if (/^Oo$/)
|
||||
{
|
||||
# $retval .= "[\\c\n";
|
||||
$extopt = 1;
|
||||
$nospace = 1
|
||||
if (! $nospace);
|
||||
$retval .= '[';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Oc$/)
|
||||
{
|
||||
$extopt = 0;
|
||||
$retval .= ']';
|
||||
next;
|
||||
}
|
||||
|
||||
$retval .= ' '
|
||||
if (! $nospace && $retval ne '' && $retval !~ m/[\n ]$/);
|
||||
$nospace = 0
|
||||
if ($nospace == 1);
|
||||
|
||||
if (/^Dd$/) {
|
||||
if (/^Dd$/)
|
||||
{
|
||||
$date = join(' ', @words);
|
||||
return undef;
|
||||
}
|
||||
|
||||
if (/^Dt$/) {
|
||||
if (/^Dt$/)
|
||||
{
|
||||
$id = join(' ', @words);
|
||||
return undef;
|
||||
}
|
||||
|
||||
if (/^Os$/) {
|
||||
if (/^Os$/)
|
||||
{
|
||||
$retval .= '.TH '
|
||||
. $id
|
||||
. " \"$date\" \""
|
||||
@@ -140,7 +214,8 @@ sub ParseMacro # ($line)
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Sh$/) {
|
||||
if (/^Sh$/)
|
||||
{
|
||||
$retval .= '.SH';
|
||||
if ($words[0] eq 'SYNOPSIS')
|
||||
{
|
||||
@@ -153,113 +228,213 @@ sub ParseMacro # ($line)
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Xr$/) {
|
||||
if (/^Xr$/)
|
||||
{
|
||||
$retval .= '\\fB' . (shift @words) .
|
||||
'\\fR(' . (shift @words) . ')'
|
||||
'\\fP(' . (shift @words) . ')'
|
||||
. (shift @words);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Nm$/) {
|
||||
if (/^Rs/)
|
||||
{
|
||||
@refauthors = ();
|
||||
$reftitle = '';
|
||||
$refissue = '';
|
||||
$refdate = '';
|
||||
$refopt = '';
|
||||
$reference = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Re/)
|
||||
{
|
||||
$retval .= "\n";
|
||||
|
||||
# authors
|
||||
while (scalar(@refauthors) > 1)
|
||||
{
|
||||
$retval .= shift(@refauthors) . ', ';
|
||||
}
|
||||
$retval .= 'and '
|
||||
if ($retval ne '');
|
||||
$retval .= shift(@refauthors);
|
||||
|
||||
# title
|
||||
$retval .= ', \\fI' . $reftitle . '\\fP';
|
||||
|
||||
# issue
|
||||
$retval .= ', ' . $refissue
|
||||
if ($refissue ne '');
|
||||
|
||||
# date
|
||||
$retval .= ', ' . $refdate
|
||||
if ($refdate ne '');
|
||||
|
||||
# optional info
|
||||
$retval .= ', ' . $refopt
|
||||
if ($refopt ne '');
|
||||
|
||||
$retval .= ".\n";
|
||||
|
||||
$reference = 0;
|
||||
last;
|
||||
}
|
||||
|
||||
if ($reference)
|
||||
{
|
||||
if (/^%A$/)
|
||||
{
|
||||
unshift(@refauthors, join(' ', @words));
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^%T$/)
|
||||
{
|
||||
$reftitle = join(' ', @words);
|
||||
$reftitle =~ s/^"//;
|
||||
$reftitle =~ s/"$//;
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^%N$/)
|
||||
{
|
||||
$refissue = join(' ', @words);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^%D$/)
|
||||
{
|
||||
$refdate = join(' ', @words);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^%O$/)
|
||||
{
|
||||
$refopt = join(' ', @words);
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if (/^Nm$/)
|
||||
{
|
||||
$name = shift @words
|
||||
if (@words > 0);
|
||||
$retval .= ".br\n"
|
||||
if ($synopsis);
|
||||
$retval .= "\\fB$name\\fR";
|
||||
$retval .= "\\fB$name\\fP";
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Nd$/) {
|
||||
if (/^Nd$/)
|
||||
{
|
||||
$retval .= '\\-';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Fl$/) {
|
||||
$retval .= '\\fB\\-' . (shift @words) . '\\fR';
|
||||
if (/^Fl$/)
|
||||
{
|
||||
$retval .= '\\fB\\-' . (shift @words) . '\\fP';
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Ar$/) {
|
||||
if (/^Ar$/)
|
||||
{
|
||||
$retval .= '\\fI';
|
||||
if (! defined $words[0])
|
||||
{
|
||||
$retval .= 'file ...\\fR';
|
||||
$retval .= 'file ...\\fP';
|
||||
}
|
||||
else
|
||||
{
|
||||
$retval .= shift(@words) . '\\fP';
|
||||
while ($words[0] eq '|')
|
||||
{
|
||||
$retval .= ' ' . shift(@words);
|
||||
$retval .= ' \\fI' . shift(@words);
|
||||
$retval .= '\\fP';
|
||||
}
|
||||
}
|
||||
$arg = 1;
|
||||
$nospace = 1
|
||||
if (! $nospace);
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Cm$/) {
|
||||
$retval .= '\\fB' . (shift @words) . '\\fR';
|
||||
if (/^Cm$/)
|
||||
{
|
||||
$retval .= '\\fB' . (shift @words) . '\\fP';
|
||||
while ($words[0] =~ m/^[\.,:)]$/)
|
||||
{
|
||||
$retval .= shift(@words);
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Op$/) {
|
||||
if (/^Op$/)
|
||||
{
|
||||
$option = 1;
|
||||
$nospace = 1
|
||||
if (! $nospace);
|
||||
$retval .= '[';
|
||||
# my $tmp = pop(@words);
|
||||
# $tmp .= ']';
|
||||
# push(@words, $tmp);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Oo$/) {
|
||||
$retval .= "[\\c\n";
|
||||
if (/^Pp$/)
|
||||
{
|
||||
$retval .= "\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Oc$/) {
|
||||
$retval .= ']';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pp$/) {
|
||||
if ($optlist) {
|
||||
$retval .= "\n";
|
||||
} else {
|
||||
$retval .= '.LP';
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Ss$/) {
|
||||
if (/^Ss$/)
|
||||
{
|
||||
$retval .= '.SS';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pa$/ && ! $option) {
|
||||
if (/^Pa$/ && ! $option)
|
||||
{
|
||||
$retval .= '\\fI';
|
||||
$retval .= '\\&'
|
||||
if ($words[0] =~ m/^\./);
|
||||
$retval .= (shift @words) . '\\fR';
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
$retval .= (shift @words) . '\\fP';
|
||||
while ($words[0] =~ m/^[\.,:;)]$/)
|
||||
{
|
||||
$retval .= shift(@words);
|
||||
}
|
||||
# $nospace = 1
|
||||
# if (! $nospace && $words[0] =~ m/^[\.,:)]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Dv$/) {
|
||||
if (/^Dv$/)
|
||||
{
|
||||
$retval .= '.BR';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(Em|Ev)$/) {
|
||||
if (/^(Em|Ev)$/)
|
||||
{
|
||||
$retval .= '.IR';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pq$/) {
|
||||
if (/^Pq$/)
|
||||
{
|
||||
$retval .= '(';
|
||||
$nospace = 1;
|
||||
$parens = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(S[xy])$/) {
|
||||
if (/^(S[xy])$/)
|
||||
{
|
||||
$retval .= '.B ' . join(' ', @words);
|
||||
last;
|
||||
}
|
||||
@@ -270,48 +445,83 @@ sub ParseMacro # ($line)
|
||||
while (defined $words[0]
|
||||
&& $words[0] !~ m/^[\.,]/)
|
||||
{
|
||||
$retval .= shift @words;
|
||||
if ($words[0] eq 'Op')
|
||||
{
|
||||
shift(@words);
|
||||
$retval .= '[';
|
||||
my $tmp = pop(@words);
|
||||
$tmp .= ']';
|
||||
push(@words, $tmp);
|
||||
next;
|
||||
}
|
||||
if ($words[0] eq 'Ar')
|
||||
{
|
||||
shift @words;
|
||||
$retval .= '\\fI';
|
||||
$retval .= shift @words;
|
||||
$retval .= '\\fP';
|
||||
}
|
||||
else
|
||||
{
|
||||
$retval .= shift @words;
|
||||
}
|
||||
$retval .= ' '
|
||||
if (! $nospace);
|
||||
}
|
||||
$retval =~ s/ $//;
|
||||
$retval .= '\\fR';
|
||||
$retval .= '\\fP';
|
||||
$retval .= shift @words
|
||||
if (defined $words[0]);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Bl$/) {
|
||||
if ($words[0] eq '-bullet') {
|
||||
if (/^Bl$/)
|
||||
{
|
||||
$oldoptlist = $optlist;
|
||||
if ($words[0] eq '-bullet')
|
||||
{
|
||||
$optlist = 1;
|
||||
} elsif ($words[0] eq '-enum') {
|
||||
}
|
||||
elsif ($words[0] eq '-enum')
|
||||
{
|
||||
$optlist = 2;
|
||||
$enum = 0;
|
||||
} elsif ($words[0] eq '-tag') {
|
||||
}
|
||||
elsif ($words[0] eq '-tag')
|
||||
{
|
||||
$optlist = 3;
|
||||
}
|
||||
elsif ($words[0] eq '-item')
|
||||
{
|
||||
$optlist = 4;
|
||||
}
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^El$/) {
|
||||
$optlist = 0;
|
||||
if (/^El$/)
|
||||
{
|
||||
$optlist = $oldoptlist;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist && /^It$/) {
|
||||
if ($optlist == 1) {
|
||||
if ($optlist && /^It$/)
|
||||
{
|
||||
if ($optlist == 1)
|
||||
{
|
||||
# bullets
|
||||
$retval .= '.IP \\(bu';
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 2) {
|
||||
if ($optlist == 2)
|
||||
{
|
||||
# enum
|
||||
$retval .= '.IP ' . (++$enum) . '.';
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 3) {
|
||||
if ($optlist == 3)
|
||||
{
|
||||
# tags
|
||||
$retval .= ".TP\n";
|
||||
if ($words[0] =~ m/^(Pa|Ev)$/)
|
||||
@@ -322,14 +532,25 @@ sub ParseMacro # ($line)
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 4)
|
||||
{
|
||||
# item
|
||||
$retval .= ".IP\n";
|
||||
next;
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Sm$/) {
|
||||
if ($words[0] eq 'off') {
|
||||
if (/^Sm$/)
|
||||
{
|
||||
if ($words[0] eq 'off')
|
||||
{
|
||||
$nospace = 2;
|
||||
} elsif ($words[0] eq 'on') {
|
||||
$retval .= "\n";
|
||||
}
|
||||
elsif ($words[0] eq 'on')
|
||||
{
|
||||
# $retval .= "\n";
|
||||
$nospace = 0;
|
||||
}
|
||||
shift @words;
|
||||
@@ -343,7 +564,7 @@ sub ParseMacro # ($line)
|
||||
if ($retval eq '.');
|
||||
|
||||
$retval =~ s/^\.([^a-zA-Z])/$1/;
|
||||
$retval =~ s/ $//;
|
||||
# $retval =~ s/ $//;
|
||||
|
||||
$retval .= ')'
|
||||
if ($parens == 1);
|
||||
@@ -351,14 +572,19 @@ sub ParseMacro # ($line)
|
||||
$retval .= ']'
|
||||
if ($option == 1);
|
||||
|
||||
$retval .= '\\fR'
|
||||
if ($arg);
|
||||
# $retval .= ' '
|
||||
# if ($nospace && $retval ne '' && $retval !~ m/\n$/);
|
||||
|
||||
$retval .= '\\c'
|
||||
if ($nospace && $retval ne '' && $retval !~ m/\n$/);
|
||||
# $retval .= ' '
|
||||
# if ($extended && $retval !~ m/ $/);
|
||||
|
||||
$retval .= ' '
|
||||
if ($ext && ! $extopt && $retval !~ m/ $/);
|
||||
|
||||
$retval .= "\n"
|
||||
if ($retval ne '' && $retval !~ m/\n$/);
|
||||
if (! $ext && ! $extopt && $retval ne '' && $retval !~ m/\n$/);
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -143,10 +143,6 @@ mysignal(int sig, mysig_t act)
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
#if defined(SA_RESTART)
|
||||
if (sig == SIGCHLD)
|
||||
sa.sa_flags |= SA_RESTART;
|
||||
#endif
|
||||
#if defined(SA_INTERRUPT)
|
||||
if (sig == SIGALRM)
|
||||
sa.sa_flags |= SA_INTERRUPT;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Makefile
|
||||
@@ -127,6 +127,9 @@ void session_proctitle(Session *s);
|
||||
void do_exec_pty(Session *s, const char *command);
|
||||
void do_exec_no_pty(Session *s, const char *command);
|
||||
void do_login(Session *s, const char *command);
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
void do_pre_login(Session *s);
|
||||
#endif
|
||||
void do_child(Session *s, const char *command);
|
||||
void do_motd(void);
|
||||
int check_quietlogin(Session *s, const char *command);
|
||||
@@ -143,9 +146,6 @@ extern u_int utmp_len;
|
||||
extern int startup_pipe;
|
||||
extern void destroy_sensitive_data(void);
|
||||
|
||||
/* Local Xauthority file. */
|
||||
static char *xauthfile;
|
||||
|
||||
/* original command from peer. */
|
||||
char *original_command = NULL;
|
||||
|
||||
@@ -194,27 +194,10 @@ do_authenticated(Authctxt *authctxt)
|
||||
do_authenticated2(authctxt);
|
||||
else
|
||||
do_authenticated1(authctxt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove local Xauthority file.
|
||||
*/
|
||||
void
|
||||
xauthfile_cleanup_proc(void *ignore)
|
||||
{
|
||||
debug("xauthfile_cleanup_proc called");
|
||||
|
||||
if (xauthfile != NULL) {
|
||||
char *p;
|
||||
unlink(xauthfile);
|
||||
p = strrchr(xauthfile, '/');
|
||||
if (p != NULL) {
|
||||
*p = '\0';
|
||||
rmdir(xauthfile);
|
||||
}
|
||||
xfree(xauthfile);
|
||||
xauthfile = NULL;
|
||||
}
|
||||
/* remove agent socket */
|
||||
if (auth_get_socket_name())
|
||||
auth_sock_cleanup_proc(authctxt->pw);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -249,7 +232,7 @@ do_authenticated1(Authctxt *authctxt)
|
||||
{
|
||||
Session *s;
|
||||
char *command;
|
||||
int success, type, fd, n_bytes, plen, screen_flag, have_pty = 0;
|
||||
int success, type, n_bytes, plen, screen_flag, have_pty = 0;
|
||||
int compression_level = 0, enable_compression_after_reply = 0;
|
||||
u_int proto_len, data_len, dlen;
|
||||
|
||||
@@ -370,25 +353,6 @@ do_authenticated1(Authctxt *authctxt)
|
||||
if (s->display == NULL)
|
||||
break;
|
||||
|
||||
/* Setup to always have a local .Xauthority. */
|
||||
xauthfile = xmalloc(MAXPATHLEN);
|
||||
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
|
||||
temporarily_use_uid(s->pw);
|
||||
if (mkdtemp(xauthfile) == NULL) {
|
||||
restore_uid();
|
||||
error("private X11 dir: mkdtemp %s failed: %s",
|
||||
xauthfile, strerror(errno));
|
||||
xfree(xauthfile);
|
||||
xauthfile = NULL;
|
||||
/* XXXX remove listening channels */
|
||||
break;
|
||||
}
|
||||
strlcat(xauthfile, "/cookies", MAXPATHLEN);
|
||||
fd = open(xauthfile, O_RDWR|O_CREAT|O_EXCL, 0600);
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
restore_uid();
|
||||
fatal_add_cleanup(xauthfile_cleanup_proc, NULL);
|
||||
success = 1;
|
||||
break;
|
||||
|
||||
@@ -442,9 +406,6 @@ do_authenticated1(Authctxt *authctxt)
|
||||
|
||||
if (command != NULL)
|
||||
xfree(command);
|
||||
/* Cleanup user's local Xauthority file. */
|
||||
if (xauthfile)
|
||||
xauthfile_cleanup_proc(NULL);
|
||||
return;
|
||||
|
||||
default:
|
||||
@@ -496,6 +457,7 @@ do_exec_no_pty(Session *s, const char *command)
|
||||
session_proctitle(s);
|
||||
|
||||
#if defined(USE_PAM)
|
||||
do_pam_session(s->pw->pw_name, NULL);
|
||||
do_pam_setcred(1);
|
||||
#endif /* USE_PAM */
|
||||
|
||||
@@ -644,6 +606,10 @@ do_exec_pty(Session *s, const char *command)
|
||||
#ifndef HAVE_OSF_SIA
|
||||
if (!(options.use_login && command == NULL))
|
||||
do_login(s, command);
|
||||
# ifdef LOGIN_NEEDS_UTMPX
|
||||
else
|
||||
do_pre_login(s);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Do common processing for the child, such as execing the command. */
|
||||
@@ -687,6 +653,34 @@ do_exec_pty(Session *s, const char *command)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
void
|
||||
do_pre_login(Session *s)
|
||||
{
|
||||
socklen_t fromlen;
|
||||
struct sockaddr_storage from;
|
||||
pid_t pid = getpid();
|
||||
|
||||
/*
|
||||
* Get IP address of client. If the connection is not a socket, let
|
||||
* the address be 0.0.0.0.
|
||||
*/
|
||||
memset(&from, 0, sizeof(from));
|
||||
if (packet_connection_is_on_socket()) {
|
||||
fromlen = sizeof(from);
|
||||
if (getpeername(packet_get_connection_in(),
|
||||
(struct sockaddr *) & from, &fromlen) < 0) {
|
||||
debug("getpeername: %.100s", strerror(errno));
|
||||
fatal_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
record_utmp_only(pid, s->tty, s->pw->pw_name,
|
||||
get_remote_name_or_ip(utmp_len, options.reverse_mapping_check),
|
||||
(struct sockaddr *)&from);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* administrative, login(1)-like work */
|
||||
void
|
||||
do_login(Session *s, const char *command)
|
||||
@@ -1313,8 +1307,6 @@ do_child(Session *s, const char *command)
|
||||
do_pam_environment(&env, &envsize);
|
||||
#endif /* USE_PAM */
|
||||
|
||||
if (xauthfile)
|
||||
child_set_env(&env, &envsize, "XAUTHORITY", xauthfile);
|
||||
if (auth_get_socket_name() != NULL)
|
||||
child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME,
|
||||
auth_get_socket_name());
|
||||
@@ -1511,6 +1503,9 @@ do_child(Session *s, const char *command)
|
||||
/* Launch login(1). */
|
||||
|
||||
execl(LOGIN_PROGRAM, "login", "-h", hostname,
|
||||
#ifdef LOGIN_NEEDS_TERM
|
||||
s->term? s->term : "unknown",
|
||||
#endif
|
||||
"-p", "-f", "--", pw->pw_name, NULL);
|
||||
|
||||
/* Login couldn't be executed, die. */
|
||||
@@ -1713,7 +1708,6 @@ session_subsystem_req(Session *s)
|
||||
int
|
||||
session_x11_req(Session *s)
|
||||
{
|
||||
int fd;
|
||||
if (no_x11_forwarding_flag) {
|
||||
debug("X11 forwarding disabled in user configuration file.");
|
||||
return 0;
|
||||
@@ -1722,11 +1716,6 @@ session_x11_req(Session *s)
|
||||
debug("X11 forwarding disabled in server configuration file.");
|
||||
return 0;
|
||||
}
|
||||
if (xauthfile != NULL) {
|
||||
debug("X11 fwd already started.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
debug("Received request for X11 forwarding with auth spoofing.");
|
||||
if (s->display != NULL)
|
||||
packet_disconnect("Protocol error: X11 display already set.");
|
||||
@@ -1743,26 +1732,6 @@ session_x11_req(Session *s)
|
||||
xfree(s->auth_data);
|
||||
return 0;
|
||||
}
|
||||
xauthfile = xmalloc(MAXPATHLEN);
|
||||
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
|
||||
temporarily_use_uid(s->pw);
|
||||
if (mkdtemp(xauthfile) == NULL) {
|
||||
restore_uid();
|
||||
error("private X11 dir: mkdtemp %s failed: %s",
|
||||
xauthfile, strerror(errno));
|
||||
xfree(xauthfile);
|
||||
xauthfile = NULL;
|
||||
xfree(s->auth_proto);
|
||||
xfree(s->auth_data);
|
||||
/* XXXX remove listening channels */
|
||||
return 0;
|
||||
}
|
||||
strlcat(xauthfile, "/cookies", MAXPATHLEN);
|
||||
fd = open(xauthfile, O_RDWR|O_CREAT|O_EXCL, 0600);
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
restore_uid();
|
||||
fatal_add_cleanup(xauthfile_cleanup_proc, s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1991,7 +1960,7 @@ session_close_by_pid(pid_t pid, int status)
|
||||
{
|
||||
Session *s = session_by_pid(pid);
|
||||
if (s == NULL) {
|
||||
debug("session_close_by_pid: no session for pid %d", s->pid);
|
||||
debug("session_close_by_pid: no session for pid %d", pid);
|
||||
return;
|
||||
}
|
||||
if (s->chanid != -1)
|
||||
@@ -2060,6 +2029,4 @@ do_authenticated2(Authctxt *authctxt)
|
||||
{
|
||||
|
||||
server_loop2();
|
||||
if (xauthfile)
|
||||
xauthfile_cleanup_proc(NULL);
|
||||
}
|
||||
|
||||
@@ -889,8 +889,13 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#if HAVE_SETVBUF
|
||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||
setvbuf(infile, NULL, _IOLBF, 0);
|
||||
#else
|
||||
setlinebuf(stdout);
|
||||
setlinebuf(infile);
|
||||
#endif
|
||||
|
||||
for(;;) {
|
||||
char *cp;
|
||||
|
||||
+12
@@ -713,6 +713,9 @@ main(int ac, char **av)
|
||||
struct sockaddr_un sunaddr;
|
||||
#ifdef HAVE_SETRLIMIT
|
||||
struct rlimit rlim;
|
||||
#endif
|
||||
#ifdef HAVE_CYGWIN
|
||||
int prev_mask;
|
||||
#endif
|
||||
pid_t pid;
|
||||
char *shell, *format, *pidstr, pidstrbuf[1 + 3 * sizeof pid];
|
||||
@@ -805,10 +808,19 @@ main(int ac, char **av)
|
||||
memset(&sunaddr, 0, sizeof(sunaddr));
|
||||
sunaddr.sun_family = AF_UNIX;
|
||||
strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path));
|
||||
#ifdef HAVE_CYGWIN
|
||||
prev_mask = umask(0177);
|
||||
#endif
|
||||
if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) {
|
||||
perror("bind");
|
||||
#ifdef HAVE_CYGWIN
|
||||
umask(prev_mask);
|
||||
#endif
|
||||
cleanup_exit(1);
|
||||
}
|
||||
#ifdef HAVE_CYGWIN
|
||||
umask(prev_mask);
|
||||
#endif
|
||||
if (listen(sock, 5) < 0) {
|
||||
perror("listen");
|
||||
cleanup_exit(1);
|
||||
|
||||
+14
@@ -77,6 +77,20 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
|
||||
login_free_entry(li);
|
||||
}
|
||||
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
void
|
||||
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
||||
const char *host, struct sockaddr * addr)
|
||||
{
|
||||
struct logininfo *li;
|
||||
|
||||
li = login_alloc_entry(pid, user, host, ttyname);
|
||||
login_set_addr(li, addr, sizeof(struct sockaddr));
|
||||
login_utmp_only(li);
|
||||
login_free_entry(li);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Records that the user has logged out. */
|
||||
|
||||
void
|
||||
|
||||
@@ -31,6 +31,15 @@ void
|
||||
record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
|
||||
const char *host, struct sockaddr *addr);
|
||||
|
||||
#ifdef LOGIN_NEEDS_UTMPX
|
||||
/*
|
||||
* Record just the utmp info for /bin/login.
|
||||
*/
|
||||
void
|
||||
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
|
||||
const char *host, struct sockaddr * addr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Records that the user has logged out. This does many thigs normally done
|
||||
* by login(1) or init.
|
||||
|
||||
@@ -20,6 +20,7 @@ RCSID("$OpenBSD: sshpty.c,v 1.1 2001/03/04 01:46:30 djm Exp $");
|
||||
|
||||
#include "sshpty.h"
|
||||
#include "log.h"
|
||||
#include "misc.h"
|
||||
|
||||
/* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */
|
||||
#if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY)
|
||||
@@ -93,16 +94,19 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
|
||||
*/
|
||||
int ptm;
|
||||
char *pts;
|
||||
mysig_t old_signal;
|
||||
|
||||
ptm = open("/dev/ptmx", O_RDWR | O_NOCTTY);
|
||||
if (ptm < 0) {
|
||||
error("/dev/ptmx: %.100s", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
old_signal = mysignal(SIGCHLD, SIG_DFL);
|
||||
if (grantpt(ptm) < 0) {
|
||||
error("grantpt: %.100s", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
mysignal(SIGCHLD, old_signal);
|
||||
if (unlockpt(ptm) < 0) {
|
||||
error("unlockpt: %.100s", strerror(errno));
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user