Vendor import of OpenSSH 3.3p1.
This commit is contained in:
parent
545d5eca42
commit
83d2307d00
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-crypto/openssh/dist/; revision=98937
94
crypto/openssh/CREDITS
Normal file
94
crypto/openssh/CREDITS
Normal file
@ -0,0 +1,94 @@
|
||||
Tatu Ylonen <ylo@cs.hut.fi> - Creator of SSH
|
||||
|
||||
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
|
||||
Theo de Raadt, and Dug Song - Creators of OpenSSH
|
||||
|
||||
Alain St-Denis <Alain.St-Denis@ec.gc.ca> - Irix fix
|
||||
Alexandre Oliva <oliva@lsd.ic.unicamp.br> - AIX fixes
|
||||
Andre Lucas <andre.lucas@dial.pipex.com> - new login code, many fixes
|
||||
Andreas Steinmetz <ast@domdv.de> - Shadow password expiry support
|
||||
Andrew McGill <andrewm@datrix.co.za> - SCO fixes
|
||||
Andrew Morgan <morgan@transmeta.com> - PAM bugfixes
|
||||
Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> - Bugfixes
|
||||
Andy Sloane <andy@guildsoftware.com> - bugfixes
|
||||
Aran Cox <acox@cv.telegroup.com> - SCO bugfixes
|
||||
Arkadiusz Miskiewicz <misiek@pld.org.pl> - IPv6 compat fixes
|
||||
Ben Lindstrom <mouring@eviladmin.org> - NeXT support
|
||||
Ben Taylor <bent@clark.net> - Solaris debugging and fixes
|
||||
Bratislav ILICH <bilic@zepter.ru> - Configure fix
|
||||
Charles Levert <charles@comm.polymtl.ca> - SunOS 4 & bug fixes
|
||||
Chip Salzenberg <chip@valinux.com> - Assorted patches
|
||||
Chris Adams <cmadams@hiwaay.net> - OSF SIA support
|
||||
Chris Saia <csaia@wtower.com> - SuSE packaging
|
||||
Chris, the Young One <cky@pobox.com> - Password auth fixes
|
||||
Christos Zoulas <christos@zoulas.com> - Autoconf fixes
|
||||
Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes
|
||||
Corinna Vinschen <vinschen@cygnus.com> - Cygwin support
|
||||
Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes
|
||||
Darren Hall <dhall@virage.org> - AIX patches
|
||||
Darren Tucker <dtucker@zip.com.au> - AIX BFF package scripts
|
||||
David Agraz <dagraz@jahoopa.com> - Build fixes
|
||||
David Del Piero <David.DelPiero@qed.qld.gov.au> - bug fixes
|
||||
David Hesprich <darkgrue@gue-tech.org> - Configure fixes
|
||||
David Rankin <drankin@bohemians.lexington.ky.us> - libwrap, AIX, NetBSD fixes
|
||||
Ed Eden <ede370@stl.rural.usda.gov> - configure fixes
|
||||
Garrick James <garrick@james.net> - configure fixes
|
||||
Gary E. Miller <gem@rellim.com> - SCO support
|
||||
Ged Lodder <lodder@yacc.com.au> - HPUX fixes and enhancements
|
||||
Gert Doering <gd@hilb1.medat.de> - bug and portability fixes
|
||||
HARUYAMA Seigo <haruyama@unixuser.org> - Translations & doc fixes
|
||||
Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp> - IPv6 and bug fixes
|
||||
Hiroshi Takekawa <takekawa@sr3.t.u-tokyo.ac.jp> - Configure fixes
|
||||
Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE> - KRB4/AFS config patch
|
||||
IWAMURO Motonori <iwa@mmp.fujitsu.co.jp> - bugfixes
|
||||
Jani Hakala <jahakala@cc.jyu.fi> - Patches
|
||||
Jarno Huuskonen <jhuuskon@hytti.uku.fi> - Bugfixes
|
||||
Jim Knoble <jmknoble@jmknoble.cx> - Many patches
|
||||
Jonchen (email unknown) - the original author of PAM support of SSH
|
||||
Juergen Keil <jk@tools.de> - scp bugfixing
|
||||
KAMAHARA Junzo <kamahara@cc.kshosen.ac.jp> - Configure fixes
|
||||
Kees Cook <cook@cpoint.net> - scp fixes
|
||||
Kenji Miyake <kenji@miyake.org> - Configure fixes
|
||||
Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation
|
||||
Kevin Steves <stevesk@pobox.com> - HP support, bugfixes, improvements
|
||||
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
|
||||
Larry Jones <larry.jones@sdrc.com> - Bugfixes
|
||||
Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
|
||||
Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
|
||||
Mark D. Baushke <mdb@juniper.net> - bug fixes
|
||||
Martin Johansson <fatbob@acc.umu.se> - Linux fixes
|
||||
Mark D. Roth <roth+openssh@feep.net> - Features, bug fixes
|
||||
Mark Miller <markm@swoon.net> - Bugfixes
|
||||
Matt Richards <v2matt@btv.ibm.com> - AIX patches
|
||||
Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
|
||||
Nakaji Hiroyuki <nakaji@tutrp.tut.ac.jp> - Sony News-OS patch
|
||||
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
|
||||
Nate Itkin <nitkin@europa.com> - SunOS 4.1.x fixes
|
||||
Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
|
||||
Pavel Kankovsky <peak@argo.troja.mff.cuni.cz> - Security fixes
|
||||
Pavel Troller <patrol@omni.sinus.cz> - Bugfixes
|
||||
Pekka Savola <pekkas@netcore.fi> - Bugfixes
|
||||
Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
|
||||
Phil Hands <phil@hands.com> - Debian scripts, assorted patches
|
||||
Phil Karn <karn@ka9q.ampr.org> - Autoconf fixes
|
||||
Philippe WILLEM <Philippe.WILLEM@urssaf.fr> - Bugfixes
|
||||
Phill Camp <P.S.S.Camp@ukc.ac.uk> - login code fix
|
||||
Rip Loomis <loomisg@cist.saic.com> - Solaris package support, fixes
|
||||
SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes
|
||||
Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes, Compat with MIT KrbV
|
||||
Svante Signell <svante.signell@telia.com> - Bugfixes
|
||||
Thomas Neumann <tom@smart.ruhr.de> - Shadow passwords
|
||||
Tim Rice <tim@multitalents.net> - Portability & SCO fixes
|
||||
Tobias Oetiker <oetiker@ee.ethz.ch> - Bugfixes
|
||||
Tom Bertelson's <tbert@abac.com> - AIX auth fixes
|
||||
Tor-Ake Fransson <torake@hotmail.com> - AIX support
|
||||
Tudor Bosman <tudorb@jm.nu> - MD5 password support
|
||||
Udo Schweigert <ust@cert.siemens.de> - ReliantUNIX support
|
||||
Zack Weinberg <zack@wolery.cumb.org> - GNOME askpass enhancement
|
||||
|
||||
Apologies to anyone I have missed.
|
||||
|
||||
Damien Miller <djm@mindrot.org>
|
||||
|
||||
$Id: CREDITS,v 1.66 2002/04/13 01:04:40 djm Exp $
|
||||
|
1007
crypto/openssh/ChangeLog
Normal file
1007
crypto/openssh/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
229
crypto/openssh/INSTALL
Normal file
229
crypto/openssh/INSTALL
Normal file
@ -0,0 +1,229 @@
|
||||
1. Prerequisites
|
||||
----------------
|
||||
|
||||
You will need working installations of Zlib and OpenSSL.
|
||||
|
||||
Zlib:
|
||||
http://www.gzip.org/zlib/
|
||||
|
||||
OpenSSL 0.9.6 or greater:
|
||||
http://www.openssl.org/
|
||||
|
||||
(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1
|
||||
Blowfish included) do not work correctly.)
|
||||
|
||||
RPMs of OpenSSL are available at http://violet.ibs.com.au/openssh/files/support.
|
||||
For Red Hat Linux 6.2, they have been released as errata. RHL7 includes
|
||||
these.
|
||||
|
||||
OpenSSH can utilise Pluggable Authentication Modules (PAM) if your system
|
||||
supports it. PAM is standard on Redhat and Debian Linux, Solaris and
|
||||
HP-UX 11.
|
||||
|
||||
NB. If you operating system supports /dev/random, you should configure
|
||||
OpenSSL to use it. OpenSSH relies on OpenSSL's direct support of
|
||||
/dev/random. If you don't you will have to rely on ssh-rand-helper, which
|
||||
is inferior to a good kernel-based solution.
|
||||
|
||||
PAM:
|
||||
http://www.kernel.org/pub/linux/libs/pam/
|
||||
|
||||
If you wish to build the GNOME passphrase requester, you will need the GNOME
|
||||
libraries and headers.
|
||||
|
||||
GNOME:
|
||||
http://www.gnome.org/
|
||||
|
||||
Alternatively, Jim Knoble <jmknoble@jmknoble.cx> has written an excellent X11
|
||||
passphrase requester. This is maintained separately at:
|
||||
|
||||
http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/index.html
|
||||
|
||||
PRNGD:
|
||||
|
||||
If your system lacks Kernel based random collection, the use of Lutz
|
||||
Jaenicke's PRNGd is recommended.
|
||||
|
||||
http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html
|
||||
|
||||
EGD:
|
||||
|
||||
The Entropy Gathering Daemon (EGD) is supported if you have a system which
|
||||
lacks /dev/random and don't want to use OpenSSH's internal entropy collection.
|
||||
|
||||
http://www.lothar.com/tech/crypto/
|
||||
|
||||
S/Key Libraries:
|
||||
http://www.sparc.spb.su/solaris/skey/
|
||||
|
||||
If you wish to use --with-skey then you will need the above library
|
||||
installed. No other current S/Key library is currently known to be
|
||||
supported.
|
||||
|
||||
2. Building / Installation
|
||||
--------------------------
|
||||
|
||||
To install OpenSSH with default options:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
This will install the OpenSSH binaries in /usr/local/bin, configuration files
|
||||
in /usr/local/etc, the server in /usr/local/sbin, etc. To specify a different
|
||||
installation prefix, use the --prefix option to configure:
|
||||
|
||||
./configure --prefix=/opt
|
||||
make
|
||||
make install
|
||||
|
||||
Will install OpenSSH in /opt/{bin,etc,lib,sbin}. You can also override
|
||||
specific paths, for example:
|
||||
|
||||
./configure --prefix=/opt --sysconfdir=/etc/ssh
|
||||
make
|
||||
make install
|
||||
|
||||
This will install the binaries in /opt/{bin,lib,sbin}, but will place the
|
||||
configuration files in /etc/ssh.
|
||||
|
||||
If you are using PAM, you may need to manually install a PAM control
|
||||
file as "/etc/pam.d/sshd" (or wherever your system prefers to keep
|
||||
them). Note that the service name used to start PAM is __progname,
|
||||
which is the basename of the path of your sshd (e.g., the service name
|
||||
for /usr/sbin/osshd will be osshd). If you have renamed your sshd
|
||||
executable, your PAM configuration may need to be modified.
|
||||
|
||||
A generic PAM configuration is included as "contrib/sshd.pam.generic",
|
||||
you may need to edit it before using it on your system. If you are
|
||||
using a recent version of Red Hat Linux, the config file in
|
||||
contrib/redhat/sshd.pam should be more useful. Failure to install a
|
||||
valid PAM file may result in an inability to use password
|
||||
authentication. On HP-UX 11 and Solaris, the standard /etc/pam.conf
|
||||
configuration will work with sshd (sshd will match the other service
|
||||
name).
|
||||
|
||||
There are a few other options to the configure script:
|
||||
|
||||
--with-rsh=PATH allows you to specify the path to your rsh program.
|
||||
Normally ./configure will search the current $PATH for 'rsh'. You
|
||||
may need to specify this option if rsh is not in your path or has a
|
||||
different name.
|
||||
|
||||
--with-pam enables PAM support.
|
||||
|
||||
--enable-gnome-askpass will build the GNOME passphrase dialog. You
|
||||
need a working installation of GNOME, including the development
|
||||
headers, for this to work.
|
||||
|
||||
--with-prngd-socket=/some/file allows you to enable EGD or PRNGD
|
||||
support and to specify a PRNGd socket. Use this if your Unix lacks
|
||||
/dev/random and you don't want to use OpenSSH's builtin entropy
|
||||
collection support.
|
||||
|
||||
--with-prngd-port=portnum allows you to enable EGD or PRNGD support
|
||||
and to specify a EGD localhost TCP port. Use this if your Unix lacks
|
||||
/dev/random and you don't want to use OpenSSH's builtin entropy
|
||||
collection support.
|
||||
|
||||
--with-lastlog=FILE will specify the location of the lastlog file.
|
||||
./configure searches a few locations for lastlog, but may not find
|
||||
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
|
||||
Kerberos installation.
|
||||
|
||||
--with-afs=PATH will enable AFS support. You will need to have the
|
||||
Kerberos IV and the AFS libraries and header files installed for this
|
||||
to work. Use the optional PATH argument to specify the root of your
|
||||
AFS installation. AFS requires Kerberos support to be enabled.
|
||||
|
||||
--with-skey=PATH will enable S/Key one time password support. You will
|
||||
need the S/Key libraries and header files installed for this to work.
|
||||
|
||||
--with-tcp-wrappers will enable TCP Wrappers (/etc/hosts.allow|deny)
|
||||
support. You will need libwrap.a and tcpd.h installed.
|
||||
|
||||
--with-md5-passwords will enable the use of MD5 passwords. Enable this
|
||||
if your operating system uses MD5 passwords without using PAM.
|
||||
|
||||
--with-utmpx enables utmpx support. utmpx support is automatic for
|
||||
some platforms.
|
||||
|
||||
--without-shadow disables shadow password support.
|
||||
|
||||
--with-ipaddr-display forces the use of a numeric IP address in the
|
||||
$DISPLAY environment variable. Some broken systems need this.
|
||||
|
||||
--with-default-path=PATH allows you to specify a default $PATH for sessions
|
||||
started by sshd. This replaces the standard path entirely.
|
||||
|
||||
--with-pid-dir=PATH specifies the directory in which the ssh.pid file is
|
||||
created.
|
||||
|
||||
--with-xauth=PATH specifies the location of the xauth binary
|
||||
|
||||
--with-ipv4-default instructs OpenSSH to use IPv4 by default for new
|
||||
connections. Normally OpenSSH will try attempt to lookup both IPv6 and
|
||||
IPv4 addresses. On Linux/glibc-2.1.2 this causes long delays in name
|
||||
resolution. If this option is specified, you can still attempt to
|
||||
connect to IPv6 addresses using the command line option '-6'.
|
||||
|
||||
--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries
|
||||
are installed.
|
||||
|
||||
--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
|
||||
real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
|
||||
|
||||
--with-opensc=DIR
|
||||
--with-sectok=DIR allows for OpenSC or sectok smartcard libraries to
|
||||
be used with OpenSSH. See 'README.smartcard' for more details.
|
||||
|
||||
If you need to pass special options to the compiler or linker, you
|
||||
can specify these as environment variables before running ./configure.
|
||||
For example:
|
||||
|
||||
CFLAGS="-O -m486" LDFLAGS="-s" LIBS="-lrubbish" LD="/usr/foo/ld" ./configure
|
||||
|
||||
3. Configuration
|
||||
----------------
|
||||
|
||||
The runtime configuration files are installed by in ${prefix}/etc or
|
||||
whatever you specified as your --sysconfdir (/usr/local/etc by default).
|
||||
|
||||
The default configuration should be instantly usable, though you should
|
||||
review it to ensure that it matches your security requirements.
|
||||
|
||||
To generate a host key, run "make host-key". Alternately you can do so
|
||||
manually using the following commands:
|
||||
|
||||
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
|
||||
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
|
||||
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
|
||||
|
||||
Replacing /etc/ssh with the correct path to the configuration directory.
|
||||
(${prefix}/etc or whatever you specified with --sysconfdir during
|
||||
configuration)
|
||||
|
||||
If you have configured OpenSSH with EGD support, ensure that EGD is
|
||||
running and has collected some Entropy.
|
||||
|
||||
For more information on configuration, please refer to the manual pages
|
||||
for sshd, ssh and ssh-agent.
|
||||
|
||||
4. Problems?
|
||||
------------
|
||||
|
||||
If you experience problems compiling, installing or running OpenSSH.
|
||||
Please refer to the "reporting bugs" section of the webpage at
|
||||
http://www.openssh.com/
|
||||
|
||||
|
||||
$Id: INSTALL,v 1.53 2002/05/13 05:22:21 djm Exp $
|
339
crypto/openssh/Makefile.in
Normal file
339
crypto/openssh/Makefile.in
Normal file
@ -0,0 +1,339 @@
|
||||
# $Id: Makefile.in,v 1.215 2002/06/21 01:38:53 mouring Exp $
|
||||
|
||||
# uncomment if you run a non bourne compatable shell. Ie. csh
|
||||
#SHELL = @SH@
|
||||
|
||||
AUTORECONF=autoreconf
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
sbindir=@sbindir@
|
||||
libexecdir=@libexecdir@
|
||||
datadir=@datadir@
|
||||
mandir=@mandir@
|
||||
mansubdir=@mansubdir@
|
||||
sysconfdir=@sysconfdir@
|
||||
piddir=@piddir@
|
||||
srcdir=@srcdir@
|
||||
top_srcdir=@top_srcdir@
|
||||
|
||||
DESTDIR=
|
||||
VPATH=@srcdir@
|
||||
SSH_PROGRAM=@bindir@/ssh
|
||||
ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
|
||||
SFTP_SERVER=$(libexecdir)/sftp-server
|
||||
SSH_KEYSIGN=$(libexecdir)/ssh-keysign
|
||||
RAND_HELPER=$(libexecdir)/ssh-rand-helper
|
||||
PRIVSEP_PATH=@PRIVSEP_PATH@
|
||||
|
||||
PATHS= -DSSHDIR=\"$(sysconfdir)\" \
|
||||
-D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
|
||||
-D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
|
||||
-D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
|
||||
-D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \
|
||||
-D_PATH_SSH_PIDDIR=\"$(piddir)\" \
|
||||
-D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
|
||||
-DSSH_RAND_HELPER=\"$(RAND_HELPER)\"
|
||||
|
||||
CC=@CC@
|
||||
LD=@LD@
|
||||
CFLAGS=@CFLAGS@
|
||||
CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
|
||||
LIBS=@LIBS@
|
||||
LIBPAM=@LIBPAM@
|
||||
LIBWRAP=@LIBWRAP@
|
||||
AR=@AR@
|
||||
RANLIB=@RANLIB@
|
||||
INSTALL=@INSTALL@
|
||||
PERL=@PERL@
|
||||
ENT=@ENT@
|
||||
XAUTH_PATH=@XAUTH_PATH@
|
||||
LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
|
||||
EXEEXT=@EXEEXT@
|
||||
|
||||
INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
|
||||
INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
|
||||
|
||||
@NO_SFTP@SFTP_PROGS=sftp-server$(EXEEXT) sftp$(EXEEXT)
|
||||
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} $(SFTP_PROGS)
|
||||
|
||||
LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o fatal.o mac.o msg.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o scard-opensc.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o monitor_wrap.o monitor_fdpass.o
|
||||
|
||||
SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o
|
||||
|
||||
SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-krb5.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o monitor_mm.o monitor.o
|
||||
|
||||
MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out
|
||||
MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 sshd_config.5 ssh_config.5
|
||||
MANTYPE = @MANTYPE@
|
||||
|
||||
CONFIGFILES=sshd_config.out ssh_config.out moduli.out
|
||||
CONFIGFILES_IN=sshd_config ssh_config moduli
|
||||
|
||||
PATHSUBS = \
|
||||
-D/etc/ssh/ssh_prng_cmds=$(sysconfdir)/ssh_prng_cmds \
|
||||
-D/etc/ssh/ssh_config=$(sysconfdir)/ssh_config \
|
||||
-D/etc/ssh/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \
|
||||
-D/etc/ssh/sshd_config=$(sysconfdir)/sshd_config \
|
||||
-D/usr/libexec=$(libexecdir) \
|
||||
-D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv \
|
||||
-D/etc/ssh/ssh_host_key=$(sysconfdir)/ssh_host_key \
|
||||
-D/etc/ssh/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \
|
||||
-D/etc/ssh/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \
|
||||
-D/var/run/sshd.pid=$(piddir)/sshd.pid \
|
||||
-D/etc/ssh/moduli=$(sysconfdir)/moduli \
|
||||
-D/etc/ssh/sshrc=$(sysconfdir)/sshrc \
|
||||
-D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
|
||||
-D/var/empty=$(PRIVSEP_PATH) \
|
||||
-D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@
|
||||
|
||||
FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
|
||||
|
||||
all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
|
||||
|
||||
$(LIBSSH_OBJS): config.h
|
||||
$(SSHOBJS): config.h
|
||||
$(SSHDOBJS): config.h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
|
||||
$(LIBCOMPAT): always
|
||||
(cd openbsd-compat && $(MAKE))
|
||||
always:
|
||||
|
||||
libssh.a: $(LIBSSH_OBJS)
|
||||
$(AR) rv $@ $(LIBSSH_OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
|
||||
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
|
||||
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS)
|
||||
|
||||
scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o
|
||||
$(LD) -o $@ scp.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
|
||||
$(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o
|
||||
$(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
|
||||
$(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o
|
||||
$(LD) -o $@ ssh-keysign.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o
|
||||
$(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
|
||||
|
||||
sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o
|
||||
$(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o
|
||||
$(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
|
||||
$(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
# test driver for the loginrec code - not built by default
|
||||
logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
|
||||
$(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
|
||||
|
||||
$(MANPAGES): $(MANPAGES_IN)
|
||||
if test "$(MANTYPE)" = "cat"; then \
|
||||
manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \
|
||||
else \
|
||||
manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
|
||||
fi; \
|
||||
if test "$(MANTYPE)" = "man"; then \
|
||||
$(FIXPATHSCMD) $${manpage} | $(PERL) $(srcdir)/mdoc2man.pl > $@; \
|
||||
else \
|
||||
$(FIXPATHSCMD) $${manpage} > $@; \
|
||||
fi
|
||||
|
||||
$(CONFIGFILES): $(CONFIGFILES_IN)
|
||||
conffile=`echo $@ | sed 's/.out$$//'`; \
|
||||
$(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
|
||||
rm -f *.out core
|
||||
(cd openbsd-compat && $(MAKE) clean)
|
||||
|
||||
distclean:
|
||||
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
|
||||
rm -f *.out core
|
||||
rm -f Makefile config.h config.status ssh_prng_cmds *~
|
||||
rm -rf autom4te.cache
|
||||
(cd openbsd-compat && $(MAKE) distclean)
|
||||
(cd scard && $(MAKE) distclean)
|
||||
|
||||
veryclean:
|
||||
rm -f configure config.h.in *.0
|
||||
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
|
||||
rm -f *.out core
|
||||
rm -f Makefile config.h config.status ssh_prng_cmds *~
|
||||
(cd openbsd-compat && $(MAKE) distclean)
|
||||
(cd scard && $(MAKE) distclean)
|
||||
|
||||
mrproper: distclean
|
||||
|
||||
catman-do:
|
||||
@for f in $(MANPAGES_IN) ; do \
|
||||
base=`echo $$f | sed 's/\..*$$//'` ; \
|
||||
echo "$$f -> $$base.0" ; \
|
||||
nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \
|
||||
>$$base.0 ; \
|
||||
done
|
||||
|
||||
distprep: catman-do
|
||||
$(AUTORECONF)
|
||||
(cd scard && $(MAKE) -f Makefile.in distprep)
|
||||
|
||||
install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key
|
||||
install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
|
||||
|
||||
scard-install:
|
||||
(cd scard && $(MAKE) DESTDIR=$(DESTDIR) install)
|
||||
|
||||
install-files: scard-install
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
|
||||
$(INSTALL) -m 0755 -s ssh $(DESTDIR)$(bindir)/ssh
|
||||
$(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp
|
||||
$(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/ssh-add
|
||||
$(INSTALL) -m 0755 -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent
|
||||
$(INSTALL) -m 0755 -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
|
||||
$(INSTALL) -m 0755 -s ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
|
||||
$(INSTALL) -m 0755 -s sshd $(DESTDIR)$(sbindir)/sshd
|
||||
if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \
|
||||
$(INSTALL) -m 0755 -s ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
|
||||
fi
|
||||
$(INSTALL) -m 4711 -s ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
|
||||
@NO_SFTP@$(INSTALL) -m 0755 -s sftp $(DESTDIR)$(bindir)/sftp
|
||||
@NO_SFTP@$(INSTALL) -m 0755 -s sftp-server $(DESTDIR)$(SFTP_SERVER)
|
||||
$(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
|
||||
$(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
|
||||
$(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
|
||||
$(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
|
||||
$(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
|
||||
$(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
|
||||
$(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
|
||||
$(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
|
||||
$(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
|
||||
if [ ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
|
||||
$(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
|
||||
fi
|
||||
@NO_SFTP@$(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
|
||||
@NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
|
||||
$(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
|
||||
-rm -f $(DESTDIR)$(bindir)/slogin
|
||||
ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
|
||||
$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
|
||||
fi
|
||||
if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
|
||||
$(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
|
||||
else \
|
||||
echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
|
||||
fi
|
||||
if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
|
||||
$(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
|
||||
else \
|
||||
echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
|
||||
fi
|
||||
if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
|
||||
$(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
|
||||
if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
|
||||
$(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
|
||||
else \
|
||||
echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
|
||||
fi ; \
|
||||
fi
|
||||
if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
|
||||
if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
|
||||
echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
|
||||
mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
|
||||
else \
|
||||
$(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
|
||||
fi ; \
|
||||
else \
|
||||
echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
|
||||
fi
|
||||
|
||||
host-key: ssh-keygen$(EXEEXT)
|
||||
if [ -z "$(DESTDIR)" ] ; then \
|
||||
if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \
|
||||
echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \
|
||||
else \
|
||||
./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \
|
||||
fi ; \
|
||||
if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
|
||||
echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
|
||||
else \
|
||||
./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \
|
||||
fi ; \
|
||||
if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \
|
||||
echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
|
||||
else \
|
||||
./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \
|
||||
fi ; \
|
||||
fi ;
|
||||
|
||||
host-key-force: ssh-keygen$(EXEEXT)
|
||||
./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
|
||||
./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
|
||||
./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
|
||||
|
||||
uninstallall: uninstall
|
||||
-rm -f $(DESTDIR)$(sysconfdir)/ssh_config
|
||||
-rm -f $(DESTDIR)$(sysconfdir)/sshd_config
|
||||
-rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
|
||||
-rmdir $(DESTDIR)$(sysconfdir)
|
||||
-rmdir $(DESTDIR)$(bindir)
|
||||
-rmdir $(DESTDIR)$(sbindir)
|
||||
-rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
|
||||
-rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
|
||||
-rmdir $(DESTDIR)$(mandir)
|
||||
-rmdir $(DESTDIR)$(libexecdir)
|
||||
|
||||
uninstall:
|
||||
-rm -f $(DESTDIR)$(bindir)/slogin
|
||||
-rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
|
||||
-rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
@ -1,25 +1,66 @@
|
||||
This release of OpenSSH is for OpenBSD systems only.
|
||||
- A Japanese translation of this document and of the OpenSSH FAQ is
|
||||
- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
|
||||
- Thanks to HARUYAMA Seigo <haruyama@unixuser.org>
|
||||
|
||||
Please read
|
||||
http://www.openssh.com/portable.html
|
||||
if you want to install OpenSSH on other operating systems.
|
||||
This is the port of OpenBSD's excellent OpenSSH[0] to Linux and other
|
||||
Unices.
|
||||
|
||||
To extract and install this release on your OpenBSD system use:
|
||||
OpenSSH is based on the last free version of Tatu Ylonen's sample
|
||||
implementation with all patent-encumbered algorithms removed (to
|
||||
external libraries), all known security bugs fixed, new features
|
||||
reintroduced and many other clean-ups. OpenSSH has been created by
|
||||
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt,
|
||||
and Dug Song. It has a homepage at http://www.openssh.com/
|
||||
|
||||
# cd /usr/src/usr.bin
|
||||
# tar xvfz .../openssh-x.y.tgz
|
||||
# cd ssh
|
||||
# make obj
|
||||
# make cleandir
|
||||
# make depend
|
||||
# make
|
||||
# make install
|
||||
# cp ssh_config sshd_config /etc/ssh
|
||||
This port consists of the re-introduction of autoconf support, PAM
|
||||
support (for Linux and Solaris), EGD[1]/PRNGD[2] support and replacements
|
||||
for OpenBSD library functions that are (regrettably) absent from other
|
||||
unices. This port has been best tested on Linux, Solaris, HP-UX, NetBSD
|
||||
and Irix. Support for AIX, SCO, NeXT and other Unices is underway.
|
||||
This version actively tracks changes in the OpenBSD CVS repository.
|
||||
|
||||
OpenSSH is a derivative of the original and free ssh 1.2.12 release
|
||||
by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels
|
||||
Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer
|
||||
features and created OpenSSH. Markus Friedl contributed the support
|
||||
for SSH protocol versions 1.5 and 2.0.
|
||||
The PAM support is now more functional than the popular packages of
|
||||
commercial ssh-1.2.x. It checks "account" and "session" modules for
|
||||
all logins, not just when using password authentication.
|
||||
|
||||
See http://www.openssh.com/ for more information.
|
||||
OpenSSH depends on Zlib[3], OpenSSL[4] and optionally PAM[5].
|
||||
|
||||
There is now several mailing lists for this port of OpenSSH. Please
|
||||
refer to http://www.openssh.com/list.html for details on how to join.
|
||||
|
||||
Please send bug reports and patches to the mailing list
|
||||
openssh-unix-dev@mindrot.org. The list is open to posting by
|
||||
unsubscribed users.
|
||||
|
||||
If you are a citizen of an USA-embargoed country to which export of
|
||||
cryptographic products is restricted, then please refrain from sending
|
||||
crypto-related code or patches to the list. We cannot accept them.
|
||||
Other code contribution are accepted, but please follow the OpenBSD
|
||||
style guidelines[6].
|
||||
|
||||
Please refer to the INSTALL document for information on how to install
|
||||
OpenSSH on your system. There are a number of differences between this
|
||||
port of OpenSSH and F-Secure SSH 1.x, please refer to the OpenSSH FAQ[7]
|
||||
for details and general tips.
|
||||
|
||||
Damien Miller <djm@mindrot.org>
|
||||
|
||||
Miscellania -
|
||||
|
||||
This version of OpenSSH is based upon code retrieved from the OpenBSD
|
||||
CVS repository which in turn was based on the last free sample
|
||||
implementation released by Tatu Ylonen.
|
||||
|
||||
References -
|
||||
|
||||
[0] http://www.openssh.com/faq.html
|
||||
[1] http://www.lothar.com/tech/crypto/
|
||||
[2] http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html
|
||||
[3] http://www.gzip.org/zlib/
|
||||
[4] http://www.openssl.org/
|
||||
[5] http://www.kernel.org/pub/linux/libs/pam/ (PAM is standard on Solaris
|
||||
and HP-UX 11)
|
||||
[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
|
||||
[7] http://www.openssh.com/faq.html
|
||||
|
||||
$Id: README,v 1.50 2001/12/24 03:17:21 djm Exp $
|
||||
|
60
crypto/openssh/README.privsep
Normal file
60
crypto/openssh/README.privsep
Normal file
@ -0,0 +1,60 @@
|
||||
Privilege separation, or privsep, is method in OpenSSH by which
|
||||
operations that require root privilege are performed by a separate
|
||||
privileged monitor process. Its purpose is to prevent privilege
|
||||
escalation by containing corruption to an unprivileged process.
|
||||
More information is available at:
|
||||
http://www.citi.umich.edu/u/provos/ssh/privsep.html
|
||||
|
||||
Privilege separation is now enabled by default; see the
|
||||
UsePrivilegeSeparation option in sshd_config(5).
|
||||
|
||||
On systems which lack mmap or anonymous (MAP_ANON) memory mapping,
|
||||
compression must be disabled in order for privilege separation to
|
||||
function.
|
||||
|
||||
When privsep is enabled, the pre-authentication sshd process will
|
||||
chroot(2) to "/var/empty" and change its privileges to the "sshd" user
|
||||
and its primary group. You should do something like the following to
|
||||
prepare the privsep preauth environment:
|
||||
|
||||
# mkdir /var/empty
|
||||
# chown root:sys /var/empty
|
||||
# chmod 755 /var/empty
|
||||
# groupadd sshd
|
||||
# useradd -g sshd sshd
|
||||
|
||||
If you are on UnixWare 7 or OpenUNIX 8 do this additional step.
|
||||
# ln /usr/lib/.ns.so /usr/lib/ns.so.1
|
||||
|
||||
/var/empty should not contain any files.
|
||||
|
||||
configure supports the following options to change the default
|
||||
privsep user and chroot directory:
|
||||
|
||||
--with-privsep-path=xxx Path for privilege separation chroot
|
||||
--with-privsep-user=user Specify non-privileged user for privilege separation
|
||||
|
||||
Privsep requires operating system support for file descriptor passing
|
||||
and mmap(MAP_ANON).
|
||||
|
||||
PAM-enabled OpenSSH is known to function with privsep on Linux.
|
||||
It does not function on HP-UX with a trusted system
|
||||
configuration. PAMAuthenticationViaKbdInt does not function with
|
||||
privsep.
|
||||
|
||||
Note that for a normal interactive login with a shell, enabling privsep
|
||||
will require 1 additional process per login session.
|
||||
|
||||
Given the following process listing (from HP-UX):
|
||||
|
||||
UID PID PPID C STIME TTY TIME COMMAND
|
||||
root 1005 1 0 10:45:17 ? 0:08 /opt/openssh/sbin/sshd -u0
|
||||
root 6917 1005 0 15:19:16 ? 0:00 sshd: stevesk [priv]
|
||||
stevesk 6919 6917 0 15:19:17 ? 0:03 sshd: stevesk@2
|
||||
stevesk 6921 6919 0 15:19:17 pts/2 0:00 -bash
|
||||
|
||||
process 1005 is the sshd process listening for new connections.
|
||||
process 6917 is the privileged monitor process, 6919 is the user owned
|
||||
sshd process and 6921 is the shell process.
|
||||
|
||||
$Id: README.privsep,v 1.7 2002/06/21 14:48:02 djm Exp $
|
@ -1,36 +1,54 @@
|
||||
How to use smartcards with OpenSSH?
|
||||
|
||||
OpenSSH contains experimental support for authentication using
|
||||
Cyberflex smartcards and TODOS card readers. To enable this you
|
||||
need to:
|
||||
OpenSSH contains experimental support for authentication using Cyberflex
|
||||
smartcards and TODOS card readers, in addition to the cards with PKCS#15
|
||||
structure supported by OpenSC.
|
||||
|
||||
(1) enable SMARTCARD support in OpenSSH:
|
||||
WARNING: Smartcard support is still in development.
|
||||
Keyfile formats, etc are still subject to change.
|
||||
|
||||
$ vi /usr/src/usr.bin/ssh/Makefile.inc
|
||||
and uncomment
|
||||
CFLAGS+= -DSMARTCARD
|
||||
LDADD+= -lsectok
|
||||
To enable sectok support:
|
||||
|
||||
(2) If you have used a previous version of ssh with your card, you
|
||||
must remove the old applet and keys.
|
||||
(1) install sectok:
|
||||
|
||||
$ sectok
|
||||
sectok> login -d
|
||||
sectok> junload Ssh.bin
|
||||
sectok> delete 0012
|
||||
sectok> delete sh
|
||||
sectok> quit
|
||||
Sources and instructions are available from
|
||||
http://www.citi.umich.edu/projects/smartcard/sectok.html
|
||||
|
||||
(3) load the Java Cardlet to the Cyberflex card and set card passphrase:
|
||||
(2) enable sectok support in OpenSSH:
|
||||
|
||||
$ ./configure --with-sectok[=/path/to/libsectok] [options]
|
||||
|
||||
(3) load the Java Cardlet to the Cyberflex card:
|
||||
|
||||
$ sectok
|
||||
sectok> login -d
|
||||
sectok> jload /usr/libdata/ssh/Ssh.bin
|
||||
sectok> setpass
|
||||
Enter new AUT0 passphrase:
|
||||
Re-enter passphrase:
|
||||
sectok> quit
|
||||
|
||||
(4) load a RSA key to the card:
|
||||
|
||||
Please don't use your production RSA keys, since
|
||||
with the current version of sectok/ssh-keygen
|
||||
the private key file is still readable.
|
||||
|
||||
$ ssh-keygen -f /path/to/rsakey -U <readernum, eg. 0>
|
||||
|
||||
In spite of the name, this does not generate a key.
|
||||
It just loads an already existing key on to the card.
|
||||
|
||||
(5) optional:
|
||||
|
||||
Change the card password so that only you can
|
||||
read the private key:
|
||||
|
||||
$ sectok
|
||||
sectok> login -d
|
||||
sectok> setpass
|
||||
sectok> quit
|
||||
|
||||
This prevents reading the key but not use of the
|
||||
key by the card applet.
|
||||
|
||||
Do not forget the passphrase. There is no way to
|
||||
recover if you do.
|
||||
|
||||
@ -38,36 +56,30 @@ need to:
|
||||
wrong passphrase three times in a row, you will
|
||||
destroy your card.
|
||||
|
||||
(4) load a RSA key to the card:
|
||||
To enable OpenSC support:
|
||||
|
||||
$ ssh-keygen -f /path/to/rsakey -U 1
|
||||
(where 1 is the reader number, you can also try 0)
|
||||
(1) install OpenSC:
|
||||
|
||||
In spite of the name, this does not generate a key.
|
||||
It just loads an already existing key on to the card.
|
||||
Sources and instructions are available from
|
||||
http://www.opensc.org/
|
||||
|
||||
(5) tell the ssh client to use the card reader:
|
||||
(2) enable OpenSC support in OpenSSH:
|
||||
|
||||
$ ssh -I 1 otherhost
|
||||
$ ./configure --with-opensc[=/path/to/opensc] [options]
|
||||
|
||||
(6) or tell the agent (don't forget to restart) to use the smartcard:
|
||||
(3) load a RSA key to the card:
|
||||
|
||||
$ ssh-add -s 1
|
||||
Not supported yet.
|
||||
|
||||
(7) Optional: If you don't want to use a card passphrase, change the
|
||||
acl on the private key file:
|
||||
Common smartcard options:
|
||||
|
||||
$ sectok
|
||||
sectok> login -d
|
||||
sectok> acl 0012 world: w
|
||||
world: w
|
||||
AUT0: w inval
|
||||
sectok> quit
|
||||
(1) tell the ssh client to use the card reader:
|
||||
|
||||
If you do this, anyone who has access to your card
|
||||
can assume your identity. This is not recommended.
|
||||
$ ssh -I <readernum, eg. 0> otherhost
|
||||
|
||||
(2) or tell the agent (don't forget to restart) to use the smartcard:
|
||||
|
||||
$ ssh-add -s <readernum, eg. 0>
|
||||
|
||||
-markus,
|
||||
Tue Jul 17 23:54:51 CEST 2001
|
||||
|
||||
$OpenBSD: README.smartcard,v 1.8 2002/03/26 18:56:23 rees Exp $
|
||||
Sat Apr 13 13:48:10 EEST 2002
|
||||
|
90
crypto/openssh/TODO
Normal file
90
crypto/openssh/TODO
Normal file
@ -0,0 +1,90 @@
|
||||
Programming:
|
||||
- Grep for 'XXX' comments and fix
|
||||
|
||||
- Link order is incorrect for some systems using Kerberos 4 and AFS. Result
|
||||
is multiple inclusion of DES symbols. Holger Trapp
|
||||
<holger.trapp@hrz.tu-chemnitz.de> reports that changing the configure
|
||||
generated link order from:
|
||||
-lresolv -lkrb -lz -lnsl -lutil -lkafs -lkrb -ldes -lcrypto
|
||||
to:
|
||||
-lresolv -lkrb -lz -lnsl -lutil -lcrypto -lkafs -lkrb -ldes
|
||||
fixing the problem.
|
||||
|
||||
- Write a test program that calls stat() to search for EGD/PRNGd socket
|
||||
rather than use the (non-portable) "test -S".
|
||||
|
||||
- Replacement for setproctitle() - HP-UX support only currently
|
||||
|
||||
- Handle changing passwords for the non-PAM expired password case
|
||||
|
||||
- Improve PAM support (a pam_lastlog module will cause sshd to exit)
|
||||
and maybe support alternate forms of authenications like OPIE via
|
||||
pam?
|
||||
|
||||
- Rework PAM ChallengeResponseAuthentication
|
||||
- Use kbdint request packet with 0 prompts for informational messages
|
||||
- Use different PAM service name for kbdint vs regular auth (suggest from
|
||||
Solar Designer)
|
||||
- Ability to select which ChallengeResponseAuthentications may be used
|
||||
and order to try them in e.g. "ChallengeResponseAuthentication skey, pam"
|
||||
|
||||
- Complete Tru64 SIA support
|
||||
- It looks like we could merge it into the password auth code to cut down
|
||||
on diff size. Maybe PAM password auth too?
|
||||
|
||||
- Finish integrating kernel-level auditing code for IRIX and SOLARIS
|
||||
(Gilbert.r.loomis@saic.com)
|
||||
|
||||
- sftp-server: Rework to step down to 32bit ints if the platform
|
||||
lacks 'long long' == 64bit (Notable SCO w/ SCO compiler)
|
||||
|
||||
- Linux hangs for 20 seconds when you do "sleep 20&exit". All current
|
||||
solutions break scp or leaves processes hanging around after the ssh
|
||||
connection has ended. It seems to be linked to two things. One
|
||||
select() under Linux is not as nice as others, and two the children
|
||||
of the shell are not killed on exiting the shell. Redhat have an excellent
|
||||
description of this in their RPM package.
|
||||
|
||||
- Build an automated test suite
|
||||
|
||||
- 64-bit builds on HP-UX 11.X (stevesk@pobox.com):
|
||||
- utmp/wtmp get corrupted (something in loginrec?)
|
||||
- can't build with PAM (no 64-bit libpam yet)
|
||||
|
||||
Documentation:
|
||||
- More and better
|
||||
|
||||
- Install FAQ?
|
||||
|
||||
- General FAQ on S/Key, TIS, RSA, RSA2, DSA, etc and suggestions on when it
|
||||
would be best to use them.
|
||||
|
||||
- Create a Documentation/ directory?
|
||||
|
||||
Clean up configure/makefiles:
|
||||
- Clean up configure.ac - There are a few double #defined variables
|
||||
left to do. HAVE_LOGIN is one of them. Consider NOT looking for
|
||||
information in wtmpx or utmpx or any of that stuff if it's not detected
|
||||
from the start
|
||||
|
||||
- Fails to compile when cross compile.
|
||||
(vinschen@redhat.com)
|
||||
|
||||
- Replace the whole u_intXX_t evilness in acconfig.h with something better???
|
||||
|
||||
- Consider splitting the u_intXX_t test for sys/bitype.h into seperate test
|
||||
to allow people to (right/wrongfully) link against Bind directly.
|
||||
|
||||
- Consider splitting configure.ac into seperate files which do logically
|
||||
similar tests. E.g move all the type detection stuff into one file,
|
||||
entropy related stuff into another.
|
||||
|
||||
Packaging:
|
||||
- Solaris: Update packaging scripts and build new sysv startup scripts
|
||||
Ideally the package metadata should be generated by autoconf.
|
||||
(gilbert.r.loomis@saic.com)
|
||||
|
||||
- HP-UX: Provide DEPOT package scripts.
|
||||
(gilbert.r.loomis@saic.com)
|
||||
|
||||
$Id: TODO,v 1.46 2002/01/22 11:26:20 djm Exp $
|
96
crypto/openssh/WARNING.RNG
Normal file
96
crypto/openssh/WARNING.RNG
Normal file
@ -0,0 +1,96 @@
|
||||
This document contains a description of portable OpenSSH's random
|
||||
number collection code. An alternate reading of this text could
|
||||
well be titled "Why I should pressure my system vendor to supply
|
||||
/dev/random in their OS".
|
||||
|
||||
Why is this important? OpenSSH depends on good, unpredictable numbers
|
||||
for generating keys, performing digital signatures and forming
|
||||
cryptographic challenges. If the random numbers that it uses are
|
||||
predictable, then the strength of the whole system is compromised.
|
||||
|
||||
A particularly pernicious problem arises with DSA keys (used by the
|
||||
ssh2 protocol). Performing a DSA signature (which is required for
|
||||
authentication), entails the use of a 160 bit random number. If an
|
||||
attacker can predict this number, then they can deduce your *private*
|
||||
key and impersonate you or your hosts.
|
||||
|
||||
If you are using the builtin random number support (configure will
|
||||
tell you if this is the case), then read this document in its entirety.
|
||||
Alternately, you can use Lutz Jaenicke's PRNGd - a small daemon which
|
||||
collects random numbers and makes them available by a socket.
|
||||
|
||||
Please also request that your OS vendor provides a kernel-based random
|
||||
number collector (/dev/random) in future versions of your operating
|
||||
systems by default.
|
||||
|
||||
On to the description...
|
||||
|
||||
The portable OpenSSH contains random number collection support for
|
||||
systems which lack a kernel entropy pool (/dev/random).
|
||||
|
||||
This collector (as of 3.1 and beyond) comes as an external application
|
||||
that allows the local admin to decide on how to implement entropy
|
||||
collection.
|
||||
|
||||
The default entropy collector operates by executing the programs listed
|
||||
in ($etcdir)/ssh_prng_cmds, reading their output and adding it to the
|
||||
PRNG supplied by OpenSSL (which is hash-based). It also stirs in the
|
||||
output of several system calls and timings from the execution of the
|
||||
programs that it runs.
|
||||
|
||||
The ssh_prng_cmds file also specifies a 'rate' for each program. This
|
||||
represents the number of bits of randomness per byte of output from
|
||||
the specified program.
|
||||
|
||||
The random number code will also read and save a seed file to
|
||||
~/.ssh/prng_seed. This contents of this file are added to the random
|
||||
number generator at startup. The goal here is to maintain as much
|
||||
randomness between sessions as possible.
|
||||
|
||||
The default entropy collection code has two main problems:
|
||||
|
||||
1. It is slow.
|
||||
|
||||
Executing each program in the list can take a large amount of time,
|
||||
especially on slower machines. Additionally some program can take a
|
||||
disproportionate time to execute.
|
||||
|
||||
Tuning the default entropy collection code is difficult at this point.
|
||||
It requires doing 'times ./ssh-rand-helper' and modifying the
|
||||
($etcdir)/ssh_prng_cmds until you have found the issue. In the next
|
||||
release we will be looking at support '-v' for verbose output to allow
|
||||
easier debugging.
|
||||
|
||||
The default entropy collector will timeout programs which take too long
|
||||
to execute, the actual timeout used can be adjusted with the
|
||||
--with-entropy-timeout configure option. OpenSSH will not try to
|
||||
re-execute programs which have not been found, have had a non-zero
|
||||
exit status or have timed out more than a couple of times.
|
||||
|
||||
2. Estimating the real 'rate' of program outputs is non-trivial
|
||||
|
||||
The shear volume of the task is problematic: there are currently
|
||||
around 50 commands in the ssh_prng_cmds list, portable OpenSSH
|
||||
supports at least 12 different OSs. That is already 600 sets of data
|
||||
to be analysed, without taking into account the numerous differences
|
||||
between versions of each OS.
|
||||
|
||||
On top of this, the different commands can produce varying amounts of
|
||||
usable data depending on how busy the machine is, how long it has been
|
||||
up and various other factors.
|
||||
|
||||
To make matters even more complex, some of the commands are reporting
|
||||
largely the same data as other commands (eg. the various "ps" calls).
|
||||
|
||||
|
||||
How to avoid the default entropy code?
|
||||
|
||||
The best way is to read the OpenSSL documentation and recompile OpenSSL
|
||||
to use prngd or egd. Some platforms (like earily solaris) have 3rd
|
||||
party /dev/random devices that can be also used for this task.
|
||||
|
||||
If you are forced to use ssh-rand-helper consider still downloading
|
||||
prngd/egd and configure OpenSSH using --with-prngd-port=xx or
|
||||
--with-prngd-socket=xx (refer to INSTALL for more information).
|
||||
|
||||
$Id: WARNING.RNG,v 1.5 2002/04/14 13:16:05 djm Exp $
|
365
crypto/openssh/acconfig.h
Normal file
365
crypto/openssh/acconfig.h
Normal file
@ -0,0 +1,365 @@
|
||||
/* $Id: acconfig.h,v 1.138 2002/06/12 16:57:15 mouring Exp $ */
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
/* Generated automatically from acconfig.h by autoheader. */
|
||||
/* Please make your changes there */
|
||||
|
||||
@TOP@
|
||||
|
||||
/* Define to a Set Process Title type if your system is */
|
||||
/* supported by bsd-setproctitle.c */
|
||||
#undef SPT_TYPE
|
||||
|
||||
/* setgroups() NOOP allowed */
|
||||
#undef SETGROUPS_NOOP
|
||||
|
||||
/* SCO workaround */
|
||||
#undef BROKEN_SYS_TERMIO_H
|
||||
|
||||
/* Define if you have SecureWare-based protected password database */
|
||||
#undef HAVE_SECUREWARE
|
||||
|
||||
/* If your header files don't define LOGIN_PROGRAM, then use this (detected) */
|
||||
/* from environment and PATH */
|
||||
#undef LOGIN_PROGRAM_FALLBACK
|
||||
|
||||
/* Define if your password has a pw_class field */
|
||||
#undef HAVE_PW_CLASS_IN_PASSWD
|
||||
|
||||
/* Define if your password has a pw_expire field */
|
||||
#undef HAVE_PW_EXPIRE_IN_PASSWD
|
||||
|
||||
/* Define if your password has a pw_change field */
|
||||
#undef HAVE_PW_CHANGE_IN_PASSWD
|
||||
|
||||
/* Define if your system uses access rights style file descriptor passing */
|
||||
#undef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
|
||||
/* Define if your system uses ancillary data style file descriptor passing */
|
||||
#undef HAVE_CONTROL_IN_MSGHDR
|
||||
|
||||
/* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */
|
||||
#undef BROKEN_INET_NTOA
|
||||
|
||||
/* Define if your system defines sys_errlist[] */
|
||||
#undef HAVE_SYS_ERRLIST
|
||||
|
||||
/* Define if your system defines sys_nerr */
|
||||
#undef HAVE_SYS_NERR
|
||||
|
||||
/* Define if your system choked on IP TOS setting */
|
||||
#undef IP_TOS_IS_BROKEN
|
||||
|
||||
/* Define if you have the getuserattr function. */
|
||||
#undef HAVE_GETUSERATTR
|
||||
|
||||
/* Work around problematic Linux PAM modules handling of PAM_TTY */
|
||||
#undef PAM_TTY_KLUDGE
|
||||
|
||||
/* Use PIPES instead of a socketpair() */
|
||||
#undef USE_PIPES
|
||||
|
||||
/* Define if your snprintf is busted */
|
||||
#undef BROKEN_SNPRINTF
|
||||
|
||||
/* Define if you are on Cygwin */
|
||||
#undef HAVE_CYGWIN
|
||||
|
||||
/* Define if you have a broken realpath. */
|
||||
#undef BROKEN_REALPATH
|
||||
|
||||
/* Define if you are on NeXT */
|
||||
#undef HAVE_NEXT
|
||||
|
||||
/* Define if you are on NEWS-OS */
|
||||
#undef HAVE_NEWS4
|
||||
|
||||
/* Define if you want to enable PAM support */
|
||||
#undef USE_PAM
|
||||
|
||||
/* Define if you want to enable AIX4's authenticate function */
|
||||
#undef WITH_AIXAUTHENTICATE
|
||||
|
||||
/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */
|
||||
#undef WITH_IRIX_ARRAY
|
||||
|
||||
/* Define if you want IRIX project management */
|
||||
#undef WITH_IRIX_PROJECT
|
||||
|
||||
/* Define if you want IRIX audit trails */
|
||||
#undef WITH_IRIX_AUDIT
|
||||
|
||||
/* Define if you want IRIX kernel jobs */
|
||||
#undef WITH_IRIX_JOBS
|
||||
|
||||
/* Location of PRNGD/EGD random number socket */
|
||||
#undef PRNGD_SOCKET
|
||||
|
||||
/* Port number of PRNGD/EGD random number socket */
|
||||
#undef PRNGD_PORT
|
||||
|
||||
/* Builtin PRNG command timeout */
|
||||
#undef ENTROPY_TIMEOUT_MSEC
|
||||
|
||||
/* non-privileged user for privilege separation */
|
||||
#undef SSH_PRIVSEP_USER
|
||||
|
||||
/* Define if you want to install preformatted manpages.*/
|
||||
#undef MANTYPE
|
||||
|
||||
/* Define if your ssl headers are included with #include <openssl/header.h> */
|
||||
#undef HAVE_OPENSSL
|
||||
|
||||
/* Define if you are linking against RSAref. Used only to print the right
|
||||
* message at run-time. */
|
||||
#undef RSAREF
|
||||
|
||||
/* struct timeval */
|
||||
#undef HAVE_STRUCT_TIMEVAL
|
||||
|
||||
/* struct utmp and struct utmpx fields */
|
||||
#undef HAVE_HOST_IN_UTMP
|
||||
#undef HAVE_HOST_IN_UTMPX
|
||||
#undef HAVE_ADDR_IN_UTMP
|
||||
#undef HAVE_ADDR_IN_UTMPX
|
||||
#undef HAVE_ADDR_V6_IN_UTMP
|
||||
#undef HAVE_ADDR_V6_IN_UTMPX
|
||||
#undef HAVE_SYSLEN_IN_UTMPX
|
||||
#undef HAVE_PID_IN_UTMP
|
||||
#undef HAVE_TYPE_IN_UTMP
|
||||
#undef HAVE_TYPE_IN_UTMPX
|
||||
#undef HAVE_TV_IN_UTMP
|
||||
#undef HAVE_TV_IN_UTMPX
|
||||
#undef HAVE_ID_IN_UTMP
|
||||
#undef HAVE_ID_IN_UTMPX
|
||||
#undef HAVE_EXIT_IN_UTMP
|
||||
#undef HAVE_TIME_IN_UTMP
|
||||
#undef HAVE_TIME_IN_UTMPX
|
||||
|
||||
/* Define if you don't want to use your system's login() call */
|
||||
#undef DISABLE_LOGIN
|
||||
|
||||
/* Define if you don't want to use pututline() etc. to write [uw]tmp */
|
||||
#undef DISABLE_PUTUTLINE
|
||||
|
||||
/* Define if you don't want to use pututxline() etc. to write [uw]tmpx */
|
||||
#undef DISABLE_PUTUTXLINE
|
||||
|
||||
/* Define if you don't want to use lastlog */
|
||||
#undef DISABLE_LASTLOG
|
||||
|
||||
/* Define if you don't want to use utmp */
|
||||
#undef DISABLE_UTMP
|
||||
|
||||
/* Define if you don't want to use utmpx */
|
||||
#undef DISABLE_UTMPX
|
||||
|
||||
/* Define if you don't want to use wtmp */
|
||||
#undef DISABLE_WTMP
|
||||
|
||||
/* 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 your login program cannot handle end of options ("--") */
|
||||
#undef LOGIN_NO_ENDOPT
|
||||
|
||||
/* Define if you want to specify the path to your lastlog file */
|
||||
#undef CONF_LASTLOG_FILE
|
||||
|
||||
/* Define if you want to specify the path to your utmp file */
|
||||
#undef CONF_UTMP_FILE
|
||||
|
||||
/* Define if you want to specify the path to your wtmp file */
|
||||
#undef CONF_WTMP_FILE
|
||||
|
||||
/* Define if you want to specify the path to your utmpx file */
|
||||
#undef CONF_UTMPX_FILE
|
||||
|
||||
/* Define if you want to specify the path to your wtmpx file */
|
||||
#undef CONF_WTMPX_FILE
|
||||
|
||||
/* Define if you want external askpass support */
|
||||
#undef USE_EXTERNAL_ASKPASS
|
||||
|
||||
/* Define if libc defines __progname */
|
||||
#undef HAVE___PROGNAME
|
||||
|
||||
/* Define if compiler implements __FUNCTION__ */
|
||||
#undef HAVE___FUNCTION__
|
||||
|
||||
/* Define if compiler implements __func__ */
|
||||
#undef HAVE___func__
|
||||
|
||||
/* Define if you want Kerberos 5 support */
|
||||
#undef KRB5
|
||||
|
||||
/* Define this if you are using the Heimdal version of Kerberos V5 */
|
||||
#undef HEIMDAL
|
||||
|
||||
/* Define if you want Kerberos 4 support */
|
||||
#undef KRB4
|
||||
|
||||
/* Define if you want AFS support */
|
||||
#undef AFS
|
||||
|
||||
/* Define if you want S/Key support */
|
||||
#undef SKEY
|
||||
|
||||
/* Define if you want TCP Wrappers support */
|
||||
#undef LIBWRAP
|
||||
|
||||
/* Define if your libraries define login() */
|
||||
#undef HAVE_LOGIN
|
||||
|
||||
/* Define if your libraries define daemon() */
|
||||
#undef HAVE_DAEMON
|
||||
|
||||
/* Define if your libraries define getpagesize() */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if xauth is found in your path */
|
||||
#undef XAUTH_PATH
|
||||
|
||||
/* Define if rsh is found in your path */
|
||||
#undef RSH_PATH
|
||||
|
||||
/* Define if you want to allow MD5 passwords */
|
||||
#undef HAVE_MD5_PASSWORDS
|
||||
|
||||
/* Define if you want to disable shadow passwords */
|
||||
#undef DISABLE_SHADOW
|
||||
|
||||
/* Define if you want to use shadow password expire field */
|
||||
#undef HAS_SHADOW_EXPIRE
|
||||
|
||||
/* Define if you have Digital Unix Security Integration Architecture */
|
||||
#undef HAVE_OSF_SIA
|
||||
|
||||
/* Define if you have getpwanam(3) [SunOS 4.x] */
|
||||
#undef HAVE_GETPWANAM
|
||||
|
||||
/* Define if you have an old version of PAM which takes only one argument */
|
||||
/* to pam_strerror */
|
||||
#undef HAVE_OLD_PAM
|
||||
|
||||
/* Define if you are using Solaris-derived PAM which passes pam_messages */
|
||||
/* to the conversation function with an extra level of indirection */
|
||||
#undef PAM_SUN_CODEBASE
|
||||
|
||||
/* Set this to your mail directory if you don't have maillock.h */
|
||||
#undef MAIL_DIRECTORY
|
||||
|
||||
/* Data types */
|
||||
#undef HAVE_U_INT
|
||||
#undef HAVE_INTXX_T
|
||||
#undef HAVE_U_INTXX_T
|
||||
#undef HAVE_UINTXX_T
|
||||
#undef HAVE_INT64_T
|
||||
#undef HAVE_U_INT64_T
|
||||
#undef HAVE_U_CHAR
|
||||
#undef HAVE_SIZE_T
|
||||
#undef HAVE_SSIZE_T
|
||||
#undef HAVE_CLOCK_T
|
||||
#undef HAVE_MODE_T
|
||||
#undef HAVE_PID_T
|
||||
#undef HAVE_SA_FAMILY_T
|
||||
#undef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||
#undef HAVE_STRUCT_ADDRINFO
|
||||
#undef HAVE_STRUCT_IN6_ADDR
|
||||
#undef HAVE_STRUCT_SOCKADDR_IN6
|
||||
|
||||
/* Fields in struct sockaddr_storage */
|
||||
#undef HAVE_SS_FAMILY_IN_SS
|
||||
#undef HAVE___SS_FAMILY_IN_SS
|
||||
|
||||
/* Define if you have /dev/ptmx */
|
||||
#undef HAVE_DEV_PTMX
|
||||
|
||||
/* Define if you have /dev/ptc */
|
||||
#undef HAVE_DEV_PTS_AND_PTC
|
||||
|
||||
/* Define if you need to use IP address instead of hostname in $DISPLAY */
|
||||
#undef IPADDR_IN_DISPLAY
|
||||
|
||||
/* Specify default $PATH */
|
||||
#undef USER_PATH
|
||||
|
||||
/* Specify location of ssh.pid */
|
||||
#undef _PATH_SSH_PIDDIR
|
||||
|
||||
/* Use IPv4 for connection by default, IPv6 can still if explicity asked */
|
||||
#undef IPV4_DEFAULT
|
||||
|
||||
/* getaddrinfo is broken (if present) */
|
||||
#undef BROKEN_GETADDRINFO
|
||||
|
||||
/* Workaround more Linux IPv6 quirks */
|
||||
#undef DONT_TRY_OTHER_AF
|
||||
|
||||
/* Detect IPv4 in IPv6 mapped addresses and treat as IPv4 */
|
||||
#undef IPV4_IN_IPV6
|
||||
|
||||
/* Define if you have BSD auth support */
|
||||
#undef BSD_AUTH
|
||||
|
||||
/* Define if X11 doesn't support AF_UNIX sockets on that system */
|
||||
#undef NO_X11_UNIX_SOCKETS
|
||||
|
||||
/* Needed for SCO and NeXT */
|
||||
#undef BROKEN_SAVED_UIDS
|
||||
|
||||
/* Define if your system glob() function has the GLOB_ALTDIRFUNC extension */
|
||||
#undef GLOB_HAS_ALTDIRFUNC
|
||||
|
||||
/* Define if your system glob() function has gl_matchc options in glob_t */
|
||||
#undef GLOB_HAS_GL_MATCHC
|
||||
|
||||
/* Define in your struct dirent expects you to allocate extra space for d_name */
|
||||
#undef BROKEN_ONE_BYTE_DIRENT_D_NAME
|
||||
|
||||
/* Define if your getopt(3) defines and uses optreset */
|
||||
#undef HAVE_GETOPT_OPTRESET
|
||||
|
||||
/* Define on *nto-qnx systems */
|
||||
#undef MISSING_NFDBITS
|
||||
|
||||
/* Define on *nto-qnx systems */
|
||||
#undef MISSING_HOWMANY
|
||||
|
||||
/* Define on *nto-qnx systems */
|
||||
#undef MISSING_FD_MASK
|
||||
|
||||
/* Define if you want smartcard support */
|
||||
#undef SMARTCARD
|
||||
|
||||
/* Define if you want smartcard support using sectok */
|
||||
#undef USE_SECTOK
|
||||
|
||||
/* Define if you want smartcard support using OpenSC */
|
||||
#undef USE_OPENSC
|
||||
|
||||
/* Define if you want to use OpenSSL's internally seeded PRNG only */
|
||||
#undef OPENSSL_PRNG_ONLY
|
||||
|
||||
/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */
|
||||
#undef WITH_ABBREV_NO_TTY
|
||||
|
||||
/* Define if you want a different $PATH for the superuser */
|
||||
#undef SUPERUSER_PATH
|
||||
|
||||
/* Path that unprivileged child will chroot() to in privep mode */
|
||||
#undef PRIVSEP_PATH
|
||||
|
||||
@BOTTOM@
|
||||
|
||||
/* ******************* Shouldn't need to edit below this line ************** */
|
||||
|
||||
#endif /* _CONFIG_H */
|
86
crypto/openssh/aclocal.m4
vendored
Normal file
86
crypto/openssh/aclocal.m4
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
dnl $Id: aclocal.m4,v 1.5 2001/10/22 00:53:59 tim Exp $
|
||||
dnl
|
||||
dnl OpenSSH-specific autoconf macros
|
||||
dnl
|
||||
|
||||
|
||||
dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
|
||||
dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
|
||||
dnl If found, set 'symbol' to be defined. Cache the result.
|
||||
dnl TODO: This is not foolproof, better to compile and read from there
|
||||
AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
|
||||
# look for field '$1' in header '$2'
|
||||
dnl This strips characters illegal to m4 from the header filename
|
||||
ossh_safe=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||
dnl
|
||||
ossh_varname="ossh_cv_$ossh_safe""_has_"$1
|
||||
AC_MSG_CHECKING(for $1 field in $2)
|
||||
AC_CACHE_VAL($ossh_varname, [
|
||||
AC_EGREP_HEADER($1, $2, [ dnl
|
||||
eval "$ossh_varname=yes" dnl
|
||||
], [ dnl
|
||||
eval "$ossh_varname=no" dnl
|
||||
]) dnl
|
||||
])
|
||||
ossh_result=`eval 'echo $'"$ossh_varname"`
|
||||
if test -n "`echo $ossh_varname`"; then
|
||||
AC_MSG_RESULT($ossh_result)
|
||||
if test "x$ossh_result" = "xyes"; then
|
||||
AC_DEFINE($3)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl OSSH_PATH_ENTROPY_PROG(variablename, command):
|
||||
dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST
|
||||
AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [
|
||||
AC_PATH_PROG($1, $2)
|
||||
if test -z "[$]$1" ; then
|
||||
$1="undef"
|
||||
fi
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
dnl Check for socklen_t: historically on BSD it is an int, and in
|
||||
dnl POSIX 1g it is a type of its own, but some platforms use different
|
||||
dnl types for the argument to getsockopt, getpeername, etc. So we
|
||||
dnl have to test to find something that will work.
|
||||
AC_DEFUN([TYPE_SOCKLEN_T],
|
||||
[
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
AC_MSG_CHECKING([for socklen_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_socklen_t_equiv],
|
||||
[
|
||||
# Systems have either "struct sockaddr *" or
|
||||
# "void *" as the second argument to getpeername
|
||||
curl_cv_socklen_t_equiv=
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
int getpeername (int, $arg2 *, $t *);
|
||||
],[
|
||||
$t len;
|
||||
getpeername(0,0,&len);
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
done
|
||||
|
||||
if test "x$curl_cv_socklen_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_socklen_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
|
||||
[type to use in place of socklen_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
])
|
||||
|
@ -45,7 +45,11 @@ atomicio(f, fd, _s, n)
|
||||
res = (f) (fd, s + pos, n - pos);
|
||||
switch (res) {
|
||||
case -1:
|
||||
#ifdef EWOULDBLOCK
|
||||
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
#else
|
||||
if (errno == EINTR || errno == EAGAIN)
|
||||
#endif
|
||||
continue;
|
||||
case 0:
|
||||
return (res);
|
||||
|
@ -41,6 +41,9 @@ RCSID("$OpenBSD: auth-krb5.c,v 1.8 2002/03/19 10:49:35 markus Exp $");
|
||||
|
||||
#ifdef KRB5
|
||||
#include <krb5.h>
|
||||
#ifndef HEIMDAL
|
||||
#define krb5_get_err_text(context,code) error_message(code)
|
||||
#endif /* !HEIMDAL */
|
||||
|
||||
extern ServerOptions options;
|
||||
|
||||
@ -93,8 +96,15 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
|
||||
goto err;
|
||||
|
||||
fd = packet_get_connection_in();
|
||||
#ifdef HEIMDAL
|
||||
problem = krb5_auth_con_setaddrs_from_fd(authctxt->krb5_ctx,
|
||||
authctxt->krb5_auth_ctx, &fd);
|
||||
#else
|
||||
problem = krb5_auth_con_genaddrs(authctxt->krb5_ctx,
|
||||
authctxt->krb5_auth_ctx,fd,
|
||||
KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
|
||||
KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
|
||||
#endif
|
||||
if (problem)
|
||||
goto err;
|
||||
|
||||
@ -108,8 +118,14 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
|
||||
if (problem)
|
||||
goto err;
|
||||
|
||||
#ifdef HEIMDAL
|
||||
problem = krb5_copy_principal(authctxt->krb5_ctx, ticket->client,
|
||||
&authctxt->krb5_user);
|
||||
#else
|
||||
problem = krb5_copy_principal(authctxt->krb5_ctx,
|
||||
ticket->enc_part2->client,
|
||||
&authctxt->krb5_user);
|
||||
#endif
|
||||
if (problem)
|
||||
goto err;
|
||||
|
||||
@ -160,13 +176,37 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
|
||||
krb5_error_code problem;
|
||||
krb5_ccache ccache = NULL;
|
||||
char *pname;
|
||||
krb5_creds **creds;
|
||||
|
||||
if (authctxt->pw == NULL || authctxt->krb5_user == NULL)
|
||||
return (0);
|
||||
|
||||
temporarily_use_uid(authctxt->pw);
|
||||
|
||||
#ifdef HEIMDAL
|
||||
problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &ccache);
|
||||
#else
|
||||
{
|
||||
char ccname[40];
|
||||
int tmpfd;
|
||||
|
||||
snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
|
||||
|
||||
if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
|
||||
log("mkstemp(): %.100s", strerror(errno));
|
||||
problem = errno;
|
||||
goto fail;
|
||||
}
|
||||
if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
|
||||
log("fchmod(): %.100s", strerror(errno));
|
||||
close(tmpfd);
|
||||
problem = errno;
|
||||
goto fail;
|
||||
}
|
||||
close(tmpfd);
|
||||
problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &ccache);
|
||||
}
|
||||
#endif
|
||||
if (problem)
|
||||
goto fail;
|
||||
|
||||
@ -175,10 +215,20 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
|
||||
if (problem)
|
||||
goto fail;
|
||||
|
||||
#ifdef HEIMDAL
|
||||
problem = krb5_rd_cred2(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
|
||||
ccache, tgt);
|
||||
if (problem)
|
||||
goto fail;
|
||||
#else
|
||||
problem = krb5_rd_cred(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
|
||||
tgt, &creds, NULL);
|
||||
if (problem)
|
||||
goto fail;
|
||||
problem = krb5_cc_store_cred(authctxt->krb5_ctx, ccache, *creds);
|
||||
if (problem)
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
authctxt->krb5_fwd_ccache = ccache;
|
||||
ccache = NULL;
|
||||
@ -211,6 +261,12 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
|
||||
int
|
||||
auth_krb5_password(Authctxt *authctxt, const char *password)
|
||||
{
|
||||
#ifndef HEIMDAL
|
||||
krb5_creds creds;
|
||||
krb5_principal server;
|
||||
char ccname[40];
|
||||
int tmpfd;
|
||||
#endif
|
||||
krb5_error_code problem;
|
||||
|
||||
if (authctxt->pw == NULL)
|
||||
@ -227,6 +283,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
#ifdef HEIMDAL
|
||||
problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops,
|
||||
&authctxt->krb5_fwd_ccache);
|
||||
if (problem)
|
||||
@ -245,13 +302,69 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
#else
|
||||
problem = krb5_get_init_creds_password(authctxt->krb5_ctx, &creds,
|
||||
authctxt->krb5_user, (char *)password, NULL, NULL, 0, NULL, NULL);
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
problem = krb5_sname_to_principal(authctxt->krb5_ctx, NULL, NULL,
|
||||
KRB5_NT_SRV_HST, &server);
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
restore_uid();
|
||||
problem = krb5_verify_init_creds(authctxt->krb5_ctx, &creds, server,
|
||||
NULL, NULL, NULL);
|
||||
krb5_free_principal(authctxt->krb5_ctx, server);
|
||||
temporarily_use_uid(authctxt->pw);
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user,
|
||||
authctxt->pw->pw_name)) {
|
||||
problem = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
|
||||
|
||||
if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
|
||||
log("mkstemp(): %.100s", strerror(errno));
|
||||
problem = errno;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
|
||||
log("fchmod(): %.100s", strerror(errno));
|
||||
close(tmpfd);
|
||||
problem = errno;
|
||||
goto out;
|
||||
}
|
||||
close(tmpfd);
|
||||
|
||||
problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &authctxt->krb5_fwd_ccache);
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
problem = krb5_cc_initialize(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache,
|
||||
authctxt->krb5_user);
|
||||
if (problem)
|
||||
goto out;
|
||||
|
||||
problem= krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache,
|
||||
&creds);
|
||||
if (problem)
|
||||
goto out;
|
||||
#endif
|
||||
|
||||
authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
|
||||
|
||||
out:
|
||||
restore_uid();
|
||||
|
||||
if (problem) {
|
||||
if (authctxt->krb5_ctx != NULL)
|
||||
if (authctxt->krb5_ctx != NULL && problem!=-1)
|
||||
debug("Kerberos password authentication failed: %s",
|
||||
krb5_get_err_text(authctxt->krb5_ctx, problem));
|
||||
else
|
||||
|
434
crypto/openssh/auth-pam.c
Normal file
434
crypto/openssh/auth-pam.c
Normal file
@ -0,0 +1,434 @@
|
||||
/*
|
||||
* Copyright (c) 2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifdef USE_PAM
|
||||
#include "ssh.h"
|
||||
#include "xmalloc.h"
|
||||
#include "log.h"
|
||||
#include "auth.h"
|
||||
#include "auth-pam.h"
|
||||
#include "servconf.h"
|
||||
#include "canohost.h"
|
||||
#include "readpass.h"
|
||||
|
||||
extern char *__progname;
|
||||
|
||||
RCSID("$Id: auth-pam.c,v 1.46 2002/05/08 02:27:56 djm Exp $");
|
||||
|
||||
#define NEW_AUTHTOK_MSG \
|
||||
"Warning: Your password has expired, please change it now"
|
||||
|
||||
static int do_pam_conversation(int num_msg, const struct pam_message **msg,
|
||||
struct pam_response **resp, void *appdata_ptr);
|
||||
|
||||
/* module-local variables */
|
||||
static struct pam_conv conv = {
|
||||
do_pam_conversation,
|
||||
NULL
|
||||
};
|
||||
static char *__pam_msg = NULL;
|
||||
static pam_handle_t *__pamh = NULL;
|
||||
static const char *__pampasswd = NULL;
|
||||
|
||||
/* states for do_pam_conversation() */
|
||||
enum { INITIAL_LOGIN, OTHER } pamstate = INITIAL_LOGIN;
|
||||
/* remember whether pam_acct_mgmt() returned PAM_NEWAUTHTOK_REQD */
|
||||
static int password_change_required = 0;
|
||||
/* remember whether the last pam_authenticate() succeeded or not */
|
||||
static int was_authenticated = 0;
|
||||
|
||||
/* Remember what has been initialised */
|
||||
static int session_opened = 0;
|
||||
static int creds_set = 0;
|
||||
|
||||
/* accessor which allows us to switch conversation structs according to
|
||||
* the authentication method being used */
|
||||
void do_pam_set_conv(struct pam_conv *conv)
|
||||
{
|
||||
pam_set_item(__pamh, PAM_CONV, conv);
|
||||
}
|
||||
|
||||
/* start an authentication run */
|
||||
int do_pam_authenticate(int flags)
|
||||
{
|
||||
int retval = pam_authenticate(__pamh, flags);
|
||||
was_authenticated = (retval == PAM_SUCCESS);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* PAM conversation function.
|
||||
* There are two states this can run in.
|
||||
*
|
||||
* INITIAL_LOGIN mode simply feeds the password from the client into
|
||||
* PAM in response to PAM_PROMPT_ECHO_OFF, and collects output
|
||||
* messages with into __pam_msg. This is used during initial
|
||||
* authentication to bypass the normal PAM password prompt.
|
||||
*
|
||||
* OTHER mode handles PAM_PROMPT_ECHO_OFF with read_passphrase()
|
||||
* and outputs messages to stderr. This mode is used if pam_chauthtok()
|
||||
* is called to update expired passwords.
|
||||
*/
|
||||
static int do_pam_conversation(int num_msg, const struct pam_message **msg,
|
||||
struct pam_response **resp, void *appdata_ptr)
|
||||
{
|
||||
struct pam_response *reply;
|
||||
int count;
|
||||
char buf[1024];
|
||||
|
||||
/* PAM will free this later */
|
||||
reply = malloc(num_msg * sizeof(*reply));
|
||||
if (reply == NULL)
|
||||
return PAM_CONV_ERR;
|
||||
|
||||
for (count = 0; count < num_msg; count++) {
|
||||
if (pamstate == INITIAL_LOGIN) {
|
||||
/*
|
||||
* We can't use stdio yet, queue messages for
|
||||
* printing later
|
||||
*/
|
||||
switch(PAM_MSG_MEMBER(msg, count, msg_style)) {
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
free(reply);
|
||||
return PAM_CONV_ERR;
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
if (__pampasswd == NULL) {
|
||||
free(reply);
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
reply[count].resp = xstrdup(__pampasswd);
|
||||
reply[count].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
case PAM_TEXT_INFO:
|
||||
if ((*msg)[count].msg != NULL) {
|
||||
message_cat(&__pam_msg,
|
||||
PAM_MSG_MEMBER(msg, count, msg));
|
||||
}
|
||||
reply[count].resp = xstrdup("");
|
||||
reply[count].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
free(reply);
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* stdio is connected, so interact directly
|
||||
*/
|
||||
switch(PAM_MSG_MEMBER(msg, count, msg_style)) {
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
fputs(PAM_MSG_MEMBER(msg, count, msg), stderr);
|
||||
fgets(buf, sizeof(buf), stdin);
|
||||
reply[count].resp = xstrdup(buf);
|
||||
reply[count].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
reply[count].resp =
|
||||
read_passphrase(PAM_MSG_MEMBER(msg, count,
|
||||
msg), RP_ALLOW_STDIN);
|
||||
reply[count].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
case PAM_TEXT_INFO:
|
||||
if ((*msg)[count].msg != NULL)
|
||||
fprintf(stderr, "%s\n",
|
||||
PAM_MSG_MEMBER(msg, count, msg));
|
||||
reply[count].resp = xstrdup("");
|
||||
reply[count].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
free(reply);
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*resp = reply;
|
||||
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
/* Called at exit to cleanly shutdown PAM */
|
||||
void do_pam_cleanup_proc(void *context)
|
||||
{
|
||||
int pam_retval = PAM_SUCCESS;
|
||||
|
||||
if (__pamh && session_opened) {
|
||||
pam_retval = pam_close_session(__pamh, 0);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
log("Cannot close PAM session[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
|
||||
if (__pamh && creds_set) {
|
||||
pam_retval = pam_setcred(__pamh, PAM_DELETE_CRED);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
debug("Cannot delete credentials[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
|
||||
if (__pamh) {
|
||||
pam_retval = pam_end(__pamh, pam_retval);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
log("Cannot release PAM authentication[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
}
|
||||
|
||||
/* Attempt password authentation using PAM */
|
||||
int auth_pam_password(Authctxt *authctxt, const char *password)
|
||||
{
|
||||
extern ServerOptions options;
|
||||
int pam_retval;
|
||||
struct passwd *pw = authctxt->pw;
|
||||
|
||||
do_pam_set_conv(&conv);
|
||||
|
||||
/* deny if no user. */
|
||||
if (pw == NULL)
|
||||
return 0;
|
||||
if (pw->pw_uid == 0 && options.permit_root_login == PERMIT_NO_PASSWD)
|
||||
return 0;
|
||||
if (*password == '\0' && options.permit_empty_passwd == 0)
|
||||
return 0;
|
||||
|
||||
__pampasswd = password;
|
||||
|
||||
pamstate = INITIAL_LOGIN;
|
||||
pam_retval = do_pam_authenticate(
|
||||
options.permit_empty_passwd == 0 ? PAM_DISALLOW_NULL_AUTHTOK : 0);
|
||||
if (pam_retval == PAM_SUCCESS) {
|
||||
debug("PAM Password authentication accepted for "
|
||||
"user \"%.100s\"", pw->pw_name);
|
||||
return 1;
|
||||
} else {
|
||||
debug("PAM Password authentication for \"%.100s\" "
|
||||
"failed[%d]: %s", pw->pw_name, pam_retval,
|
||||
PAM_STRERROR(__pamh, pam_retval));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Do account management using PAM */
|
||||
int do_pam_account(char *username, char *remote_user)
|
||||
{
|
||||
int pam_retval;
|
||||
|
||||
do_pam_set_conv(&conv);
|
||||
|
||||
if (remote_user) {
|
||||
debug("PAM setting ruser to \"%.200s\"", remote_user);
|
||||
pam_retval = pam_set_item(__pamh, PAM_RUSER, remote_user);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM set ruser failed[%d]: %.200s", pam_retval,
|
||||
PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
|
||||
pam_retval = pam_acct_mgmt(__pamh, 0);
|
||||
debug2("pam_acct_mgmt() = %d", pam_retval);
|
||||
switch (pam_retval) {
|
||||
case PAM_SUCCESS:
|
||||
/* This is what we want */
|
||||
break;
|
||||
#if 0
|
||||
case PAM_NEW_AUTHTOK_REQD:
|
||||
message_cat(&__pam_msg, NEW_AUTHTOK_MSG);
|
||||
/* flag that password change is necessary */
|
||||
password_change_required = 1;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
log("PAM rejected by account configuration[%d]: "
|
||||
"%.200s", pam_retval, PAM_STRERROR(__pamh,
|
||||
pam_retval));
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
/* Do PAM-specific session initialisation */
|
||||
void do_pam_session(char *username, const char *ttyname)
|
||||
{
|
||||
int pam_retval;
|
||||
|
||||
do_pam_set_conv(&conv);
|
||||
|
||||
if (ttyname != NULL) {
|
||||
debug("PAM setting tty to \"%.200s\"", ttyname);
|
||||
pam_retval = pam_set_item(__pamh, PAM_TTY, ttyname);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM set tty failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
|
||||
pam_retval = pam_open_session(__pamh, 0);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM session setup failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
|
||||
session_opened = 1;
|
||||
}
|
||||
|
||||
/* Set PAM credentials */
|
||||
void do_pam_setcred(int init)
|
||||
{
|
||||
int pam_retval;
|
||||
|
||||
if (__pamh == NULL)
|
||||
return;
|
||||
|
||||
do_pam_set_conv(&conv);
|
||||
|
||||
debug("PAM establishing creds");
|
||||
pam_retval = pam_setcred(__pamh,
|
||||
init ? PAM_ESTABLISH_CRED : PAM_REINITIALIZE_CRED);
|
||||
if (pam_retval != PAM_SUCCESS) {
|
||||
if (was_authenticated)
|
||||
fatal("PAM setcred failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
else
|
||||
debug("PAM setcred failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
} else
|
||||
creds_set = 1;
|
||||
}
|
||||
|
||||
/* accessor function for file scope static variable */
|
||||
int is_pam_password_change_required(void)
|
||||
{
|
||||
return password_change_required;
|
||||
}
|
||||
|
||||
/*
|
||||
* Have user change authentication token if pam_acct_mgmt() indicated
|
||||
* it was expired. This needs to be called after an interactive
|
||||
* session is established and the user's pty is connected to
|
||||
* stdin/stout/stderr.
|
||||
*/
|
||||
void do_pam_chauthtok(void)
|
||||
{
|
||||
int pam_retval;
|
||||
|
||||
do_pam_set_conv(&conv);
|
||||
|
||||
if (password_change_required) {
|
||||
pamstate = OTHER;
|
||||
pam_retval = pam_chauthtok(__pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM pam_chauthtok failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanly shutdown PAM */
|
||||
void finish_pam(void)
|
||||
{
|
||||
do_pam_cleanup_proc(NULL);
|
||||
fatal_remove_cleanup(&do_pam_cleanup_proc, NULL);
|
||||
}
|
||||
|
||||
/* Start PAM authentication for specified account */
|
||||
void start_pam(const char *user)
|
||||
{
|
||||
int pam_retval;
|
||||
extern ServerOptions options;
|
||||
extern u_int utmp_len;
|
||||
const char *rhost;
|
||||
|
||||
debug("Starting up PAM with username \"%.200s\"", user);
|
||||
|
||||
pam_retval = pam_start(SSHD_PAM_SERVICE, user, &conv, &__pamh);
|
||||
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM initialisation failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
|
||||
rhost = get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping);
|
||||
debug("PAM setting rhost to \"%.200s\"", rhost);
|
||||
|
||||
pam_retval = pam_set_item(__pamh, PAM_RHOST, rhost);
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM set rhost failed[%d]: %.200s", pam_retval,
|
||||
PAM_STRERROR(__pamh, pam_retval));
|
||||
#ifdef PAM_TTY_KLUDGE
|
||||
/*
|
||||
* Some PAM modules (e.g. pam_time) require a TTY to operate,
|
||||
* and will fail in various stupid ways if they don't get one.
|
||||
* sshd doesn't set the tty until too late in the auth process and may
|
||||
* not even need one (for tty-less connections)
|
||||
* Kludge: Set a fake PAM_TTY
|
||||
*/
|
||||
pam_retval = pam_set_item(__pamh, PAM_TTY, "NODEVssh");
|
||||
if (pam_retval != PAM_SUCCESS)
|
||||
fatal("PAM set tty failed[%d]: %.200s",
|
||||
pam_retval, PAM_STRERROR(__pamh, pam_retval));
|
||||
#endif /* PAM_TTY_KLUDGE */
|
||||
|
||||
fatal_add_cleanup(&do_pam_cleanup_proc, NULL);
|
||||
}
|
||||
|
||||
/* Return list of PAM enviornment strings */
|
||||
char **fetch_pam_environment(void)
|
||||
{
|
||||
#ifdef HAVE_PAM_GETENVLIST
|
||||
return(pam_getenvlist(__pamh));
|
||||
#else /* HAVE_PAM_GETENVLIST */
|
||||
return(NULL);
|
||||
#endif /* HAVE_PAM_GETENVLIST */
|
||||
}
|
||||
|
||||
/* Print any messages that have been generated during authentication */
|
||||
/* or account checking to stderr */
|
||||
void print_pam_messages(void)
|
||||
{
|
||||
if (__pam_msg != NULL)
|
||||
fputs(__pam_msg, stderr);
|
||||
}
|
||||
|
||||
/* Append a message to buffer */
|
||||
void message_cat(char **p, const char *a)
|
||||
{
|
||||
char *cp;
|
||||
size_t new_len;
|
||||
|
||||
new_len = strlen(a);
|
||||
|
||||
if (*p) {
|
||||
size_t len = strlen(*p);
|
||||
|
||||
*p = xrealloc(*p, new_len + len + 2);
|
||||
cp = *p + len;
|
||||
} else
|
||||
*p = cp = xmalloc(new_len + 2);
|
||||
|
||||
memcpy(cp, a, new_len);
|
||||
cp[new_len] = '\n';
|
||||
cp[new_len + 1] = '\0';
|
||||
}
|
||||
|
||||
#endif /* USE_PAM */
|
22
crypto/openssh/auth-pam.h
Normal file
22
crypto/openssh/auth-pam.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* $Id: auth-pam.h,v 1.12 2002/04/04 19:02:28 stevesk Exp $ */
|
||||
|
||||
#include "includes.h"
|
||||
#ifdef USE_PAM
|
||||
|
||||
#include <pwd.h> /* For struct passwd */
|
||||
|
||||
void start_pam(const char *user);
|
||||
void finish_pam(void);
|
||||
int auth_pam_password(Authctxt *authctxt, const char *password);
|
||||
char **fetch_pam_environment(void);
|
||||
int do_pam_authenticate(int flags);
|
||||
int do_pam_account(char *username, char *remote_user);
|
||||
void do_pam_session(char *username, const char *ttyname);
|
||||
void do_pam_setcred(int init);
|
||||
void print_pam_messages(void);
|
||||
int is_pam_password_change_required(void);
|
||||
void do_pam_chauthtok(void);
|
||||
void do_pam_set_conv(struct pam_conv *);
|
||||
void message_cat(char **p, const char *a);
|
||||
|
||||
#endif /* USE_PAM */
|
@ -43,6 +43,42 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $");
|
||||
#include "servconf.h"
|
||||
#include "auth.h"
|
||||
|
||||
#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
|
||||
/* Don't need any of these headers for the PAM or SIA cases */
|
||||
# ifdef HAVE_CRYPT_H
|
||||
# include <crypt.h>
|
||||
# endif
|
||||
# ifdef WITH_AIXAUTHENTICATE
|
||||
# include <login.h>
|
||||
# endif
|
||||
# ifdef __hpux
|
||||
# include <hpsecurity.h>
|
||||
# include <prot.h>
|
||||
# endif
|
||||
# ifdef HAVE_SECUREWARE
|
||||
# include <sys/security.h>
|
||||
# include <sys/audit.h>
|
||||
# include <prot.h>
|
||||
# endif /* HAVE_SECUREWARE */
|
||||
# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
||||
# include <shadow.h>
|
||||
# endif
|
||||
# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
|
||||
# include <sys/label.h>
|
||||
# include <sys/audit.h>
|
||||
# include <pwdadj.h>
|
||||
# endif
|
||||
# if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
|
||||
# include "md5crypt.h"
|
||||
# endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
|
||||
|
||||
# ifdef HAVE_CYGWIN
|
||||
# undef ERROR
|
||||
# include <windows.h>
|
||||
# include <sys/cygwin.h>
|
||||
# define is_winnt (GetVersion() < 0x80000000)
|
||||
# endif
|
||||
#endif /* !USE_PAM && !HAVE_OSF_SIA */
|
||||
|
||||
extern ServerOptions options;
|
||||
|
||||
@ -53,13 +89,41 @@ extern ServerOptions options;
|
||||
int
|
||||
auth_password(Authctxt *authctxt, const char *password)
|
||||
{
|
||||
#if defined(USE_PAM)
|
||||
if (*password == '\0' && options.permit_empty_passwd == 0)
|
||||
return 0;
|
||||
return auth_pam_password(authctxt, password);
|
||||
#elif defined(HAVE_OSF_SIA)
|
||||
if (*password == '\0' && options.permit_empty_passwd == 0)
|
||||
return 0;
|
||||
return auth_sia_password(authctxt, password);
|
||||
#else
|
||||
struct passwd * pw = authctxt->pw;
|
||||
char *encrypted_password;
|
||||
char *pw_password;
|
||||
char *salt;
|
||||
#if defined(__hpux) || defined(HAVE_SECUREWARE)
|
||||
struct pr_passwd *spw;
|
||||
#endif /* __hpux || HAVE_SECUREWARE */
|
||||
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
||||
struct spwd *spw;
|
||||
#endif
|
||||
#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
|
||||
struct passwd_adjunct *spw;
|
||||
#endif
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
char *authmsg;
|
||||
char *loginmsg;
|
||||
int reenter = 1;
|
||||
#endif
|
||||
|
||||
/* deny if no user. */
|
||||
if (pw == NULL)
|
||||
return 0;
|
||||
if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
|
||||
#ifndef HAVE_CYGWIN
|
||||
if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
|
||||
return 0;
|
||||
#endif
|
||||
if (*password == '\0' && options.permit_empty_passwd == 0)
|
||||
return 0;
|
||||
#ifdef KRB5
|
||||
@ -70,6 +134,19 @@ auth_password(Authctxt *authctxt, const char *password)
|
||||
/* Fall back to ordinary passwd authentication. */
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (is_winnt) {
|
||||
HANDLE hToken = cygwin_logon_user(pw, password);
|
||||
|
||||
if (hToken == INVALID_HANDLE_VALUE)
|
||||
return 0;
|
||||
cygwin_set_impersonation_token(hToken);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
|
||||
#endif
|
||||
#ifdef KRB4
|
||||
if (options.kerberos_authentication == 1) {
|
||||
int ret = auth_krb4_password(authctxt, password);
|
||||
@ -84,20 +161,63 @@ auth_password(Authctxt *authctxt, const char *password)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
#else
|
||||
/* Check for users with no password. */
|
||||
if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0)
|
||||
return 1;
|
||||
else {
|
||||
/* Encrypt the candidate password using the proper salt. */
|
||||
char *encrypted_password = crypt(password,
|
||||
(pw->pw_passwd[0] && pw->pw_passwd[1]) ?
|
||||
pw->pw_passwd : "xx");
|
||||
/*
|
||||
* Authentication is accepted if the encrypted passwords
|
||||
* are identical.
|
||||
*/
|
||||
return (strcmp(encrypted_password, pw->pw_passwd) == 0);
|
||||
}
|
||||
#endif
|
||||
pw_password = pw->pw_passwd;
|
||||
|
||||
/*
|
||||
* Various interfaces to shadow or protected password data
|
||||
*/
|
||||
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
||||
spw = getspnam(pw->pw_name);
|
||||
if (spw != NULL)
|
||||
pw_password = spw->sp_pwdp;
|
||||
#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
|
||||
|
||||
#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
|
||||
if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
|
||||
pw_password = spw->pwa_passwd;
|
||||
#endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
|
||||
|
||||
#ifdef HAVE_SECUREWARE
|
||||
if ((spw = getprpwnam(pw->pw_name)) != NULL)
|
||||
pw_password = spw->ufld.fd_encrypt;
|
||||
#endif /* HAVE_SECUREWARE */
|
||||
|
||||
#if defined(__hpux) && !defined(HAVE_SECUREWARE)
|
||||
if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
|
||||
pw_password = spw->ufld.fd_encrypt;
|
||||
#endif /* defined(__hpux) && !defined(HAVE_SECUREWARE) */
|
||||
|
||||
/* Check for users with no password. */
|
||||
if ((password[0] == '\0') && (pw_password[0] == '\0'))
|
||||
return 1;
|
||||
|
||||
if (pw_password[0] != '\0')
|
||||
salt = pw_password;
|
||||
else
|
||||
salt = "xx";
|
||||
|
||||
#ifdef HAVE_MD5_PASSWORDS
|
||||
if (is_md5_salt(salt))
|
||||
encrypted_password = md5_crypt(password, salt);
|
||||
else
|
||||
encrypted_password = crypt(password, salt);
|
||||
#else /* HAVE_MD5_PASSWORDS */
|
||||
# if defined(__hpux) && !defined(HAVE_SECUREWARE)
|
||||
if (iscomsec())
|
||||
encrypted_password = bigcrypt(password, salt);
|
||||
else
|
||||
encrypted_password = crypt(password, salt);
|
||||
# else
|
||||
# ifdef HAVE_SECUREWARE
|
||||
encrypted_password = bigcrypt(password, salt);
|
||||
# else
|
||||
encrypted_password = crypt(password, salt);
|
||||
# endif /* HAVE_SECUREWARE */
|
||||
# endif /* __hpux && !defined(HAVE_SECUREWARE) */
|
||||
#endif /* HAVE_MD5_PASSWORDS */
|
||||
|
||||
/* Authentication is accepted if the encrypted passwords are identical. */
|
||||
return (strcmp(encrypted_password, pw_password) == 0);
|
||||
#endif /* !USE_PAM && !HAVE_OSF_SIA */
|
||||
}
|
||||
|
124
crypto/openssh/auth-sia.c
Normal file
124
crypto/openssh/auth-sia.c
Normal file
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) 2002 Chris Adams. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifdef HAVE_OSF_SIA
|
||||
#include "ssh.h"
|
||||
#include "auth.h"
|
||||
#include "auth-sia.h"
|
||||
#include "log.h"
|
||||
#include "servconf.h"
|
||||
#include "canohost.h"
|
||||
|
||||
#include <sia.h>
|
||||
#include <siad.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
extern ServerOptions options;
|
||||
extern int saved_argc;
|
||||
extern char **saved_argv;
|
||||
|
||||
extern int errno;
|
||||
|
||||
int
|
||||
auth_sia_password(Authctxt *authctxt, char *pass)
|
||||
{
|
||||
int ret;
|
||||
SIAENTITY *ent = NULL;
|
||||
const char *host;
|
||||
char *user = authctxt->user;
|
||||
|
||||
host = get_canonical_hostname(options.verify_reverse_mapping);
|
||||
|
||||
if (!user || !pass || pass[0] == '\0')
|
||||
return(0);
|
||||
|
||||
if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, NULL, 0,
|
||||
NULL) != SIASUCCESS)
|
||||
return(0);
|
||||
|
||||
if ((ret = sia_ses_authent(NULL, pass, ent)) != SIASUCCESS) {
|
||||
error("Couldn't authenticate %s from %s", user, host);
|
||||
if (ret & SIASTOP)
|
||||
sia_ses_release(&ent);
|
||||
return(0);
|
||||
}
|
||||
|
||||
sia_ses_release(&ent);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
void
|
||||
session_setup_sia(char *user, char *tty)
|
||||
{
|
||||
struct passwd *pw;
|
||||
SIAENTITY *ent = NULL;
|
||||
const char *host;
|
||||
|
||||
host = get_canonical_hostname (options.verify_reverse_mapping);
|
||||
|
||||
if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0,
|
||||
NULL) != SIASUCCESS) {
|
||||
fatal("sia_ses_init failed");
|
||||
}
|
||||
|
||||
if ((pw = getpwnam(user)) == NULL) {
|
||||
sia_ses_release(&ent);
|
||||
fatal("getpwnam: no user: %s", user);
|
||||
}
|
||||
if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
|
||||
sia_ses_release(&ent);
|
||||
fatal("sia_make_entity_pwd failed");
|
||||
}
|
||||
|
||||
ent->authtype = SIA_A_NONE;
|
||||
if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) {
|
||||
fatal("Couldn't establish session for %s from %s", user,
|
||||
host);
|
||||
}
|
||||
|
||||
if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
|
||||
sia_ses_release(&ent);
|
||||
fatal("setpriority: %s", strerror (errno));
|
||||
}
|
||||
|
||||
if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) {
|
||||
fatal("Couldn't launch session for %s from %s", user, host);
|
||||
}
|
||||
|
||||
sia_ses_release(&ent);
|
||||
|
||||
if (setreuid(geteuid(), geteuid()) < 0) {
|
||||
fatal("setreuid: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_OSF_SIA */
|
32
crypto/openssh/auth-sia.h
Normal file
32
crypto/openssh/auth-sia.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2002 Chris Adams. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifdef HAVE_OSF_SIA
|
||||
|
||||
int auth_sia_password(Authctxt *authctxt, char *pass);
|
||||
void session_setup_sia(char *user, char *tty);
|
||||
|
||||
#endif /* HAVE_OSF_SIA */
|
@ -25,7 +25,16 @@
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: auth.c,v 1.43 2002/05/17 14:27:55 millert Exp $");
|
||||
|
||||
#ifdef HAVE_LOGIN_H
|
||||
#include <login.h>
|
||||
#endif
|
||||
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
||||
#include <shadow.h>
|
||||
#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
|
||||
|
||||
#ifdef HAVE_LIBGEN_H
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "match.h"
|
||||
@ -66,11 +75,53 @@ allowed_user(struct passwd * pw)
|
||||
const char *hostname = NULL, *ipaddr = NULL;
|
||||
char *shell;
|
||||
int i;
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
char *loginmsg;
|
||||
#endif /* WITH_AIXAUTHENTICATE */
|
||||
#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
|
||||
!defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
|
||||
struct spwd *spw;
|
||||
|
||||
/* Shouldn't be called if pw is NULL, but better safe than sorry... */
|
||||
if (!pw || !pw->pw_name)
|
||||
return 0;
|
||||
|
||||
#define DAY (24L * 60 * 60) /* 1 day in seconds */
|
||||
spw = getspnam(pw->pw_name);
|
||||
if (spw != NULL) {
|
||||
time_t today = time(NULL) / DAY;
|
||||
debug3("allowed_user: today %d sp_expire %d sp_lstchg %d"
|
||||
" sp_max %d", (int)today, (int)spw->sp_expire,
|
||||
(int)spw->sp_lstchg, (int)spw->sp_max);
|
||||
|
||||
/*
|
||||
* We assume account and password expiration occurs the
|
||||
* day after the day specified.
|
||||
*/
|
||||
if (spw->sp_expire != -1 && today > spw->sp_expire) {
|
||||
log("Account %.100s has expired", pw->pw_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (spw->sp_lstchg == 0) {
|
||||
log("User %.100s password has expired (root forced)",
|
||||
pw->pw_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (spw->sp_max != -1 &&
|
||||
today > spw->sp_lstchg + spw->sp_max) {
|
||||
log("User %.100s password has expired (password aged)",
|
||||
pw->pw_name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Shouldn't be called if pw is NULL, but better safe than sorry... */
|
||||
if (!pw || !pw->pw_name)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get the shell from the password data. An empty shell field is
|
||||
* legal, and means /bin/sh.
|
||||
@ -149,6 +200,24 @@ allowed_user(struct passwd * pw)
|
||||
}
|
||||
ga_free();
|
||||
}
|
||||
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
|
||||
if (loginmsg && *loginmsg) {
|
||||
/* Remove embedded newlines (if any) */
|
||||
char *p;
|
||||
for (p = loginmsg; *p; p++) {
|
||||
if (*p == '\n')
|
||||
*p = ' ';
|
||||
}
|
||||
/* Remove trailing newline */
|
||||
*--p = '\0';
|
||||
log("Login restricted for %s: %.100s", pw->pw_name, loginmsg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* WITH_AIXAUTHENTICATE */
|
||||
|
||||
/* We found no reason not to let this user try to log on... */
|
||||
return 1;
|
||||
}
|
||||
|
@ -132,6 +132,9 @@ int auth_krb5_password(Authctxt *authctxt, const char *password);
|
||||
void krb5_cleanup_proc(void *authctxt);
|
||||
#endif /* KRB5 */
|
||||
|
||||
#include "auth-pam.h"
|
||||
#include "auth2-pam.h"
|
||||
|
||||
Authctxt *do_authentication(void);
|
||||
Authctxt *do_authentication2(void);
|
||||
|
||||
|
@ -94,6 +94,8 @@ do_authloop(Authctxt *authctxt)
|
||||
packet_send();
|
||||
packet_write_wait();
|
||||
|
||||
client_user = NULL;
|
||||
|
||||
for (;;) {
|
||||
/* default to fail */
|
||||
authenticated = 0;
|
||||
@ -127,7 +129,6 @@ do_authloop(Authctxt *authctxt)
|
||||
snprintf(info, sizeof(info),
|
||||
" tktuser %.100s",
|
||||
client_user);
|
||||
xfree(client_user);
|
||||
}
|
||||
#endif /* KRB4 */
|
||||
} else {
|
||||
@ -141,7 +142,6 @@ do_authloop(Authctxt *authctxt)
|
||||
snprintf(info, sizeof(info),
|
||||
" tktuser %.100s",
|
||||
client_user);
|
||||
xfree(client_user);
|
||||
}
|
||||
#endif /* KRB5 */
|
||||
}
|
||||
@ -180,7 +180,6 @@ do_authloop(Authctxt *authctxt)
|
||||
authenticated = auth_rhosts(pw, client_user);
|
||||
|
||||
snprintf(info, sizeof info, " ruser %.100s", client_user);
|
||||
xfree(client_user);
|
||||
break;
|
||||
|
||||
case SSH_CMSG_AUTH_RHOSTS_RSA:
|
||||
@ -212,7 +211,6 @@ do_authloop(Authctxt *authctxt)
|
||||
key_free(client_host_key);
|
||||
|
||||
snprintf(info, sizeof info, " ruser %.100s", client_user);
|
||||
xfree(client_user);
|
||||
break;
|
||||
|
||||
case SSH_CMSG_AUTH_RSA:
|
||||
@ -294,19 +292,45 @@ do_authloop(Authctxt *authctxt)
|
||||
fatal("INTERNAL ERROR: authenticated invalid user %s",
|
||||
authctxt->user);
|
||||
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (authenticated &&
|
||||
!check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, pw)) {
|
||||
packet_disconnect("Authentication rejected for uid %d.",
|
||||
pw == NULL ? -1 : pw->pw_uid);
|
||||
authenticated = 0;
|
||||
}
|
||||
#else
|
||||
/* Special handling for root */
|
||||
if (authenticated && authctxt->pw->pw_uid == 0 &&
|
||||
!auth_root_allowed(get_authname(type)))
|
||||
authenticated = 0;
|
||||
#endif
|
||||
#ifdef USE_PAM
|
||||
if (!use_privsep && authenticated &&
|
||||
!do_pam_account(pw->pw_name, client_user))
|
||||
authenticated = 0;
|
||||
#endif
|
||||
|
||||
/* Log before sending the reply */
|
||||
auth_log(authctxt, authenticated, get_authname(type), info);
|
||||
|
||||
if (client_user != NULL) {
|
||||
xfree(client_user);
|
||||
client_user = NULL;
|
||||
}
|
||||
|
||||
if (authenticated)
|
||||
return;
|
||||
|
||||
if (authctxt->failures++ > AUTH_FAIL_MAX)
|
||||
if (authctxt->failures++ > AUTH_FAIL_MAX) {
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
/* XXX: privsep */
|
||||
loginfailed(authctxt->user,
|
||||
get_canonical_hostname(options.verify_reverse_mapping),
|
||||
"ssh");
|
||||
#endif /* WITH_AIXAUTHENTICATE */
|
||||
packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
|
||||
}
|
||||
|
||||
packet_start(SSH_SMSG_FAILURE);
|
||||
packet_send();
|
||||
@ -358,13 +382,19 @@ do_authentication(void)
|
||||
setproctitle("%s%s", authctxt->pw ? user : "unknown",
|
||||
use_privsep ? " [net]" : "");
|
||||
|
||||
#ifdef USE_PAM
|
||||
PRIVSEP(start_pam(authctxt->pw == NULL ? "NOUSER" : user));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we are not running as root, the user must have the same uid as
|
||||
* the server.
|
||||
* the server. (Unless you are running Windows)
|
||||
*/
|
||||
#ifndef HAVE_CYGWIN
|
||||
if (!use_privsep && getuid() != 0 && authctxt->pw &&
|
||||
authctxt->pw->pw_uid != getuid())
|
||||
packet_disconnect("Cannot change user when server not running as root.");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Loop until the user has been authenticated or the connection is
|
||||
|
@ -49,8 +49,16 @@ userauth_kbdint(Authctxt *authctxt)
|
||||
if (options.challenge_response_authentication)
|
||||
authenticated = auth2_challenge(authctxt, devs);
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (authenticated == 0 && options.pam_authentication_via_kbd_int)
|
||||
authenticated = auth2_pam(authctxt);
|
||||
#endif
|
||||
xfree(devs);
|
||||
xfree(lang);
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (check_nt_auth(0, authctxt->pw) == 0)
|
||||
return(0);
|
||||
#endif
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,10 @@ userauth_none(Authctxt *authctxt)
|
||||
none_enabled = 0;
|
||||
packet_check_eom();
|
||||
userauth_banner();
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (check_nt_auth(1, authctxt->pw) == 0)
|
||||
return(0);
|
||||
#endif
|
||||
return (authctxt->valid ? PRIVSEP(auth_password(authctxt, "")) : 0);
|
||||
}
|
||||
|
||||
|
@ -1,334 +1,158 @@
|
||||
/*-
|
||||
* Copyright (c) 2002 Networks Associates Technology, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed for the FreeBSD Project by ThinkSec AS and
|
||||
* NAI Labs, the Security Research Division of Network Associates, Inc.
|
||||
* under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
|
||||
* DARPA CHATS research program.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#include "includes.h"
|
||||
RCSID("$Id: auth2-pam.c,v 1.12 2002/01/22 12:43:13 djm Exp $");
|
||||
|
||||
#ifdef USE_PAM
|
||||
#include "includes.h"
|
||||
RCSID("$FreeBSD$");
|
||||
|
||||
#include <security/pam_appl.h>
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh2.h"
|
||||
#include "auth.h"
|
||||
#include "auth-pam.h"
|
||||
#include "packet.h"
|
||||
#include "xmalloc.h"
|
||||
#include "dispatch.h"
|
||||
#include "log.h"
|
||||
|
||||
struct pam_ctxt {
|
||||
char *pam_user;
|
||||
pid_t pam_pid;
|
||||
int pam_sock;
|
||||
int pam_done;
|
||||
static int do_pam_conversation_kbd_int(int num_msg,
|
||||
const struct pam_message **msg, struct pam_response **resp,
|
||||
void *appdata_ptr);
|
||||
void input_userauth_info_response_pam(int type, u_int32_t seqnr, void *ctxt);
|
||||
|
||||
struct {
|
||||
int finished, num_received, num_expected;
|
||||
int *prompts;
|
||||
struct pam_response *responses;
|
||||
} context_pam2 = {0, 0, 0, NULL};
|
||||
|
||||
static struct pam_conv conv2 = {
|
||||
do_pam_conversation_kbd_int,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static void pam_free_ctx(void *);
|
||||
|
||||
/*
|
||||
* Send message to parent or child.
|
||||
*/
|
||||
static int
|
||||
pam_send(struct pam_ctxt *ctxt, char *fmt, ...)
|
||||
int
|
||||
auth2_pam(Authctxt *authctxt)
|
||||
{
|
||||
va_list ap;
|
||||
char *mstr;
|
||||
size_t len;
|
||||
int r;
|
||||
int retval = -1;
|
||||
|
||||
va_start(ap, fmt);
|
||||
len = vasprintf(&mstr, fmt, ap);
|
||||
va_end(ap);
|
||||
if (mstr == NULL)
|
||||
exit(1);
|
||||
if (ctxt->pam_pid != 0)
|
||||
debug2("to child: %s", mstr);
|
||||
r = send(ctxt->pam_sock, mstr, len + 1, MSG_EOR);
|
||||
free(mstr);
|
||||
return (r);
|
||||
if (authctxt->user == NULL)
|
||||
fatal("auth2_pam: internal error: no user");
|
||||
|
||||
conv2.appdata_ptr = authctxt;
|
||||
do_pam_set_conv(&conv2);
|
||||
|
||||
dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE,
|
||||
&input_userauth_info_response_pam);
|
||||
retval = (do_pam_authenticate(0) == PAM_SUCCESS);
|
||||
dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Peek at first byte of next message.
|
||||
*/
|
||||
static int
|
||||
pam_peek(struct pam_ctxt *ctxt)
|
||||
do_pam_conversation_kbd_int(int num_msg, const struct pam_message **msg,
|
||||
struct pam_response **resp, void *appdata_ptr)
|
||||
{
|
||||
char ch;
|
||||
int i, j, done;
|
||||
char *text;
|
||||
|
||||
if (recv(ctxt->pam_sock, &ch, 1, MSG_PEEK) < 1)
|
||||
return (-1);
|
||||
return (ch);
|
||||
}
|
||||
context_pam2.finished = 0;
|
||||
context_pam2.num_received = 0;
|
||||
context_pam2.num_expected = 0;
|
||||
context_pam2.prompts = xmalloc(sizeof(int) * num_msg);
|
||||
context_pam2.responses = xmalloc(sizeof(struct pam_response) * num_msg);
|
||||
memset(context_pam2.responses, 0, sizeof(struct pam_response) * num_msg);
|
||||
|
||||
/*
|
||||
* Receive a message from parent or child.
|
||||
*/
|
||||
static char *
|
||||
pam_receive(struct pam_ctxt *ctxt)
|
||||
{
|
||||
char *buf;
|
||||
size_t len;
|
||||
ssize_t rlen;
|
||||
|
||||
len = 64;
|
||||
buf = NULL;
|
||||
do {
|
||||
len *= 2;
|
||||
buf = xrealloc(buf, len);
|
||||
rlen = recv(ctxt->pam_sock, buf, len, MSG_PEEK);
|
||||
if (rlen < 1) {
|
||||
xfree(buf);
|
||||
return (NULL);
|
||||
}
|
||||
} while (rlen == len);
|
||||
if (recv(ctxt->pam_sock, buf, len, 0) != rlen) {
|
||||
xfree(buf);
|
||||
return (NULL);
|
||||
}
|
||||
if (ctxt->pam_pid != 0)
|
||||
debug2("from child: %s", buf);
|
||||
return (buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Conversation function for child process.
|
||||
*/
|
||||
static int
|
||||
pam_child_conv(int n,
|
||||
const struct pam_message **msg,
|
||||
struct pam_response **resp,
|
||||
void *data)
|
||||
{
|
||||
struct pam_ctxt *ctxt;
|
||||
char *line;
|
||||
size_t len;
|
||||
int i;
|
||||
|
||||
ctxt = data;
|
||||
if (n <= 0 || n > PAM_MAX_NUM_MSG)
|
||||
return (PAM_CONV_ERR);
|
||||
if ((*resp = calloc(n, sizeof **resp)) == NULL)
|
||||
return (PAM_BUF_ERR);
|
||||
for (i = 0; i < n; ++i) {
|
||||
resp[i]->resp_retcode = 0;
|
||||
resp[i]->resp = NULL;
|
||||
switch (msg[i]->msg_style) {
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
pam_send(ctxt, "p%s", msg[i]->msg);
|
||||
resp[i]->resp = pam_receive(ctxt);
|
||||
break;
|
||||
text = NULL;
|
||||
for (i = 0, context_pam2.num_expected = 0; i < num_msg; i++) {
|
||||
int style = PAM_MSG_MEMBER(msg, i, msg_style);
|
||||
switch (style) {
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
pam_send(ctxt, "P%s", msg[i]->msg);
|
||||
resp[i]->resp = pam_receive(ctxt);
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
/*pam_send(ctxt, "e%s", msg[i]->msg);*/
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
context_pam2.num_expected++;
|
||||
break;
|
||||
case PAM_TEXT_INFO:
|
||||
/*pam_send(ctxt, "i%s", msg[i]->msg);*/
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
default:
|
||||
goto fail;
|
||||
/* Capture all these messages to be sent at once */
|
||||
message_cat(&text, PAM_MSG_MEMBER(msg, i, msg));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (PAM_SUCCESS);
|
||||
fail:
|
||||
while (i)
|
||||
free(resp[--i]);
|
||||
free(*resp);
|
||||
*resp = NULL;
|
||||
return (PAM_CONV_ERR);
|
||||
|
||||
if (context_pam2.num_expected == 0)
|
||||
return PAM_SUCCESS;
|
||||
|
||||
packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST);
|
||||
packet_put_cstring(""); /* Name */
|
||||
packet_put_cstring(""); /* Instructions */
|
||||
packet_put_cstring(""); /* Language */
|
||||
packet_put_int(context_pam2.num_expected);
|
||||
|
||||
for (i = 0, j = 0; i < num_msg; i++) {
|
||||
int style = PAM_MSG_MEMBER(msg, i, msg_style);
|
||||
|
||||
/* Skip messages which don't need a reply */
|
||||
if (style != PAM_PROMPT_ECHO_ON && style != PAM_PROMPT_ECHO_OFF)
|
||||
continue;
|
||||
|
||||
context_pam2.prompts[j++] = i;
|
||||
if (text) {
|
||||
message_cat(&text, PAM_MSG_MEMBER(msg, i, msg));
|
||||
packet_put_cstring(text);
|
||||
text = NULL;
|
||||
} else
|
||||
packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg));
|
||||
packet_put_char(style == PAM_PROMPT_ECHO_ON);
|
||||
}
|
||||
packet_send();
|
||||
packet_write_wait();
|
||||
|
||||
/*
|
||||
* Grabbing control of execution and spinning until we get what
|
||||
* we want is probably rude, but it seems to work properly, and
|
||||
* the client *should* be in lock-step with us, so the loop should
|
||||
* only be traversed once.
|
||||
*/
|
||||
while(context_pam2.finished == 0) {
|
||||
done = 1;
|
||||
dispatch_run(DISPATCH_BLOCK, &done, appdata_ptr);
|
||||
if(context_pam2.finished == 0)
|
||||
debug("extra packet during conversation");
|
||||
}
|
||||
|
||||
if(context_pam2.num_received == context_pam2.num_expected) {
|
||||
*resp = context_pam2.responses;
|
||||
return PAM_SUCCESS;
|
||||
} else
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Child process.
|
||||
*/
|
||||
static void *
|
||||
pam_child(struct pam_ctxt *ctxt)
|
||||
void
|
||||
input_userauth_info_response_pam(int type, u_int32_t seqnr, void *ctxt)
|
||||
{
|
||||
struct pam_conv pam_conv = { pam_child_conv, ctxt };
|
||||
pam_handle_t *pamh;
|
||||
char *msg;
|
||||
int pam_err;
|
||||
Authctxt *authctxt = ctxt;
|
||||
unsigned int nresp = 0, rlen = 0, i = 0;
|
||||
char *resp;
|
||||
|
||||
pam_err = pam_start("sshd", ctxt->pam_user, &pam_conv, &pamh);
|
||||
if (pam_err != PAM_SUCCESS)
|
||||
goto auth_fail;
|
||||
pam_err = pam_authenticate(pamh, 0);
|
||||
if (pam_err != PAM_SUCCESS)
|
||||
goto auth_fail;
|
||||
pam_send(ctxt, "=OK");
|
||||
pam_end(pamh, pam_err);
|
||||
exit(0);
|
||||
auth_fail:
|
||||
pam_send(ctxt, "!%s", pam_strerror(pamh, pam_err));
|
||||
pam_end(pamh, pam_err);
|
||||
exit(0);
|
||||
if (authctxt == NULL)
|
||||
fatal("input_userauth_info_response_pam: no authentication context");
|
||||
|
||||
nresp = packet_get_int(); /* Number of responses. */
|
||||
debug("got %d responses", nresp);
|
||||
|
||||
for (i = 0; i < nresp; i++) {
|
||||
int j = context_pam2.prompts[i];
|
||||
|
||||
resp = packet_get_string(&rlen);
|
||||
context_pam2.responses[j].resp_retcode = PAM_SUCCESS;
|
||||
context_pam2.responses[j].resp = xstrdup(resp);
|
||||
xfree(resp);
|
||||
context_pam2.num_received++;
|
||||
}
|
||||
|
||||
context_pam2.finished = 1;
|
||||
|
||||
packet_check_eom();
|
||||
}
|
||||
|
||||
static void *
|
||||
pam_init_ctx(Authctxt *authctxt)
|
||||
{
|
||||
struct pam_ctxt *ctxt;
|
||||
int socks[2];
|
||||
int i;
|
||||
|
||||
ctxt = xmalloc(sizeof *ctxt);
|
||||
ctxt->pam_user = xstrdup(authctxt->user);
|
||||
ctxt->pam_done = 0;
|
||||
if (socketpair(AF_UNIX, SOCK_DGRAM, PF_UNSPEC, socks) == -1) {
|
||||
error("%s: failed create sockets: %s",
|
||||
__func__, strerror(errno));
|
||||
xfree(ctxt);
|
||||
return (NULL);
|
||||
}
|
||||
if ((ctxt->pam_pid = fork()) == -1) {
|
||||
error("%s: failed to fork auth-pam child: %s",
|
||||
__func__, strerror(errno));
|
||||
close(socks[0]);
|
||||
close(socks[1]);
|
||||
xfree(ctxt);
|
||||
return (NULL);
|
||||
}
|
||||
if (ctxt->pam_pid == 0) {
|
||||
/* close everything except our end of the pipe */
|
||||
ctxt->pam_sock = socks[1];
|
||||
for (i = 0; i < getdtablesize(); ++i)
|
||||
if (i != ctxt->pam_sock)
|
||||
close(i);
|
||||
pam_child(ctxt);
|
||||
/* not reached */
|
||||
exit(1);
|
||||
}
|
||||
ctxt->pam_sock = socks[0];
|
||||
close(socks[1]);
|
||||
return (ctxt);
|
||||
}
|
||||
|
||||
static int
|
||||
pam_query(void *ctx, char **name, char **info,
|
||||
u_int *num, char ***prompts, u_int **echo_on)
|
||||
{
|
||||
struct pam_ctxt *ctxt = ctx;
|
||||
char *msg;
|
||||
|
||||
if ((msg = pam_receive(ctxt)) == NULL)
|
||||
return (-1);
|
||||
*name = xstrdup("");
|
||||
*info = xstrdup("");
|
||||
*prompts = xmalloc(sizeof(char *));
|
||||
*echo_on = xmalloc(sizeof(u_int));
|
||||
switch (*msg) {
|
||||
case 'P':
|
||||
**echo_on = 1;
|
||||
case 'p':
|
||||
*num = 1;
|
||||
**prompts = xstrdup(msg + 1);
|
||||
**echo_on = (*msg == 'P');
|
||||
break;
|
||||
case '=':
|
||||
*num = 0;
|
||||
**echo_on = 0;
|
||||
ctxt->pam_done = 1;
|
||||
break;
|
||||
case '!':
|
||||
error("%s", msg + 1);
|
||||
default:
|
||||
*num = 0;
|
||||
**echo_on = 0;
|
||||
xfree(msg);
|
||||
ctxt->pam_done = -1;
|
||||
return (-1);
|
||||
}
|
||||
xfree(msg);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
pam_respond(void *ctx, u_int num, char **resp)
|
||||
{
|
||||
struct pam_ctxt *ctxt = ctx;
|
||||
char *msg;
|
||||
|
||||
debug2(__func__);
|
||||
switch (ctxt->pam_done) {
|
||||
case 1:
|
||||
return (0);
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
if (num != 1) {
|
||||
error("expected one response, got %u", num);
|
||||
return (-1);
|
||||
}
|
||||
pam_send(ctxt, "%s", *resp);
|
||||
switch (pam_peek(ctxt)) {
|
||||
case 'P':
|
||||
case 'p':
|
||||
return (1);
|
||||
case '=':
|
||||
msg = pam_receive(ctxt);
|
||||
xfree(msg);
|
||||
ctxt->pam_done = 1;
|
||||
return (0);
|
||||
default:
|
||||
msg = pam_receive(ctxt);
|
||||
if (*msg == '!')
|
||||
error("%s", msg + 1);
|
||||
xfree(msg);
|
||||
ctxt->pam_done = -1;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pam_free_ctx(void *ctxtp)
|
||||
{
|
||||
struct pam_ctxt *ctxt = ctxtp;
|
||||
int i;
|
||||
|
||||
close(ctxt->pam_sock);
|
||||
kill(ctxt->pam_pid, SIGHUP);
|
||||
xfree(ctxt->pam_user);
|
||||
xfree(ctxt);
|
||||
}
|
||||
|
||||
KbdintDevice pam_device = {
|
||||
"pam",
|
||||
pam_init_ctx,
|
||||
pam_query,
|
||||
pam_respond,
|
||||
pam_free_ctx
|
||||
};
|
||||
|
||||
#endif /* USE_PAM */
|
||||
#endif
|
||||
|
8
crypto/openssh/auth2-pam.h
Normal file
8
crypto/openssh/auth2-pam.h
Normal file
@ -0,0 +1,8 @@
|
||||
/* $Id: auth2-pam.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#include "includes.h"
|
||||
#ifdef USE_PAM
|
||||
|
||||
int auth2_pam(Authctxt *authctxt);
|
||||
|
||||
#endif /* USE_PAM */
|
@ -48,6 +48,9 @@ userauth_passwd(Authctxt *authctxt)
|
||||
password = packet_get_string(&len);
|
||||
packet_check_eom();
|
||||
if (authctxt->valid &&
|
||||
#ifdef HAVE_CYGWIN
|
||||
check_nt_auth(1, authctxt->pw) &&
|
||||
#endif
|
||||
PRIVSEP(auth_password(authctxt, password)) == 1)
|
||||
authenticated = 1;
|
||||
memset(password, 0, len);
|
||||
|
@ -156,6 +156,10 @@ userauth_pubkey(Authctxt *authctxt)
|
||||
key_free(key);
|
||||
xfree(pkalg);
|
||||
xfree(pkblob);
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (check_nt_auth(0, authctxt->pw) == 0)
|
||||
return(0);
|
||||
#endif
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,10 @@ do_authentication2(void)
|
||||
/* challenge-response is implemented via keyboard interactive */
|
||||
if (options.challenge_response_authentication)
|
||||
options.kbd_interactive_authentication = 1;
|
||||
if (options.pam_authentication_via_kbd_int)
|
||||
options.kbd_interactive_authentication = 1;
|
||||
if (use_privsep)
|
||||
options.pam_authentication_via_kbd_int = 0;
|
||||
|
||||
dispatch_init(&dispatch_protocol_error);
|
||||
dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
|
||||
@ -152,8 +156,14 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
|
||||
if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
|
||||
authctxt->valid = 1;
|
||||
debug2("input_userauth_request: setting up authctxt for %s", user);
|
||||
#ifdef USE_PAM
|
||||
PRIVSEP(start_pam(authctxt->pw->pw_name));
|
||||
#endif
|
||||
} else {
|
||||
log("input_userauth_request: illegal user %s", user);
|
||||
#ifdef USE_PAM
|
||||
PRIVSEP(start_pam("NOUSER"));
|
||||
#endif
|
||||
}
|
||||
setproctitle("%s%s", authctxt->pw ? user : "unknown",
|
||||
use_privsep ? " [net]" : "");
|
||||
@ -199,6 +209,12 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
|
||||
!auth_root_allowed(method))
|
||||
authenticated = 0;
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (!use_privsep && authenticated && authctxt->user &&
|
||||
!do_pam_account(authctxt->user, NULL))
|
||||
authenticated = 0;
|
||||
#endif /* USE_PAM */
|
||||
|
||||
/* Log before sending the reply */
|
||||
auth_log(authctxt, authenticated, method, " ssh2");
|
||||
|
||||
@ -215,8 +231,15 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
|
||||
/* now we can break out */
|
||||
authctxt->success = 1;
|
||||
} else {
|
||||
if (authctxt->failures++ > AUTH_FAIL_MAX)
|
||||
if (authctxt->failures++ > AUTH_FAIL_MAX) {
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
/* XXX: privsep */
|
||||
loginfailed(authctxt->user,
|
||||
get_canonical_hostname(options.verify_reverse_mapping),
|
||||
"ssh");
|
||||
#endif /* WITH_AIXAUTHENTICATE */
|
||||
packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
|
||||
}
|
||||
methods = authmethods_get();
|
||||
packet_start(SSH2_MSG_USERAUTH_FAILURE);
|
||||
packet_put_cstring(methods);
|
||||
|
@ -484,6 +484,9 @@ key_perm_ok(int fd, const char *filename)
|
||||
* permissions of the file. if the key owned by a different user,
|
||||
* then we don't care.
|
||||
*/
|
||||
#ifdef HAVE_CYGWIN
|
||||
if (check_ntsec(filename))
|
||||
#endif
|
||||
if ((st.st_uid == getuid()) && (st.st_mode & 077) != 0) {
|
||||
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
|
||||
error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @");
|
||||
|
@ -157,6 +157,7 @@ buffer_get_int(Buffer *buffer)
|
||||
return GET_32BIT(buf);
|
||||
}
|
||||
|
||||
#ifdef HAVE_U_INT64_T
|
||||
u_int64_t
|
||||
buffer_get_int64(Buffer *buffer)
|
||||
{
|
||||
@ -164,6 +165,7 @@ buffer_get_int64(Buffer *buffer)
|
||||
buffer_get(buffer, (char *) buf, 8);
|
||||
return GET_64BIT(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stores integers in the buffer, msb first.
|
||||
@ -184,6 +186,7 @@ buffer_put_int(Buffer *buffer, u_int value)
|
||||
buffer_append(buffer, buf, 4);
|
||||
}
|
||||
|
||||
#ifdef HAVE_U_INT64_T
|
||||
void
|
||||
buffer_put_int64(Buffer *buffer, u_int64_t value)
|
||||
{
|
||||
@ -191,6 +194,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value)
|
||||
PUT_64BIT(buf, value);
|
||||
buffer_append(buffer, buf, 8);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Returns an arbitrary binary string from the buffer. The string cannot
|
||||
|
@ -29,8 +29,10 @@ void buffer_put_short(Buffer *, u_short);
|
||||
u_int buffer_get_int(Buffer *);
|
||||
void buffer_put_int(Buffer *, u_int);
|
||||
|
||||
#ifdef HAVE_U_INT64_T
|
||||
u_int64_t buffer_get_int64(Buffer *);
|
||||
void buffer_put_int64(Buffer *, u_int64_t);
|
||||
#endif
|
||||
|
||||
int buffer_get_char(Buffer *);
|
||||
void buffer_put_char(Buffer *, int);
|
||||
|
@ -42,6 +42,28 @@ get_remote_hostname(int socket, int verify_reverse_mapping)
|
||||
debug("getpeername failed: %.100s", strerror(errno));
|
||||
fatal_cleanup();
|
||||
}
|
||||
#ifdef IPV4_IN_IPV6
|
||||
if (from.ss_family == AF_INET6) {
|
||||
struct sockaddr_in6 *from6 = (struct sockaddr_in6 *)&from;
|
||||
|
||||
/* Detect IPv4 in IPv6 mapped address and convert it to */
|
||||
/* plain (AF_INET) IPv4 address */
|
||||
if (IN6_IS_ADDR_V4MAPPED(&from6->sin6_addr)) {
|
||||
struct sockaddr_in *from4 = (struct sockaddr_in *)&from;
|
||||
struct in_addr addr;
|
||||
u_int16_t port;
|
||||
|
||||
memcpy(&addr, ((char *)&from6->sin6_addr) + 12, sizeof(addr));
|
||||
port = from6->sin6_port;
|
||||
|
||||
memset(&from, 0, sizeof(from));
|
||||
|
||||
from4->sin_family = AF_INET;
|
||||
memcpy(&from4->sin_addr, &addr, sizeof(addr));
|
||||
from4->sin_port = port;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop),
|
||||
NULL, 0, NI_NUMERICHOST) != 0)
|
||||
|
@ -2057,7 +2057,11 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
|
||||
/* Bind the socket to the address. */
|
||||
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
|
||||
/* address can be in use ipv6 address is already bound */
|
||||
verbose("bind: %.100s", strerror(errno));
|
||||
if (!ai->ai_next)
|
||||
error("bind: %.100s", strerror(errno));
|
||||
else
|
||||
verbose("bind: %.100s", strerror(errno));
|
||||
|
||||
close(sock);
|
||||
continue;
|
||||
}
|
||||
@ -2176,6 +2180,7 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
|
||||
hostname = packet_get_string(NULL);
|
||||
host_port = packet_get_int();
|
||||
|
||||
#ifndef HAVE_CYGWIN
|
||||
/*
|
||||
* Check that an unprivileged user is not trying to forward a
|
||||
* privileged port.
|
||||
@ -2183,6 +2188,7 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
|
||||
if (port < IPPORT_RESERVED && !is_root)
|
||||
packet_disconnect("Requested forwarding of port %d but user is not root.",
|
||||
port);
|
||||
#endif
|
||||
/* Initiate forwarding */
|
||||
channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports);
|
||||
|
||||
@ -2354,12 +2360,29 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
|
||||
continue;
|
||||
sock = socket(ai->ai_family, SOCK_STREAM, 0);
|
||||
if (sock < 0) {
|
||||
error("socket: %.100s", strerror(errno));
|
||||
return -1;
|
||||
if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) {
|
||||
error("socket: %.100s", strerror(errno));
|
||||
return -1;
|
||||
} else {
|
||||
debug("x11_create_display_inet: Socket family %d not supported",
|
||||
ai->ai_family);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#ifdef IPV6_V6ONLY
|
||||
if (ai->ai_family == AF_INET6) {
|
||||
int on = 1;
|
||||
if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
|
||||
error("setsockopt IPV6_V6ONLY: %.100s", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
|
||||
debug("bind port %d: %.100s", port, strerror(errno));
|
||||
close(sock);
|
||||
|
||||
if (ai->ai_next)
|
||||
continue;
|
||||
|
||||
for (n = 0; n < num_socks; n++) {
|
||||
close(socks[n]);
|
||||
}
|
||||
@ -2367,8 +2390,17 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
|
||||
break;
|
||||
}
|
||||
socks[num_socks++] = sock;
|
||||
#ifndef DONT_TRY_OTHER_AF
|
||||
if (num_socks == NUM_SOCKS)
|
||||
break;
|
||||
#else
|
||||
if (x11_use_localhost) {
|
||||
if (num_socks == NUM_SOCKS)
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
freeaddrinfo(aitop);
|
||||
if (num_socks > 0)
|
||||
|
@ -43,6 +43,11 @@ RCSID("$OpenBSD: cipher.c,v 1.59 2002/06/19 18:01:00 markus Exp $");
|
||||
|
||||
#include <openssl/md5.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00906000L
|
||||
#define SSH_OLD_EVP
|
||||
#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00907000L
|
||||
#include "rijndael.h"
|
||||
static const EVP_CIPHER *evp_rijndael(void);
|
||||
@ -188,7 +193,11 @@ cipher_init(CipherContext *cc, Cipher *cipher,
|
||||
int encrypt)
|
||||
{
|
||||
static int dowarn = 1;
|
||||
#ifdef SSH_OLD_EVP
|
||||
EVP_CIPHER *type;
|
||||
#else
|
||||
const EVP_CIPHER *type;
|
||||
#endif
|
||||
int klen;
|
||||
|
||||
if (cipher->number == SSH_CIPHER_DES) {
|
||||
@ -213,6 +222,15 @@ cipher_init(CipherContext *cc, Cipher *cipher,
|
||||
type = (*cipher->evptype)();
|
||||
|
||||
EVP_CIPHER_CTX_init(&cc->evp);
|
||||
#ifdef SSH_OLD_EVP
|
||||
if (type->key_len > 0 && type->key_len != keylen) {
|
||||
debug("cipher_init: set keylen (%d -> %d)",
|
||||
type->key_len, keylen);
|
||||
type->key_len = keylen;
|
||||
}
|
||||
EVP_CipherInit(&cc->evp, type, (u_char *)key, (u_char *)iv,
|
||||
(encrypt == CIPHER_ENCRYPT));
|
||||
#else
|
||||
if (EVP_CipherInit(&cc->evp, type, NULL, (u_char *)iv,
|
||||
(encrypt == CIPHER_ENCRYPT)) == 0)
|
||||
fatal("cipher_init: EVP_CipherInit failed for %s",
|
||||
@ -227,6 +245,7 @@ cipher_init(CipherContext *cc, Cipher *cipher,
|
||||
if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0)
|
||||
fatal("cipher_init: EVP_CipherInit: set key failed for %s",
|
||||
cipher->name);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -234,15 +253,23 @@ cipher_crypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len)
|
||||
{
|
||||
if (len % cc->cipher->block_size)
|
||||
fatal("cipher_encrypt: bad plaintext length %d", len);
|
||||
#ifdef SSH_OLD_EVP
|
||||
EVP_Cipher(&cc->evp, dest, (u_char *)src, len);
|
||||
#else
|
||||
if (EVP_Cipher(&cc->evp, dest, (u_char *)src, len) == 0)
|
||||
fatal("evp_crypt: EVP_Cipher failed");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
cipher_cleanup(CipherContext *cc)
|
||||
{
|
||||
#ifdef SSH_OLD_EVP
|
||||
EVP_CIPHER_CTX_cleanup(&cc->evp);
|
||||
#else
|
||||
if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0)
|
||||
error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -313,6 +340,11 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
|
||||
EVP_CIPHER_CTX_init(&c->k1);
|
||||
EVP_CIPHER_CTX_init(&c->k2);
|
||||
EVP_CIPHER_CTX_init(&c->k3);
|
||||
#ifdef SSH_OLD_EVP
|
||||
EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc);
|
||||
EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc);
|
||||
EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc);
|
||||
#else
|
||||
if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 ||
|
||||
EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 ||
|
||||
EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) {
|
||||
@ -321,6 +353,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
|
||||
EVP_CIPHER_CTX_set_app_data(ctx, NULL);
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
static int
|
||||
@ -332,10 +365,16 @@ ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
|
||||
error("ssh1_3des_cbc: no context");
|
||||
return (0);
|
||||
}
|
||||
#ifdef SSH_OLD_EVP
|
||||
EVP_Cipher(&c->k1, dest, (u_char *)src, len);
|
||||
EVP_Cipher(&c->k2, dest, dest, len);
|
||||
EVP_Cipher(&c->k3, dest, dest, len);
|
||||
#else
|
||||
if (EVP_Cipher(&c->k1, dest, (u_char *)src, len) == 0 ||
|
||||
EVP_Cipher(&c->k2, dest, dest, len) == 0 ||
|
||||
EVP_Cipher(&c->k3, dest, dest, len) == 0)
|
||||
return (0);
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
static int
|
||||
@ -363,7 +402,9 @@ evp_ssh1_3des(void)
|
||||
ssh1_3des.init = ssh1_3des_init;
|
||||
ssh1_3des.cleanup = ssh1_3des_cleanup;
|
||||
ssh1_3des.do_cipher = ssh1_3des_cbc;
|
||||
#ifndef SSH_OLD_EVP
|
||||
ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
|
||||
#endif
|
||||
return (&ssh1_3des);
|
||||
}
|
||||
|
||||
@ -512,8 +553,10 @@ evp_rijndael(void)
|
||||
rijndal_cbc.init = ssh_rijndael_init;
|
||||
rijndal_cbc.cleanup = ssh_rijndael_cleanup;
|
||||
rijndal_cbc.do_cipher = ssh_rijndael_cbc;
|
||||
#ifndef SSH_OLD_EVP
|
||||
rijndal_cbc.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
|
||||
EVP_CIPH_ALWAYS_CALL_INIT;
|
||||
#endif
|
||||
return (&rijndal_cbc);
|
||||
}
|
||||
#endif
|
||||
|
1327
crypto/openssh/config.guess
vendored
Executable file
1327
crypto/openssh/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1362
crypto/openssh/config.sub
vendored
Executable file
1362
crypto/openssh/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
2437
crypto/openssh/configure.ac
Normal file
2437
crypto/openssh/configure.ac
Normal file
File diff suppressed because it is too large
Load Diff
542
crypto/openssh/defines.h
Normal file
542
crypto/openssh/defines.h
Normal file
@ -0,0 +1,542 @@
|
||||
#ifndef _DEFINES_H
|
||||
#define _DEFINES_H
|
||||
|
||||
/* $Id: defines.h,v 1.90 2002/06/07 03:19:36 mouring Exp $ */
|
||||
|
||||
|
||||
/* Constants */
|
||||
|
||||
#ifndef SHUT_RDWR
|
||||
enum
|
||||
{
|
||||
SHUT_RD = 0, /* No more receptions. */
|
||||
SHUT_WR, /* No more transmissions. */
|
||||
SHUT_RDWR /* No more receptions or transmissions. */
|
||||
};
|
||||
# define SHUT_RD SHUT_RD
|
||||
# define SHUT_WR SHUT_WR
|
||||
# define SHUT_RDWR SHUT_RDWR
|
||||
#endif
|
||||
|
||||
#ifndef IPTOS_LOWDELAY
|
||||
# define IPTOS_LOWDELAY 0x10
|
||||
# define IPTOS_THROUGHPUT 0x08
|
||||
# define IPTOS_RELIABILITY 0x04
|
||||
# define IPTOS_LOWCOST 0x02
|
||||
# define IPTOS_MINCOST IPTOS_LOWCOST
|
||||
#endif /* IPTOS_LOWDELAY */
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
# ifdef PATH_MAX
|
||||
# define MAXPATHLEN PATH_MAX
|
||||
# else /* PATH_MAX */
|
||||
# define MAXPATHLEN 64 /* Should be safe */
|
||||
# endif /* PATH_MAX */
|
||||
#endif /* MAXPATHLEN */
|
||||
|
||||
#ifndef STDIN_FILENO
|
||||
# define STDIN_FILENO 0
|
||||
#endif
|
||||
#ifndef STDOUT_FILENO
|
||||
# define STDOUT_FILENO 1
|
||||
#endif
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
|
||||
#endif /* S_ISDIR */
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
|
||||
#endif /* S_ISREG */
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#endif /* S_ISLNK */
|
||||
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0000100 /* execute/search permission, */
|
||||
# define S_IXGRP 0000010 /* execute/search permission, */
|
||||
# define S_IXOTH 0000001 /* execute/search permission, */
|
||||
# define _S_IWUSR 0000200 /* write permission, */
|
||||
# define S_IWUSR _S_IWUSR /* write permission, owner */
|
||||
# define S_IWGRP 0000020 /* write permission, group */
|
||||
# define S_IWOTH 0000002 /* write permission, other */
|
||||
# define S_IRUSR 0000400 /* read permission, owner */
|
||||
# define S_IRGRP 0000040 /* read permission, group */
|
||||
# define S_IROTH 0000004 /* read permission, other */
|
||||
# define S_IRWXU 0000700 /* read, write, execute */
|
||||
# define S_IRWXG 0000070 /* read, write, execute */
|
||||
# define S_IRWXO 0000007 /* read, write, execute */
|
||||
#endif /* S_IXUSR */
|
||||
|
||||
#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS)
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#endif
|
||||
|
||||
#ifndef MAP_FAILED
|
||||
# define MAP_FAILED ((void *)-1)
|
||||
#endif
|
||||
|
||||
/* *-*-nto-qnx doesn't define this constant in the system headers */
|
||||
#ifdef MISSING_NFDBITS
|
||||
# define NFDBITS (8 * sizeof(unsigned long))
|
||||
#endif
|
||||
|
||||
/*
|
||||
SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but
|
||||
including rpc/rpc.h breaks Solaris 6
|
||||
*/
|
||||
#ifndef INADDR_LOOPBACK
|
||||
#define INADDR_LOOPBACK ((ulong)0x7f000001)
|
||||
#endif
|
||||
|
||||
/* Types */
|
||||
|
||||
/* If sys/types.h does not supply intXX_t, supply them ourselves */
|
||||
/* (or die trying) */
|
||||
|
||||
|
||||
#ifndef HAVE_U_INT
|
||||
typedef unsigned int u_int;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INTXX_T
|
||||
# if (SIZEOF_CHAR == 1)
|
||||
typedef char int8_t;
|
||||
# else
|
||||
# error "8 bit int type not found."
|
||||
# endif
|
||||
# if (SIZEOF_SHORT_INT == 2)
|
||||
typedef short int int16_t;
|
||||
# else
|
||||
# ifdef _CRAY
|
||||
# if (SIZEOF_SHORT_INT == 4)
|
||||
typedef short int16_t;
|
||||
# else
|
||||
typedef long int16_t;
|
||||
# endif
|
||||
# else
|
||||
# error "16 bit int type not found."
|
||||
# endif /* _CRAY */
|
||||
# endif
|
||||
# if (SIZEOF_INT == 4)
|
||||
typedef int int32_t;
|
||||
# else
|
||||
# ifdef _CRAY
|
||||
typedef long int32_t;
|
||||
# else
|
||||
# error "32 bit int type not found."
|
||||
# endif /* _CRAY */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
|
||||
#ifndef HAVE_U_INTXX_T
|
||||
# ifdef HAVE_UINTXX_T
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
# define HAVE_U_INTXX_T 1
|
||||
# else
|
||||
# if (SIZEOF_CHAR == 1)
|
||||
typedef unsigned char u_int8_t;
|
||||
# else
|
||||
# error "8 bit int type not found."
|
||||
# endif
|
||||
# if (SIZEOF_SHORT_INT == 2)
|
||||
typedef unsigned short int u_int16_t;
|
||||
# else
|
||||
# ifdef _CRAY
|
||||
# if (SIZEOF_SHORT_INT == 4)
|
||||
typedef unsigned short u_int16_t;
|
||||
# else
|
||||
typedef unsigned long u_int16_t;
|
||||
# endif
|
||||
# else
|
||||
# error "16 bit int type not found."
|
||||
# endif
|
||||
# endif
|
||||
# if (SIZEOF_INT == 4)
|
||||
typedef unsigned int u_int32_t;
|
||||
# else
|
||||
# ifdef _CRAY
|
||||
typedef unsigned long u_int32_t;
|
||||
# else
|
||||
# error "32 bit int type not found."
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#define __BIT_TYPES_DEFINED__
|
||||
#endif
|
||||
|
||||
/* 64-bit types */
|
||||
#ifndef HAVE_INT64_T
|
||||
# if (SIZEOF_LONG_INT == 8)
|
||||
typedef long int int64_t;
|
||||
# define HAVE_INT64_T 1
|
||||
# else
|
||||
# if (SIZEOF_LONG_LONG_INT == 8)
|
||||
typedef long long int int64_t;
|
||||
# define HAVE_INT64_T 1
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifndef HAVE_U_INT64_T
|
||||
# if (SIZEOF_LONG_INT == 8)
|
||||
typedef unsigned long int u_int64_t;
|
||||
# define HAVE_U_INT64_T 1
|
||||
# else
|
||||
# if (SIZEOF_LONG_LONG_INT == 8)
|
||||
typedef unsigned long long int u_int64_t;
|
||||
# define HAVE_U_INT64_T 1
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
|
||||
# define HAVE_LONG_LONG_INT 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_U_CHAR
|
||||
typedef unsigned char u_char;
|
||||
# define HAVE_U_CHAR
|
||||
#endif /* HAVE_U_CHAR */
|
||||
|
||||
#ifndef HAVE_SIZE_T
|
||||
typedef unsigned int size_t;
|
||||
# define HAVE_SIZE_T
|
||||
#endif /* HAVE_SIZE_T */
|
||||
|
||||
#ifndef HAVE_SSIZE_T
|
||||
typedef int ssize_t;
|
||||
# define HAVE_SSIZE_T
|
||||
#endif /* HAVE_SSIZE_T */
|
||||
|
||||
#ifndef HAVE_CLOCK_T
|
||||
typedef long clock_t;
|
||||
# define HAVE_CLOCK_T
|
||||
#endif /* HAVE_CLOCK_T */
|
||||
|
||||
#ifndef HAVE_SA_FAMILY_T
|
||||
typedef int sa_family_t;
|
||||
# define HAVE_SA_FAMILY_T
|
||||
#endif /* HAVE_SA_FAMILY_T */
|
||||
|
||||
#ifndef HAVE_PID_T
|
||||
typedef int pid_t;
|
||||
# define HAVE_PID_T
|
||||
#endif /* HAVE_PID_T */
|
||||
|
||||
#ifndef HAVE_SIG_ATOMIC_T
|
||||
typedef int sig_atomic_t;
|
||||
# define HAVE_SIG_ATOMIC_T
|
||||
#endif /* HAVE_SIG_ATOMIC_T */
|
||||
|
||||
#ifndef HAVE_MODE_T
|
||||
typedef int mode_t;
|
||||
# define HAVE_MODE_T
|
||||
#endif /* HAVE_MODE_T */
|
||||
|
||||
#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
|
||||
# define ss_family __ss_family
|
||||
#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */
|
||||
|
||||
#ifndef HAVE_SYS_UN_H
|
||||
struct sockaddr_un {
|
||||
short sun_family; /* AF_UNIX */
|
||||
char sun_path[108]; /* path name (gag) */
|
||||
};
|
||||
#endif /* HAVE_SYS_UN_H */
|
||||
|
||||
#if defined(BROKEN_SYS_TERMIO_H) && !defined(_STRUCT_WINSIZE)
|
||||
#define _STRUCT_WINSIZE
|
||||
struct winsize {
|
||||
unsigned short ws_row; /* rows, in characters */
|
||||
unsigned short ws_col; /* columns, in character */
|
||||
unsigned short ws_xpixel; /* horizontal size, pixels */
|
||||
unsigned short ws_ypixel; /* vertical size, pixels */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* *-*-nto-qnx does not define this type in the system headers */
|
||||
#ifdef MISSING_FD_MASK
|
||||
typedef unsigned long int fd_mask;
|
||||
#endif
|
||||
|
||||
/* Paths */
|
||||
|
||||
#ifndef _PATH_BSHELL
|
||||
# define _PATH_BSHELL "/bin/sh"
|
||||
#endif
|
||||
#ifndef _PATH_CSHELL
|
||||
# define _PATH_CSHELL "/bin/csh"
|
||||
#endif
|
||||
#ifndef _PATH_SHELLS
|
||||
# define _PATH_SHELLS "/etc/shells"
|
||||
#endif
|
||||
|
||||
#ifdef USER_PATH
|
||||
# ifdef _PATH_STDPATH
|
||||
# undef _PATH_STDPATH
|
||||
# endif
|
||||
# define _PATH_STDPATH USER_PATH
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_STDPATH
|
||||
# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_DEVNULL
|
||||
# define _PATH_DEVNULL "/dev/null"
|
||||
#endif
|
||||
|
||||
#ifndef MAIL_DIRECTORY
|
||||
# define MAIL_DIRECTORY "/var/spool/mail"
|
||||
#endif
|
||||
|
||||
#ifndef MAILDIR
|
||||
# define MAILDIR MAIL_DIRECTORY
|
||||
#endif
|
||||
|
||||
#if !defined(_PATH_MAILDIR) && defined(MAILDIR)
|
||||
# define _PATH_MAILDIR MAILDIR
|
||||
#endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */
|
||||
|
||||
#ifndef _PATH_RSH
|
||||
# ifdef RSH_PATH
|
||||
# define _PATH_RSH RSH_PATH
|
||||
# else /* RSH_PATH */
|
||||
# define _PATH_RSH "/usr/bin/rsh"
|
||||
# endif /* RSH_PATH */
|
||||
#endif /* _PATH_RSH */
|
||||
|
||||
#ifndef _PATH_NOLOGIN
|
||||
# define _PATH_NOLOGIN "/etc/nologin"
|
||||
#endif
|
||||
|
||||
/* Define this to be the path of the xauth program. */
|
||||
#ifdef XAUTH_PATH
|
||||
#define _PATH_XAUTH XAUTH_PATH
|
||||
#endif /* XAUTH_PATH */
|
||||
|
||||
/* derived from XF4/xc/lib/dps/Xlibnet.h */
|
||||
#ifndef X_UNIX_PATH
|
||||
# ifdef __hpux
|
||||
# define X_UNIX_PATH "/var/spool/sockets/X11/%u"
|
||||
# else
|
||||
# define X_UNIX_PATH "/tmp/.X11-unix/X%u"
|
||||
# endif
|
||||
#endif /* X_UNIX_PATH */
|
||||
#define _PATH_UNIX_X X_UNIX_PATH
|
||||
|
||||
#ifndef _PATH_TTY
|
||||
# define _PATH_TTY "/dev/tty"
|
||||
#endif
|
||||
|
||||
/* Macros */
|
||||
|
||||
#if defined(HAVE_LOGIN_GETCAPBOOL) && defined(HAVE_LOGIN_CAP_H)
|
||||
# define HAVE_LOGIN_CAP
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
# define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#ifndef roundup
|
||||
# define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
|
||||
#endif
|
||||
|
||||
#ifndef timersub
|
||||
#define timersub(a, b, result) \
|
||||
do { \
|
||||
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||
if ((result)->tv_usec < 0) { \
|
||||
--(result)->tv_sec; \
|
||||
(result)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef __P
|
||||
# define __P(x) x
|
||||
#endif
|
||||
|
||||
#if !defined(IN6_IS_ADDR_V4MAPPED)
|
||||
# define IN6_IS_ADDR_V4MAPPED(a) \
|
||||
((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
|
||||
(((u_int32_t *) (a))[2] == htonl (0xffff)))
|
||||
#endif /* !defined(IN6_IS_ADDR_V4MAPPED) */
|
||||
|
||||
#if !defined(__GNUC__) || (__GNUC__ < 2)
|
||||
# define __attribute__(x)
|
||||
#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
|
||||
|
||||
/* *-*-nto-qnx doesn't define this macro in the system headers */
|
||||
#ifdef MISSING_HOWMANY
|
||||
# define howmany(x,y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
#ifndef OSSH_ALIGNBYTES
|
||||
#define OSSH_ALIGNBYTES (sizeof(int) - 1)
|
||||
#endif
|
||||
#ifndef __CMSG_ALIGN
|
||||
#define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
/* Length of the contents of a control message of length len */
|
||||
#ifndef CMSG_LEN
|
||||
#define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
|
||||
#endif
|
||||
|
||||
/* Length of the space taken up by a padded control message of length len */
|
||||
#ifndef CMSG_SPACE
|
||||
#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
|
||||
#endif
|
||||
|
||||
/* Function replacement / compatibility hacks */
|
||||
|
||||
#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO))
|
||||
# define HAVE_GETADDRINFO
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_OPTRESET
|
||||
#define getopt(ac, av, o) BSDgetopt(ac, av, o)
|
||||
#endif
|
||||
|
||||
/* In older versions of libpam, pam_strerror takes a single argument */
|
||||
#ifdef HAVE_OLD_PAM
|
||||
# define PAM_STRERROR(a,b) pam_strerror((b))
|
||||
#else
|
||||
# define PAM_STRERROR(a,b) pam_strerror((a),(b))
|
||||
#endif
|
||||
|
||||
#ifdef PAM_SUN_CODEBASE
|
||||
# define PAM_MSG_MEMBER(msg, n, member) ((*(msg))[(n)].member)
|
||||
#else
|
||||
# define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member)
|
||||
#endif
|
||||
|
||||
#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO)
|
||||
# undef HAVE_GETADDRINFO
|
||||
#endif
|
||||
#if defined(BROKEN_GETADDRINFO) && defined(HAVE_FREEADDRINFO)
|
||||
# undef HAVE_FREEADDRINFO
|
||||
#endif
|
||||
#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GAI_STRERROR)
|
||||
# undef HAVE_GAI_STRERROR
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY)
|
||||
# define memmove(s1, s2, n) bcopy((s2), (s1), (n))
|
||||
#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
|
||||
|
||||
#if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX)
|
||||
# define USE_VHANGUP
|
||||
#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */
|
||||
|
||||
#ifndef GETPGRP_VOID
|
||||
# define getpgrp() getpgrp(0)
|
||||
#endif
|
||||
|
||||
/* OPENSSL_free() is Free() in versions before OpenSSL 0.9.6 */
|
||||
#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x0090600f)
|
||||
# define OPENSSL_free(x) Free(x)
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE___func__) && defined(HAVE___FUNCTION__)
|
||||
# define __func__ __FUNCTION__
|
||||
#elif !defined(HAVE___func__)
|
||||
# define __func__ ""
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define this to use pipes instead of socketpairs for communicating with the
|
||||
* client program. Socketpairs do not seem to work on all systems.
|
||||
*
|
||||
* configure.ac sets this for a few OS's which are known to have problems
|
||||
* but you may need to set it yourself
|
||||
*/
|
||||
/* #define USE_PIPES 1 */
|
||||
|
||||
/**
|
||||
** login recorder definitions
|
||||
**/
|
||||
|
||||
/* FIXME: put default paths back in */
|
||||
#ifndef UTMP_FILE
|
||||
# ifdef _PATH_UTMP
|
||||
# define UTMP_FILE _PATH_UTMP
|
||||
# else
|
||||
# ifdef CONF_UTMP_FILE
|
||||
# define UTMP_FILE CONF_UTMP_FILE
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifndef WTMP_FILE
|
||||
# ifdef _PATH_WTMP
|
||||
# define WTMP_FILE _PATH_WTMP
|
||||
# else
|
||||
# ifdef CONF_WTMP_FILE
|
||||
# define WTMP_FILE CONF_WTMP_FILE
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* pick up the user's location for lastlog if given */
|
||||
#ifndef LASTLOG_FILE
|
||||
# ifdef _PATH_LASTLOG
|
||||
# define LASTLOG_FILE _PATH_LASTLOG
|
||||
# else
|
||||
# ifdef CONF_LASTLOG_FILE
|
||||
# define LASTLOG_FILE CONF_LASTLOG_FILE
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* The login() library function in libutil is first choice */
|
||||
#if defined(HAVE_LOGIN) && !defined(DISABLE_LOGIN)
|
||||
# define USE_LOGIN
|
||||
|
||||
#else
|
||||
/* Simply select your favourite login types. */
|
||||
/* Can't do if-else because some systems use several... <sigh> */
|
||||
# if defined(UTMPX_FILE) && !defined(DISABLE_UTMPX)
|
||||
# define USE_UTMPX
|
||||
# endif
|
||||
# if defined(UTMP_FILE) && !defined(DISABLE_UTMP)
|
||||
# define USE_UTMP
|
||||
# endif
|
||||
# if defined(WTMPX_FILE) && !defined(DISABLE_WTMPX)
|
||||
# define USE_WTMPX
|
||||
# endif
|
||||
# if defined(WTMP_FILE) && !defined(DISABLE_WTMP)
|
||||
# define USE_WTMP
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/* I hope that the presence of LASTLOG_FILE is enough to detect this */
|
||||
#if defined(LASTLOG_FILE) && !defined(DISABLE_LASTLOG)
|
||||
# define USE_LASTLOG
|
||||
#endif
|
||||
|
||||
/** end of login recorder definitions */
|
||||
|
||||
#endif /* _DEFINES_H */
|
154
crypto/openssh/entropy.c
Normal file
154
crypto/openssh/entropy.c
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Copyright (c) 2001 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#include "ssh.h"
|
||||
#include "misc.h"
|
||||
#include "xmalloc.h"
|
||||
#include "atomicio.h"
|
||||
#include "pathnames.h"
|
||||
#include "log.h"
|
||||
|
||||
/*
|
||||
* Portable OpenSSH PRNG seeding:
|
||||
* If OpenSSL has not "internally seeded" itself (e.g. pulled data from
|
||||
* /dev/random), then we execute a "ssh-rand-helper" program which
|
||||
* collects entropy and writes it to stdout. The child program must
|
||||
* write at least RANDOM_SEED_SIZE bytes. The child is run with stderr
|
||||
* attached, so error/debugging output should be visible.
|
||||
*
|
||||
* XXX: we should tell the child how many bytes we need.
|
||||
*/
|
||||
|
||||
RCSID("$Id: entropy.c,v 1.44 2002/06/09 19:41:48 mouring Exp $");
|
||||
|
||||
#ifndef OPENSSL_PRNG_ONLY
|
||||
#define RANDOM_SEED_SIZE 48
|
||||
static uid_t original_uid, original_euid;
|
||||
#endif
|
||||
|
||||
void
|
||||
seed_rng(void)
|
||||
{
|
||||
#ifndef OPENSSL_PRNG_ONLY
|
||||
int devnull;
|
||||
int p[2];
|
||||
pid_t pid;
|
||||
int ret;
|
||||
unsigned char buf[RANDOM_SEED_SIZE];
|
||||
mysig_t old_sigchld;
|
||||
|
||||
if (RAND_status() == 1) {
|
||||
debug3("RNG is ready, skipping seeding");
|
||||
return;
|
||||
}
|
||||
|
||||
debug3("Seeding PRNG from %s", SSH_RAND_HELPER);
|
||||
|
||||
if ((devnull = open("/dev/null", O_RDWR)) == -1)
|
||||
fatal("Couldn't open /dev/null: %s", strerror(errno));
|
||||
if (pipe(p) == -1)
|
||||
fatal("pipe: %s", strerror(errno));
|
||||
|
||||
old_sigchld = mysignal(SIGCHLD, SIG_DFL);
|
||||
if ((pid = fork()) == -1)
|
||||
fatal("Couldn't fork: %s", strerror(errno));
|
||||
if (pid == 0) {
|
||||
dup2(devnull, STDIN_FILENO);
|
||||
dup2(p[1], STDOUT_FILENO);
|
||||
/* Keep stderr open for errors */
|
||||
close(p[0]);
|
||||
close(p[1]);
|
||||
close(devnull);
|
||||
|
||||
if (original_uid != original_euid &&
|
||||
( seteuid(getuid()) == -1 ||
|
||||
setuid(original_uid) == -1) ) {
|
||||
fprintf(stderr, "(rand child) setuid(%d): %s\n",
|
||||
original_uid, strerror(errno));
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
execl(SSH_RAND_HELPER, "ssh-rand-helper", NULL);
|
||||
fprintf(stderr, "(rand child) Couldn't exec '%s': %s\n",
|
||||
SSH_RAND_HELPER, strerror(errno));
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
close(devnull);
|
||||
close(p[1]);
|
||||
|
||||
memset(buf, '\0', sizeof(buf));
|
||||
ret = atomicio(read, p[0], buf, sizeof(buf));
|
||||
if (ret == -1)
|
||||
fatal("Couldn't read from ssh-rand-helper: %s",
|
||||
strerror(errno));
|
||||
if (ret != sizeof(buf))
|
||||
fatal("ssh-rand-helper child produced insufficient data");
|
||||
|
||||
close(p[0]);
|
||||
|
||||
if (waitpid(pid, &ret, 0) == -1)
|
||||
fatal("Couldn't wait for ssh-rand-helper completion: %s",
|
||||
strerror(errno));
|
||||
mysignal(SIGCHLD, old_sigchld);
|
||||
|
||||
/* We don't mind if the child exits upon a SIGPIPE */
|
||||
if (!WIFEXITED(ret) &&
|
||||
(!WIFSIGNALED(ret) || WTERMSIG(ret) != SIGPIPE))
|
||||
fatal("ssh-rand-helper terminated abnormally");
|
||||
if (WEXITSTATUS(ret) != 0)
|
||||
fatal("ssh-rand-helper exit with exit status %d", ret);
|
||||
|
||||
RAND_add(buf, sizeof(buf), sizeof(buf));
|
||||
memset(buf, '\0', sizeof(buf));
|
||||
|
||||
#endif /* OPENSSL_PRNG_ONLY */
|
||||
if (RAND_status() != 1)
|
||||
fatal("PRNG is not seeded");
|
||||
}
|
||||
|
||||
void
|
||||
init_rng(void)
|
||||
{
|
||||
/*
|
||||
* OpenSSL version numbers: MNNFFPPS: major minor fix patch status
|
||||
* We match major, minor, fix and status (not patch)
|
||||
*/
|
||||
if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L)
|
||||
fatal("OpenSSL version mismatch. Built against %lx, you "
|
||||
"have %lx", OPENSSL_VERSION_NUMBER, SSLeay());
|
||||
|
||||
#ifndef OPENSSL_PRNG_ONLY
|
||||
if ((original_uid = getuid()) == -1)
|
||||
fatal("getuid: %s", strerror(errno));
|
||||
if ((original_euid = geteuid()) == -1)
|
||||
fatal("geteuid: %s", strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
33
crypto/openssh/entropy.h
Normal file
33
crypto/openssh/entropy.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: entropy.h,v 1.4 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _RANDOMS_H
|
||||
#define _RANDOMS_H
|
||||
|
||||
void seed_rng(void);
|
||||
void init_rng(void);
|
||||
|
||||
#endif /* _RANDOMS_H */
|
43
crypto/openssh/fixpaths
Executable file
43
crypto/openssh/fixpaths
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# fixpaths - substitute makefile variables into text files
|
||||
|
||||
|
||||
$usage = "Usage: $0 [-Dstring=replacement] [[infile] ...]\n";
|
||||
|
||||
if (!defined(@ARGV)) { die ("$usage"); }
|
||||
|
||||
# read in the command line and get some definitions
|
||||
while ($_=$ARGV[0], /^-/) {
|
||||
if (/^-D/) {
|
||||
# definition
|
||||
shift(@ARGV);
|
||||
if ( /-D(.*)=(.*)/ ) {
|
||||
$def{"$1"}=$2;
|
||||
} else {
|
||||
die ("$usage$0: error in command line arguments.\n");
|
||||
}
|
||||
} else {
|
||||
@cmd = split(//, $ARGV[0]); $opt = $cmd[1];
|
||||
die ("$usage$0: unknown option '-$opt'\n");
|
||||
}
|
||||
} # while parsing arguments
|
||||
|
||||
if (!defined(%def)) {
|
||||
die ("$0: nothing to do - no substitutions listed!\n");
|
||||
}
|
||||
|
||||
for $f (@ARGV) {
|
||||
|
||||
$f =~ /(.*\/)*(.*)$/;
|
||||
|
||||
open(IN, "<$f") || die ("$0: input file $f missing!\n");
|
||||
while (<IN>) {
|
||||
for $s (keys(%def)) {
|
||||
s#$s#$def{$s}#;
|
||||
} # for $s
|
||||
print;
|
||||
} # while <IN>
|
||||
} # for $f
|
||||
|
||||
exit 0;
|
72
crypto/openssh/fixprogs
Executable file
72
crypto/openssh/fixprogs
Executable file
@ -0,0 +1,72 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# fixprogs - run through the list of entropy commands and
|
||||
# score out the losers
|
||||
#
|
||||
|
||||
$entscale = 50; # divisor for optional entropy measurement
|
||||
|
||||
sub usage {
|
||||
return("Usage: $0 <command file>\n");
|
||||
}
|
||||
|
||||
if (($#ARGV == -1) || ($#ARGV>1)) {
|
||||
die(&usage);
|
||||
}
|
||||
|
||||
# 'undocumented' option - run ent (in second param) on the output
|
||||
if ($#ARGV==1) {
|
||||
$entcmd=$ARGV[1]
|
||||
} else {
|
||||
$entcmd = ""
|
||||
};
|
||||
|
||||
$infilename = $ARGV[0];
|
||||
|
||||
if (!open(IN, "<".$infilename)) {
|
||||
die("Couldn't open input file");
|
||||
}
|
||||
$outfilename=$infilename.".out";
|
||||
if (!open(OUT, ">$outfilename")) {
|
||||
die("Couldn't open output file $outfilename");
|
||||
}
|
||||
@infile=<IN>;
|
||||
|
||||
select(OUT); $|=1; select(STDOUT);
|
||||
|
||||
foreach (@infile) {
|
||||
if (/^\s*\#/ || /^\s*$/) {
|
||||
print OUT;
|
||||
next;
|
||||
}
|
||||
($cmd, $path, $est) = /^\"([^\"]+)\"\s+([\w\/_-]+)\s+([\d\.\-]+)/o;
|
||||
@args = split(/ /, $cmd);
|
||||
if (! ($pid = fork())) {
|
||||
# child
|
||||
close STDIN; close STDOUT; close STDERR;
|
||||
open (STDIN, "</dev/null");
|
||||
open (STDOUT, ">/dev/null");
|
||||
open (STDERR, ">/dev/null");
|
||||
exec $path @args;
|
||||
exit 1; # shouldn't be here
|
||||
}
|
||||
# parent
|
||||
waitpid ($pid, 0); $ret=$? >> 8;
|
||||
|
||||
if ($ret != 0) {
|
||||
$path = "undef";
|
||||
} else {
|
||||
if ($entcmd ne "") {
|
||||
# now try to run ent on the command
|
||||
$mostargs=join(" ", splice(@args,1));
|
||||
print "Evaluating '$path $mostargs'\n";
|
||||
@ent = qx{$path $mostargs | $entcmd -b -t};
|
||||
@ent = grep(/^1,/, @ent);
|
||||
($null, $null, $rate) = split(/,/, $ent[0]);
|
||||
$est = $rate / $entscale; # scale the estimate back
|
||||
}
|
||||
}
|
||||
print OUT "\"$cmd\" $path $est\n";
|
||||
}
|
||||
|
||||
close(IN);
|
@ -19,48 +19,142 @@
|
||||
#define RCSID(msg) \
|
||||
static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/endian.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/resource.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <netgroup.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fcntl.h> /* For O_NONBLOCK */
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <paths.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "version.h"
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h> /* For PATH_MAX */
|
||||
#endif
|
||||
#ifdef HAVE_GETOPT_H
|
||||
# include <getopt.h>
|
||||
#endif
|
||||
#ifdef HAVE_BSTRING_H
|
||||
# include <bstring.h>
|
||||
#endif
|
||||
#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
|
||||
defined(GLOB_HAS_GL_MATCHC)
|
||||
# include <glob.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETGROUP_H
|
||||
# include <netgroup.h>
|
||||
#endif
|
||||
#if defined(HAVE_NETDB_H)
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
# include <endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_TTYENT_H
|
||||
# include <ttyent.h>
|
||||
#endif
|
||||
#ifdef HAVE_UTIME_H
|
||||
# include <utime.h>
|
||||
#endif
|
||||
#ifdef HAVE_MAILLOCK_H
|
||||
# include <maillock.h> /* For _PATH_MAILDIR */
|
||||
#endif
|
||||
#ifdef HAVE_NEXT
|
||||
# include <libc.h>
|
||||
#endif
|
||||
#include <unistd.h> /* For STDIN_FILENO, etc */
|
||||
#include <termios.h> /* Struct winsize */
|
||||
|
||||
/*
|
||||
* Define this to use pipes instead of socketpairs for communicating with the
|
||||
* client program. Socketpairs do not seem to work on all systems.
|
||||
*-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
|
||||
*/
|
||||
#define USE_PIPES 1
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_LOGIN_H
|
||||
# include <login.h>
|
||||
#endif
|
||||
|
||||
#endif /* INCLUDES_H */
|
||||
#ifdef HAVE_UTMP_H
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
#ifdef HAVE_UTMPX_H
|
||||
# ifdef HAVE_TV_IN_UTMPX
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
# include <utmpx.h>
|
||||
#endif
|
||||
#ifdef HAVE_LASTLOG_H
|
||||
# include <lastlog.h>
|
||||
#endif
|
||||
#ifdef HAVE_PATHS_H
|
||||
# include <paths.h> /* For _PATH_XXX */
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h> /* For timersub */
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_BSDTTY_H
|
||||
# include <sys/bsdtty.h>
|
||||
#endif
|
||||
#include <sys/param.h> /* For MAXPATHLEN and roundup() */
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
# include <sys/un.h> /* For sockaddr_un */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_BITYPES_H
|
||||
# include <sys/bitypes.h> /* For u_intXX_t */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_CDEFS_H
|
||||
# include <sys/cdefs.h> /* For __P() */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h> /* For S_* constants and macros */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
# include <sys/sysmacros.h> /* For MIN, MAX, etc */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h> /* for MAP_ANONYMOUS */
|
||||
#endif
|
||||
|
||||
#include <netinet/in_systm.h> /* For typedefs */
|
||||
#include <netinet/in.h> /* For IPv6 macros */
|
||||
#include <netinet/ip.h> /* For IPTOS macros */
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef HAVE_RPC_TYPES_H
|
||||
# include <rpc/types.h> /* For INADDR_LOOPBACK */
|
||||
#endif
|
||||
#ifdef USE_PAM
|
||||
# include <security/pam_appl.h>
|
||||
#endif
|
||||
#ifdef HAVE_READPASSPHRASE_H
|
||||
# include <readpassphrase.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
#include "version.h"
|
||||
#include "openbsd-compat/openbsd-compat.h"
|
||||
#include "openbsd-compat/bsd-cygwin_util.h"
|
||||
#include "openbsd-compat/bsd-nextstep.h"
|
||||
|
||||
#include "entropy.h"
|
||||
|
||||
#endif /* INCLUDES_H */
|
||||
|
251
crypto/openssh/install-sh
Executable file
251
crypto/openssh/install-sh
Executable file
@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
@ -57,6 +57,9 @@ static struct {
|
||||
{ "DAEMON", SYSLOG_FACILITY_DAEMON },
|
||||
{ "USER", SYSLOG_FACILITY_USER },
|
||||
{ "AUTH", SYSLOG_FACILITY_AUTH },
|
||||
#ifdef LOG_AUTHPRIV
|
||||
{ "AUTHPRIV", SYSLOG_FACILITY_AUTHPRIV },
|
||||
#endif
|
||||
{ "LOCAL0", SYSLOG_FACILITY_LOCAL0 },
|
||||
{ "LOCAL1", SYSLOG_FACILITY_LOCAL1 },
|
||||
{ "LOCAL2", SYSLOG_FACILITY_LOCAL2 },
|
||||
@ -273,6 +276,11 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
|
||||
case SYSLOG_FACILITY_AUTH:
|
||||
log_facility = LOG_AUTH;
|
||||
break;
|
||||
#ifdef LOG_AUTHPRIV
|
||||
case SYSLOG_FACILITY_AUTHPRIV:
|
||||
log_facility = LOG_AUTHPRIV;
|
||||
break;
|
||||
#endif
|
||||
case SYSLOG_FACILITY_LOCAL0:
|
||||
log_facility = LOG_LOCAL0;
|
||||
break;
|
||||
|
@ -15,11 +15,16 @@
|
||||
#ifndef SSH_LOG_H
|
||||
#define SSH_LOG_H
|
||||
|
||||
#include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */
|
||||
|
||||
/* Supported syslog facilities and levels. */
|
||||
typedef enum {
|
||||
SYSLOG_FACILITY_DAEMON,
|
||||
SYSLOG_FACILITY_USER,
|
||||
SYSLOG_FACILITY_AUTH,
|
||||
#ifdef LOG_AUTHPRIV
|
||||
SYSLOG_FACILITY_AUTHPRIV,
|
||||
#endif
|
||||
SYSLOG_FACILITY_LOCAL0,
|
||||
SYSLOG_FACILITY_LOCAL1,
|
||||
SYSLOG_FACILITY_LOCAL2,
|
||||
|
1510
crypto/openssh/loginrec.c
Normal file
1510
crypto/openssh/loginrec.c
Normal file
File diff suppressed because it is too large
Load Diff
140
crypto/openssh/loginrec.h
Normal file
140
crypto/openssh/loginrec.h
Normal file
@ -0,0 +1,140 @@
|
||||
#ifndef _HAVE_LOGINREC_H_
|
||||
#define _HAVE_LOGINREC_H_
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Andre Lucas. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Markus Friedl.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
** loginrec.h: platform-independent login recording and lastlog retrieval
|
||||
**/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/* RCSID("$Id: loginrec.h,v 1.6 2001/05/08 20:33:06 mouring Exp $"); */
|
||||
|
||||
/**
|
||||
** you should use the login_* calls to work around platform dependencies
|
||||
**/
|
||||
|
||||
/*
|
||||
* login_netinfo structure
|
||||
*/
|
||||
|
||||
union login_netinfo {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in sa_in;
|
||||
struct sockaddr_storage sa_storage;
|
||||
};
|
||||
|
||||
/*
|
||||
* * logininfo structure *
|
||||
*/
|
||||
/* types - different to utmp.h 'type' macros */
|
||||
/* (though set to the same value as linux, openbsd and others...) */
|
||||
#define LTYPE_LOGIN 7
|
||||
#define LTYPE_LOGOUT 8
|
||||
|
||||
/* string lengths - set very long */
|
||||
#define LINFO_PROGSIZE 64
|
||||
#define LINFO_LINESIZE 64
|
||||
#define LINFO_NAMESIZE 64
|
||||
#define LINFO_HOSTSIZE 256
|
||||
|
||||
struct logininfo {
|
||||
char progname[LINFO_PROGSIZE]; /* name of program (for PAM) */
|
||||
int progname_null;
|
||||
short int type; /* type of login (LTYPE_*) */
|
||||
int pid; /* PID of login process */
|
||||
int uid; /* UID of this user */
|
||||
char line[LINFO_LINESIZE]; /* tty/pty name */
|
||||
char username[LINFO_NAMESIZE]; /* login username */
|
||||
char hostname[LINFO_HOSTSIZE]; /* remote hostname */
|
||||
/* 'exit_status' structure components */
|
||||
int exit; /* process exit status */
|
||||
int termination; /* process termination status */
|
||||
/* struct timeval (sys/time.h) isn't always available, if it isn't we'll
|
||||
* use time_t's value as tv_sec and set tv_usec to 0
|
||||
*/
|
||||
unsigned int tv_sec;
|
||||
unsigned int tv_usec;
|
||||
union login_netinfo hostaddr; /* caller's host address(es) */
|
||||
}; /* struct logininfo */
|
||||
|
||||
/*
|
||||
* login recording functions
|
||||
*/
|
||||
|
||||
/** 'public' functions */
|
||||
|
||||
/* construct a new login entry */
|
||||
struct logininfo *login_alloc_entry(int pid, const char *username,
|
||||
const char *hostname, const char *line);
|
||||
/* free a structure */
|
||||
void login_free_entry(struct logininfo *li);
|
||||
/* fill out a pre-allocated structure with useful information */
|
||||
int login_init_entry(struct logininfo *li, int pid, const char *username,
|
||||
const char *hostname, const char *line);
|
||||
/* place the current time in a logininfo struct */
|
||||
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 */
|
||||
|
||||
/* record the entry */
|
||||
int login_write (struct logininfo *li);
|
||||
int login_log_entry(struct logininfo *li);
|
||||
|
||||
/* set the network address based on network address type */
|
||||
void login_set_addr(struct logininfo *li, const struct sockaddr *sa,
|
||||
const unsigned int sa_size);
|
||||
|
||||
/*
|
||||
* lastlog retrieval functions
|
||||
*/
|
||||
/* lastlog *entry* functions fill out a logininfo */
|
||||
struct logininfo *login_get_lastlog(struct logininfo *li, const int uid);
|
||||
/* lastlog *time* functions return time_t equivalent (uint) */
|
||||
unsigned int login_get_lastlog_time(const int uid);
|
||||
|
||||
/* produce various forms of the line filename */
|
||||
char *line_fullname(char *dst, const char *src, int dstsize);
|
||||
char *line_stripname(char *dst, const char *src, int dstsize);
|
||||
char *line_abbrevname(char *dst, const char *src, int dstsize);
|
||||
|
||||
#endif /* _HAVE_LOGINREC_H_ */
|
315
crypto/openssh/logintest.c
Normal file
315
crypto/openssh/logintest.c
Normal file
@ -0,0 +1,315 @@
|
||||
/*
|
||||
* Copyright (c) 2000 Andre Lucas. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Markus Friedl.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
** logintest.c: simple test driver for platform-independent login recording
|
||||
** and lastlog retrieval
|
||||
**/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <pwd.h>
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include "loginrec.h"
|
||||
|
||||
RCSID("$Id: logintest.c,v 1.8 2001/04/05 23:05:22 stevesk Exp $");
|
||||
|
||||
#ifdef HAVE___PROGNAME
|
||||
extern char *__progname;
|
||||
#else
|
||||
char *__progname;
|
||||
#endif
|
||||
|
||||
#define PAUSE_BEFORE_LOGOUT 3
|
||||
|
||||
int nologtest = 0;
|
||||
int compile_opts_only = 0;
|
||||
int be_verbose = 0;
|
||||
|
||||
|
||||
/* Dump a logininfo to stdout. Assumes a tab size of 8 chars. */
|
||||
void
|
||||
dump_logininfo(struct logininfo *li, char *descname)
|
||||
{
|
||||
/* yes I know how nasty this is */
|
||||
printf("struct logininfo %s = {\n\t"
|
||||
"progname\t'%s'\n\ttype\t\t%d\n\t"
|
||||
"pid\t\t%d\n\tuid\t\t%d\n\t"
|
||||
"line\t\t'%s'\n\tusername\t'%s'\n\t"
|
||||
"hostname\t'%s'\n\texit\t\t%d\n\ttermination\t%d\n\t"
|
||||
"tv_sec\t%d\n\ttv_usec\t%d\n\t"
|
||||
"struct login_netinfo hostaddr {\n\t\t"
|
||||
"struct sockaddr sa {\n"
|
||||
"\t\t\tfamily\t%d\n\t\t}\n"
|
||||
"\t}\n"
|
||||
"}\n",
|
||||
descname, li->progname, li->type,
|
||||
li->pid, li->uid, li->line,
|
||||
li->username, li->hostname, li->exit,
|
||||
li->termination, li->tv_sec, li->tv_usec,
|
||||
li->hostaddr.sa.sa_family);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
testAPI()
|
||||
{
|
||||
struct logininfo *li1;
|
||||
struct passwd *pw;
|
||||
struct hostent *he;
|
||||
struct sockaddr_in sa_in4;
|
||||
char cmdstring[256], stripline[8];
|
||||
char username[32];
|
||||
#ifdef HAVE_TIME_H
|
||||
time_t t0, t1, t2, logintime, logouttime;
|
||||
char s_t0[64],s_t1[64],s_t2[64];
|
||||
char s_logintime[64], s_logouttime[64]; /* ctime() strings */
|
||||
#endif
|
||||
|
||||
printf("**\n** Testing the API...\n**\n");
|
||||
|
||||
pw = getpwuid(getuid());
|
||||
strlcpy(username, pw->pw_name, sizeof(username));
|
||||
|
||||
/* gethostname(hostname, sizeof(hostname)); */
|
||||
|
||||
printf("login_alloc_entry test (no host info):\n");
|
||||
|
||||
/* FIXME fake tty more effectively - this could upset some platforms */
|
||||
li1 = login_alloc_entry((int)getpid(), username, NULL, ttyname(0));
|
||||
strlcpy(li1->progname, "OpenSSH-logintest", sizeof(li1->progname));
|
||||
|
||||
if (be_verbose)
|
||||
dump_logininfo(li1, "li1");
|
||||
|
||||
printf("Setting host address info for 'localhost' (may call out):\n");
|
||||
if (! (he = gethostbyname("localhost"))) {
|
||||
printf("Couldn't set hostname(lookup failed)\n");
|
||||
} else {
|
||||
/* NOTE: this is messy, but typically a program wouldn't have to set
|
||||
* any of this, a sockaddr_in* would be already prepared */
|
||||
memcpy((void *)&(sa_in4.sin_addr), (void *)&(he->h_addr_list[0][0]),
|
||||
sizeof(struct in_addr));
|
||||
login_set_addr(li1, (struct sockaddr *) &sa_in4, sizeof(sa_in4));
|
||||
strlcpy(li1->hostname, "localhost", sizeof(li1->hostname));
|
||||
}
|
||||
if (be_verbose)
|
||||
dump_logininfo(li1, "li1");
|
||||
|
||||
if ((int)geteuid() != 0) {
|
||||
printf("NOT RUNNING LOGIN TESTS - you are not root!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nologtest)
|
||||
return 1;
|
||||
|
||||
line_stripname(stripline, li1->line, sizeof(stripline));
|
||||
|
||||
printf("Performing an invalid login attempt (no type field)\n--\n");
|
||||
login_write(li1);
|
||||
printf("--\n(Should have written errors to stderr)\n");
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
(void)time(&t0);
|
||||
strlcpy(s_t0, ctime(&t0), sizeof(s_t0));
|
||||
t1 = login_get_lastlog_time(getuid());
|
||||
strlcpy(s_t1, ctime(&t1), sizeof(s_t1));
|
||||
printf("Before logging in:\n\tcurrent time is %d - %s\t"
|
||||
"lastlog time is %d - %s\n",
|
||||
(int)t0, s_t0, (int)t1, s_t1);
|
||||
#endif
|
||||
|
||||
printf("Performing a login on line %s ", stripline);
|
||||
#ifdef HAVE_TIME_H
|
||||
(void)time(&logintime);
|
||||
strlcpy(s_logintime, ctime(&logintime), sizeof(s_logintime));
|
||||
printf("at %d - %s", (int)logintime, s_logintime);
|
||||
#endif
|
||||
printf("--\n");
|
||||
login_login(li1);
|
||||
|
||||
snprintf(cmdstring, sizeof(cmdstring), "who | grep '%s '",
|
||||
stripline);
|
||||
system(cmdstring);
|
||||
|
||||
printf("--\nPausing for %d second(s)...\n", PAUSE_BEFORE_LOGOUT);
|
||||
sleep(PAUSE_BEFORE_LOGOUT);
|
||||
|
||||
printf("Performing a logout ");
|
||||
#ifdef HAVE_TIME_H
|
||||
(void)time(&logouttime);
|
||||
strlcpy(s_logouttime, ctime(&logouttime), sizeof(s_logouttime));
|
||||
printf("at %d - %s", (int)logouttime, s_logouttime);
|
||||
#endif
|
||||
printf("\nThe root login shown above should be gone.\n"
|
||||
"If the root login hasn't gone, but another user on the same\n"
|
||||
"pty has, this is OK - we're hacking it here, and there\n"
|
||||
"shouldn't be two users on one pty in reality...\n"
|
||||
"-- ('who' output follows)\n");
|
||||
login_logout(li1);
|
||||
|
||||
system(cmdstring);
|
||||
printf("-- ('who' output ends)\n");
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
t2 = login_get_lastlog_time(getuid());
|
||||
strlcpy(s_t2, ctime(&t2), sizeof(s_t2));
|
||||
printf("After logging in, lastlog time is %d - %s\n", (int)t2, s_t2);
|
||||
if (t1 == t2)
|
||||
printf("The lastlog times before and after logging in are the "
|
||||
"same.\nThis indicates that lastlog is ** NOT WORKING "
|
||||
"CORRECTLY **\n");
|
||||
else if (t0 != t2)
|
||||
/* We can be off by a second or so, even when recording works fine.
|
||||
* I'm not 100% sure why, but it's true. */
|
||||
printf("** The login time and the lastlog time differ.\n"
|
||||
"** This indicates that lastlog is either recording the "
|
||||
"wrong time,\n** or retrieving the wrong entry.\n"
|
||||
"If it's off by less than %d second(s) "
|
||||
"run the test again.\n", PAUSE_BEFORE_LOGOUT);
|
||||
else
|
||||
printf("lastlog agrees with the login time. This is a good thing.\n");
|
||||
|
||||
#endif
|
||||
|
||||
printf("--\nThe output of 'last' shown next should have "
|
||||
"an entry for root \n on %s for the time shown above:\n--\n",
|
||||
stripline);
|
||||
snprintf(cmdstring, sizeof(cmdstring), "last | grep '%s ' | head -3",
|
||||
stripline);
|
||||
system(cmdstring);
|
||||
|
||||
printf("--\nEnd of login test.\n");
|
||||
|
||||
login_free_entry(li1);
|
||||
|
||||
return 1;
|
||||
} /* testAPI() */
|
||||
|
||||
|
||||
void
|
||||
testLineName(char *line)
|
||||
{
|
||||
/* have to null-terminate - these functions are designed for
|
||||
* structures with fixed-length char arrays, and don't null-term.*/
|
||||
char full[17], strip[9], abbrev[5];
|
||||
|
||||
memset(full, '\0', sizeof(full));
|
||||
memset(strip, '\0', sizeof(strip));
|
||||
memset(abbrev, '\0', sizeof(abbrev));
|
||||
|
||||
line_fullname(full, line, sizeof(full)-1);
|
||||
line_stripname(strip, full, sizeof(strip)-1);
|
||||
line_abbrevname(abbrev, full, sizeof(abbrev)-1);
|
||||
printf("%s: %s, %s, %s\n", line, full, strip, abbrev);
|
||||
|
||||
} /* testLineName() */
|
||||
|
||||
|
||||
int
|
||||
testOutput()
|
||||
{
|
||||
printf("**\n** Testing linename functions\n**\n");
|
||||
testLineName("/dev/pts/1");
|
||||
testLineName("pts/1");
|
||||
testLineName("pts/999");
|
||||
testLineName("/dev/ttyp00");
|
||||
testLineName("ttyp00");
|
||||
|
||||
return 1;
|
||||
} /* testOutput() */
|
||||
|
||||
|
||||
/* show which options got compiled in */
|
||||
void
|
||||
showOptions(void)
|
||||
{
|
||||
printf("**\n** Compile-time options\n**\n");
|
||||
|
||||
printf("login recording methods selected:\n");
|
||||
#ifdef USE_LOGIN
|
||||
printf("\tUSE_LOGIN\n");
|
||||
#endif
|
||||
#ifdef USE_UTMP
|
||||
printf("\tUSE_UTMP (UTMP_FILE=%s)\n", UTMP_FILE);
|
||||
#endif
|
||||
#ifdef USE_UTMPX
|
||||
printf("\tUSE_UTMPX (UTMPX_FILE=%s)\n", UTMPX_FILE);
|
||||
#endif
|
||||
#ifdef USE_WTMP
|
||||
printf("\tUSE_WTMP (WTMP_FILE=%s)\n", WTMP_FILE);
|
||||
#endif
|
||||
#ifdef USE_WTMPX
|
||||
printf("\tUSE_WTMPX (WTMPX_FILE=%s)\n", WTMPX_FILE);
|
||||
#endif
|
||||
#ifdef USE_LASTLOG
|
||||
printf("\tUSE_LASTLOG (LASTLOG_FILE=%s)\n", LASTLOG_FILE);
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
} /* showOptions() */
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
printf("Platform-independent login recording test driver\n");
|
||||
|
||||
__progname = get_progname(argv[0]);
|
||||
if (argc == 2) {
|
||||
if (strncmp(argv[1], "-i", 3) == 0)
|
||||
compile_opts_only = 1;
|
||||
else if (strncmp(argv[1], "-v", 3) == 0)
|
||||
be_verbose=1;
|
||||
}
|
||||
|
||||
if (!compile_opts_only) {
|
||||
if (be_verbose && !testOutput())
|
||||
return 1;
|
||||
|
||||
if (!testAPI())
|
||||
return 1;
|
||||
}
|
||||
|
||||
showOptions();
|
||||
|
||||
return 0;
|
||||
} /* main() */
|
||||
|
159
crypto/openssh/md5crypt.c
Normal file
159
crypto/openssh/md5crypt.c
Normal file
@ -0,0 +1,159 @@
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* "THE BEER-WARE LICENSE" (Revision 42):
|
||||
* <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
|
||||
* can do whatever you want with this stuff. If we meet some day, and you think
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ported from FreeBSD to Linux, only minimal changes. --marekm
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adapted from shadow-19990607 by Tudor Bosman, tudorb@jm.nu
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: md5crypt.c,v 1.5 2001/02/09 01:55:36 djm Exp $");
|
||||
|
||||
#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
|
||||
|
||||
#include <openssl/md5.h>
|
||||
|
||||
static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
static char *magic = "$1$"; /*
|
||||
* This string is magic for
|
||||
* this algorithm. Having
|
||||
* it this way, we can get
|
||||
* get better later on
|
||||
*/
|
||||
|
||||
static void
|
||||
to64(char *s, unsigned long v, int n)
|
||||
{
|
||||
while (--n >= 0) {
|
||||
*s++ = itoa64[v&0x3f];
|
||||
v >>= 6;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
is_md5_salt(const char *salt)
|
||||
{
|
||||
return (!strncmp(salt, magic, strlen(magic)));
|
||||
}
|
||||
|
||||
/*
|
||||
* UNIX password
|
||||
*
|
||||
* Use MD5 for what it is best at...
|
||||
*/
|
||||
|
||||
char *
|
||||
md5_crypt(const char *pw, const char *salt)
|
||||
{
|
||||
static char passwd[120], *p;
|
||||
static const char *sp,*ep;
|
||||
unsigned char final[16];
|
||||
int sl,pl,i,j;
|
||||
MD5_CTX ctx,ctx1;
|
||||
unsigned long l;
|
||||
|
||||
/* Refine the Salt first */
|
||||
sp = salt;
|
||||
|
||||
/* If it starts with the magic string, then skip that */
|
||||
if(!strncmp(sp,magic,strlen(magic)))
|
||||
sp += strlen(magic);
|
||||
|
||||
/* It stops at the first '$', max 8 chars */
|
||||
for(ep=sp;*ep && *ep != '$' && ep < (sp+8);ep++)
|
||||
continue;
|
||||
|
||||
/* get the length of the true salt */
|
||||
sl = ep - sp;
|
||||
|
||||
MD5_Init(&ctx);
|
||||
|
||||
/* The password first, since that is what is most unknown */
|
||||
MD5_Update(&ctx,pw,strlen(pw));
|
||||
|
||||
/* Then our magic string */
|
||||
MD5_Update(&ctx,magic,strlen(magic));
|
||||
|
||||
/* Then the raw salt */
|
||||
MD5_Update(&ctx,sp,sl);
|
||||
|
||||
/* Then just as many characters of the MD5(pw,salt,pw) */
|
||||
MD5_Init(&ctx1);
|
||||
MD5_Update(&ctx1,pw,strlen(pw));
|
||||
MD5_Update(&ctx1,sp,sl);
|
||||
MD5_Update(&ctx1,pw,strlen(pw));
|
||||
MD5_Final(final,&ctx1);
|
||||
for(pl = strlen(pw); pl > 0; pl -= 16)
|
||||
MD5_Update(&ctx,final,pl>16 ? 16 : pl);
|
||||
|
||||
/* Don't leave anything around in vm they could use. */
|
||||
memset(final,0,sizeof final);
|
||||
|
||||
/* Then something really weird... */
|
||||
for (j=0,i = strlen(pw); i ; i >>= 1)
|
||||
if(i&1)
|
||||
MD5_Update(&ctx, final+j, 1);
|
||||
else
|
||||
MD5_Update(&ctx, pw+j, 1);
|
||||
|
||||
/* Now make the output string */
|
||||
strcpy(passwd,magic);
|
||||
strncat(passwd,sp,sl);
|
||||
strcat(passwd,"$");
|
||||
|
||||
MD5_Final(final,&ctx);
|
||||
|
||||
/*
|
||||
* and now, just to make sure things don't run too fast
|
||||
* On a 60 Mhz Pentium this takes 34 msec, so you would
|
||||
* need 30 seconds to build a 1000 entry dictionary...
|
||||
*/
|
||||
for(i=0;i<1000;i++) {
|
||||
MD5_Init(&ctx1);
|
||||
if(i & 1)
|
||||
MD5_Update(&ctx1,pw,strlen(pw));
|
||||
else
|
||||
MD5_Update(&ctx1,final,16);
|
||||
|
||||
if(i % 3)
|
||||
MD5_Update(&ctx1,sp,sl);
|
||||
|
||||
if(i % 7)
|
||||
MD5_Update(&ctx1,pw,strlen(pw));
|
||||
|
||||
if(i & 1)
|
||||
MD5_Update(&ctx1,final,16);
|
||||
else
|
||||
MD5_Update(&ctx1,pw,strlen(pw));
|
||||
MD5_Final(final,&ctx1);
|
||||
}
|
||||
|
||||
p = passwd + strlen(passwd);
|
||||
|
||||
l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p,l,4); p += 4;
|
||||
l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p,l,4); p += 4;
|
||||
l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; to64(p,l,4); p += 4;
|
||||
l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; to64(p,l,4); p += 4;
|
||||
l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; to64(p,l,4); p += 4;
|
||||
l = final[11] ; to64(p,l,2); p += 2;
|
||||
*p = '\0';
|
||||
|
||||
/* Don't leave anything around in vm they could use. */
|
||||
memset(final,0,sizeof final);
|
||||
|
||||
return passwd;
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
|
32
crypto/openssh/md5crypt.h
Normal file
32
crypto/openssh/md5crypt.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* "THE BEER-WARE LICENSE" (Revision 42):
|
||||
* <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
|
||||
* can do whatever you want with this stuff. If we meet some day, and you think
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ported from FreeBSD to Linux, only minimal changes. --marekm
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adapted from shadow-19990607 by Tudor Bosman, tudorb@jm.nu
|
||||
*/
|
||||
|
||||
/* $Id: md5crypt.h,v 1.3 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _MD5CRYPT_H
|
||||
#define _MD5CRYPT_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
|
||||
|
||||
int is_md5_salt(const char *salt);
|
||||
char *md5_crypt(const char *pw, const char *salt);
|
||||
|
||||
#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
|
||||
|
||||
#endif /* MD5CRYPT_H */
|
592
crypto/openssh/mdoc2man.pl
Normal file
592
crypto/openssh/mdoc2man.pl
Normal file
@ -0,0 +1,592 @@
|
||||
#!/usr/bin/perl
|
||||
###
|
||||
### Quick usage: mdoc2man.pl < mdoc_manpage.8 > man_manpage.8
|
||||
###
|
||||
###
|
||||
### Copyright (c) 2001 University of Illinois Board of Trustees
|
||||
### Copyright (c) 2001 Mark D. Roth
|
||||
### All rights reserved.
|
||||
###
|
||||
### Redistribution and use in source and binary forms, with or without
|
||||
### modification, are permitted provided that the following conditions
|
||||
### are met:
|
||||
### 1. Redistributions of source code must retain the above copyright
|
||||
### notice, this list of conditions and the following disclaimer.
|
||||
### 2. Redistributions in binary form must reproduce the above copyright
|
||||
### notice, this list of conditions and the following disclaimer in the
|
||||
### documentation and/or other materials provided with the distribution.
|
||||
### 3. All advertising materials mentioning features or use of this software
|
||||
### must display the following acknowledgement:
|
||||
### This product includes software developed by the University of
|
||||
### Illinois at Urbana, and their contributors.
|
||||
### 4. The University nor the names of their
|
||||
### contributors may be used to endorse or promote products derived from
|
||||
### this software without specific prior written permission.
|
||||
###
|
||||
### THIS SOFTWARE IS PROVIDED BY THE TRUSTEES AND CONTRIBUTORS ``AS IS'' AND
|
||||
### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
### ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR CONTRIBUTORS BE LIABLE
|
||||
### FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
### DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
### OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
### HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
### LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
### OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
### SUCH DAMAGE.
|
||||
###
|
||||
|
||||
use strict;
|
||||
|
||||
my ($name, $date, $id);
|
||||
my ($line);
|
||||
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, 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;
|
||||
}
|
||||
|
||||
$line =~ s/^\.//;
|
||||
|
||||
next
|
||||
if ($line =~ m/\\"/);
|
||||
|
||||
$line = ParseMacro($line);
|
||||
print($line)
|
||||
if (defined $line);
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub ParseMacro # ($line)
|
||||
{
|
||||
my ($line) = @_;
|
||||
my (@words, $retval, $option, $parens);
|
||||
|
||||
@words = split(/\s+/, $line);
|
||||
$retval = '';
|
||||
$option = 0;
|
||||
$parens = 0;
|
||||
|
||||
# print('@words = ', scalar(@words), ': ', join(' ', @words), "\n");
|
||||
|
||||
while ($_ = shift @words)
|
||||
{
|
||||
# print "WORD: $_\n";
|
||||
|
||||
next
|
||||
if (/^(Li|Pf)$/);
|
||||
|
||||
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);
|
||||
$retval =~ s/ $//;
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^No$/)
|
||||
{
|
||||
$retval =~ s/ $//;
|
||||
$retval .= shift @words;
|
||||
next;
|
||||
}
|
||||
|
||||
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)$/)
|
||||
{
|
||||
$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$/)
|
||||
{
|
||||
$date = join(' ', @words);
|
||||
return undef;
|
||||
}
|
||||
|
||||
if (/^Dt$/)
|
||||
{
|
||||
$id = join(' ', @words);
|
||||
return undef;
|
||||
}
|
||||
|
||||
if (/^Os$/)
|
||||
{
|
||||
$retval .= '.TH '
|
||||
. $id
|
||||
. " \"$date\" \""
|
||||
. join(' ', @words)
|
||||
. "\"";
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Sh$/)
|
||||
{
|
||||
$retval .= '.SH';
|
||||
if ($words[0] eq 'SYNOPSIS')
|
||||
{
|
||||
$synopsis = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$synopsis = 0;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Xr$/)
|
||||
{
|
||||
$retval .= '\\fB' . (shift @words) .
|
||||
'\\fP(' . (shift @words) . ')'
|
||||
. (shift @words);
|
||||
last;
|
||||
}
|
||||
|
||||
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$/)
|
||||
{
|
||||
my $n = $name;
|
||||
$n = shift @words
|
||||
if (@words > 0);
|
||||
$name = $n unless $name;
|
||||
$retval .= ".br\n"
|
||||
if ($synopsis);
|
||||
$retval .= "\\fB$n\\fP";
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Nd$/)
|
||||
{
|
||||
$retval .= '\\-';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Fl$/)
|
||||
{
|
||||
$retval .= '\\fB\\-' . (shift @words) . '\\fP';
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Ar$/)
|
||||
{
|
||||
$retval .= '\\fI';
|
||||
if (! defined $words[0])
|
||||
{
|
||||
$retval .= 'file ...\\fP';
|
||||
}
|
||||
else
|
||||
{
|
||||
$retval .= shift(@words) . '\\fP';
|
||||
while ($words[0] eq '|')
|
||||
{
|
||||
$retval .= ' ' . shift(@words);
|
||||
$retval .= ' \\fI' . shift(@words);
|
||||
$retval .= '\\fP';
|
||||
}
|
||||
}
|
||||
$nospace = 1
|
||||
if (! $nospace && $words[0] =~ m/^[\.,]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Cm$/)
|
||||
{
|
||||
$retval .= '\\fB' . (shift @words) . '\\fP';
|
||||
while ($words[0] =~ m/^[\.,:)]$/)
|
||||
{
|
||||
$retval .= shift(@words);
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Op$/)
|
||||
{
|
||||
$option = 1;
|
||||
$nospace = 1
|
||||
if (! $nospace);
|
||||
$retval .= '[';
|
||||
# my $tmp = pop(@words);
|
||||
# $tmp .= ']';
|
||||
# push(@words, $tmp);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pp$/)
|
||||
{
|
||||
$retval .= "\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Ss$/)
|
||||
{
|
||||
$retval .= '.SS';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pa$/ && ! $option)
|
||||
{
|
||||
$retval .= '\\fI';
|
||||
$retval .= '\\&'
|
||||
if ($words[0] =~ m/^\./);
|
||||
$retval .= (shift @words) . '\\fP';
|
||||
while ($words[0] =~ m/^[\.,:;)]$/)
|
||||
{
|
||||
$retval .= shift(@words);
|
||||
}
|
||||
# $nospace = 1
|
||||
# if (! $nospace && $words[0] =~ m/^[\.,:)]/);
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Dv$/)
|
||||
{
|
||||
$retval .= '.BR';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(Em|Ev)$/)
|
||||
{
|
||||
$retval .= '.IR';
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Pq$/)
|
||||
{
|
||||
$retval .= '(';
|
||||
$nospace = 1;
|
||||
$parens = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^(S[xy])$/)
|
||||
{
|
||||
$retval .= '.B ' . join(' ', @words);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Ic$/)
|
||||
{
|
||||
$retval .= '\\fB';
|
||||
while (defined $words[0]
|
||||
&& $words[0] !~ m/^[\.,]/)
|
||||
{
|
||||
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 .= '\\fP';
|
||||
$retval .= shift @words
|
||||
if (defined $words[0]);
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^Bl$/)
|
||||
{
|
||||
$oldoptlist = $optlist;
|
||||
if ($words[0] eq '-bullet')
|
||||
{
|
||||
$optlist = 1;
|
||||
}
|
||||
elsif ($words[0] eq '-enum')
|
||||
{
|
||||
$optlist = 2;
|
||||
$enum = 0;
|
||||
}
|
||||
elsif ($words[0] eq '-tag')
|
||||
{
|
||||
$optlist = 3;
|
||||
}
|
||||
elsif ($words[0] eq '-item')
|
||||
{
|
||||
$optlist = 4;
|
||||
}
|
||||
last;
|
||||
}
|
||||
|
||||
if (/^El$/)
|
||||
{
|
||||
$optlist = $oldoptlist;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist && /^It$/)
|
||||
{
|
||||
if ($optlist == 1)
|
||||
{
|
||||
# bullets
|
||||
$retval .= '.IP \\(bu';
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 2)
|
||||
{
|
||||
# enum
|
||||
$retval .= '.IP ' . (++$enum) . '.';
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 3)
|
||||
{
|
||||
# tags
|
||||
$retval .= ".TP\n";
|
||||
if ($words[0] =~ m/^(Pa|Ev)$/)
|
||||
{
|
||||
shift @words;
|
||||
$retval .= '.B';
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
if ($optlist == 4)
|
||||
{
|
||||
# item
|
||||
$retval .= ".IP\n";
|
||||
next;
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^Sm$/)
|
||||
{
|
||||
if ($words[0] eq 'off')
|
||||
{
|
||||
$nospace = 2;
|
||||
}
|
||||
elsif ($words[0] eq 'on')
|
||||
{
|
||||
# $retval .= "\n";
|
||||
$nospace = 0;
|
||||
}
|
||||
shift @words;
|
||||
next;
|
||||
}
|
||||
|
||||
$retval .= "$_";
|
||||
}
|
||||
|
||||
return undef
|
||||
if ($retval eq '.');
|
||||
|
||||
$retval =~ s/^\.([^a-zA-Z])/$1/;
|
||||
# $retval =~ s/ $//;
|
||||
|
||||
$retval .= ')'
|
||||
if ($parens == 1);
|
||||
|
||||
$retval .= ']'
|
||||
if ($option == 1);
|
||||
|
||||
# $retval .= ' '
|
||||
# if ($nospace && $retval ne '' && $retval !~ m/\n$/);
|
||||
|
||||
# $retval .= ' '
|
||||
# if ($extended && $retval !~ m/ $/);
|
||||
|
||||
$retval .= ' '
|
||||
if ($ext && ! $extopt && $retval !~ m/ $/);
|
||||
|
||||
$retval .= "\n"
|
||||
if (! $ext && ! $extopt && $retval ne '' && $retval !~ m/\n$/);
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
|
@ -152,9 +152,15 @@ pwcopy(struct passwd *pw)
|
||||
copy->pw_gecos = xstrdup(pw->pw_gecos);
|
||||
copy->pw_uid = pw->pw_uid;
|
||||
copy->pw_gid = pw->pw_gid;
|
||||
#ifdef HAVE_PW_EXPIRE_IN_PASSWD
|
||||
copy->pw_expire = pw->pw_expire;
|
||||
#endif
|
||||
#ifdef HAVE_PW_CHANGE_IN_PASSWD
|
||||
copy->pw_change = pw->pw_change;
|
||||
#endif
|
||||
#ifdef HAVE_PW_CLASS_IN_PASSWD
|
||||
copy->pw_class = xstrdup(pw->pw_class);
|
||||
#endif
|
||||
copy->pw_dir = xstrdup(pw->pw_dir);
|
||||
copy->pw_shell = xstrdup(pw->pw_shell);
|
||||
return copy;
|
||||
@ -317,3 +323,29 @@ addargs(arglist *args, char *fmt, ...)
|
||||
args->list[args->num++] = xstrdup(buf);
|
||||
args->list[args->num] = NULL;
|
||||
}
|
||||
|
||||
mysig_t
|
||||
mysignal(int sig, mysig_t act)
|
||||
{
|
||||
#ifdef HAVE_SIGACTION
|
||||
struct sigaction sa, osa;
|
||||
|
||||
if (sigaction(sig, NULL, &osa) == -1)
|
||||
return (mysig_t) -1;
|
||||
if (osa.sa_handler != act) {
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
#if defined(SA_INTERRUPT)
|
||||
if (sig == SIGALRM)
|
||||
sa.sa_flags |= SA_INTERRUPT;
|
||||
#endif
|
||||
sa.sa_handler = act;
|
||||
if (sigaction(sig, &sa, NULL) == -1)
|
||||
return (mysig_t) -1;
|
||||
}
|
||||
return (osa.sa_handler);
|
||||
#else
|
||||
return (signal(sig, act));
|
||||
#endif
|
||||
}
|
||||
|
@ -31,3 +31,7 @@ struct arglist {
|
||||
int nalloc;
|
||||
};
|
||||
void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
|
||||
|
||||
/* wrapper for signal interface */
|
||||
typedef void (*mysig_t)(int);
|
||||
mysig_t mysignal(int sig, mysig_t act);
|
||||
|
40
crypto/openssh/mkinstalldirs
Executable file
40
crypto/openssh/mkinstalldirs
Executable file
@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.1 2000/05/20 05:33:45 damien Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
158
crypto/openssh/moduli
Normal file
158
crypto/openssh/moduli
Normal file
@ -0,0 +1,158 @@
|
||||
# $OpenBSD: moduli,v 1.1 2001/06/22 22:07:54 provos Exp $
|
||||
|
||||
# Time Type Tests Tries Size Generator Modulus
|
||||
20010328182134 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF5449C221CB
|
||||
20010328182222 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF5449C95A43
|
||||
20010328182256 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF5449CC8CFB
|
||||
20010328182409 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF5449D9BDB7
|
||||
20010328182628 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF5449FB6EF3
|
||||
20010328182708 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A000153
|
||||
20010328182758 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A06E9EB
|
||||
20010328182946 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A1F2C93
|
||||
20010328183015 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A206ADB
|
||||
20010328183112 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A2A109B
|
||||
20010328183143 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A2BC1BB
|
||||
20010328183301 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A3ADCEB
|
||||
20010328183532 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A5E8BAF
|
||||
20010328183646 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A6D54D7
|
||||
20010328183712 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544A6EC46F
|
||||
20010328184223 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544AB8626F
|
||||
20010328184337 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544AC7DC73
|
||||
20010328184634 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544AEFF073
|
||||
20010328184714 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544AF594FF
|
||||
20010328184807 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544AFEEC53
|
||||
20010328184910 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B0B3513
|
||||
20010328185030 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B165707
|
||||
20010328185334 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B3A9673
|
||||
20010328185423 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B426623
|
||||
20010328185451 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B4427DB
|
||||
20010328185637 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B5E3FC7
|
||||
20010328185720 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B65964B
|
||||
20010328185757 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B6A9373
|
||||
20010328185844 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B7203B3
|
||||
20010328185933 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B7A9FFF
|
||||
20010328190006 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B7DAAD3
|
||||
20010328190054 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B855C2F
|
||||
20010328190139 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B8C53EB
|
||||
20010328190304 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544B9F26C3
|
||||
20010328190329 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544BA00697
|
||||
20010328190412 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544BA54313
|
||||
20010328190506 2 6 100 1023 5 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544BAEEF27
|
||||
20010328190550 2 6 100 1023 2 DCFAC4EFE89F5B082962AB9A67E8D63E84FA491E5D3874978815868595469163DA0661E6208A8C2CD4F83893B53864ADFD2154E8D8EFA146BAD808562E4BF6C90348FD79EEB3387D93FC7943BC450BA55399BA3CF3DFBD0D4E71800007B0E9D5F12E7A2CB7EA4E49812E715F8DC570C478DC2DEB1C49B0AE87A5DF544BB5CE0B
|
||||
20010328200734 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC33395187
|
||||
20010328201124 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC334ED15B
|
||||
20010328201358 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3359FC07
|
||||
20010328201537 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC335F7A83
|
||||
20010328201829 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC336D1433
|
||||
20010328202120 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC337B253B
|
||||
20010328202848 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC33A3D43F
|
||||
20010328203335 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC33BF24A3
|
||||
20010328204332 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC34011B8B
|
||||
20010328204443 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3402A92F
|
||||
20010328204617 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3406D343
|
||||
20010328205458 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3436FA2B
|
||||
20010328210413 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3471CF1B
|
||||
20010328213513 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC352AF5EF
|
||||
20010328215014 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC358CC3CB
|
||||
20010328215520 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35A9B7FF
|
||||
20010328215733 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35B2927F
|
||||
20010328220114 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35C47323
|
||||
20010328220334 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35CFA9C3
|
||||
20010328220653 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35E0BB37
|
||||
20010328220915 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35E9CC23
|
||||
20010328221256 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC35FD7D67
|
||||
20010328221457 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC36052CCB
|
||||
20010328222639 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC364A1E07
|
||||
20010328224126 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC36AD5557
|
||||
20010328225125 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC36EE57BF
|
||||
20010328225751 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3716A70B
|
||||
20010328225943 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC371D010B
|
||||
20010328230054 2 6 100 1534 5 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC371EB5C7
|
||||
20010328230301 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC37275F4B
|
||||
20010328230628 2 6 100 1534 2 6DFD16D9669EDAF42EF5D4EED82AA84B0541DEC2045B6AF55021A184F32BCADE614A114137022C9A8B41C09AFC38199E7305864F70A8708F37FC2127264ECF4FA32391F243CC62B89602D3813082679E5BDF496BA9DFA4C818AD21EC261B6F11841E6F2DE1574CE95095841DAF052868CCD5E9BFCA543E0934B50A76A598E693136DE2D479AEF3785D97BAFF4FB85AB8D46DA424C4CC5E11ABCAF718837E16350982BF8A27728318EC02C71ED164F57CDB121B72614B7B7C406613EC3738C3F3
|
||||
20010329000424 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853ACAACAB
|
||||
20010329001637 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853AE5BE0F
|
||||
20010329002229 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853AEDE2D3
|
||||
20010329003652 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853B0F32CB
|
||||
20010329005040 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853B30E503
|
||||
20010329014643 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853BC9AF57
|
||||
20010329021950 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853C205263
|
||||
20010329023256 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853C3F2E53
|
||||
20010329031049 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853CA28BBF
|
||||
20010329032045 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853CB81103
|
||||
20010329052113 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853DF13B47
|
||||
20010329052449 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853DF3ED53
|
||||
20010329060404 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853E5D25E7
|
||||
20010329062856 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853E9CF013
|
||||
20010329063152 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853E9E1CEB
|
||||
20010329070601 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853EF58B7F
|
||||
20010329071302 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F017697
|
||||
20010329072011 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F0E72D3
|
||||
20010329072445 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F14CE17
|
||||
20010329073641 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F2EEBA3
|
||||
20010329075209 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F52E927
|
||||
20010329080750 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853F776F8B
|
||||
20010329084002 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853FC98043
|
||||
20010329084744 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853FD7EAAF
|
||||
20010329090209 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993853FF9AF5F
|
||||
20010329093527 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC3499385404E330B
|
||||
20010329094652 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC349938540672D1F
|
||||
20010329103445 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC349938540E4B213
|
||||
20010329111418 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC34993854144947F
|
||||
20010329112031 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC3499385414F223B
|
||||
20010329112413 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC349938541522073
|
||||
20010329114209 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC3499385417C8E53
|
||||
20010329125026 2 6 100 2046 2 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC3499385422E41AB
|
||||
20010329132045 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC3499385427DD3FF
|
||||
20010329134105 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC349938542AFA2D7
|
||||
20010329134914 2 6 100 2046 5 7ED0888B660A818F15E5F76A7F2BF10C99D74129DA04446C60116C9C800501060B8AFF075DCE0C08CEFDF695440E6F16FCCDB06359D080EF62D6485CBAEB94B92BE771D535B4EA9C5D14D84CD7649E25C7CFEA2C914486CC2BFDE77C4C0DF1D6DDED65FEE2F53A7FA690AFE38EE00C154FBAEFF935466B176CB0AED02458A552929F4EA7FC3E6F9F758DE7F22CC1F49641F492820441BDC109F0CE18F883FC93EA9AC4C1432682BA1C5B67BED8C861152A5F952A8CDCF1BCE02B8D93E80C113CE9FE2E4ACA49B2978B99A8C5FA231A77F5E7C604D44C7C6EA98D561294D4F7AB061432CAB8BBDCEC3659DE64F65265E6B9FC5F46879BB17CC349938542C04A37
|
||||
20010403222140 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0AB16DAF
|
||||
20010403225231 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0AC56CFF
|
||||
20010404053436 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0C2F4B7F
|
||||
20010404092851 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0D04E7F7
|
||||
20010404093943 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0D07794B
|
||||
20010404102659 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0D2BE8CF
|
||||
20010404112553 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0D5D012B
|
||||
20010404174625 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0EA59E17
|
||||
20010404184645 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0ED6DA4F
|
||||
20010404193402 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0EFB39B3
|
||||
20010404230716 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B0FB07C1B
|
||||
20010405044433 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B10DD9FC3
|
||||
20010405053429 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B11038737
|
||||
20010405062826 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B112E24E7
|
||||
20010405092601 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B11C9E9FB
|
||||
20010405113007 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B123803EB
|
||||
20010405122212 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B12612ED3
|
||||
20010405182035 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B13A25087
|
||||
20010405210758 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B142C4E23
|
||||
20010405220222 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B145878F3
|
||||
20010406020130 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B152AF6AB
|
||||
20010406053538 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B15E78C8B
|
||||
20010406073014 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1649BFEF
|
||||
20010406074100 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B164D4E3F
|
||||
20010406103625 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B16E07B33
|
||||
20010406131946 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B17706243
|
||||
20010406170234 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B182FD957
|
||||
20010406182949 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B18768903
|
||||
20010406203157 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B18DCFC3B
|
||||
20010407022825 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1A1AF797
|
||||
20010407071024 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1B1551E7
|
||||
20010407112402 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1BF78EC7
|
||||
20010407123215 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1C30021B
|
||||
20010407161504 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1CF27743
|
||||
20010407171629 2 6 100 3190 5 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1D25FAD7
|
||||
20010407191502 2 6 100 3190 2 669BA3ED661F226A090BE5644A2BB4209371B78FC3E6848A095821993F59084CA5EE12052F977D01F0666F03F6573B199DFEC9AB94588C2C60DE3B3E7CF5094587919FCC3FB40A61C261E891A0F91D9FFC8F30CA12CF809DD8290DD786FA8B041FFAC5793C38F38757EA6790472AC2692185B554B0046E8C065C983C0ACC8D2F85AB4BEDF7CE233009218C9691FE44261580D4149F1D4471B0B5DF79E224252474EBC3B7B5490950BB438BF498E79F8794498B3A3B5FBB42829C3BBEA4067F28C23BE40377B986BD5443CCCF02405B8CCCAA09E8179F0168D4969994171A6AD98F81015BC84E10A44E1EFD2E0862C5D1AAFE99014715A36800DBD9A6C51C0226CC82A651DAE4F73D54C4D103C13D1C15CF8CCA67D5CB39F03C66F3B7467F8FFDCC5074CD0C1B2538FBF956971BF39314CEDD20E1B10DE16D86E10BE7FA5B1A706AEB4C356F49807A22072CD00559AF0A863788956651919E26A315EAD1D26E7C98FC4CFA35A0F04DD400A2991A1FFE5B271FEDE54375896A29F968BE1D511BA466A92AC3E3772709FC815B1D8C2753
|
||||
20010420002705 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10C1E08F3
|
||||
20010420005243 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10C219FB3
|
||||
20010420035225 2 6 100 4094 5 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10C660B3F
|
||||
20010420145749 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10D741313
|
||||
20010420205718 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10DD41193
|
||||
20010420232458 2 6 100 4094 5 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10E0AB4EF
|
||||
20010421003952 2 6 100 4094 5 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10E22F857
|
||||
20010421013245 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10E31828B
|
||||
20010421085157 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10EE28B2B
|
||||
20010421092617 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10EE97A3B
|
||||
20010421135621 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C10F52C463
|
||||
20010422012438 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C110627AF3
|
||||
20010422042530 2 6 100 4094 2 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C110A793B3
|
||||
20010422163438 2 6 100 4094 5 65B5B9F5ECFADB4CCB38D1BC894302E95B4843290F1A7A40579DF3E2FF98C1D3DA9F210857C784433DF32ADF9E0C80121211690E1FFB41B8DB4E86AFE388A09C9BB2C98EDC581C2E65D57F61BB920C3D1B7B058B5FADFF65D607DAFF443B8BA1ACE1A3A7B16EA0713F62537C6689E3C4A0F61198F3B054FCF140CFADD8622C0E7621998331E59DA6F72E9D608D0E58F526E95F485C7CA30A416617DA3CCFF722BB82362606283D054B34B83ECDB4C91BAB835944010EBE5E9FA7B016ED89891DD553CC71B5CF76EDB2A184B377F670D6AF191763EEFD175E48EA37EE18B9E44E2D017D845C444C8111816819866E490B52F7F879A0C6F401CF7859674F93E304365F4E8CB8C312EFB725732A46D7CF0C9D2939AEE25F428CEFC90959DBF8ADD612F343EF9BFCA2FBA61BD4BF93E1E54626D227FDA812E18D071579AB4EEAC9901DAB183BCB0D9F48732D92CE66B386EAE5D8212C9FD156DC3F09B171B5603E17A468D244F3B6880EBCDA189BA9E23E4A4C6C2995ACF264F8CE9D54B27316343C0BC19221F75E6A2AC68011741695E599F73460B7A042E0461DB189CDCE223B40336BF2251AE3B363159960C9F63B47EFC43790D474DABB9A686DAF21E0DD76533749FCA9F144FA9C243CEF1364C79D981ED81DC4635C73B7F8908BA190AA920ED370F815BC2F9B3D28ED87BE34A01498836222C17B70C246C03CA1C111D2A227
|
@ -116,6 +116,10 @@ int mm_answer_rsa_response(int, Buffer *);
|
||||
int mm_answer_sesskey(int, Buffer *);
|
||||
int mm_answer_sessid(int, Buffer *);
|
||||
|
||||
#ifdef USE_PAM
|
||||
int mm_answer_pam_start(int, Buffer *);
|
||||
#endif
|
||||
|
||||
static Authctxt *authctxt;
|
||||
static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */
|
||||
|
||||
@ -150,6 +154,9 @@ struct mon_table mon_dispatch_proto20[] = {
|
||||
{MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv},
|
||||
{MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner},
|
||||
{MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
|
||||
#ifdef USE_PAM
|
||||
{MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
|
||||
#endif
|
||||
#ifdef BSD_AUTH
|
||||
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
|
||||
{MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond},
|
||||
@ -181,6 +188,9 @@ struct mon_table mon_dispatch_proto15[] = {
|
||||
{MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed},
|
||||
{MONITOR_REQ_RSACHALLENGE, MON_ONCE, mm_answer_rsa_challenge},
|
||||
{MONITOR_REQ_RSARESPONSE, MON_ONCE|MON_AUTHDECIDE, mm_answer_rsa_response},
|
||||
#ifdef USE_PAM
|
||||
{MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
|
||||
#endif
|
||||
#ifdef BSD_AUTH
|
||||
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
|
||||
{MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond},
|
||||
@ -188,6 +198,9 @@ struct mon_table mon_dispatch_proto15[] = {
|
||||
#ifdef SKEY
|
||||
{MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
|
||||
{MONITOR_REQ_SKEYRESPOND, MON_AUTH, mm_answer_skeyrespond},
|
||||
#endif
|
||||
#ifdef USE_PAM
|
||||
{MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
|
||||
#endif
|
||||
{0, 0, NULL}
|
||||
};
|
||||
@ -262,6 +275,10 @@ monitor_child_preauth(struct monitor *pmonitor)
|
||||
if (authctxt->pw->pw_uid == 0 &&
|
||||
!auth_root_allowed(auth_method))
|
||||
authenticated = 0;
|
||||
#ifdef USE_PAM
|
||||
if (!do_pam_account(authctxt->pw->pw_name, NULL))
|
||||
authenticated = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ent->flags & MON_AUTHDECIDE) {
|
||||
@ -509,7 +526,9 @@ mm_answer_pwnamallow(int socket, Buffer *m)
|
||||
buffer_put_cstring(m, pwent->pw_name);
|
||||
buffer_put_cstring(m, "*");
|
||||
buffer_put_cstring(m, pwent->pw_gecos);
|
||||
#ifdef HAVE_PW_CLASS_IN_PASSWD
|
||||
buffer_put_cstring(m, pwent->pw_class);
|
||||
#endif
|
||||
buffer_put_cstring(m, pwent->pw_dir);
|
||||
buffer_put_cstring(m, pwent->pw_shell);
|
||||
|
||||
@ -526,6 +545,9 @@ mm_answer_pwnamallow(int socket, Buffer *m)
|
||||
monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
|
||||
}
|
||||
|
||||
#ifdef USE_PAM
|
||||
monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -700,6 +722,22 @@ mm_answer_skeyrespond(int socket, Buffer *m)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_PAM
|
||||
int
|
||||
mm_answer_pam_start(int socket, Buffer *m)
|
||||
{
|
||||
char *user;
|
||||
|
||||
user = buffer_get_string(m, NULL);
|
||||
|
||||
start_pam(user);
|
||||
|
||||
xfree(user);
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
mm_append_debug(Buffer *m)
|
||||
{
|
||||
@ -1453,8 +1491,13 @@ mm_init_compression(struct mm_master *mm)
|
||||
static void
|
||||
monitor_socketpair(int *pair)
|
||||
{
|
||||
#ifdef HAVE_SOCKETPAIR
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
|
||||
fatal("%s: socketpair", __func__);
|
||||
#else
|
||||
fatal("%s: UsePrivilegeSeparation=yes not supported",
|
||||
__func__);
|
||||
#endif
|
||||
FD_CLOSEONEXEC(pair[0]);
|
||||
FD_CLOSEONEXEC(pair[1]);
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ enum monitor_reqtype {
|
||||
MONITOR_REQ_RSAKEYALLOWED, MONITOR_ANS_RSAKEYALLOWED,
|
||||
MONITOR_REQ_RSACHALLENGE, MONITOR_ANS_RSACHALLENGE,
|
||||
MONITOR_REQ_RSARESPONSE, MONITOR_ANS_RSARESPONSE,
|
||||
MONITOR_REQ_PAM_START,
|
||||
MONITOR_REQ_TERM
|
||||
};
|
||||
|
||||
|
@ -34,14 +34,21 @@ RCSID("$OpenBSD: monitor_fdpass.c,v 1.3 2002/06/04 23:05:49 markus Exp $");
|
||||
void
|
||||
mm_send_fd(int socket, int fd)
|
||||
{
|
||||
#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
|
||||
struct msghdr msg;
|
||||
char tmp[CMSG_SPACE(sizeof(int))];
|
||||
struct cmsghdr *cmsg;
|
||||
struct iovec vec;
|
||||
char ch = '\0';
|
||||
int n;
|
||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
char tmp[CMSG_SPACE(sizeof(int))];
|
||||
struct cmsghdr *cmsg;
|
||||
#endif
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
msg.msg_accrights = (caddr_t)&fd;
|
||||
msg.msg_accrightslen = sizeof(fd);
|
||||
#else
|
||||
msg.msg_control = (caddr_t)tmp;
|
||||
msg.msg_controllen = CMSG_LEN(sizeof(int));
|
||||
cmsg = CMSG_FIRSTHDR(&msg);
|
||||
@ -49,6 +56,7 @@ mm_send_fd(int socket, int fd)
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
cmsg->cmsg_type = SCM_RIGHTS;
|
||||
*(int *)CMSG_DATA(cmsg) = fd;
|
||||
#endif
|
||||
|
||||
vec.iov_base = &ch;
|
||||
vec.iov_len = 1;
|
||||
@ -61,25 +69,37 @@ mm_send_fd(int socket, int fd)
|
||||
if (n != 1)
|
||||
fatal("%s: sendmsg: expected sent 1 got %d",
|
||||
__func__, n);
|
||||
#else
|
||||
fatal("%s: UsePrivilegeSeparation=yes not supported",
|
||||
__func__);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
mm_receive_fd(int socket)
|
||||
{
|
||||
#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
|
||||
struct msghdr msg;
|
||||
char tmp[CMSG_SPACE(sizeof(int))];
|
||||
struct cmsghdr *cmsg;
|
||||
struct iovec vec;
|
||||
char ch;
|
||||
int fd, n;
|
||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
char tmp[CMSG_SPACE(sizeof(int))];
|
||||
struct cmsghdr *cmsg;
|
||||
#endif
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
vec.iov_base = &ch;
|
||||
vec.iov_len = 1;
|
||||
msg.msg_iov = &vec;
|
||||
msg.msg_iovlen = 1;
|
||||
#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
msg.msg_accrights = (caddr_t)&fd;
|
||||
msg.msg_accrightslen = sizeof(fd);
|
||||
#else
|
||||
msg.msg_control = tmp;
|
||||
msg.msg_controllen = sizeof(tmp);
|
||||
#endif
|
||||
|
||||
if ((n = recvmsg(socket, &msg, 0)) == -1)
|
||||
fatal("%s: recvmsg: %s", __func__, strerror(errno));
|
||||
@ -87,10 +107,19 @@ mm_receive_fd(int socket)
|
||||
fatal("%s: recvmsg: expected received 1 got %d",
|
||||
__func__, n);
|
||||
|
||||
#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
if (msg.msg_accrightslen != sizeof(fd))
|
||||
fatal("%s: no fd", __func__);
|
||||
#else
|
||||
cmsg = CMSG_FIRSTHDR(&msg);
|
||||
if (cmsg->cmsg_type != SCM_RIGHTS)
|
||||
fatal("%s: expected type %d got %d", __func__,
|
||||
SCM_RIGHTS, cmsg->cmsg_type);
|
||||
fd = (*(int *)CMSG_DATA(cmsg));
|
||||
#endif
|
||||
return fd;
|
||||
#else
|
||||
fatal("%s: UsePrivilegeSeparation=yes not supported",
|
||||
__func__);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: monitor_fdpass.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */
|
||||
/* $OpenBSD: monitor_fdpass.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
|
@ -26,7 +26,9 @@
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $");
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "ssh.h"
|
||||
#include "xmalloc.h"
|
||||
@ -82,10 +84,15 @@ mm_create(struct mm_master *mmalloc, size_t size)
|
||||
*/
|
||||
mm->mmalloc = mmalloc;
|
||||
|
||||
#if defined(HAVE_MMAP) && defined(MAP_ANON)
|
||||
address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
|
||||
-1, 0);
|
||||
if (address == MAP_FAILED)
|
||||
fatal("mmap(%lu): %s", (u_long)size, strerror(errno));
|
||||
#else
|
||||
fatal("%s: UsePrivilegeSeparation=yes not supported",
|
||||
__func__);
|
||||
#endif
|
||||
|
||||
mm->address = address;
|
||||
mm->size = size;
|
||||
@ -123,9 +130,14 @@ mm_destroy(struct mm_master *mm)
|
||||
mm_freelist(mm->mmalloc, &mm->rb_free);
|
||||
mm_freelist(mm->mmalloc, &mm->rb_allocated);
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (munmap(mm->address, mm->size) == -1)
|
||||
fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size,
|
||||
strerror(errno));
|
||||
#else
|
||||
fatal("%s: UsePrivilegeSeparation=yes not supported",
|
||||
__func__);
|
||||
#endif
|
||||
if (mm->mmalloc == NULL)
|
||||
xfree(mm);
|
||||
else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: monitor_mm.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */
|
||||
/* $OpenBSD: monitor_mm.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#ifndef _MM_H_
|
||||
#define _MM_H_
|
||||
#include <sys/tree.h>
|
||||
#include "openbsd-compat/tree.h"
|
||||
|
||||
struct mm_share {
|
||||
RB_ENTRY(mm_share) next;
|
||||
|
@ -197,7 +197,9 @@ mm_getpwnamallow(const char *login)
|
||||
pw->pw_name = buffer_get_string(&m, NULL);
|
||||
pw->pw_passwd = buffer_get_string(&m, NULL);
|
||||
pw->pw_gecos = buffer_get_string(&m, NULL);
|
||||
#ifdef HAVE_PW_CLASS_IN_PASSWD
|
||||
pw->pw_class = buffer_get_string(&m, NULL);
|
||||
#endif
|
||||
pw->pw_dir = buffer_get_string(&m, NULL);
|
||||
pw->pw_shell = buffer_get_string(&m, NULL);
|
||||
buffer_free(&m);
|
||||
@ -647,6 +649,23 @@ mm_session_pty_cleanup2(void *session)
|
||||
s->ttyfd = -1;
|
||||
}
|
||||
|
||||
#ifdef USE_PAM
|
||||
void
|
||||
mm_start_pam(char *user)
|
||||
{
|
||||
Buffer m;
|
||||
|
||||
debug3("%s entering", __func__);
|
||||
|
||||
buffer_init(&m);
|
||||
buffer_put_cstring(&m, user);
|
||||
|
||||
mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_START, &m);
|
||||
|
||||
buffer_free(&m);
|
||||
}
|
||||
#endif /* USE_PAM */
|
||||
|
||||
/* Request process termination */
|
||||
|
||||
void
|
||||
|
@ -55,6 +55,10 @@ int mm_auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
|
||||
int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
|
||||
BIGNUM *mm_auth_rsa_generate_challenge(Key *);
|
||||
|
||||
#ifdef USE_PAM
|
||||
void mm_start_pam(char *);
|
||||
#endif
|
||||
|
||||
void mm_terminate(void);
|
||||
int mm_pty_allocate(int *, int *, char *, int);
|
||||
void mm_session_pty_cleanup2(void *);
|
||||
|
@ -463,7 +463,13 @@ chan_shutdown_read(Channel *c)
|
||||
return;
|
||||
debug("channel %d: close_read", c->self);
|
||||
if (c->sock != -1) {
|
||||
if (shutdown(c->sock, SHUT_RD) < 0)
|
||||
/*
|
||||
* shutdown(sock, SHUT_READ) may return ENOTCONN if the
|
||||
* write side has been closed already. (bug on Linux)
|
||||
* HP-UX may return ENOTCONN also.
|
||||
*/
|
||||
if (shutdown(c->sock, SHUT_RD) < 0
|
||||
&& errno != ENOTCONN)
|
||||
error("channel %d: chan_shutdown_read: "
|
||||
"shutdown() failed for fd%d [i%d o%d]: %.100s",
|
||||
c->self, c->sock, c->istate, c->ostate,
|
||||
|
42
crypto/openssh/openbsd-compat/Makefile.in
Normal file
42
crypto/openssh/openbsd-compat/Makefile.in
Normal file
@ -0,0 +1,42 @@
|
||||
# $Id: Makefile.in,v 1.21 2002/02/19 20:27:57 mouring Exp $
|
||||
|
||||
sysconfdir=@sysconfdir@
|
||||
piddir=@piddir@
|
||||
srcdir=@srcdir@
|
||||
top_srcdir=@top_srcdir@
|
||||
|
||||
VPATH=@srcdir@
|
||||
CC=@CC@
|
||||
LD=@LD@
|
||||
CFLAGS=@CFLAGS@
|
||||
CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
|
||||
LIBS=@LIBS@
|
||||
AR=@AR@
|
||||
RANLIB=@RANLIB@
|
||||
INSTALL=@INSTALL@
|
||||
LDFLAGS=-L. @LDFLAGS@
|
||||
|
||||
OPENBSD=base64.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o
|
||||
|
||||
COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o
|
||||
|
||||
PORTS=port-irix.o port-aix.o
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
all: libopenbsd-compat.a
|
||||
|
||||
$(COMPAT): ../config.h
|
||||
$(OPENBSD): ../config.h
|
||||
$(PORTS): ../config.h
|
||||
|
||||
libopenbsd-compat.a: $(COMPAT) $(OPENBSD) $(PORTS)
|
||||
$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a core
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile *~
|
316
crypto/openssh/openbsd-compat/base64.c
Normal file
316
crypto/openssh/openbsd-compat/base64.c
Normal file
@ -0,0 +1,316 @@
|
||||
/* $OpenBSD: base64.c,v 1.3 1997/11/08 20:46:55 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions Copyright (c) 1995 by International Business Machines, Inc.
|
||||
*
|
||||
* International Business Machines, Inc. (hereinafter called IBM) grants
|
||||
* permission under its copyrights to use, copy, modify, and distribute this
|
||||
* Software with or without fee, provided that the above copyright notice and
|
||||
* all paragraphs of this notice appear in all copies, and that the name of IBM
|
||||
* not be used in connection with the marketing of any product incorporating
|
||||
* the Software or modifications thereof, without specific, written prior
|
||||
* permission.
|
||||
*
|
||||
* To the extent it has a right to do so, IBM grants an immunity from suit
|
||||
* under its patents, if any, for the use, sale or manufacture of products to
|
||||
* the extent that such products are used for performing Domain Name System
|
||||
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
|
||||
* granted for any product per se or for any other function of any product.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
|
||||
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "base64.h"
|
||||
|
||||
#define Assert(Cond) if (!(Cond)) abort()
|
||||
|
||||
static const char Base64[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
static const char Pad64 = '=';
|
||||
|
||||
/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
|
||||
The following encoding technique is taken from RFC 1521 by Borenstein
|
||||
and Freed. It is reproduced here in a slightly edited form for
|
||||
convenience.
|
||||
|
||||
A 65-character subset of US-ASCII is used, enabling 6 bits to be
|
||||
represented per printable character. (The extra 65th character, "=",
|
||||
is used to signify a special processing function.)
|
||||
|
||||
The encoding process represents 24-bit groups of input bits as output
|
||||
strings of 4 encoded characters. Proceeding from left to right, a
|
||||
24-bit input group is formed by concatenating 3 8-bit input groups.
|
||||
These 24 bits are then treated as 4 concatenated 6-bit groups, each
|
||||
of which is translated into a single digit in the base64 alphabet.
|
||||
|
||||
Each 6-bit group is used as an index into an array of 64 printable
|
||||
characters. The character referenced by the index is placed in the
|
||||
output string.
|
||||
|
||||
Table 1: The Base64 Alphabet
|
||||
|
||||
Value Encoding Value Encoding Value Encoding Value Encoding
|
||||
0 A 17 R 34 i 51 z
|
||||
1 B 18 S 35 j 52 0
|
||||
2 C 19 T 36 k 53 1
|
||||
3 D 20 U 37 l 54 2
|
||||
4 E 21 V 38 m 55 3
|
||||
5 F 22 W 39 n 56 4
|
||||
6 G 23 X 40 o 57 5
|
||||
7 H 24 Y 41 p 58 6
|
||||
8 I 25 Z 42 q 59 7
|
||||
9 J 26 a 43 r 60 8
|
||||
10 K 27 b 44 s 61 9
|
||||
11 L 28 c 45 t 62 +
|
||||
12 M 29 d 46 u 63 /
|
||||
13 N 30 e 47 v
|
||||
14 O 31 f 48 w (pad) =
|
||||
15 P 32 g 49 x
|
||||
16 Q 33 h 50 y
|
||||
|
||||
Special processing is performed if fewer than 24 bits are available
|
||||
at the end of the data being encoded. A full encoding quantum is
|
||||
always completed at the end of a quantity. When fewer than 24 input
|
||||
bits are available in an input group, zero bits are added (on the
|
||||
right) to form an integral number of 6-bit groups. Padding at the
|
||||
end of the data is performed using the '=' character.
|
||||
|
||||
Since all base64 input is an integral number of octets, only the
|
||||
-------------------------------------------------
|
||||
following cases can arise:
|
||||
|
||||
(1) the final quantum of encoding input is an integral
|
||||
multiple of 24 bits; here, the final unit of encoded
|
||||
output will be an integral multiple of 4 characters
|
||||
with no "=" padding,
|
||||
(2) the final quantum of encoding input is exactly 8 bits;
|
||||
here, the final unit of encoded output will be two
|
||||
characters followed by two "=" padding characters, or
|
||||
(3) the final quantum of encoding input is exactly 16 bits;
|
||||
here, the final unit of encoded output will be three
|
||||
characters followed by one "=" padding character.
|
||||
*/
|
||||
|
||||
int
|
||||
b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
|
||||
{
|
||||
size_t datalength = 0;
|
||||
u_char input[3];
|
||||
u_char output[4];
|
||||
int i;
|
||||
|
||||
while (2 < srclength) {
|
||||
input[0] = *src++;
|
||||
input[1] = *src++;
|
||||
input[2] = *src++;
|
||||
srclength -= 3;
|
||||
|
||||
output[0] = input[0] >> 2;
|
||||
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
|
||||
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
|
||||
output[3] = input[2] & 0x3f;
|
||||
Assert(output[0] < 64);
|
||||
Assert(output[1] < 64);
|
||||
Assert(output[2] < 64);
|
||||
Assert(output[3] < 64);
|
||||
|
||||
if (datalength + 4 > targsize)
|
||||
return (-1);
|
||||
target[datalength++] = Base64[output[0]];
|
||||
target[datalength++] = Base64[output[1]];
|
||||
target[datalength++] = Base64[output[2]];
|
||||
target[datalength++] = Base64[output[3]];
|
||||
}
|
||||
|
||||
/* Now we worry about padding. */
|
||||
if (0 != srclength) {
|
||||
/* Get what's left. */
|
||||
input[0] = input[1] = input[2] = '\0';
|
||||
for (i = 0; i < srclength; i++)
|
||||
input[i] = *src++;
|
||||
|
||||
output[0] = input[0] >> 2;
|
||||
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
|
||||
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
|
||||
Assert(output[0] < 64);
|
||||
Assert(output[1] < 64);
|
||||
Assert(output[2] < 64);
|
||||
|
||||
if (datalength + 4 > targsize)
|
||||
return (-1);
|
||||
target[datalength++] = Base64[output[0]];
|
||||
target[datalength++] = Base64[output[1]];
|
||||
if (srclength == 1)
|
||||
target[datalength++] = Pad64;
|
||||
else
|
||||
target[datalength++] = Base64[output[2]];
|
||||
target[datalength++] = Pad64;
|
||||
}
|
||||
if (datalength >= targsize)
|
||||
return (-1);
|
||||
target[datalength] = '\0'; /* Returned value doesn't count \0. */
|
||||
return (datalength);
|
||||
}
|
||||
|
||||
/* skips all whitespace anywhere.
|
||||
converts characters, four at a time, starting at (or after)
|
||||
src from base - 64 numbers into three 8 bit bytes in the target area.
|
||||
it returns the number of data bytes stored at the target, or -1 on error.
|
||||
*/
|
||||
|
||||
int
|
||||
b64_pton(char const *src, u_char *target, size_t targsize)
|
||||
{
|
||||
int tarindex, state, ch;
|
||||
char *pos;
|
||||
|
||||
state = 0;
|
||||
tarindex = 0;
|
||||
|
||||
while ((ch = *src++) != '\0') {
|
||||
if (isspace(ch)) /* Skip whitespace anywhere. */
|
||||
continue;
|
||||
|
||||
if (ch == Pad64)
|
||||
break;
|
||||
|
||||
pos = strchr(Base64, ch);
|
||||
if (pos == 0) /* A non-base64 character. */
|
||||
return (-1);
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (target) {
|
||||
if (tarindex >= targsize)
|
||||
return (-1);
|
||||
target[tarindex] = (pos - Base64) << 2;
|
||||
}
|
||||
state = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (target) {
|
||||
if (tarindex + 1 >= targsize)
|
||||
return (-1);
|
||||
target[tarindex] |= (pos - Base64) >> 4;
|
||||
target[tarindex+1] = ((pos - Base64) & 0x0f)
|
||||
<< 4 ;
|
||||
}
|
||||
tarindex++;
|
||||
state = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (target) {
|
||||
if (tarindex + 1 >= targsize)
|
||||
return (-1);
|
||||
target[tarindex] |= (pos - Base64) >> 2;
|
||||
target[tarindex+1] = ((pos - Base64) & 0x03)
|
||||
<< 6;
|
||||
}
|
||||
tarindex++;
|
||||
state = 3;
|
||||
break;
|
||||
case 3:
|
||||
if (target) {
|
||||
if (tarindex >= targsize)
|
||||
return (-1);
|
||||
target[tarindex] |= (pos - Base64);
|
||||
}
|
||||
tarindex++;
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We are done decoding Base-64 chars. Let's see if we ended
|
||||
* on a byte boundary, and/or with erroneous trailing characters.
|
||||
*/
|
||||
|
||||
if (ch == Pad64) { /* We got a pad char. */
|
||||
ch = *src++; /* Skip it, get next. */
|
||||
switch (state) {
|
||||
case 0: /* Invalid = in first position */
|
||||
case 1: /* Invalid = in second position */
|
||||
return (-1);
|
||||
|
||||
case 2: /* Valid, means one byte of info */
|
||||
/* Skip any number of spaces. */
|
||||
for (; ch != '\0'; ch = *src++)
|
||||
if (!isspace(ch))
|
||||
break;
|
||||
/* Make sure there is another trailing = sign. */
|
||||
if (ch != Pad64)
|
||||
return (-1);
|
||||
ch = *src++; /* Skip the = */
|
||||
/* Fall through to "single trailing =" case. */
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 3: /* Valid, means two bytes of info */
|
||||
/*
|
||||
* We know this char is an =. Is there anything but
|
||||
* whitespace after it?
|
||||
*/
|
||||
for (; ch != '\0'; ch = *src++)
|
||||
if (!isspace(ch))
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Now make sure for cases 2 and 3 that the "extra"
|
||||
* bits that slopped past the last full byte were
|
||||
* zeros. If we don't check them, they become a
|
||||
* subliminal channel.
|
||||
*/
|
||||
if (target && target[tarindex] != 0)
|
||||
return (-1);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* We ended by seeing the end of the string. Make sure we
|
||||
* have no partial bytes lying around.
|
||||
*/
|
||||
if (state != 0)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return (tarindex);
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */
|
18
crypto/openssh/openbsd-compat/base64.h
Normal file
18
crypto/openssh/openbsd-compat/base64.h
Normal file
@ -0,0 +1,18 @@
|
||||
/* $Id: base64.h,v 1.3 2002/02/26 16:59:59 stevesk Exp $ */
|
||||
|
||||
#ifndef _BSD_BASE64_H
|
||||
#define _BSD_BASE64_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE___B64_NTOP
|
||||
# ifndef HAVE_B64_NTOP
|
||||
int b64_ntop(u_char const *src, size_t srclength, char *target,
|
||||
size_t targsize);
|
||||
int b64_pton(char const *src, u_char *target, size_t targsize);
|
||||
# endif /* !HAVE_B64_NTOP */
|
||||
# define __b64_ntop b64_ntop
|
||||
# define __b64_pton b64_pton
|
||||
#endif /* HAVE___B64_NTOP */
|
||||
|
||||
#endif /* _BSD_BASE64_H */
|
123
crypto/openssh/openbsd-compat/bindresvport.c
Normal file
123
crypto/openssh/openbsd-compat/bindresvport.c
Normal file
@ -0,0 +1,123 @@
|
||||
/* This file has be modified from the original OpenBSD source */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
* media and as a part of the software program in whole or part. Users
|
||||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_BINDRESVPORT_SA
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$OpenBSD: bindresvport.c,v 1.13 2000/01/26 03:43:21 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987 by Sun Microsystems, Inc.
|
||||
*
|
||||
* Portions Copyright(C) 1996, Jason Downs. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#define STARTPORT 600
|
||||
#define ENDPORT (IPPORT_RESERVED - 1)
|
||||
#define NPORTS (ENDPORT - STARTPORT + 1)
|
||||
|
||||
/*
|
||||
* Bind a socket to a privileged IP port
|
||||
*/
|
||||
int
|
||||
bindresvport_sa(sd, sa)
|
||||
int sd;
|
||||
struct sockaddr *sa;
|
||||
{
|
||||
int error, af;
|
||||
struct sockaddr_storage myaddr;
|
||||
struct sockaddr_in *sin;
|
||||
struct sockaddr_in6 *sin6;
|
||||
u_int16_t *portp;
|
||||
u_int16_t port;
|
||||
socklen_t salen;
|
||||
int i;
|
||||
|
||||
if (sa == NULL) {
|
||||
memset(&myaddr, 0, sizeof(myaddr));
|
||||
sa = (struct sockaddr *)&myaddr;
|
||||
|
||||
if (getsockname(sd, sa, &salen) == -1)
|
||||
return -1; /* errno is correctly set */
|
||||
|
||||
af = sa->sa_family;
|
||||
memset(&myaddr, 0, salen);
|
||||
} else
|
||||
af = sa->sa_family;
|
||||
|
||||
if (af == AF_INET) {
|
||||
sin = (struct sockaddr_in *)sa;
|
||||
salen = sizeof(struct sockaddr_in);
|
||||
portp = &sin->sin_port;
|
||||
} else if (af == AF_INET6) {
|
||||
sin6 = (struct sockaddr_in6 *)sa;
|
||||
salen = sizeof(struct sockaddr_in6);
|
||||
portp = &sin6->sin6_port;
|
||||
} else {
|
||||
errno = EPFNOSUPPORT;
|
||||
return (-1);
|
||||
}
|
||||
sa->sa_family = af;
|
||||
|
||||
port = ntohs(*portp);
|
||||
if (port == 0)
|
||||
port = (arc4random() % NPORTS) + STARTPORT;
|
||||
|
||||
/* Avoid warning */
|
||||
error = -1;
|
||||
|
||||
for(i = 0; i < NPORTS; i++) {
|
||||
*portp = htons(port);
|
||||
|
||||
error = bind(sd, sa, salen);
|
||||
|
||||
/* Terminate on success */
|
||||
if (error == 0)
|
||||
break;
|
||||
|
||||
/* Terminate on errors, except "address already in use" */
|
||||
if ((error < 0) && !((errno == EADDRINUSE) || (errno == EINVAL)))
|
||||
break;
|
||||
|
||||
port++;
|
||||
if (port > ENDPORT)
|
||||
port = STARTPORT;
|
||||
}
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
#endif /* HAVE_BINDRESVPORT_SA */
|
12
crypto/openssh/openbsd-compat/bindresvport.h
Normal file
12
crypto/openssh/openbsd-compat/bindresvport.h
Normal file
@ -0,0 +1,12 @@
|
||||
/* $Id: bindresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_BINDRESVPORT_H
|
||||
#define _BSD_BINDRESVPORT_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_BINDRESVPORT_SA
|
||||
int bindresvport_sa(int sd, struct sockaddr *sa);
|
||||
#endif /* !HAVE_BINDRESVPORT_SA */
|
||||
|
||||
#endif /* _BSD_BINDRESVPORT_H */
|
77
crypto/openssh/openbsd-compat/bsd-arc4random.c
Normal file
77
crypto/openssh/openbsd-compat/bsd-arc4random.c
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "log.h"
|
||||
|
||||
RCSID("$Id: bsd-arc4random.c,v 1.5 2002/05/08 22:57:18 tim Exp $");
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/rc4.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
/* Size of key to use */
|
||||
#define SEED_SIZE 20
|
||||
|
||||
/* Number of bytes to reseed after */
|
||||
#define REKEY_BYTES (1 << 24)
|
||||
|
||||
static int rc4_ready = 0;
|
||||
static RC4_KEY rc4;
|
||||
|
||||
unsigned int arc4random(void)
|
||||
{
|
||||
unsigned int r = 0;
|
||||
static int first_time = 1;
|
||||
|
||||
if (rc4_ready <= 0) {
|
||||
if (first_time)
|
||||
seed_rng();
|
||||
first_time = 0;
|
||||
arc4random_stir();
|
||||
}
|
||||
|
||||
RC4(&rc4, sizeof(r), (unsigned char *)&r, (unsigned char *)&r);
|
||||
|
||||
rc4_ready -= sizeof(r);
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
||||
void arc4random_stir(void)
|
||||
{
|
||||
unsigned char rand_buf[SEED_SIZE];
|
||||
|
||||
memset(&rc4, 0, sizeof(rc4));
|
||||
if (!RAND_bytes(rand_buf, sizeof(rand_buf)))
|
||||
fatal("Couldn't obtain random bytes (error %ld)",
|
||||
ERR_get_error());
|
||||
RC4_set_key(&rc4, sizeof(rand_buf), rand_buf);
|
||||
memset(rand_buf, 0, sizeof(rand_buf));
|
||||
|
||||
rc4_ready = REKEY_BYTES;
|
||||
}
|
||||
#endif /* !HAVE_ARC4RANDOM */
|
37
crypto/openssh/openbsd-compat/bsd-arc4random.h
Normal file
37
crypto/openssh/openbsd-compat/bsd-arc4random.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: bsd-arc4random.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_ARC4RANDOM_H
|
||||
#define _BSD_ARC4RANDOM_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
unsigned int arc4random(void);
|
||||
void arc4random_stir(void);
|
||||
#endif /* !HAVE_ARC4RANDOM */
|
||||
|
||||
#endif /* _BSD_ARC4RANDOM_H */
|
300
crypto/openssh/openbsd-compat/bsd-cray.c
Normal file
300
crypto/openssh/openbsd-compat/bsd-cray.c
Normal file
@ -0,0 +1,300 @@
|
||||
/*
|
||||
* $Id: bsd-cray.c,v 1.6 2002/05/15 16:39:51 mouring Exp $
|
||||
*
|
||||
* bsd-cray.c
|
||||
*
|
||||
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
||||
* Significant portions provided by
|
||||
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
||||
* William Jones, UTexas <jones@tacc.utexas.edu>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Created: Apr 22 16.34:00 2002 wp
|
||||
*
|
||||
* This file contains functions required for proper execution
|
||||
* on UNICOS systems.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef _CRAY
|
||||
#include <udb.h>
|
||||
#include <tmpdir.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/category.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/jtab.h>
|
||||
#include <signal.h>
|
||||
#include <sys/priv.h>
|
||||
#include <sys/secparm.h>
|
||||
#include <sys/usrv.h>
|
||||
#include <sys/sysv.h>
|
||||
#include <sys/sectab.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "bsd-cray.h"
|
||||
|
||||
char cray_tmpdir[TPATHSIZ+1]; /* job TMPDIR path */
|
||||
|
||||
/*
|
||||
* Functions.
|
||||
*/
|
||||
void cray_retain_utmp(struct utmp *, int);
|
||||
void cray_delete_tmpdir(char *, int, uid_t);
|
||||
void cray_init_job(struct passwd *);
|
||||
void cray_set_tmpdir(struct utmp *);
|
||||
|
||||
|
||||
/*
|
||||
* Orignal written by:
|
||||
* Wayne Schroeder
|
||||
* San Diego Supercomputer Center
|
||||
* schroeder@sdsc.edu
|
||||
*/
|
||||
void
|
||||
cray_setup(uid_t uid, char *username)
|
||||
{
|
||||
struct udb *p;
|
||||
extern char *setlimits();
|
||||
int i, j;
|
||||
int accts[MAXVIDS];
|
||||
int naccts;
|
||||
int err;
|
||||
char *sr;
|
||||
int pid;
|
||||
struct jtab jbuf;
|
||||
int jid;
|
||||
|
||||
if ((jid = getjtab(&jbuf)) < 0)
|
||||
fatal("getjtab: no jid");
|
||||
|
||||
err = setudb(); /* open and rewind the Cray User DataBase */
|
||||
if (err != 0)
|
||||
fatal("UDB open failure");
|
||||
naccts = 0;
|
||||
p = getudbnam(username);
|
||||
if (p == NULL)
|
||||
fatal("No UDB entry for %.100s", username);
|
||||
if (uid != p->ue_uid)
|
||||
fatal("UDB entry %.100s uid(%d) does not match uid %d",
|
||||
username, (int) p->ue_uid, (int) uid);
|
||||
for (j = 0; p->ue_acids[j] != -1 && j < MAXVIDS; j++) {
|
||||
accts[naccts] = p->ue_acids[j];
|
||||
naccts++;
|
||||
}
|
||||
endudb(); /* close the udb */
|
||||
|
||||
if (naccts != 0) {
|
||||
/* Perhaps someday we'll prompt users who have multiple accounts
|
||||
to let them pick one (like CRI's login does), but for now just set
|
||||
the account to the first entry. */
|
||||
if (acctid(0, accts[0]) < 0)
|
||||
fatal("System call acctid failed, accts[0]=%d", accts[0]);
|
||||
}
|
||||
|
||||
/* Now set limits, including CPU time for the (interactive) job and process,
|
||||
and set up permissions (for chown etc), etc. This is via an internal CRI
|
||||
routine, setlimits, used by CRI's login. */
|
||||
|
||||
pid = getpid();
|
||||
sr = setlimits(username, C_PROC, pid, UDBRC_INTER);
|
||||
if (sr != NULL)
|
||||
fatal("%.200s", sr);
|
||||
|
||||
sr = setlimits(username, C_JOB, jid, UDBRC_INTER);
|
||||
if (sr != NULL)
|
||||
fatal("%.200s", sr);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* The rc.* and /etc/sdaemon methods of starting a program on unicos/unicosmk
|
||||
* can have pal privileges that sshd can inherit which
|
||||
* could allow a user to su to root with out a password.
|
||||
* This subroutine clears all privileges.
|
||||
*/
|
||||
void
|
||||
drop_cray_privs()
|
||||
{
|
||||
#if defined(_SC_CRAY_PRIV_SU)
|
||||
priv_proc_t* privstate;
|
||||
int result;
|
||||
extern int priv_set_proc();
|
||||
extern priv_proc_t* priv_init_proc();
|
||||
struct usrv usrv;
|
||||
|
||||
/*
|
||||
* If ether of theses two flags are not set
|
||||
* then don't allow this version of ssh to run.
|
||||
*/
|
||||
if (!sysconf(_SC_CRAY_PRIV_SU))
|
||||
fatal("Not PRIV_SU system.");
|
||||
if (!sysconf(_SC_CRAY_POSIX_PRIV))
|
||||
fatal("Not POSIX_PRIV.");
|
||||
|
||||
debug("Dropping privileges.");
|
||||
|
||||
memset(&usrv, 0, sizeof(usrv));
|
||||
if (setusrv(&usrv) < 0)
|
||||
fatal("%s(%d): setusrv(): %s", __FILE__, __LINE__,
|
||||
strerror(errno));
|
||||
|
||||
if ((privstate = priv_init_proc()) != NULL) {
|
||||
result = priv_set_proc(privstate);
|
||||
if (result != 0 )
|
||||
fatal("%s(%d): priv_set_proc(): %s",
|
||||
__FILE__, __LINE__, strerror(errno));
|
||||
priv_free_proc(privstate);
|
||||
}
|
||||
debug ("Privileges should be cleared...");
|
||||
#else
|
||||
/* XXX: do this differently */
|
||||
# error Cray systems must be run with _SC_CRAY_PRIV_SU on!
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Retain utmp/wtmp information - used by cray accounting.
|
||||
*/
|
||||
void
|
||||
cray_retain_utmp(struct utmp *ut, int pid)
|
||||
{
|
||||
int fd;
|
||||
struct utmp utmp;
|
||||
|
||||
if ((fd = open(UTMP_FILE, O_RDONLY)) != -1) {
|
||||
while (read(fd, (char *)&utmp, sizeof(utmp)) == sizeof(utmp)) {
|
||||
if (pid == utmp.ut_pid) {
|
||||
ut->ut_jid = utmp.ut_jid;
|
||||
/* XXX: MIN_SIZEOF here? can this go in loginrec? */
|
||||
strncpy(ut->ut_tpath, utmp.ut_tpath, sizeof(utmp.ut_tpath));
|
||||
strncpy(ut->ut_host, utmp.ut_host, sizeof(utmp.ut_host));
|
||||
strncpy(ut->ut_name, utmp.ut_name, sizeof(utmp.ut_name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
/* XXX: error message? */
|
||||
}
|
||||
|
||||
/*
|
||||
* tmpdir support.
|
||||
*/
|
||||
|
||||
/*
|
||||
* find and delete jobs tmpdir.
|
||||
*/
|
||||
void
|
||||
cray_delete_tmpdir(char *login, int jid, uid_t uid)
|
||||
{
|
||||
int child;
|
||||
static char jtmp[TPATHSIZ];
|
||||
struct stat statbuf;
|
||||
int c;
|
||||
int wstat;
|
||||
|
||||
for (c = 'a'; c <= 'z'; c++) {
|
||||
snprintf(jtmp, TPATHSIZ, "%s/jtmp.%06d%c", JTMPDIR, jid, c);
|
||||
if (stat(jtmp, &statbuf) == 0 && statbuf.st_uid == uid)
|
||||
break;
|
||||
}
|
||||
|
||||
if (c > 'z')
|
||||
return;
|
||||
|
||||
if ((child = fork()) == 0) {
|
||||
execl(CLEANTMPCMD, CLEANTMPCMD, login, jtmp, (char *)NULL);
|
||||
fatal("cray_delete_tmpdir: execl of CLEANTMPCMD failed");
|
||||
}
|
||||
|
||||
while (waitpid(child, &wstat, 0) == -1 && errno == EINTR)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove tmpdir on job termination.
|
||||
*/
|
||||
void
|
||||
cray_job_termination_handler(int sig)
|
||||
{
|
||||
int jid;
|
||||
char *login = NULL;
|
||||
struct jtab jtab;
|
||||
|
||||
debug("Received SIG JOB.");
|
||||
|
||||
if ((jid = waitjob(&jtab)) == -1 ||
|
||||
(login = uid2nam(jtab.j_uid)) == NULL)
|
||||
return;
|
||||
|
||||
cray_delete_tmpdir(login, jid, jtab.j_uid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set job id and create tmpdir directory.
|
||||
*/
|
||||
void
|
||||
cray_init_job(struct passwd *pw)
|
||||
{
|
||||
int jid;
|
||||
int c;
|
||||
|
||||
jid = setjob(pw->pw_uid, WJSIGNAL);
|
||||
if (jid < 0)
|
||||
fatal("System call setjob failure");
|
||||
|
||||
for (c = 'a'; c <= 'z'; c++) {
|
||||
snprintf(cray_tmpdir, TPATHSIZ, "%s/jtmp.%06d%c", JTMPDIR, jid, c);
|
||||
if (mkdir(cray_tmpdir, JTMPMODE) != 0)
|
||||
continue;
|
||||
if (chown(cray_tmpdir, pw->pw_uid, pw->pw_gid) != 0) {
|
||||
rmdir(cray_tmpdir);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (c > 'z')
|
||||
cray_tmpdir[0] = '\0';
|
||||
}
|
||||
|
||||
void
|
||||
cray_set_tmpdir(struct utmp *ut)
|
||||
{
|
||||
int jid;
|
||||
struct jtab jbuf;
|
||||
|
||||
if ((jid = getjtab(&jbuf)) < 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Set jid and tmpdir in utmp record.
|
||||
*/
|
||||
ut->ut_jid = jid;
|
||||
strncpy(ut->ut_tpath, cray_tmpdir, TPATHSIZ);
|
||||
}
|
||||
#endif
|
47
crypto/openssh/openbsd-compat/bsd-cray.h
Normal file
47
crypto/openssh/openbsd-compat/bsd-cray.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* $Id: bsd-cray.h,v 1.3 2002/05/15 16:39:52 mouring Exp $
|
||||
*
|
||||
* bsd-cray.h
|
||||
*
|
||||
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
||||
* Significant portions provided by
|
||||
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
||||
* William Jones, UTexas <jones@tacc.utexas.edu>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Created: Apr 22 16.34:00 2002 wp
|
||||
*
|
||||
* This file contains functions required for proper execution
|
||||
* on UNICOS systems.
|
||||
*
|
||||
*/
|
||||
#ifndef _BSD_CRAY_H
|
||||
#define _BSD_CRAY_H
|
||||
|
||||
#ifdef _CRAY
|
||||
void cray_init_job(struct passwd *); /* init cray job */
|
||||
void cray_job_termination_handler(int); /* process end of job signal */
|
||||
void cray_setup(uid_t, char *); /* set cray limits */
|
||||
extern char cray_tmpdir[]; /* cray tmpdir */
|
||||
#endif
|
||||
|
||||
#endif /* _BSD_CRAY_H */
|
182
crypto/openssh/openbsd-compat/bsd-cygwin_util.c
Normal file
182
crypto/openssh/openbsd-compat/bsd-cygwin_util.c
Normal file
@ -0,0 +1,182 @@
|
||||
/*
|
||||
* cygwin_util.c
|
||||
*
|
||||
* Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Created: Sat Sep 02 12:17:00 2000 cv
|
||||
*
|
||||
* This file contains functions for forcing opened file descriptors to
|
||||
* binary mode on Windows systems.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: bsd-cygwin_util.c,v 1.8 2002/04/15 22:00:52 stevesk Exp $");
|
||||
|
||||
#ifdef HAVE_CYGWIN
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <windows.h>
|
||||
#define is_winnt (GetVersion() < 0x80000000)
|
||||
|
||||
#define ntsec_on(c) ((c) && strstr((c),"ntsec") && !strstr((c),"nontsec"))
|
||||
#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea"))
|
||||
|
||||
#if defined(open) && open == binary_open
|
||||
# undef open
|
||||
#endif
|
||||
#if defined(pipe) && open == binary_pipe
|
||||
# undef pipe
|
||||
#endif
|
||||
|
||||
int binary_open(const char *filename, int flags, ...)
|
||||
{
|
||||
va_list ap;
|
||||
mode_t mode;
|
||||
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, mode_t);
|
||||
va_end(ap);
|
||||
return open(filename, flags | O_BINARY, mode);
|
||||
}
|
||||
|
||||
int binary_pipe(int fd[2])
|
||||
{
|
||||
int ret = pipe(fd);
|
||||
|
||||
if (!ret) {
|
||||
setmode (fd[0], O_BINARY);
|
||||
setmode (fd[1], O_BINARY);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int check_nt_auth(int pwd_authenticated, struct passwd *pw)
|
||||
{
|
||||
/*
|
||||
* The only authentication which is able to change the user
|
||||
* context on NT systems is the password authentication. So
|
||||
* we deny all requsts for changing the user context if another
|
||||
* authentication method is used.
|
||||
*
|
||||
* This doesn't apply to Cygwin versions >= 1.3.2 anymore which
|
||||
* uses the undocumented NtCreateToken() call to create a user
|
||||
* token if the process has the appropriate privileges and if
|
||||
* CYGWIN ntsec setting is on.
|
||||
*/
|
||||
static int has_create_token = -1;
|
||||
|
||||
if (pw == NULL)
|
||||
return 0;
|
||||
if (is_winnt) {
|
||||
if (has_create_token < 0) {
|
||||
struct utsname uts;
|
||||
int major_high = 0, major_low = 0, minor = 0;
|
||||
char *cygwin = getenv("CYGWIN");
|
||||
|
||||
has_create_token = 0;
|
||||
if (ntsec_on(cygwin) && !uname(&uts)) {
|
||||
sscanf(uts.release, "%d.%d.%d",
|
||||
&major_high, &major_low, &minor);
|
||||
if (major_high > 1 ||
|
||||
(major_high == 1 && (major_low > 3 ||
|
||||
(major_low == 3 && minor >= 2))))
|
||||
has_create_token = 1;
|
||||
}
|
||||
}
|
||||
if (has_create_token < 1 &&
|
||||
!pwd_authenticated && geteuid() != pw->pw_uid)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int check_ntsec(const char *filename)
|
||||
{
|
||||
char *cygwin;
|
||||
int allow_ntea = 0;
|
||||
int allow_ntsec = 0;
|
||||
struct statfs fsstat;
|
||||
|
||||
/* Windows 95/98/ME don't support file system security at all. */
|
||||
if (!is_winnt)
|
||||
return 0;
|
||||
|
||||
/* Evaluate current CYGWIN settings. */
|
||||
cygwin = getenv("CYGWIN");
|
||||
allow_ntea = ntea_on(cygwin);
|
||||
allow_ntsec = ntsec_on(cygwin);
|
||||
|
||||
/*
|
||||
* `ntea' is an emulation of POSIX attributes. It doesn't support
|
||||
* real file level security as ntsec on NTFS file systems does
|
||||
* but it supports FAT filesystems. `ntea' is minimum requirement
|
||||
* for security checks.
|
||||
*/
|
||||
if (allow_ntea)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Retrieve file system flags. In Cygwin, file system flags are
|
||||
* copied to f_type which has no meaning in Win32 itself.
|
||||
*/
|
||||
if (statfs(filename, &fsstat))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Only file systems supporting ACLs are able to set permissions.
|
||||
* `ntsec' is the setting in Cygwin which switches using of NTFS
|
||||
* ACLs to support POSIX permissions on files.
|
||||
*/
|
||||
if (fsstat.f_type & FS_PERSISTENT_ACLS)
|
||||
return allow_ntsec;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void register_9x_service(void)
|
||||
{
|
||||
HINSTANCE kerneldll;
|
||||
DWORD (*RegisterServiceProcess)(DWORD, DWORD);
|
||||
|
||||
/* The service register mechanism in 9x/Me is pretty different from
|
||||
* NT/2K/XP. In NT/2K/XP we're using a special service starter
|
||||
* application to register and control sshd as service. This method
|
||||
* doesn't play nicely with 9x/Me. For that reason we register here
|
||||
* as service when running under 9x/Me. This function is only called
|
||||
* by the child sshd when it's going to daemonize.
|
||||
*/
|
||||
if (is_winnt)
|
||||
return;
|
||||
if (! (kerneldll = LoadLibrary("KERNEL32.DLL")))
|
||||
return;
|
||||
if (! (RegisterServiceProcess = (DWORD (*)(DWORD, DWORD))
|
||||
GetProcAddress(kerneldll, "RegisterServiceProcess")))
|
||||
return;
|
||||
RegisterServiceProcess(0, 1);
|
||||
}
|
||||
|
||||
#endif /* HAVE_CYGWIN */
|
52
crypto/openssh/openbsd-compat/bsd-cygwin_util.h
Normal file
52
crypto/openssh/openbsd-compat/bsd-cygwin_util.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* $Id: bsd-cygwin_util.h,v 1.7 2002/04/15 22:00:52 stevesk Exp $ */
|
||||
|
||||
/*
|
||||
* cygwin_util.c
|
||||
*
|
||||
* Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Created: Sat Sep 02 12:17:00 2000 cv
|
||||
*
|
||||
* This file contains functions for forcing opened file descriptors to
|
||||
* binary mode on Windows systems.
|
||||
*/
|
||||
|
||||
#ifndef _BSD_CYGWIN_UTIL_H
|
||||
#define _BSD_CYGWIN_UTIL_H
|
||||
|
||||
#ifdef HAVE_CYGWIN
|
||||
|
||||
#include <io.h>
|
||||
|
||||
int binary_open(const char *filename, int flags, ...);
|
||||
int binary_pipe(int fd[2]);
|
||||
int check_nt_auth(int pwd_authenticated, struct passwd *pw);
|
||||
int check_ntsec(const char *filename);
|
||||
void register_9x_service(void);
|
||||
|
||||
#define open binary_open
|
||||
#define pipe binary_pipe
|
||||
|
||||
#endif /* HAVE_CYGWIN */
|
||||
|
||||
#endif /* _BSD_CYGWIN_UTIL_H */
|
131
crypto/openssh/openbsd-compat/bsd-misc.c
Normal file
131
crypto/openssh/openbsd-compat/bsd-misc.c
Normal file
@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: bsd-misc.c,v 1.8 2002/06/13 21:34:58 mouring Exp $");
|
||||
|
||||
char *get_progname(char *argv0)
|
||||
{
|
||||
#ifdef HAVE___PROGNAME
|
||||
extern char *__progname;
|
||||
|
||||
return __progname;
|
||||
#else
|
||||
char *p;
|
||||
|
||||
if (argv0 == NULL)
|
||||
return "unknown"; /* XXX */
|
||||
p = strrchr(argv0, '/');
|
||||
if (p == NULL)
|
||||
p = argv0;
|
||||
else
|
||||
p++;
|
||||
return p;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef HAVE_SETLOGIN
|
||||
int setlogin(const char *name)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
#endif /* !HAVE_SETLOGIN */
|
||||
|
||||
#ifndef HAVE_INNETGR
|
||||
int innetgr(const char *netgroup, const char *host,
|
||||
const char *user, const char *domain)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
#endif /* HAVE_INNETGR */
|
||||
|
||||
#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
|
||||
int seteuid(uid_t euid)
|
||||
{
|
||||
return(setreuid(-1,euid));
|
||||
}
|
||||
#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
|
||||
|
||||
#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
|
||||
int setegid(uid_t egid)
|
||||
{
|
||||
return(setresgid(-1,egid,-1));
|
||||
}
|
||||
#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */
|
||||
|
||||
#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
|
||||
const char *strerror(int e)
|
||||
{
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
|
||||
if ((e >= 0) && (e < sys_nerr))
|
||||
return(sys_errlist[e]);
|
||||
else
|
||||
return("unlisted error");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UTIMES
|
||||
int utimes(char *filename, struct timeval *tvp)
|
||||
{
|
||||
struct utimbuf ub;
|
||||
|
||||
ub.actime = tvp->tv_sec;
|
||||
ub.modtime = tvp->tv_usec;
|
||||
|
||||
return(utime(filename, &ub));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TRUNCATE
|
||||
int truncate (const char *path, off_t length)
|
||||
{
|
||||
int fd, ret, saverrno;
|
||||
|
||||
fd = open(path, O_WRONLY);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
ret = ftruncate(fd, length);
|
||||
saverrno = errno;
|
||||
(void) close (fd);
|
||||
if (ret == -1)
|
||||
errno = saverrno;
|
||||
return(ret);
|
||||
}
|
||||
#endif /* HAVE_TRUNCATE */
|
||||
|
||||
#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
|
||||
/*
|
||||
* Cygwin setgroups should be a noop.
|
||||
*/
|
||||
int
|
||||
setgroups(size_t size, const gid_t *list)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
84
crypto/openssh/openbsd-compat/bsd-misc.h
Normal file
84
crypto/openssh/openbsd-compat/bsd-misc.h
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: bsd-misc.h,v 1.6 2002/06/13 21:34:58 mouring Exp $ */
|
||||
|
||||
#ifndef _BSD_MISC_H
|
||||
#define _BSD_MISC_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
char *get_progname(char *argv0);
|
||||
|
||||
#ifndef HAVE_SETSID
|
||||
#define setsid() setpgrp(0, getpid())
|
||||
#endif /* !HAVE_SETSID */
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv(const char *name, const char *value, int overwrite);
|
||||
#endif /* !HAVE_SETENV */
|
||||
|
||||
#ifndef HAVE_SETLOGIN
|
||||
int setlogin(const char *name);
|
||||
#endif /* !HAVE_SETLOGIN */
|
||||
|
||||
#ifndef HAVE_INNETGR
|
||||
int innetgr(const char *netgroup, const char *host,
|
||||
const char *user, const char *domain);
|
||||
#endif /* HAVE_INNETGR */
|
||||
|
||||
#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
|
||||
int seteuid(uid_t euid);
|
||||
#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
|
||||
|
||||
#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
|
||||
int setegid(uid_t egid);
|
||||
#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */
|
||||
|
||||
#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
|
||||
const char *strerror(int e);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_UTIMES
|
||||
#ifndef HAVE_STRUCT_TIMEVAL
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
}
|
||||
#endif /* HAVE_STRUCT_TIMEVAL */
|
||||
|
||||
int utimes(char *filename, struct timeval *tvp);
|
||||
#endif /* HAVE_UTIMES */
|
||||
|
||||
#ifndef HAVE_TRUNCATE
|
||||
int truncate (const char *path, off_t length);
|
||||
#endif /* HAVE_TRUNCATE */
|
||||
|
||||
#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
|
||||
int setgroups(size_t size, const gid_t *list);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _BSD_MISC_H */
|
103
crypto/openssh/openbsd-compat/bsd-nextstep.c
Normal file
103
crypto/openssh/openbsd-compat/bsd-nextstep.c
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: bsd-nextstep.c,v 1.4 2001/03/26 05:35:34 mouring Exp $");
|
||||
|
||||
#ifdef HAVE_NEXT
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include "bsd-nextstep.h"
|
||||
|
||||
pid_t
|
||||
posix_wait(int *status)
|
||||
{
|
||||
union wait statusp;
|
||||
pid_t wait_pid;
|
||||
|
||||
#undef wait /* Use NeXT's wait() function */
|
||||
wait_pid = wait(&statusp);
|
||||
if (status)
|
||||
*status = (int) statusp.w_status;
|
||||
|
||||
return wait_pid;
|
||||
}
|
||||
|
||||
int
|
||||
tcgetattr(int fd, struct termios *t)
|
||||
{
|
||||
return (ioctl(fd, TIOCGETA, t));
|
||||
}
|
||||
|
||||
int
|
||||
tcsetattr(int fd, int opt, const struct termios *t)
|
||||
{
|
||||
struct termios localterm;
|
||||
|
||||
if (opt & TCSASOFT) {
|
||||
localterm = *t;
|
||||
localterm.c_cflag |= CIGNORE;
|
||||
t = &localterm;
|
||||
}
|
||||
switch (opt & ~TCSASOFT) {
|
||||
case TCSANOW:
|
||||
return (ioctl(fd, TIOCSETA, t));
|
||||
case TCSADRAIN:
|
||||
return (ioctl(fd, TIOCSETAW, t));
|
||||
case TCSAFLUSH:
|
||||
return (ioctl(fd, TIOCSETAF, t));
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
int tcsetpgrp(int fd, pid_t pgrp)
|
||||
{
|
||||
return (ioctl(fd, TIOCSPGRP, &pgrp));
|
||||
}
|
||||
|
||||
speed_t cfgetospeed(const struct termios *t)
|
||||
{
|
||||
return (t->c_ospeed);
|
||||
}
|
||||
|
||||
speed_t cfgetispeed(const struct termios *t)
|
||||
{
|
||||
return (t->c_ispeed);
|
||||
}
|
||||
|
||||
int
|
||||
cfsetospeed(struct termios *t,int speed)
|
||||
{
|
||||
t->c_ospeed = speed;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
cfsetispeed(struct termios *t, int speed)
|
||||
{
|
||||
t->c_ispeed = speed;
|
||||
return (0);
|
||||
}
|
||||
#endif /* HAVE_NEXT */
|
58
crypto/openssh/openbsd-compat/bsd-nextstep.h
Normal file
58
crypto/openssh/openbsd-compat/bsd-nextstep.h
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Id: bsd-nextstep.h,v 1.6 2001/03/19 13:42:22 mouring Exp $ */
|
||||
|
||||
#ifndef _NEXT_POSIX_H
|
||||
#define _NEXT_POSIX_H
|
||||
|
||||
#ifdef HAVE_NEXT
|
||||
#include <sys/dir.h>
|
||||
|
||||
/* NGROUPS_MAX is behind -lposix. Use the BSD version which is NGROUPS */
|
||||
#undef NGROUPS_MAX
|
||||
#define NGROUPS_MAX NGROUPS
|
||||
|
||||
/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
|
||||
#define dirent direct
|
||||
|
||||
/* Swap out NeXT's BSD wait() for a more POSIX complient one */
|
||||
pid_t posix_wait(int *status);
|
||||
#define wait(a) posix_wait(a)
|
||||
|
||||
/* #ifdef wrapped functions that need defining for clean compiling */
|
||||
pid_t getppid(void);
|
||||
void vhangup(void);
|
||||
int innetgr(const char *netgroup, const char *host, const char *user,
|
||||
const char *domain);
|
||||
|
||||
/* TERMCAP */
|
||||
int tcgetattr(int fd, struct termios *t);
|
||||
int tcsetattr(int fd, int opt, const struct termios *t);
|
||||
int tcsetpgrp(int fd, pid_t pgrp);
|
||||
speed_t cfgetospeed(const struct termios *t);
|
||||
speed_t cfgetispeed(const struct termios *t);
|
||||
int cfsetospeed(struct termios *t, int speed);
|
||||
int cfsetispeed(struct termios *t, int speed);
|
||||
#endif /* HAVE_NEXT */
|
||||
#endif /* _NEXT_POSIX_H */
|
744
crypto/openssh/openbsd-compat/bsd-snprintf.c
Normal file
744
crypto/openssh/openbsd-compat/bsd-snprintf.c
Normal file
@ -0,0 +1,744 @@
|
||||
/**************************************************************
|
||||
* Original:
|
||||
* Patrick Powell Tue Apr 11 09:48:21 PDT 1995
|
||||
* A bombproof version of doprnt (dopr) included.
|
||||
* Sigh. This sort of thing is always nasty do deal with. Note that
|
||||
* the version here does not include floating point...
|
||||
*
|
||||
* snprintf() is used instead of sprintf() as it does limit checks
|
||||
* for string length. This covers a nasty loophole.
|
||||
*
|
||||
* The other functions are there to prevent NULL pointers from
|
||||
* causing nast effects.
|
||||
*
|
||||
* More Recently:
|
||||
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
|
||||
* This was ugly. It is still ugly. I opted out of floating point
|
||||
* numbers, but the formatter understands just about everything
|
||||
* from the normal C string format, at least as far as I can tell from
|
||||
* the Solaris 2.5 printf(3S) man page.
|
||||
*
|
||||
* Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1
|
||||
* Ok, added some minimal floating point support, which means this
|
||||
* probably requires libm on most operating systems. Don't yet
|
||||
* support the exponent (e,E) and sigfig (g,G). Also, fmtint()
|
||||
* was pretty badly broken, it just wasn't being exercised in ways
|
||||
* which showed it, so that's been fixed. Also, formated the code
|
||||
* to mutt conventions, and removed dead code left over from the
|
||||
* original. Also, there is now a builtin-test, just compile with:
|
||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||
* and run snprintf for results.
|
||||
*
|
||||
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||
* The PGP code was using unsigned hexadecimal formats.
|
||||
* Unfortunately, unsigned formats simply didn't work.
|
||||
*
|
||||
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||
* The original code assumed that both snprintf() and vsnprintf() were
|
||||
* missing. Some systems only have snprintf() but not vsnprintf(), so
|
||||
* the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
|
||||
*
|
||||
* Ben Lindstrom <mouring@eviladmin.org> 09/27/00 for OpenSSH
|
||||
* Welcome to the world of %lld and %qd support. With other
|
||||
* long long support. This is needed for sftp-server to work
|
||||
* right.
|
||||
*
|
||||
* Ben Lindstrom <mouring@eviladmin.org> 02/12/01 for OpenSSH
|
||||
* Removed all hint of VARARGS stuff and banished it to the void,
|
||||
* and did a bit of KNF style work to make things a bit more
|
||||
* acceptable. Consider stealing from mutt or enlightenment.
|
||||
**************************************************************/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: bsd-snprintf.c,v 1.5 2001/02/25 23:20:41 mouring Exp $");
|
||||
|
||||
#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */
|
||||
# undef HAVE_SNPRINTF
|
||||
# undef HAVE_VSNPRINTF
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||
|
||||
static void
|
||||
dopr(char *buffer, size_t maxlen, const char *format, va_list args);
|
||||
|
||||
static void
|
||||
fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags,
|
||||
int min, int max);
|
||||
|
||||
static void
|
||||
fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
||||
int min, int max, int flags);
|
||||
|
||||
static void
|
||||
fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
|
||||
int min, int max, int flags);
|
||||
|
||||
static void
|
||||
dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
|
||||
|
||||
/*
|
||||
* dopr(): poor man's version of doprintf
|
||||
*/
|
||||
|
||||
/* format read states */
|
||||
#define DP_S_DEFAULT 0
|
||||
#define DP_S_FLAGS 1
|
||||
#define DP_S_MIN 2
|
||||
#define DP_S_DOT 3
|
||||
#define DP_S_MAX 4
|
||||
#define DP_S_MOD 5
|
||||
#define DP_S_CONV 6
|
||||
#define DP_S_DONE 7
|
||||
|
||||
/* format flags - Bits */
|
||||
#define DP_F_MINUS (1 << 0)
|
||||
#define DP_F_PLUS (1 << 1)
|
||||
#define DP_F_SPACE (1 << 2)
|
||||
#define DP_F_NUM (1 << 3)
|
||||
#define DP_F_ZERO (1 << 4)
|
||||
#define DP_F_UP (1 << 5)
|
||||
#define DP_F_UNSIGNED (1 << 6)
|
||||
|
||||
/* Conversion Flags */
|
||||
#define DP_C_SHORT 1
|
||||
#define DP_C_LONG 2
|
||||
#define DP_C_LDOUBLE 3
|
||||
#define DP_C_LONG_LONG 4
|
||||
|
||||
#define char_to_int(p) (p - '0')
|
||||
#define abs_val(p) (p < 0 ? -p : p)
|
||||
|
||||
|
||||
static void
|
||||
dopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
||||
{
|
||||
char *strvalue;
|
||||
char ch;
|
||||
long value;
|
||||
long double fvalue;
|
||||
int min = 0;
|
||||
int max = -1;
|
||||
int state = DP_S_DEFAULT;
|
||||
int flags = 0;
|
||||
int cflags = 0;
|
||||
size_t currlen = 0;
|
||||
|
||||
ch = *format++;
|
||||
|
||||
while (state != DP_S_DONE) {
|
||||
if ((ch == '\0') || (currlen >= maxlen))
|
||||
state = DP_S_DONE;
|
||||
|
||||
switch(state) {
|
||||
case DP_S_DEFAULT:
|
||||
if (ch == '%')
|
||||
state = DP_S_FLAGS;
|
||||
else
|
||||
dopr_outch(buffer, &currlen, maxlen, ch);
|
||||
ch = *format++;
|
||||
break;
|
||||
case DP_S_FLAGS:
|
||||
switch (ch) {
|
||||
case '-':
|
||||
flags |= DP_F_MINUS;
|
||||
ch = *format++;
|
||||
break;
|
||||
case '+':
|
||||
flags |= DP_F_PLUS;
|
||||
ch = *format++;
|
||||
break;
|
||||
case ' ':
|
||||
flags |= DP_F_SPACE;
|
||||
ch = *format++;
|
||||
break;
|
||||
case '#':
|
||||
flags |= DP_F_NUM;
|
||||
ch = *format++;
|
||||
break;
|
||||
case '0':
|
||||
flags |= DP_F_ZERO;
|
||||
ch = *format++;
|
||||
break;
|
||||
default:
|
||||
state = DP_S_MIN;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DP_S_MIN:
|
||||
if (isdigit((unsigned char)ch)) {
|
||||
min = 10*min + char_to_int (ch);
|
||||
ch = *format++;
|
||||
} else if (ch == '*') {
|
||||
min = va_arg (args, int);
|
||||
ch = *format++;
|
||||
state = DP_S_DOT;
|
||||
} else
|
||||
state = DP_S_DOT;
|
||||
break;
|
||||
case DP_S_DOT:
|
||||
if (ch == '.') {
|
||||
state = DP_S_MAX;
|
||||
ch = *format++;
|
||||
} else
|
||||
state = DP_S_MOD;
|
||||
break;
|
||||
case DP_S_MAX:
|
||||
if (isdigit((unsigned char)ch)) {
|
||||
if (max < 0)
|
||||
max = 0;
|
||||
max = 10*max + char_to_int(ch);
|
||||
ch = *format++;
|
||||
} else if (ch == '*') {
|
||||
max = va_arg (args, int);
|
||||
ch = *format++;
|
||||
state = DP_S_MOD;
|
||||
} else
|
||||
state = DP_S_MOD;
|
||||
break;
|
||||
case DP_S_MOD:
|
||||
switch (ch) {
|
||||
case 'h':
|
||||
cflags = DP_C_SHORT;
|
||||
ch = *format++;
|
||||
break;
|
||||
case 'l':
|
||||
cflags = DP_C_LONG;
|
||||
ch = *format++;
|
||||
if (ch == 'l') {
|
||||
cflags = DP_C_LONG_LONG;
|
||||
ch = *format++;
|
||||
}
|
||||
break;
|
||||
case 'q':
|
||||
cflags = DP_C_LONG_LONG;
|
||||
ch = *format++;
|
||||
break;
|
||||
case 'L':
|
||||
cflags = DP_C_LDOUBLE;
|
||||
ch = *format++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
state = DP_S_CONV;
|
||||
break;
|
||||
case DP_S_CONV:
|
||||
switch (ch) {
|
||||
case 'd':
|
||||
case 'i':
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg(args, int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = va_arg(args, long int);
|
||||
else if (cflags == DP_C_LONG_LONG)
|
||||
value = va_arg (args, long long);
|
||||
else
|
||||
value = va_arg (args, int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
break;
|
||||
case 'o':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LONG_LONG)
|
||||
value = va_arg(args, unsigned long long);
|
||||
else
|
||||
value = va_arg(args, unsigned int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags);
|
||||
break;
|
||||
case 'u':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LONG_LONG)
|
||||
value = va_arg(args, unsigned long long);
|
||||
else
|
||||
value = va_arg(args, unsigned int);
|
||||
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
break;
|
||||
case 'X':
|
||||
flags |= DP_F_UP;
|
||||
case 'x':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LONG_LONG)
|
||||
value = va_arg(args, unsigned long long);
|
||||
else
|
||||
value = va_arg(args, unsigned int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags);
|
||||
break;
|
||||
case 'f':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg(args, long double);
|
||||
else
|
||||
fvalue = va_arg(args, double);
|
||||
/* um, floating point? */
|
||||
fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags);
|
||||
break;
|
||||
case 'E':
|
||||
flags |= DP_F_UP;
|
||||
case 'e':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg(args, long double);
|
||||
else
|
||||
fvalue = va_arg(args, double);
|
||||
break;
|
||||
case 'G':
|
||||
flags |= DP_F_UP;
|
||||
case 'g':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg(args, long double);
|
||||
else
|
||||
fvalue = va_arg(args, double);
|
||||
break;
|
||||
case 'c':
|
||||
dopr_outch(buffer, &currlen, maxlen, va_arg(args, int));
|
||||
break;
|
||||
case 's':
|
||||
strvalue = va_arg(args, char *);
|
||||
if (max < 0)
|
||||
max = maxlen; /* ie, no max */
|
||||
fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||
break;
|
||||
case 'p':
|
||||
strvalue = va_arg(args, void *);
|
||||
fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
||||
break;
|
||||
case 'n':
|
||||
if (cflags == DP_C_SHORT) {
|
||||
short int *num;
|
||||
num = va_arg(args, short int *);
|
||||
*num = currlen;
|
||||
} else if (cflags == DP_C_LONG) {
|
||||
long int *num;
|
||||
num = va_arg(args, long int *);
|
||||
*num = currlen;
|
||||
} else if (cflags == DP_C_LONG_LONG) {
|
||||
long long *num;
|
||||
num = va_arg(args, long long *);
|
||||
*num = currlen;
|
||||
} else {
|
||||
int *num;
|
||||
num = va_arg(args, int *);
|
||||
*num = currlen;
|
||||
}
|
||||
break;
|
||||
case '%':
|
||||
dopr_outch(buffer, &currlen, maxlen, ch);
|
||||
break;
|
||||
case 'w': /* not supported yet, treat as next char */
|
||||
ch = *format++;
|
||||
break;
|
||||
default: /* Unknown, skip */
|
||||
break;
|
||||
}
|
||||
ch = *format++;
|
||||
state = DP_S_DEFAULT;
|
||||
flags = cflags = min = 0;
|
||||
max = -1;
|
||||
break;
|
||||
case DP_S_DONE:
|
||||
break;
|
||||
default: /* hmm? */
|
||||
break; /* some picky compilers need this */
|
||||
}
|
||||
}
|
||||
if (currlen < maxlen - 1)
|
||||
buffer[currlen] = '\0';
|
||||
else
|
||||
buffer[maxlen - 1] = '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
fmtstr(char *buffer, size_t *currlen, size_t maxlen,
|
||||
char *value, int flags, int min, int max)
|
||||
{
|
||||
int padlen, strln; /* amount to pad */
|
||||
int cnt = 0;
|
||||
|
||||
if (value == 0)
|
||||
value = "<NULL>";
|
||||
|
||||
for (strln = 0; value[strln]; ++strln); /* strlen */
|
||||
padlen = min - strln;
|
||||
if (padlen < 0)
|
||||
padlen = 0;
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justify */
|
||||
|
||||
while ((padlen > 0) && (cnt < max)) {
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--padlen;
|
||||
++cnt;
|
||||
}
|
||||
while (*value && (cnt < max)) {
|
||||
dopr_outch(buffer, currlen, maxlen, *value++);
|
||||
++cnt;
|
||||
}
|
||||
while ((padlen < 0) && (cnt < max)) {
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
++padlen;
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
|
||||
|
||||
static void
|
||||
fmtint(char *buffer, size_t *currlen, size_t maxlen,
|
||||
long value, int base, int min, int max, int flags)
|
||||
{
|
||||
unsigned long uvalue;
|
||||
char convert[20];
|
||||
int signvalue = 0;
|
||||
int place = 0;
|
||||
int spadlen = 0; /* amount to space pad */
|
||||
int zpadlen = 0; /* amount to zero pad */
|
||||
int caps = 0;
|
||||
|
||||
if (max < 0)
|
||||
max = 0;
|
||||
|
||||
uvalue = value;
|
||||
|
||||
if (!(flags & DP_F_UNSIGNED)) {
|
||||
if (value < 0) {
|
||||
signvalue = '-';
|
||||
uvalue = -value;
|
||||
} else if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||
signvalue = '+';
|
||||
else if (flags & DP_F_SPACE)
|
||||
signvalue = ' ';
|
||||
}
|
||||
|
||||
if (flags & DP_F_UP)
|
||||
caps = 1; /* Should characters be upper case? */
|
||||
|
||||
do {
|
||||
convert[place++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")
|
||||
[uvalue % (unsigned)base];
|
||||
uvalue = (uvalue / (unsigned)base );
|
||||
} while (uvalue && (place < 20));
|
||||
if (place == 20)
|
||||
place--;
|
||||
convert[place] = 0;
|
||||
|
||||
zpadlen = max - place;
|
||||
spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
|
||||
if (zpadlen < 0)
|
||||
zpadlen = 0;
|
||||
if (spadlen < 0)
|
||||
spadlen = 0;
|
||||
if (flags & DP_F_ZERO) {
|
||||
zpadlen = MAX(zpadlen, spadlen);
|
||||
spadlen = 0;
|
||||
}
|
||||
if (flags & DP_F_MINUS)
|
||||
spadlen = -spadlen; /* Left Justifty */
|
||||
|
||||
|
||||
/* Spaces */
|
||||
while (spadlen > 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--spadlen;
|
||||
}
|
||||
|
||||
/* Sign */
|
||||
if (signvalue)
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
|
||||
/* Zeros */
|
||||
if (zpadlen > 0) {
|
||||
while (zpadlen > 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--zpadlen;
|
||||
}
|
||||
}
|
||||
|
||||
/* Digits */
|
||||
while (place > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, convert[--place]);
|
||||
|
||||
/* Left Justified spaces */
|
||||
while (spadlen < 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
++spadlen;
|
||||
}
|
||||
}
|
||||
|
||||
static long double
|
||||
pow10(int exp)
|
||||
{
|
||||
long double result = 1;
|
||||
|
||||
while (exp) {
|
||||
result *= 10;
|
||||
exp--;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static long
|
||||
round(long double value)
|
||||
{
|
||||
long intpart = value;
|
||||
|
||||
value -= intpart;
|
||||
if (value >= 0.5)
|
||||
intpart++;
|
||||
|
||||
return intpart;
|
||||
}
|
||||
|
||||
static void
|
||||
fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
|
||||
int min, int max, int flags)
|
||||
{
|
||||
char iconvert[20];
|
||||
char fconvert[20];
|
||||
int signvalue = 0;
|
||||
int iplace = 0;
|
||||
int fplace = 0;
|
||||
int padlen = 0; /* amount to pad */
|
||||
int zpadlen = 0;
|
||||
int caps = 0;
|
||||
long intpart;
|
||||
long fracpart;
|
||||
long double ufvalue;
|
||||
|
||||
/*
|
||||
* AIX manpage says the default is 0, but Solaris says the default
|
||||
* is 6, and sprintf on AIX defaults to 6
|
||||
*/
|
||||
if (max < 0)
|
||||
max = 6;
|
||||
|
||||
ufvalue = abs_val(fvalue);
|
||||
|
||||
if (fvalue < 0)
|
||||
signvalue = '-';
|
||||
else if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||
signvalue = '+';
|
||||
else if (flags & DP_F_SPACE)
|
||||
signvalue = ' ';
|
||||
|
||||
intpart = ufvalue;
|
||||
|
||||
/*
|
||||
* Sorry, we only support 9 digits past the decimal because of our
|
||||
* conversion method
|
||||
*/
|
||||
if (max > 9)
|
||||
max = 9;
|
||||
|
||||
/* We "cheat" by converting the fractional part to integer by
|
||||
* multiplying by a factor of 10
|
||||
*/
|
||||
fracpart = round((pow10 (max)) * (ufvalue - intpart));
|
||||
|
||||
if (fracpart >= pow10 (max)) {
|
||||
intpart++;
|
||||
fracpart -= pow10 (max);
|
||||
}
|
||||
|
||||
/* Convert integer part */
|
||||
do {
|
||||
iconvert[iplace++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
|
||||
intpart = (intpart / 10);
|
||||
} while(intpart && (iplace < 20));
|
||||
if (iplace == 20)
|
||||
iplace--;
|
||||
iconvert[iplace] = 0;
|
||||
|
||||
/* Convert fractional part */
|
||||
do {
|
||||
fconvert[fplace++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
|
||||
fracpart = (fracpart / 10);
|
||||
} while(fracpart && (fplace < 20));
|
||||
if (fplace == 20)
|
||||
fplace--;
|
||||
fconvert[fplace] = 0;
|
||||
|
||||
/* -1 for decimal point, another -1 if we are printing a sign */
|
||||
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||
zpadlen = max - fplace;
|
||||
if (zpadlen < 0)
|
||||
zpadlen = 0;
|
||||
if (padlen < 0)
|
||||
padlen = 0;
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justifty */
|
||||
|
||||
if ((flags & DP_F_ZERO) && (padlen > 0)) {
|
||||
if (signvalue) {
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
--padlen;
|
||||
signvalue = 0;
|
||||
}
|
||||
while (padlen > 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--padlen;
|
||||
}
|
||||
}
|
||||
while (padlen > 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--padlen;
|
||||
}
|
||||
if (signvalue)
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
|
||||
while (iplace > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]);
|
||||
|
||||
/*
|
||||
* Decimal point. This should probably use locale to find the correct
|
||||
* char to print out.
|
||||
*/
|
||||
dopr_outch(buffer, currlen, maxlen, '.');
|
||||
|
||||
while (fplace > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, fconvert[--fplace]);
|
||||
|
||||
while (zpadlen > 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--zpadlen;
|
||||
}
|
||||
|
||||
while (padlen < 0) {
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
++padlen;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
{
|
||||
if (*currlen < maxlen)
|
||||
buffer[(*currlen)++] = c;
|
||||
}
|
||||
#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
int
|
||||
vsnprintf(char *str, size_t count, const char *fmt, va_list args)
|
||||
{
|
||||
str[0] = 0;
|
||||
dopr(str, count, fmt, args);
|
||||
|
||||
return(strlen(str));
|
||||
}
|
||||
#endif /* !HAVE_VSNPRINTF */
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
int
|
||||
snprintf(char *str,size_t count,const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
(void) vsnprintf(str, count, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
return(strlen(str));
|
||||
}
|
||||
|
||||
#ifdef TEST_SNPRINTF
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
#define LONG_STRING 1024
|
||||
char buf1[LONG_STRING];
|
||||
char buf2[LONG_STRING];
|
||||
char *fp_fmt[] = {
|
||||
"%-1.5f",
|
||||
"%1.5f",
|
||||
"%123.9f",
|
||||
"%10.5f",
|
||||
"% 10.5f",
|
||||
"%+22.9f",
|
||||
"%+4.9f",
|
||||
"%01.3f",
|
||||
"%4f",
|
||||
"%3.1f",
|
||||
"%3.2f",
|
||||
NULL
|
||||
};
|
||||
double fp_nums[] = {
|
||||
-1.5,
|
||||
134.21,
|
||||
91340.2,
|
||||
341.1234,
|
||||
0203.9,
|
||||
0.96,
|
||||
0.996,
|
||||
0.9996,
|
||||
1.996,
|
||||
4.136,
|
||||
0
|
||||
};
|
||||
char *int_fmt[] = {
|
||||
"%-1.5d",
|
||||
"%1.5d",
|
||||
"%123.9d",
|
||||
"%5.5d",
|
||||
"%10.5d",
|
||||
"% 10.5d",
|
||||
"%+22.33d",
|
||||
"%01.3d",
|
||||
"%4d",
|
||||
"%lld",
|
||||
"%qd",
|
||||
NULL
|
||||
};
|
||||
long long int_nums[] = { -1, 134, 91340, 341, 0203, 0, 9999999 };
|
||||
int x, y;
|
||||
int fail = 0;
|
||||
int num = 0;
|
||||
|
||||
printf("Testing snprintf format codes against system sprintf...\n");
|
||||
|
||||
for (x = 0; fp_fmt[x] != NULL ; x++) {
|
||||
for (y = 0; fp_nums[y] != 0 ; y++) {
|
||||
snprintf(buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
|
||||
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
||||
if (strcmp (buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\t"
|
||||
"snprintf = %s\n\tsprintf = %s\n",
|
||||
fp_fmt[x], buf1, buf2);
|
||||
fail++;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
for (x = 0; int_fmt[x] != NULL ; x++) {
|
||||
for (y = 0; int_nums[y] != 0 ; y++) {
|
||||
snprintf(buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
|
||||
sprintf(buf2, int_fmt[x], int_nums[y]);
|
||||
if (strcmp (buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\t"
|
||||
"snprintf = %s\n\tsprintf = %s\n",
|
||||
int_fmt[x], buf1, buf2);
|
||||
fail++;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
printf("%d tests failed out of %d.\n", fail, num);
|
||||
return(0);
|
||||
}
|
||||
#endif /* SNPRINTF_TEST */
|
||||
|
||||
#endif /* !HAVE_SNPRINTF */
|
19
crypto/openssh/openbsd-compat/bsd-snprintf.h
Normal file
19
crypto/openssh/openbsd-compat/bsd-snprintf.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* $Id: bsd-snprintf.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_SNPRINTF_H
|
||||
#define _BSD_SNPRINTF_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h> /* For size_t */
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
int snprintf(char *str, size_t count, const char *fmt, ...);
|
||||
#endif /* !HAVE_SNPRINTF */
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
|
||||
#endif /* !HAVE_SNPRINTF */
|
||||
|
||||
|
||||
#endif /* _BSD_SNPRINTF_H */
|
52
crypto/openssh/openbsd-compat/bsd-waitpid.c
Normal file
52
crypto/openssh/openbsd-compat/bsd-waitpid.c
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: bsd-waitpid.c,v 1.3 2001/03/26 05:35:34 mouring Exp $");
|
||||
|
||||
#ifndef HAVE_WAITPID
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include "bsd-waitpid.h"
|
||||
|
||||
pid_t
|
||||
waitpid(int pid, int *stat_loc, int options)
|
||||
{
|
||||
union wait statusp;
|
||||
pid_t wait_pid;
|
||||
|
||||
if (pid <= 0) {
|
||||
if (pid != -1) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
pid = 0; /* wait4() wants pid=0 for indiscriminate wait. */
|
||||
}
|
||||
wait_pid = wait4(pid, &statusp, options, NULL);
|
||||
if (stat_loc)
|
||||
*stat_loc = (int) statusp.w_status;
|
||||
|
||||
return wait_pid;
|
||||
}
|
||||
|
||||
#endif /* !HAVE_WAITPID */
|
49
crypto/openssh/openbsd-compat/bsd-waitpid.h
Normal file
49
crypto/openssh/openbsd-compat/bsd-waitpid.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Id: bsd-waitpid.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_WAITPID_H
|
||||
#define _BSD_WAITPID_H
|
||||
|
||||
#ifndef HAVE_WAITPID
|
||||
/* Clean out any potental issues */
|
||||
#undef WIFEXITED
|
||||
#undef WIFSTOPPED
|
||||
#undef WIFSIGNALED
|
||||
|
||||
/* Define required functions to mimic a POSIX look and feel */
|
||||
#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
|
||||
#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
|
||||
#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
|
||||
#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
|
||||
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
|
||||
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
|
||||
#define WCOREFLAG 0x80
|
||||
#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
|
||||
|
||||
/* Prototype */
|
||||
pid_t waitpid(int pid, int *stat_loc, int options);
|
||||
|
||||
#endif /* !HAVE_WAITPID */
|
||||
#endif /* _BSD_WAITPID_H */
|
84
crypto/openssh/openbsd-compat/daemon.c
Normal file
84
crypto/openssh/openbsd-compat/daemon.c
Normal file
@ -0,0 +1,84 @@
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifndef HAVE_DAEMON
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: daemon.c,v 1.2 1996/08/19 08:22:13 tholo Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
int
|
||||
daemon(nochdir, noclose)
|
||||
int nochdir, noclose;
|
||||
{
|
||||
int fd;
|
||||
|
||||
switch (fork()) {
|
||||
case -1:
|
||||
return (-1);
|
||||
case 0:
|
||||
#ifdef HAVE_CYGWIN
|
||||
register_9x_service();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#ifdef HAVE_CYGWIN
|
||||
/*
|
||||
* This sleep avoids a race condition which kills the
|
||||
* child process if parent is started by a NT/W2K service.
|
||||
*/
|
||||
sleep(1);
|
||||
#endif
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
if (setsid() == -1)
|
||||
return (-1);
|
||||
|
||||
if (!nochdir)
|
||||
(void)chdir("/");
|
||||
|
||||
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
|
||||
(void)dup2(fd, STDIN_FILENO);
|
||||
(void)dup2(fd, STDOUT_FILENO);
|
||||
(void)dup2(fd, STDERR_FILENO);
|
||||
if (fd > 2)
|
||||
(void)close (fd);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif /* !HAVE_DAEMON */
|
||||
|
11
crypto/openssh/openbsd-compat/daemon.h
Normal file
11
crypto/openssh/openbsd-compat/daemon.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* $Id: daemon.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_DAEMON_H
|
||||
#define _BSD_DAEMON_H
|
||||
|
||||
#include "config.h"
|
||||
#ifndef HAVE_DAEMON
|
||||
int daemon(int nochdir, int noclose);
|
||||
#endif /* !HAVE_DAEMON */
|
||||
|
||||
#endif /* _BSD_DAEMON_H */
|
80
crypto/openssh/openbsd-compat/dirname.c
Normal file
80
crypto/openssh/openbsd-compat/dirname.c
Normal file
@ -0,0 +1,80 @@
|
||||
/* $OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#ifndef HAVE_DIRNAME
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: dirname.c,v 1.6 2001/06/28 04:27:19 pjanzen Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
char *
|
||||
dirname(path)
|
||||
const char *path;
|
||||
{
|
||||
static char bname[MAXPATHLEN];
|
||||
register const char *endp;
|
||||
|
||||
/* Empty or NULL string gets treated as "." */
|
||||
if (path == NULL || *path == '\0') {
|
||||
(void)strcpy(bname, ".");
|
||||
return(bname);
|
||||
}
|
||||
|
||||
/* Strip trailing slashes */
|
||||
endp = path + strlen(path) - 1;
|
||||
while (endp > path && *endp == '/')
|
||||
endp--;
|
||||
|
||||
/* Find the start of the dir */
|
||||
while (endp > path && *endp != '/')
|
||||
endp--;
|
||||
|
||||
/* Either the dir is "/" or there are no slashes */
|
||||
if (endp == path) {
|
||||
(void)strcpy(bname, *endp == '/' ? "/" : ".");
|
||||
return(bname);
|
||||
} else {
|
||||
do {
|
||||
endp--;
|
||||
} while (endp > path && *endp == '/');
|
||||
}
|
||||
|
||||
if (endp - path + 2 > sizeof(bname)) {
|
||||
errno = ENAMETOOLONG;
|
||||
return(NULL);
|
||||
}
|
||||
strlcpy(bname, path, endp - path + 2);
|
||||
return(bname);
|
||||
}
|
||||
#endif
|
5
crypto/openssh/openbsd-compat/dirname.h
Normal file
5
crypto/openssh/openbsd-compat/dirname.h
Normal file
@ -0,0 +1,5 @@
|
||||
#ifndef HAVE_DIRNAME
|
||||
|
||||
char *dirname(const char *path);
|
||||
|
||||
#endif
|
14
crypto/openssh/openbsd-compat/fake-gai-errnos.h
Normal file
14
crypto/openssh/openbsd-compat/fake-gai-errnos.h
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* fake library for ssh
|
||||
*
|
||||
* This file is included in getaddrinfo.c and getnameinfo.c.
|
||||
* See getaddrinfo.c and getnameinfo.c.
|
||||
*/
|
||||
|
||||
/* $Id: fake-gai-errnos.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
/* for old netdb.h */
|
||||
#ifndef EAI_NODATA
|
||||
#define EAI_NODATA 1
|
||||
#define EAI_MEMORY 2
|
||||
#endif
|
121
crypto/openssh/openbsd-compat/fake-getaddrinfo.c
Normal file
121
crypto/openssh/openbsd-compat/fake-getaddrinfo.c
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
* fake library for ssh
|
||||
*
|
||||
* This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
|
||||
* These funtions are defined in rfc2133.
|
||||
*
|
||||
* But these functions are not implemented correctly. The minimum subset
|
||||
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "ssh.h"
|
||||
|
||||
RCSID("$Id: fake-getaddrinfo.c,v 1.2 2001/02/09 01:55:36 djm Exp $");
|
||||
|
||||
#ifndef HAVE_GAI_STRERROR
|
||||
char *gai_strerror(int ecode)
|
||||
{
|
||||
switch (ecode) {
|
||||
case EAI_NODATA:
|
||||
return "no address associated with hostname.";
|
||||
case EAI_MEMORY:
|
||||
return "memory allocation failure.";
|
||||
default:
|
||||
return "unknown error.";
|
||||
}
|
||||
}
|
||||
#endif /* !HAVE_GAI_STRERROR */
|
||||
|
||||
#ifndef HAVE_FREEADDRINFO
|
||||
void freeaddrinfo(struct addrinfo *ai)
|
||||
{
|
||||
struct addrinfo *next;
|
||||
|
||||
do {
|
||||
next = ai->ai_next;
|
||||
free(ai);
|
||||
} while (NULL != (ai = next));
|
||||
}
|
||||
#endif /* !HAVE_FREEADDRINFO */
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
static struct addrinfo *malloc_ai(int port, u_long addr)
|
||||
{
|
||||
struct addrinfo *ai;
|
||||
|
||||
ai = malloc(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
|
||||
if (ai == NULL)
|
||||
return(NULL);
|
||||
|
||||
memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
|
||||
|
||||
ai->ai_addr = (struct sockaddr *)(ai + 1);
|
||||
/* XXX -- ssh doesn't use sa_len */
|
||||
ai->ai_addrlen = sizeof(struct sockaddr_in);
|
||||
ai->ai_addr->sa_family = ai->ai_family = AF_INET;
|
||||
|
||||
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
|
||||
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
|
||||
|
||||
return(ai);
|
||||
}
|
||||
|
||||
int getaddrinfo(const char *hostname, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res)
|
||||
{
|
||||
struct addrinfo *cur, *prev = NULL;
|
||||
struct hostent *hp;
|
||||
struct in_addr in;
|
||||
int i, port;
|
||||
|
||||
if (servname)
|
||||
port = htons(atoi(servname));
|
||||
else
|
||||
port = 0;
|
||||
|
||||
if (hints && hints->ai_flags & AI_PASSIVE) {
|
||||
if (NULL != (*res = malloc_ai(port, htonl(0x00000000))))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
}
|
||||
|
||||
if (!hostname) {
|
||||
if (NULL != (*res = malloc_ai(port, htonl(0x7f000001))))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
}
|
||||
|
||||
if (inet_aton(hostname, &in)) {
|
||||
if (NULL != (*res = malloc_ai(port, in.s_addr)))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
}
|
||||
|
||||
hp = gethostbyname(hostname);
|
||||
if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
|
||||
for (i = 0; hp->h_addr_list[i]; i++) {
|
||||
cur = malloc_ai(port, ((struct in_addr *)hp->h_addr_list[i])->s_addr);
|
||||
if (cur == NULL) {
|
||||
if (*res)
|
||||
freeaddrinfo(*res);
|
||||
return EAI_MEMORY;
|
||||
}
|
||||
|
||||
if (prev)
|
||||
prev->ai_next = cur;
|
||||
else
|
||||
*res = cur;
|
||||
|
||||
prev = cur;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return EAI_NODATA;
|
||||
}
|
||||
#endif /* !HAVE_GETADDRINFO */
|
47
crypto/openssh/openbsd-compat/fake-getaddrinfo.h
Normal file
47
crypto/openssh/openbsd-compat/fake-getaddrinfo.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* $Id: fake-getaddrinfo.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _FAKE_GETADDRINFO_H
|
||||
#define _FAKE_GETADDRINFO_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fake-gai-errnos.h"
|
||||
|
||||
#ifndef AI_PASSIVE
|
||||
# define AI_PASSIVE 1
|
||||
# define AI_CANONNAME 2
|
||||
#endif
|
||||
|
||||
#ifndef NI_NUMERICHOST
|
||||
# define NI_NUMERICHOST 2
|
||||
# define NI_NAMEREQD 4
|
||||
# define NI_NUMERICSERV 8
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_ADDRINFO
|
||||
struct addrinfo {
|
||||
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
|
||||
int ai_family; /* PF_xxx */
|
||||
int ai_socktype; /* SOCK_xxx */
|
||||
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||
size_t ai_addrlen; /* length of ai_addr */
|
||||
char *ai_canonname; /* canonical name for hostname */
|
||||
struct sockaddr *ai_addr; /* binary address */
|
||||
struct addrinfo *ai_next; /* next structure in linked list */
|
||||
};
|
||||
#endif /* !HAVE_STRUCT_ADDRINFO */
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
int getaddrinfo(const char *hostname, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
#endif /* !HAVE_GETADDRINFO */
|
||||
|
||||
#ifndef HAVE_GAI_STRERROR
|
||||
char *gai_strerror(int ecode);
|
||||
#endif /* !HAVE_GAI_STRERROR */
|
||||
|
||||
#ifndef HAVE_FREEADDRINFO
|
||||
void freeaddrinfo(struct addrinfo *ai);
|
||||
#endif /* !HAVE_FREEADDRINFO */
|
||||
|
||||
#endif /* _FAKE_GETADDRINFO_H */
|
55
crypto/openssh/openbsd-compat/fake-getnameinfo.c
Normal file
55
crypto/openssh/openbsd-compat/fake-getnameinfo.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* fake library for ssh
|
||||
*
|
||||
* This file includes getnameinfo().
|
||||
* These funtions are defined in rfc2133.
|
||||
*
|
||||
* But these functions are not implemented correctly. The minimum subset
|
||||
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "ssh.h"
|
||||
|
||||
RCSID("$Id: fake-getnameinfo.c,v 1.2 2001/02/09 01:55:36 djm Exp $");
|
||||
|
||||
#ifndef HAVE_GETNAMEINFO
|
||||
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||
size_t hostlen, char *serv, size_t servlen, int flags)
|
||||
{
|
||||
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
||||
struct hostent *hp;
|
||||
char tmpserv[16];
|
||||
|
||||
if (serv) {
|
||||
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
|
||||
if (strlen(tmpserv) >= servlen)
|
||||
return EAI_MEMORY;
|
||||
else
|
||||
strcpy(serv, tmpserv);
|
||||
}
|
||||
|
||||
if (host) {
|
||||
if (flags & NI_NUMERICHOST) {
|
||||
if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
|
||||
return EAI_MEMORY;
|
||||
|
||||
strcpy(host, inet_ntoa(sin->sin_addr));
|
||||
return 0;
|
||||
} else {
|
||||
hp = gethostbyaddr((char *)&sin->sin_addr,
|
||||
sizeof(struct in_addr), AF_INET);
|
||||
if (hp == NULL)
|
||||
return EAI_NODATA;
|
||||
|
||||
if (strlen(hp->h_name) >= hostlen)
|
||||
return EAI_MEMORY;
|
||||
|
||||
strcpy(host, hp->h_name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* !HAVE_GETNAMEINFO */
|
20
crypto/openssh/openbsd-compat/fake-getnameinfo.h
Normal file
20
crypto/openssh/openbsd-compat/fake-getnameinfo.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* $Id: fake-getnameinfo.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _FAKE_GETNAMEINFO_H
|
||||
#define _FAKE_GETNAMEINFO_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_GETNAMEINFO
|
||||
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||
size_t hostlen, char *serv, size_t servlen, int flags);
|
||||
#endif /* !HAVE_GETNAMEINFO */
|
||||
|
||||
#ifndef NI_MAXSERV
|
||||
# define NI_MAXSERV 32
|
||||
#endif /* !NI_MAXSERV */
|
||||
#ifndef NI_MAXHOST
|
||||
# define NI_MAXHOST 1025
|
||||
#endif /* !NI_MAXHOST */
|
||||
|
||||
#endif /* _FAKE_GETNAMEINFO_H */
|
584
crypto/openssh/openbsd-compat/fake-queue.h
Normal file
584
crypto/openssh/openbsd-compat/fake-queue.h
Normal file
@ -0,0 +1,584 @@
|
||||
/* $OpenBSD: queue.h,v 1.22 2001/06/23 04:39:35 angelos Exp $ */
|
||||
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)queue.h 8.5 (Berkeley) 8/20/94
|
||||
*/
|
||||
|
||||
#ifndef _FAKE_QUEUE_H_
|
||||
#define _FAKE_QUEUE_H_
|
||||
|
||||
/*
|
||||
* Ignore all <sys/queue.h> since older platforms have broken/incomplete
|
||||
* <sys/queue.h> that are too hard to work around.
|
||||
*/
|
||||
#undef SLIST_HEAD
|
||||
#undef SLIST_HEAD_INITIALIZER
|
||||
#undef SLIST_ENTRY
|
||||
#undef SLIST_FIRST
|
||||
#undef SLIST_END
|
||||
#undef SLIST_EMPTY
|
||||
#undef SLIST_NEXT
|
||||
#undef SLIST_FOREACH
|
||||
#undef SLIST_INIT
|
||||
#undef SLIST_INSERT_AFTER
|
||||
#undef SLIST_INSERT_HEAD
|
||||
#undef SLIST_REMOVE_HEAD
|
||||
#undef SLIST_REMOVE
|
||||
#undef LIST_HEAD
|
||||
#undef LIST_HEAD_INITIALIZER
|
||||
#undef LIST_ENTRY
|
||||
#undef LIST_FIRST
|
||||
#undef LIST_END
|
||||
#undef LIST_EMPTY
|
||||
#undef LIST_NEXT
|
||||
#undef LIST_FOREACH
|
||||
#undef LIST_INIT
|
||||
#undef LIST_INSERT_AFTER
|
||||
#undef LIST_INSERT_BEFORE
|
||||
#undef LIST_INSERT_HEAD
|
||||
#undef LIST_REMOVE
|
||||
#undef LIST_REPLACE
|
||||
#undef SIMPLEQ_HEAD
|
||||
#undef SIMPLEQ_HEAD_INITIALIZER
|
||||
#undef SIMPLEQ_ENTRY
|
||||
#undef SIMPLEQ_FIRST
|
||||
#undef SIMPLEQ_END
|
||||
#undef SIMPLEQ_EMPTY
|
||||
#undef SIMPLEQ_NEXT
|
||||
#undef SIMPLEQ_FOREACH
|
||||
#undef SIMPLEQ_INIT
|
||||
#undef SIMPLEQ_INSERT_HEAD
|
||||
#undef SIMPLEQ_INSERT_TAIL
|
||||
#undef SIMPLEQ_INSERT_AFTER
|
||||
#undef SIMPLEQ_REMOVE_HEAD
|
||||
#undef TAILQ_HEAD
|
||||
#undef TAILQ_HEAD_INITIALIZER
|
||||
#undef TAILQ_ENTRY
|
||||
#undef TAILQ_FIRST
|
||||
#undef TAILQ_END
|
||||
#undef TAILQ_NEXT
|
||||
#undef TAILQ_LAST
|
||||
#undef TAILQ_PREV
|
||||
#undef TAILQ_EMPTY
|
||||
#undef TAILQ_FOREACH
|
||||
#undef TAILQ_FOREACH_REVERSE
|
||||
#undef TAILQ_INIT
|
||||
#undef TAILQ_INSERT_HEAD
|
||||
#undef TAILQ_INSERT_TAIL
|
||||
#undef TAILQ_INSERT_AFTER
|
||||
#undef TAILQ_INSERT_BEFORE
|
||||
#undef TAILQ_REMOVE
|
||||
#undef TAILQ_REPLACE
|
||||
#undef CIRCLEQ_HEAD
|
||||
#undef CIRCLEQ_HEAD_INITIALIZER
|
||||
#undef CIRCLEQ_ENTRY
|
||||
#undef CIRCLEQ_FIRST
|
||||
#undef CIRCLEQ_LAST
|
||||
#undef CIRCLEQ_END
|
||||
#undef CIRCLEQ_NEXT
|
||||
#undef CIRCLEQ_PREV
|
||||
#undef CIRCLEQ_EMPTY
|
||||
#undef CIRCLEQ_FOREACH
|
||||
#undef CIRCLEQ_FOREACH_REVERSE
|
||||
#undef CIRCLEQ_INIT
|
||||
#undef CIRCLEQ_INSERT_AFTER
|
||||
#undef CIRCLEQ_INSERT_BEFORE
|
||||
#undef CIRCLEQ_INSERT_HEAD
|
||||
#undef CIRCLEQ_INSERT_TAIL
|
||||
#undef CIRCLEQ_REMOVE
|
||||
#undef CIRCLEQ_REPLACE
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* lists, simple queues, tail queues, and circular queues.
|
||||
*
|
||||
*
|
||||
* A singly-linked list is headed by a single forward pointer. The elements
|
||||
* are singly linked for minimum space and pointer manipulation overhead at
|
||||
* the expense of O(n) removal for arbitrary elements. New elements can be
|
||||
* added to the list after an existing element or at the head of the list.
|
||||
* Elements being removed from the head of the list should use the explicit
|
||||
* macro for this purpose for optimum efficiency. A singly-linked list may
|
||||
* only be traversed in the forward direction. Singly-linked lists are ideal
|
||||
* for applications with large datasets and few or no removals or for
|
||||
* implementing a LIFO queue.
|
||||
*
|
||||
* A list is headed by a single forward pointer (or an array of forward
|
||||
* pointers for a hash table header). The elements are doubly linked
|
||||
* so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before
|
||||
* or after an existing element or at the head of the list. A list
|
||||
* may only be traversed in the forward direction.
|
||||
*
|
||||
* A simple queue is headed by a pair of pointers, one the head of the
|
||||
* list and the other to the tail of the list. The elements are singly
|
||||
* linked to save space, so elements can only be removed from the
|
||||
* head of the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the
|
||||
* list. A simple queue may only be traversed in the forward direction.
|
||||
*
|
||||
* A tail queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or
|
||||
* after an existing element, at the head of the list, or at the end of
|
||||
* the list. A tail queue may be traversed in either direction.
|
||||
*
|
||||
* A circle queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the list.
|
||||
* A circle queue may be traversed in either direction, but has a more
|
||||
* complex end of list detection.
|
||||
*
|
||||
* For details on the use of these macros, see the queue(3) manual page.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
*/
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_END(head) NULL
|
||||
#define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head))
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = SLIST_FIRST(head); \
|
||||
(var) != SLIST_END(head); \
|
||||
(var) = SLIST_NEXT(var, field))
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
*/
|
||||
#define SLIST_INIT(head) { \
|
||||
SLIST_FIRST(head) = SLIST_END(head); \
|
||||
}
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} \
|
||||
else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
while( curelm->field.sle_next != (elm) ) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* List definitions.
|
||||
*/
|
||||
#define LIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *lh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define LIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define LIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *le_next; /* next element */ \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* List access methods
|
||||
*/
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_END(head) NULL
|
||||
#define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head))
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for((var) = LIST_FIRST(head); \
|
||||
(var)!= LIST_END(head); \
|
||||
(var) = LIST_NEXT(var, field))
|
||||
|
||||
/*
|
||||
* List functions.
|
||||
*/
|
||||
#define LIST_INIT(head) do { \
|
||||
LIST_FIRST(head) = LIST_END(head); \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
|
||||
(listelm)->field.le_next->field.le_prev = \
|
||||
&(elm)->field.le_next; \
|
||||
(listelm)->field.le_next = (elm); \
|
||||
(elm)->field.le_prev = &(listelm)->field.le_next; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.le_prev = (listelm)->field.le_prev; \
|
||||
(elm)->field.le_next = (listelm); \
|
||||
*(listelm)->field.le_prev = (elm); \
|
||||
(listelm)->field.le_prev = &(elm)->field.le_next; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
|
||||
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
|
||||
(head)->lh_first = (elm); \
|
||||
(elm)->field.le_prev = &(head)->lh_first; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_REMOVE(elm, field) do { \
|
||||
if ((elm)->field.le_next != NULL) \
|
||||
(elm)->field.le_next->field.le_prev = \
|
||||
(elm)->field.le_prev; \
|
||||
*(elm)->field.le_prev = (elm)->field.le_next; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_REPLACE(elm, elm2, field) do { \
|
||||
if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
|
||||
(elm2)->field.le_next->field.le_prev = \
|
||||
&(elm2)->field.le_next; \
|
||||
(elm2)->field.le_prev = (elm)->field.le_prev; \
|
||||
*(elm2)->field.le_prev = (elm2); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Simple queue definitions.
|
||||
*/
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_END(head) NULL
|
||||
#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for((var) = SIMPLEQ_FIRST(head); \
|
||||
(var) != SIMPLEQ_END(head); \
|
||||
(var) = SIMPLEQ_NEXT(var, field))
|
||||
|
||||
/*
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, elm, field) do { \
|
||||
if (((head)->sqh_first = (elm)->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define TAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *tqh_first; /* first element */ \
|
||||
struct type **tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define TAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *tqe_next; /* next element */ \
|
||||
struct type **tqe_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* tail queue access methods
|
||||
*/
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_END(head) NULL
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
/* XXX */
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
#define TAILQ_EMPTY(head) \
|
||||
(TAILQ_FIRST(head) == TAILQ_END(head))
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for((var) = TAILQ_FIRST(head); \
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = TAILQ_NEXT(var, field))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, field, headname) \
|
||||
for((var) = TAILQ_LAST(head, headname); \
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = TAILQ_PREV(var, headname, field))
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
|
||||
(elm2)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm2)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm2)->field.tqe_next; \
|
||||
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
|
||||
*(elm2)->field.tqe_prev = (elm2); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Circular queue definitions.
|
||||
*/
|
||||
#define CIRCLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *cqh_first; /* first element */ \
|
||||
struct type *cqh_last; /* last element */ \
|
||||
}
|
||||
|
||||
#define CIRCLEQ_HEAD_INITIALIZER(head) \
|
||||
{ CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
|
||||
|
||||
#define CIRCLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *cqe_next; /* next element */ \
|
||||
struct type *cqe_prev; /* previous element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Circular queue access methods
|
||||
*/
|
||||
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
|
||||
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
|
||||
#define CIRCLEQ_END(head) ((void *)(head))
|
||||
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
|
||||
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
|
||||
#define CIRCLEQ_EMPTY(head) \
|
||||
(CIRCLEQ_FIRST(head) == CIRCLEQ_END(head))
|
||||
|
||||
#define CIRCLEQ_FOREACH(var, head, field) \
|
||||
for((var) = CIRCLEQ_FIRST(head); \
|
||||
(var) != CIRCLEQ_END(head); \
|
||||
(var) = CIRCLEQ_NEXT(var, field))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
|
||||
for((var) = CIRCLEQ_LAST(head); \
|
||||
(var) != CIRCLEQ_END(head); \
|
||||
(var) = CIRCLEQ_PREV(var, field))
|
||||
|
||||
/*
|
||||
* Circular queue functions.
|
||||
*/
|
||||
#define CIRCLEQ_INIT(head) do { \
|
||||
(head)->cqh_first = CIRCLEQ_END(head); \
|
||||
(head)->cqh_last = CIRCLEQ_END(head); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
|
||||
(elm)->field.cqe_prev = (listelm); \
|
||||
if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
|
||||
(listelm)->field.cqe_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm); \
|
||||
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
|
||||
if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
|
||||
(listelm)->field.cqe_prev = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (head)->cqh_first; \
|
||||
(elm)->field.cqe_prev = CIRCLEQ_END(head); \
|
||||
if ((head)->cqh_last == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(head)->cqh_first->field.cqe_prev = (elm); \
|
||||
(head)->cqh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = CIRCLEQ_END(head); \
|
||||
(elm)->field.cqe_prev = (head)->cqh_last; \
|
||||
if ((head)->cqh_first == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(head)->cqh_last->field.cqe_next = (elm); \
|
||||
(head)->cqh_last = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
else \
|
||||
(elm)->field.cqe_next->field.cqe_prev = \
|
||||
(elm)->field.cqe_prev; \
|
||||
if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm)->field.cqe_next; \
|
||||
else \
|
||||
(elm)->field.cqe_prev->field.cqe_next = \
|
||||
(elm)->field.cqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
|
||||
CIRCLEQ_END(head)) \
|
||||
(head).cqh_last = (elm2); \
|
||||
else \
|
||||
(elm2)->field.cqe_next->field.cqe_prev = (elm2); \
|
||||
if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
|
||||
CIRCLEQ_END(head)) \
|
||||
(head).cqh_first = (elm2); \
|
||||
else \
|
||||
(elm2)->field.cqe_prev->field.cqe_next = (elm2); \
|
||||
} while (0)
|
||||
|
||||
#endif /* !_FAKE_QUEUE_H_ */
|
47
crypto/openssh/openbsd-compat/fake-socket.h
Normal file
47
crypto/openssh/openbsd-compat/fake-socket.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */
|
||||
|
||||
#ifndef _FAKE_SOCKET_H
|
||||
#define _FAKE_SOCKET_H
|
||||
|
||||
#include "includes.h"
|
||||
#include "sys/types.h"
|
||||
|
||||
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||
# define _SS_MAXSIZE 128 /* Implementation specific max size */
|
||||
# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
|
||||
|
||||
struct sockaddr_storage {
|
||||
struct sockaddr ss_sa;
|
||||
char __ss_pad2[_SS_PADSIZE];
|
||||
};
|
||||
# define ss_family ss_sa.sa_family
|
||||
#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
|
||||
|
||||
#ifndef IN6_IS_ADDR_LOOPBACK
|
||||
# define IN6_IS_ADDR_LOOPBACK(a) \
|
||||
(((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
|
||||
((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
|
||||
#endif /* !IN6_IS_ADDR_LOOPBACK */
|
||||
|
||||
#ifndef HAVE_STRUCT_IN6_ADDR
|
||||
struct in6_addr {
|
||||
u_int8_t s6_addr[16];
|
||||
};
|
||||
#endif /* !HAVE_STRUCT_IN6_ADDR */
|
||||
|
||||
#ifndef HAVE_STRUCT_SOCKADDR_IN6
|
||||
struct sockaddr_in6 {
|
||||
unsigned short sin6_family;
|
||||
u_int16_t sin6_port;
|
||||
u_int32_t sin6_flowinfo;
|
||||
struct in6_addr sin6_addr;
|
||||
};
|
||||
#endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
|
||||
|
||||
#ifndef AF_INET6
|
||||
/* Define it to something that should never appear */
|
||||
#define AF_INET6 AF_MAX
|
||||
#endif
|
||||
|
||||
#endif /* !_FAKE_SOCKET_H */
|
||||
|
237
crypto/openssh/openbsd-compat/getcwd.c
Normal file
237
crypto/openssh/openbsd-compat/getcwd.c
Normal file
@ -0,0 +1,237 @@
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(HAVE_GETCWD)
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: getcwd.c,v 1.6 2000/07/19 15:25:13 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/dir.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "includes.h"
|
||||
|
||||
#define ISDOT(dp) \
|
||||
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
||||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
|
||||
|
||||
char *
|
||||
getcwd(char *pt,size_t size)
|
||||
{
|
||||
register struct dirent *dp;
|
||||
register DIR *dir = NULL;
|
||||
register dev_t dev;
|
||||
register ino_t ino;
|
||||
register int first;
|
||||
register char *bpt, *bup;
|
||||
struct stat s;
|
||||
dev_t root_dev;
|
||||
ino_t root_ino;
|
||||
size_t ptsize, upsize;
|
||||
int save_errno;
|
||||
char *ept, *eup, *up;
|
||||
|
||||
/*
|
||||
* If no buffer specified by the user, allocate one as necessary.
|
||||
* If a buffer is specified, the size has to be non-zero. The path
|
||||
* is built from the end of the buffer backwards.
|
||||
*/
|
||||
if (pt) {
|
||||
ptsize = 0;
|
||||
if (!size) {
|
||||
errno = EINVAL;
|
||||
return (NULL);
|
||||
}
|
||||
ept = pt + size;
|
||||
} else {
|
||||
if ((pt = malloc(ptsize = 1024 - 4)) == NULL)
|
||||
return (NULL);
|
||||
ept = pt + ptsize;
|
||||
}
|
||||
bpt = ept - 1;
|
||||
*bpt = '\0';
|
||||
|
||||
/*
|
||||
* Allocate bytes (1024 - malloc space) for the string of "../"'s.
|
||||
* Should always be enough (it's 340 levels). If it's not, allocate
|
||||
* as necessary. Special * case the first stat, it's ".", not "..".
|
||||
*/
|
||||
if ((up = malloc(upsize = 1024 - 4)) == NULL)
|
||||
goto err;
|
||||
eup = up + MAXPATHLEN;
|
||||
bup = up;
|
||||
up[0] = '.';
|
||||
up[1] = '\0';
|
||||
|
||||
/* Save root values, so know when to stop. */
|
||||
if (stat("/", &s))
|
||||
goto err;
|
||||
root_dev = s.st_dev;
|
||||
root_ino = s.st_ino;
|
||||
|
||||
errno = 0; /* XXX readdir has no error return. */
|
||||
|
||||
for (first = 1;; first = 0) {
|
||||
/* Stat the current level. */
|
||||
if (lstat(up, &s))
|
||||
goto err;
|
||||
|
||||
/* Save current node values. */
|
||||
ino = s.st_ino;
|
||||
dev = s.st_dev;
|
||||
|
||||
/* Check for reaching root. */
|
||||
if (root_dev == dev && root_ino == ino) {
|
||||
*--bpt = '/';
|
||||
/*
|
||||
* It's unclear that it's a requirement to copy the
|
||||
* path to the beginning of the buffer, but it's always
|
||||
* been that way and stuff would probably break.
|
||||
*/
|
||||
memmove(pt, bpt, ept - bpt);
|
||||
free(up);
|
||||
return (pt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build pointer to the parent directory, allocating memory
|
||||
* as necessary. Max length is 3 for "../", the largest
|
||||
* possible component name, plus a trailing NULL.
|
||||
*/
|
||||
if (bup + 3 + MAXNAMLEN + 1 >= eup) {
|
||||
char *nup;
|
||||
|
||||
if ((nup = realloc(up, upsize *= 2)) == NULL)
|
||||
goto err;
|
||||
up = nup;
|
||||
bup = up;
|
||||
eup = up + upsize;
|
||||
}
|
||||
*bup++ = '.';
|
||||
*bup++ = '.';
|
||||
*bup = '\0';
|
||||
|
||||
/* Open and stat parent directory.
|
||||
* RACE?? - replaced fstat(dirfd(dir), &s) w/ lstat(up,&s)
|
||||
*/
|
||||
if (!(dir = opendir(up)) || lstat(up,&s))
|
||||
goto err;
|
||||
|
||||
/* Add trailing slash for next directory. */
|
||||
*bup++ = '/';
|
||||
|
||||
/*
|
||||
* If it's a mount point, have to stat each element because
|
||||
* the inode number in the directory is for the entry in the
|
||||
* parent directory, not the inode number of the mounted file.
|
||||
*/
|
||||
save_errno = 0;
|
||||
if (s.st_dev == dev) {
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (dp->d_fileno == ino)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (ISDOT(dp))
|
||||
continue;
|
||||
memmove(bup, dp->d_name, dp->d_namlen + 1);
|
||||
|
||||
/* Save the first error for later. */
|
||||
if (lstat(up, &s)) {
|
||||
if (!save_errno)
|
||||
save_errno = errno;
|
||||
errno = 0;
|
||||
continue;
|
||||
}
|
||||
if (s.st_dev == dev && s.st_ino == ino)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for length of the current name, preceding slash,
|
||||
* leading slash.
|
||||
*/
|
||||
if (bpt - pt < dp->d_namlen + (first ? 1 : 2)) {
|
||||
size_t len, off;
|
||||
char *npt;
|
||||
|
||||
if (!ptsize) {
|
||||
errno = ERANGE;
|
||||
goto err;
|
||||
}
|
||||
off = bpt - pt;
|
||||
len = ept - bpt;
|
||||
if ((npt = realloc(pt, ptsize *= 2)) == NULL)
|
||||
goto err;
|
||||
pt = npt;
|
||||
bpt = pt + off;
|
||||
ept = pt + ptsize;
|
||||
memmove(ept - len, bpt, len);
|
||||
bpt = ept - len;
|
||||
}
|
||||
if (!first)
|
||||
*--bpt = '/';
|
||||
bpt -= dp->d_namlen;
|
||||
memmove(bpt, dp->d_name, dp->d_namlen);
|
||||
(void)closedir(dir);
|
||||
|
||||
/* Truncate any file name. */
|
||||
*bup = '\0';
|
||||
}
|
||||
|
||||
notfound:
|
||||
/*
|
||||
* If readdir set errno, use it, not any saved error; otherwise,
|
||||
* didn't find the current directory in its parent directory, set
|
||||
* errno to ENOENT.
|
||||
*/
|
||||
if (!errno)
|
||||
errno = save_errno ? save_errno : ENOENT;
|
||||
/* FALLTHROUGH */
|
||||
err:
|
||||
if (ptsize)
|
||||
free(pt);
|
||||
if (up)
|
||||
free(up);
|
||||
if (dir)
|
||||
(void)closedir(dir);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_GETCWD) */
|
12
crypto/openssh/openbsd-compat/getcwd.h
Normal file
12
crypto/openssh/openbsd-compat/getcwd.h
Normal file
@ -0,0 +1,12 @@
|
||||
/* $Id: getcwd.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_GETCWD_H
|
||||
#define _BSD_GETCWD_H
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(HAVE_GETCWD)
|
||||
|
||||
char *getcwd(char *pt, size_t size);
|
||||
|
||||
#endif /* !defined(HAVE_GETCWD) */
|
||||
#endif /* _BSD_GETCWD_H */
|
103
crypto/openssh/openbsd-compat/getgrouplist.c
Normal file
103
crypto/openssh/openbsd-compat/getgrouplist.c
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifndef HAVE_GETGROUPLIST
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.7 1997/08/19 19:13:27 deraadt Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
* get credential
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <grp.h>
|
||||
|
||||
int
|
||||
getgrouplist(uname, agroup, groups, grpcnt)
|
||||
const char *uname;
|
||||
gid_t agroup;
|
||||
register gid_t *groups;
|
||||
int *grpcnt;
|
||||
{
|
||||
register struct group *grp;
|
||||
register int i, ngroups;
|
||||
int ret, maxgroups;
|
||||
int bail;
|
||||
|
||||
ret = 0;
|
||||
ngroups = 0;
|
||||
maxgroups = *grpcnt;
|
||||
|
||||
/*
|
||||
* install primary group
|
||||
*/
|
||||
if (ngroups >= maxgroups) {
|
||||
*grpcnt = ngroups;
|
||||
return (-1);
|
||||
}
|
||||
groups[ngroups++] = agroup;
|
||||
|
||||
/*
|
||||
* Scan the group file to find additional groups.
|
||||
*/
|
||||
setgrent();
|
||||
while ((grp = getgrent())) {
|
||||
if (grp->gr_gid == agroup)
|
||||
continue;
|
||||
for (bail = 0, i = 0; bail == 0 && i < ngroups; i++)
|
||||
if (groups[i] == grp->gr_gid)
|
||||
bail = 1;
|
||||
if (bail)
|
||||
continue;
|
||||
for (i = 0; grp->gr_mem[i]; i++) {
|
||||
if (!strcmp(grp->gr_mem[i], uname)) {
|
||||
if (ngroups >= maxgroups) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
groups[ngroups++] = grp->gr_gid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
out:
|
||||
endgrent();
|
||||
*grpcnt = ngroups;
|
||||
return (ret);
|
||||
}
|
||||
|
||||
#endif /* HAVE_GETGROUPLIST */
|
16
crypto/openssh/openbsd-compat/getgrouplist.h
Normal file
16
crypto/openssh/openbsd-compat/getgrouplist.h
Normal file
@ -0,0 +1,16 @@
|
||||
/* $Id: getgrouplist.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
|
||||
|
||||
#ifndef _BSD_GETGROUPLIST_H
|
||||
#define _BSD_GETGROUPLIST_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_GETGROUPLIST
|
||||
|
||||
#include <grp.h>
|
||||
|
||||
int getgrouplist(const char *, gid_t, gid_t *, int *);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
122
crypto/openssh/openbsd-compat/getopt.c
Normal file
122
crypto/openssh/openbsd-compat/getopt.c
Normal file
@ -0,0 +1,122 @@
|
||||
/*
|
||||
* Copyright (c) 1987, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$OpenBSD: getopt.c,v 1.2 1996/08/19 08:33:32 tholo Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int opterr = 1, /* if error message should be printed */
|
||||
optind = 1, /* index into parent argv vector */
|
||||
optopt, /* character checked for validity */
|
||||
optreset; /* reset getopt */
|
||||
char *optarg; /* argument associated with option */
|
||||
|
||||
#define BADCH (int)'?'
|
||||
#define BADARG (int)':'
|
||||
#define EMSG ""
|
||||
|
||||
/*
|
||||
* getopt --
|
||||
* Parse argc/argv argument vector.
|
||||
*/
|
||||
int
|
||||
BSDgetopt(nargc, nargv, ostr)
|
||||
int nargc;
|
||||
char * const *nargv;
|
||||
const char *ostr;
|
||||
{
|
||||
extern char *__progname;
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
char *oli; /* option letter list index */
|
||||
|
||||
if (optreset || !*place) { /* update scanning pointer */
|
||||
optreset = 0;
|
||||
if (optind >= nargc || *(place = nargv[optind]) != '-') {
|
||||
place = EMSG;
|
||||
return (-1);
|
||||
}
|
||||
if (place[1] && *++place == '-') { /* found "--" */
|
||||
++optind;
|
||||
place = EMSG;
|
||||
return (-1);
|
||||
}
|
||||
} /* option letter okay? */
|
||||
if ((optopt = (int)*place++) == (int)':' ||
|
||||
!(oli = strchr(ostr, optopt))) {
|
||||
/*
|
||||
* if the user didn't specify '-' as an option,
|
||||
* assume it means -1.
|
||||
*/
|
||||
if (optopt == (int)'-')
|
||||
return (-1);
|
||||
if (!*place)
|
||||
++optind;
|
||||
if (opterr && *ostr != ':')
|
||||
(void)fprintf(stderr,
|
||||
"%s: illegal option -- %c\n", __progname, optopt);
|
||||
return (BADCH);
|
||||
}
|
||||
if (*++oli != ':') { /* don't need argument */
|
||||
optarg = NULL;
|
||||
if (!*place)
|
||||
++optind;
|
||||
}
|
||||
else { /* need an argument */
|
||||
if (*place) /* no white space */
|
||||
optarg = place;
|
||||
else if (nargc <= ++optind) { /* no arg */
|
||||
place = EMSG;
|
||||
if (*ostr == ':')
|
||||
return (BADARG);
|
||||
if (opterr)
|
||||
(void)fprintf(stderr,
|
||||
"%s: option requires an argument -- %c\n",
|
||||
__progname, optopt);
|
||||
return (BADCH);
|
||||
}
|
||||
else /* white space */
|
||||
optarg = nargv[optind];
|
||||
place = EMSG;
|
||||
++optind;
|
||||
}
|
||||
return (optopt); /* dump back option letter */
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_GETOPT) || !defined(HAVE_OPTRESET) */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user