Commit Graph

604 Commits

Author SHA1 Message Date
Damien Miller 71adf127e8 - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c
openbsd-compat/port-linux.h] Move SELinux-specific code from ssh.c to
   port-linux.c to avoid compilation errors. Add -lselinux to ssh when
   building with SELinux support to avoid linking failure; report from
   amk AT spamfence.net; ok dtucker
2011-01-25 12:16:15 +11:00
Darren Tucker 79241377df - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add
RSA_get_default_method() for the benefit of openssl versions that don't
   have it (at least openssl-engine-0.9.6b).  Found and tested by Kevin Brott,
   ok djm@.
2011-01-22 09:37:01 +11:00
Darren Tucker 263d43d2a5 - (dtucker) [openbsd-compat/port-linux.c] Fix minor bug caught by -Werror on
the tinderbox.
2011-01-17 18:50:22 +11:00
Darren Tucker 0c93adc7c1 - (dtucker) [openbsd-compat/port-linux.c] Bug #1838: Add support for the new
Linux OOM-killer magic values that changed in 2.6.36 kernels, with fallback
   to the old values.  Feedback from vapier at gentoo org and djm, ok djm.
2011-01-17 11:55:59 +11:00
Damien Miller 4927aaf446 - djm@cvs.openbsd.org 2011/01/12 01:53:14
avoid some integer overflows mostly with GLOB_APPEND and GLOB_DOOFFS
     and sanity check arguments (these will be unnecessary when we switch
     struct glob members from being type into to size_t in the future);
     "looks ok" tedu@ feedback guenther@
2011-01-12 13:32:03 +11:00
Damien Miller b66e917831 - nicm@cvs.openbsd.org 2010/10/08 21:48:42
[openbsd-compat/glob.c]
     Extend GLOB_LIMIT to cover readdir and stat and bump the malloc limit
     from ARG_MAX to 64K.
     Fixes glob-using programs (notably ftp) able to be triggered to hit
     resource limits.
     Idea from a similar NetBSD change, original problem reported by jasper@.
     ok millert tedu jasper
2011-01-12 13:30:18 +11:00
Darren Tucker 37bb7568ab - (dtucker) openbsd-compat/openssl-compat.c] remove sleep leftover from
debugging.  Spotted by djm.
2010-12-05 08:46:05 +11:00
Darren Tucker ebdef76b5d - (dtucker) [configure.ac moduli.c openbsd-compat/openssl-compat.{c,h}] Add
shims for the new, non-deprecated OpenSSL key generation functions for
   platforms that don't have the new interfaces.
2010-12-04 23:20:50 +11:00
Damien Miller d89745b9e7 - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
instead of (arc4random() % range)
2010-12-03 10:50:26 +11:00
Darren Tucker 9e0ff7afc8 - (dtucker) Bug #1840: fix warning when configuring --with-ssl-engine, patch
from vapier at gentoo org.
2010-11-22 17:59:00 +11:00
Tim Rice c7a8af03a0 - (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add
support for platforms missing isblank(). ok djm@
2010-11-08 14:26:23 -08:00
Darren Tucker 97528353c2 - (dtucker) [configure.ac platform.{c,h} session.c
openbsd-compat/port-solaris.{c,h}] Bug #1824: Add Solaris Project support.
   Patch from cory.erickson at csu mnscu edu with a bit of rework from me.
   ok djm@
2010-11-05 12:03:05 +11:00
Tim Rice bdd3e67c19 - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with
1.12 to unbreak Solaris build.
   ok djm@
2010-10-24 18:35:55 -07:00
Damien Miller 88b844f19b - (djm) [openbsd-compat/Makefile.in] Actually link timingsafe_bcmp 2010-10-07 22:19:23 +11:00
Damien Miller 37f4f1892f - (djm) [openbsd-compat/glob.c] restore ARG_MAX compat code. 2010-10-07 22:10:38 +11:00
Damien Miller 9a3d0dc062 - djm@cvs.openbsd.org 2010/10/01 23:05:32
[cipher-3des1.c cipher-bf1.c cipher-ctr.c openbsd-compat/openssl-compat.h]
     adapt to API changes in openssl-1.0.0a
     NB. contains compat code to select correct API for older OpenSSL
2010-10-07 22:06:42 +11:00
Damien Miller 2738361878 sadly, two typos on one line is not my best record 2010-10-07 22:00:24 +11:00
Damien Miller faca8ccd4d unbreak previous 2010-10-07 21:59:40 +11:00
Damien Miller a6e121aaa0 - djm@cvs.openbsd.org 2010/09/25 09:30:16
[sftp.c configure.ac openbsd-compat/glob.c openbsd-compat/glob.h]
     make use of new glob(3) GLOB_KEEPSTAT extension to save extra server
     rountrips to fetch per-file stat(2) information.
     NB. update openbsd-compat/ glob(3) implementation from OpenBSD libc to
     match.
2010-10-07 21:39:17 +11:00
Damien Miller aa18063baf - matthew@cvs.openbsd.org 2010/09/24 13:33:00
[misc.c misc.h configure.ac openbsd-compat/openbsd-compat.h]
     [openbsd-compat/timingsafe_bcmp.c]
     Add timingsafe_bcmp(3) to libc, mention that it's already in the
     kernel in kern(9), and remove it from OpenSSH.
     ok deraadt@, djm@
     NB. re-added under openbsd-compat/ for portable OpenSSH
2010-10-07 21:25:27 +11:00
Darren Tucker 50e3bab242 - (dtucker) [openbsd-compat/port-linux.c] Check is_selinux_enabled for exact
return code since it can apparently return -1 under some conditions.  From
   openssh bugs werbittewas de, ok djm@
2010-09-10 10:30:25 +10:00
Darren Tucker aa74f6754a - (dtucker) [configure.ac openbsd-compat/Makefile.in
openbsd-compat/openbsd-compat.h openbsd-compat/strptime.c] Add strptime to
   the compat library which helps on platforms like old IRIX.  Based on work
   by djm, tested by Tom Christensen.
2010-08-16 13:15:23 +10:00
Damien Miller 2c4b13aa32 - (djm) bz#1561: don't bother setting IFF_UP on tun(4) device if it is
already set. Makes FreeBSD user openable tunnels useful; patch from
   richard.burakowski+ossh AT mrburak.net, ok dtucker@
2010-08-10 12:47:40 +10:00
Tim Rice 3fd307df5b - (tim) [openbsd-compat/port-uw.c] Reorder includes. auth-options.h now needs
key.h.
2010-06-26 16:45:15 -07:00
Damien Miller 4b1ec8381b - (djm) [openbsd-compat/openssl-compat.h] Fix build breakage on older
libcrypto by defining OPENSSL_[DR]SA_MAX_MODULUS_BITS if they aren't
   already. ok dtucker@
2010-05-12 17:49:59 +10:00
Damien Miller 7d09b8f8d9 - (djm) [openbsd-compat/bsd-arc4random.c] Fix preprocessor detection
for arc4random_buf() and arc4random_uniform(); from Josh Gilkerson
2010-03-26 08:52:02 +11:00
Darren Tucker 9af0cb9acc - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
adjust log at verbose only, since according to cjwatson in bug #1470
   some virtualization platforms don't allow writes.
2010-03-01 15:52:49 +11:00
Damien Miller d05951fcee - (djm) [openbsd-compat/bsd-cygwin_util.c] Reduce the set of environment
variables copied into sshd child processes. From vinschen AT redhat.com
2010-02-28 03:29:33 +11:00
Darren Tucker 19d32cb934 - (dtucker) [openbsd-compat/openssl-compat.c] Bug #1707: Call OPENSSL_config()
after registering the hardware engines, which causes the openssl.cnf file to
   be processed.  See OpenSSL's man page for OPENSSL_config(3) for details.
   Patch from Solomon Peachy, ok djm@.
2010-01-29 10:54:11 +11:00
Darren Tucker 4e21855422 - (dtucker) [openbsd-compat/openbsd-compat.h] Typo. 2010-01-16 23:58:37 +11:00
Darren Tucker 612e400c68 - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
variable warnings.
2010-01-16 13:53:52 +11:00
Darren Tucker 69371b511b - (dtucker) [openbsd-compat/openbsd-compat.h] Fix prototypes, spotted by
Tim.
2010-01-16 13:30:30 +11:00
Darren Tucker 2563e3f272 - (dtucker) [openbsd-compat/openbsd-compat.h] Prototypes for user_from_uid
and group_from_gid.
2010-01-16 11:53:07 +11:00
Darren Tucker ca94485a48 - (dtucker) [openbsd-compat/pwcache.c] Pull in includes.h and thus defines.h
so we correctly detect whether or not we have a native user_from_uid.
2010-01-16 11:48:27 +11:00
Darren Tucker 909a390bb8 - (dtucker) [configure.ac openbsd-compat/{Makefile.in,pwcache.c} Portability
for pwcache.  Also, added caching of negative hits.
2010-01-15 12:38:30 +11:00
Darren Tucker 9d1fd5bc10 - (dtucker) [openbsd-compat.c/pwcache.c] Pull in pwcache.c from OpenBSD (no
changes yet but there will be some to come).
2010-01-15 12:14:45 +11:00
Darren Tucker d59487a33b - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.22.
Fixes bz #1590, where sometimes you could not interrupt a connection while
   ssh was prompting for a passphrase or password.
2010-01-13 21:32:44 +11:00
Darren Tucker 1035cb4729 - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.21. 2010-01-13 18:32:59 +11:00
Darren Tucker ab3c2cab18 - (dtucker) [openbsd-compat/readpassphrase.c] Resync against OpenBSD's r1.18: missing restore of SIGTTOU and some whitespace. 2010-01-13 18:27:32 +11:00
Darren Tucker 1bf3503c9d - (dtucker) [auth-krb5.c platform.{c,h} openbsd-compat/port-aix.{c,h}]
Bug #1583: Use system's kerberos principal name on AIX if it's available.
   Based on a patch from and tested by Miguel Sanders.
2009-12-21 10:49:21 +11:00
Darren Tucker c8802aac28 - (dtucker) Bug #1470: Disable OOM-killing of the listening sshd on Linux,
based on a patch from Vaclav Ovsik and Colin Watson.  ok djm.
2009-12-08 13:39:48 +11:00
Darren Tucker 4d6656b103 - (dtucker) [session.c openbsd-compat/port-linux.{c,h}] Bug #1637: if selinux
is enabled set the security context to "sftpd_t" before running the
   internal sftp server   Based on a patch from jchadima at redhat.
2009-10-24 15:04:12 +11:00
Darren Tucker 82edf23fff - (dtucker) [session.c openbsd-compat/port-aix.h] Bugs #1249 and #1567: move
the setpcred call on AIX to immediately before the permanently_set_uid().
   Ensures that we still have privileges when we call chroot and
   pam_open_sesson.  Based on a patch from David Leonard.
2009-08-20 16:20:50 +10:00
Darren Tucker b5d5ee1ab0 - (dtucker) [sshlogin.c openbsd-compat/port-aix.{c,h}] Bug #1595: make
PrintLastLog work on AIX.  Based in part on a patch from Miguel Sanders.
2009-08-17 09:40:00 +10:00
Darren Tucker 440089afe0 - (dtucker) [openbsd-compat/getrrsetbyname.c] Reduce answer buffer size so it
fits into 16 bits to work around a bug in glibc's resolver where it masks
   off the buffer size at 16 bits.  Patch from Hauke Lampe, ok djm jakob.
2009-07-13 11:38:23 +10:00
Darren Tucker 9d86e5d570 - (dtucker) [auth-passwd.c auth1.c auth2-kbdint.c auth2-none.c auth2-passwd.c
auth2-pubkey.c session.c openbsd-compat/bsd-cygwin_util.{c,h}
   openbsd-compat/daemon.c] Remove support for Windows 95/98/ME and very old
   version of Cygwin.  Patch from vinschen at redhat com.
2009-03-08 11:40:27 +11:00
Darren Tucker 3e7e15f1bd - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}]
EVP_DigestUpdate does not exactly match the other OLD_EVP functions (eg
   in openssl 0.9.6) so add an explicit test for it.
2009-03-07 22:22:35 +11:00
Darren Tucker 8aae6ff0d9 - (dtucker) [schnorr.c openbsd-compat/openssl-compat.{c,h}] Add
EVP_DigestUpdate to the OLD_EVP compatibility functions and tell schnorr.c
   to use them.  Allows building with older OpenSSL versions.
2009-03-07 12:01:47 +11:00
Damien Miller 3f94aaf38c - (djm) [regress/conch-ciphers.sh regress/putty-ciphers.sh]
[regress/putty-kex.sh regress/putty-transfer.sh] Downgrade disabled
   interop tests from FATAL error to a warning. Allows some interop
   tests to proceed if others are missing necessary prerequisites.
2009-02-16 15:21:39 +11:00
Tim Rice 351529ce30 - (tim) [configure.ac defines.h openbsd-compat/port-uw.c
openbsd-compat/xcrypt.c] Add SECUREWARE support to OpenServer 6 SVR5 ABI.
   OK djm@ dtucker@
2009-01-07 10:04:12 -08:00
Darren Tucker 661f63b7d2 - (dtucker) [openbsd-compat/bsd-poll.c] correctly check for number of FDs
larger than FD_SETSIZE (OpenSSH only ever uses poll with one fd).  Patch
   from Nicholas Marriott.
2008-08-30 07:32:37 +10:00
Darren Tucker 9a3f2b4cc3 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Remove long-unneeded compat
code, replace with equivalent cygwin library call.  Patch from vinschen
   at redhat.comi, ok djm@.
2008-07-17 19:03:49 +10:00
Damien Miller c4657ef181 - (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h]
return EAI_FAMILY when trying to lookup unsupported address family;
   from vinschen AT redhat.com
2008-07-14 21:37:36 +10:00
Damien Miller 639ce593d4 - (djm) [openbsd-compat/rresvport.c] Add unistd.h for missing close()
prototype; reported by cristian.ionescu-idbohrn AT axis.com
2008-07-14 12:03:27 +10:00
Damien Miller ce02e5e09e - (djm) [openbsd-compat/bindresvport.c] Rename variables s/sin/in/ to
avoid clash with sin(3) function; reported by
   cristian.ionescu-idbohrn AT axis.com
2008-07-14 12:02:24 +10:00
Damien Miller 8b7ab960df - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction
replacement code; patch from ighighi AT gmail.com in bz#1240;
   ok dtucker
2008-06-15 10:55:34 +10:00
Darren Tucker f387e59d52 - (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent
compiler warnings on some platforms.  Based on a discussion with otto@
2008-06-13 15:03:14 +10:00
Darren Tucker 9d3739daa1 - (dtucker) [openbsd-compat/fake-rfc2553.h] Add sin6_scope_id to sockaddr_in6
since the new CIDR code in addmatch.c references it.
2008-06-10 23:52:51 +10:00
Darren Tucker 598eaa6c0c - (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c
openbsd-compat/Makefile.in openbsd-compat/openbsd-compat.h
   openbsd-compat/bsd-statvfs.{c,h}] Add a null implementation of statvfs and
   fstatvfs and remove #defines around statvfs code.  ok djm@
2008-06-09 03:32:29 +10:00
Damien Miller 58ea61ba2a - (djm) [openbsd-compat/bsd-arc4random.c] Fix math bug that caused bias
in arc4random_uniform with upper_bound in (2^30,2*31). Note that
   OpenSSH did not make requests with upper bounds in this range.
2008-06-04 10:54:00 +10:00
Damien Miller a7058ec7c0 - (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in]
[openbsd-compat/fmt_scaled.c openbsd-compat/openbsd-compat.h]
   Fix compilation on Linux, including pulling in fmt_scaled(3)
   implementation from OpenBSD's libutil.
2008-05-20 08:57:06 +10:00
Damien Miller 9417831ece - (djm) [openbsd-compat/port-tun.c] needs sys/queue.h 2008-05-19 15:28:35 +10:00
Damien Miller caaed01e90 - (djm) [openbsd-compat/bsd-arc4random.c] Warning fixes 2008-05-19 15:26:54 +10:00
Damien Miller a4be7c23fd - (djm) [openbsd-compat/bsd-arc4random.c openbsd-compat/openbsd-compat.c]
[configure.ac] Implement arc4random_buf(), import implementation of
     arc4random_uniform() from OpenBSD
2008-05-19 14:47:37 +10:00
Damien Miller c5750226af - (djm) Force string arguments to replacement setproctitle() though
strnvis first. Ok dtucker@
2008-05-16 10:01:54 +10:00
Damien Miller 55754fb002 - (djm) [openbsd-compat/bsd-poll.c] Include stdlib.h to avoid compile-
time warnings on LynxOS. Patch from ops AT iki.fi
2008-04-04 16:16:35 +11:00
Darren Tucker b8eb586412 - (dtucker) Cache selinux status earlier so we know if it's enabled after a
chroot.  Allows ChrootDirectory to work with selinux support compiled in
   but not enabled.  Using it with selinux enabled will require some selinux
   support inside the chroot.  "looks sane" djm@
2008-03-27 07:27:20 +11:00
Darren Tucker 7643e3397d - (dtucker) [openbsd-compat/regress/strtonumtest.c] Bug #1347: Use platform's
equivalent of LLONG_MAX for the compat regression tests, which makes them
   run on AIX and HP-UX.  Patch from David Leonard.
2008-03-09 17:10:09 +11:00
Darren Tucker 16ba6a8ea2 - (dtucker) [openbsd-compat/port-aix.{c,h}] Remove AIX specific initgroups
implementation.  It's not needed to fix bug #1081 and breaks the build
   on some AIX configurations.
2008-03-09 16:36:55 +11:00
Darren Tucker 7ec8733247 - (dtucker) [openbsd-compat/bsd-poll.c] We don't check for select(2) in
configure (and there's not much point, as openssh won't work without it)
   so HAVE_SELECT is not defined and the poll(2) compat code doesn't get
   built in.  Remove HAVE_SELECT so we can build on platforms without poll.
2008-02-29 13:57:47 +11:00
Darren Tucker 0f26b1386a - (dtucker) [configure.ac openbsd-compat/port-aix.{c,h}] Bug #1081: Implement
getgrouplist via getgrset on AIX, rather than iterating over getgrent.
   This allows, eg, Match and AllowGroups directives to work with NIS and
   LDAP groups.
2008-02-28 23:16:04 +11:00
Darren Tucker 3d295a6cf0 - (dtucker) [key.c defines.h openbsd-compat/openssl-compat.h] Move old OpenSSL
compat glue into openssl-compat.h.
2008-02-28 19:22:04 +11:00
Darren Tucker bfaaf960a0 - (dtucker) [includes.h ssh-add.c ssh-agent.c ssh-keygen.c ssh.c sshd.c
openbsd-compat/openssl-compat.{c,h}] Bug #1437 Move the OpenSSL compat
   header to after OpenSSL headers, since some versions of OpenSSL have
   SSLeay_add_all_algorithms as a macro already.
2008-02-28 19:13:52 +11:00
Darren Tucker 935e20a3f0 - (dtucker) [includes.h openbsd-compat/openssl-compat.c] Bug #1437: reshuffle
headers so ./configure --with-ssl-engine actually works.  Patch from
   Ian Lister.
2008-02-25 21:13:47 +11:00
Darren Tucker 2c2ac033c1 - (dtucker) [openbsd-compat/fake-rfc2553.h] rename ssh_gai_strerror hack
since it now conflicts with the helper function in misc.c.  From
   vinschen AT redhat.com.
2008-02-25 20:21:20 +11:00
Darren Tucker 528d6fa10a - (dtucker) [configure.ac openbsd-compat/glob.{c,h}] Bug #1407: force use of
builtin glob implementation on Mac OS X.  Based on a patch from
   vgiffin at apple.
2007-12-31 21:29:26 +11:00
Damien Miller e6d1527949 - djm@cvs.openbsd.org 2007/10/29 23:49:41
[openbsd-compat/sys-tree.h]
     remove extra backslash at the end of RB_PROTOTYPE, report from
     Jan.Pechanec AT Sun.COM; ok deraadt@
2007-10-30 10:52:44 +11:00
Damien Miller 0ff80a1b17 - millert@cvs.openbsd.org 2004/10/07 16:56:11
GLOB_NOESCAPE is POSIX so move it out of the #ifndef _POSIX_SOURCE
     block.
     (NB. mostly an RCS ID sync, as portable strips out the conditionals)
2007-10-26 16:48:13 +10:00
Damien Miller a95c0c224b - otto@cvs.openbsd.org 2007/04/30 18:42:34
[openbsd-compat/sys-queue.h]
     Enable QUEUE_MACRO_DEBUG on DIAGNOSTIC kernels.
     Input and okays from krw@, millert@, otto@, deraadt@, miod@.
2007-10-26 16:46:31 +10:00
Damien Miller 03c618afa3 - otto@cvs.openbsd.org 2005/11/25 08:06:25
[openbsd-compat/sys-queue.h]
     Introduce debugging aid for queue macros. Disabled by default; but
     developers are encouraged to run with this enabled.
     ok krw@ fgsch@ deraadt@
2007-10-26 16:45:32 +10:00
Damien Miller 300f95fccb - otto@cvs.openbsd.org 2005/10/25 06:37:47
[openbsd-compat/sys-queue.h]
     Some uvm problem is being exposed with the more strict macros.
     Revert until we've found out what's causing the panics.
2007-10-26 16:44:27 +10:00
Damien Miller 0b6a21d468 - otto@cvs.openbsd.org 2005/10/24 20:25:14
[openbsd-compat/sys-queue.h]
     Partly backout. NOLIST, used in LISTs is probably interfering.
     requested by deraadt@
2007-10-26 16:43:22 +10:00
Damien Miller 9aeef6b50d - otto@cvs.openbsd.org 2005/10/17 20:19:42
[openbsd-compat/sys-queue.h]
     Performing certain operations on queue.h data structurs produced
     funny results.  An example is calling  LIST_REMOVE on the same
     element twice. This will not fail, but result in a data structure
     referencing who knows what. Prevent these accidents by NULLing some
     fields on remove and replace. This way, either a panic or segfault
     will be produced on the faulty operation.
2007-10-26 16:42:18 +10:00
Damien Miller d129ecb0f9 - deraadt@cvs.openbsd.org 2005/02/25 13:29:30
[openbsd-compat/sys-queue.h]
     minor white spacing
2007-10-26 16:41:14 +10:00
Damien Miller b99f5f714b - grange@cvs.openbsd.org 2004/05/04 16:59:32
[openbsd-compat/sys-queue.h]
     Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro.
     This matches our SLIST behaviour and NetBSD's SIMPLEQ as well.
     ok millert krw deraadt
2007-10-26 16:40:20 +10:00
Damien Miller 0afeae426c - tdeval@cvs.openbsd.org 2004/11/24 18:10:42
[openbsd-compat/sys-tree.h]
     typo
2007-10-26 16:39:05 +10:00
Damien Miller 88aa4e3d61 - frantzen@@cvs.openbsd.org 2004/04/24 18:11:46
[openbsd-compat/tree.h]
     sync to Niels Provos' version.  avoid unused variable warning in
     RB_NEXT()
2007-10-26 16:37:43 +10:00
Damien Miller 2f715eeb5c - jakob@cvs.openbsd.org 2007/10/11 18:36:41
[openbsd-compat/getrrsetbyname.c openbsd-compat/getrrsetbyname.h]
     use RRSIG instead of SIG for DNSSEC. ok djm@
2007-10-26 16:26:46 +10:00
Damien Miller 1651f6c40e - otto@cvs.openbsd.org 2006/10/21 09:55:03
[openbsd-compat/base64.c]
     remove calls to abort(3) that can't happen anyway; from
     <bret dot lambert at gmail.com>; ok millert@ deraadt@
2007-10-26 16:17:24 +10:00
Damien Miller a97529fa2e - (djm) [openbsd-compat/bindresvport.c]
Sync RCS ID after irrelevant (for portable OpenSSH) header shuffling
2007-10-26 16:16:09 +10:00
Damien Miller 9ed5643491 - jakob@cvs.openbsd.org 2007/10/11 18:36:41
[openbsd-compat/getrrsetbyname.c]
     use RRSIG instead of SIG for DNSSEC. ok djm@
2007-10-26 16:14:46 +10:00
Damien Miller 9c51c8d81a - deraadt@cvs.openbsd.org 2005/11/28 17:50:12
[openbsd-compat/glob.c]
     unused arg in internal static API
2007-10-26 16:13:39 +10:00
Darren Tucker 84287b831e - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path.
Patch from Jan.Pechanec at sun com.
2007-09-14 10:04:15 +10:00
Darren Tucker e296d58dcf - (dtucker) [openbsd-compat/regress/closefromtest.c] Bug #1358: Always
return 0 on successful test.  From David.Leonard at quest com.
2007-09-10 13:20:14 +10:00
Darren Tucker 794f97026e - (dtucker) [openbsd-compat/bsd-cray.c] Remove debug from signal handler.
ok djm@
2007-08-15 19:17:43 +10:00
Darren Tucker 863cfa0e6f - (dtucker) [openbsd-compat/port-aix.c] Comment typo. 2007-08-09 14:29:47 +10:00
Tim Rice bf0212d1b7 - (tim) [openbsd-compat/regress/closefromtest.c] Bug 1345: fix open() call.
Report/patch by David.Leonard AT quest.com
2007-07-24 20:54:09 -07:00
Damien Miller 0d7b93473c - (djm) bz#1325: Fix SELinux in permissive mode where it would
incorrectly fatal() on errors. patch from cjwatson AT debian.org;
   ok dtucker
2007-06-28 08:48:02 +10:00
Darren Tucker febf0f5668 - (dtucker) [atomicio.c configure.ac openbsd-compat/Makefile.in
openbsd-compat/bsd-poll.{c,h} openbsd-compat/openbsd-compat.h]
   Add an implementation of poll() built on top of select(2).  Code from
   OpenNTPD with changes suggested by djm.  ok djm@
2007-06-25 22:15:12 +10:00
Darren Tucker 7dae3d296e - (dtucker) [openbsd-compat/openssl-compat.h] Remove redundant definition
of USE_BUILTIN_RIJNDAEL since the <0.9.6 test is covered by the
   subsequent <0.9.7 test.
2007-06-14 23:47:31 +10:00
Darren Tucker a2ed75582f - (dtucker) [openbsd-compat/openssl-compat.h] Merge USE_BUILTIN_RIJNDAEL
sections.  Fixes builds with early OpenSSL 0.9.6 versions.
2007-06-14 23:38:39 +10:00
Darren Tucker cb52017ad9 - (dtucker) [cipher-ctr.c umac.c openbsd-compat/openssl-compat.h] Move the
USE_BUILTIN_RIJNDAEL compat goop to openssl-compat.h so it can be
   shared with umac.c.  Allows building with OpenSSL 0.9.5 again including
   umac support.  With tim@ djm@, ok djm.
2007-06-14 23:21:32 +10:00
Darren Tucker 1534fa41e0 - (dtucker) [openbsd-compat/bsd-misc.c] According to the spec the "remainder"
argument to nanosleep may be NULL.  Currently this never happens in OpenSSH,
   but check anyway in case this changes or the code gets used elsewhere.
2007-06-11 14:34:53 +10:00
Damien Miller 66177929ae spacing 2007-06-11 12:52:24 +10:00
Darren Tucker 2ac529b505 - (dtucker) [openbsd-compat/xmmap.c] Include stdlib.h for mkstemp prototype. 2007-04-29 14:02:43 +10:00
Darren Tucker cc40d5ecdf - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1299: Use the
platform's _res if it has one.  Should fix problem of DNSSEC record lookups
   on NetBSD as reported by Curt Sampson.
2007-04-29 13:58:06 +10:00
Darren Tucker 781e7a28d0 - (dtucker) [openbsd-compat/bsd-misc.c] Include unistd.h and sys/types.h
for select(2) prototype.
2007-04-29 12:06:55 +10:00
Tim Rice 99203ec48b 20070326
- (tim) [auth.c configure.ac defines.h session.c openbsd-compat/port-uw.c
   openbsd-compat/port-uw.h openbsd-compat/xcrypt.c] Rework libiaf test/defines
   to account for IRIX having libiaf but not set_id(). Patch with & ok dtucker@
2007-03-26 09:35:28 -07:00
Darren Tucker 164aa30e46 - (dtucker) [configure.ac openbsd-compat/bsd-getpeereid.c] Bug #1287: Use
getpeerucred to implement getpeereid (currently only Solaris 10 and up).
   Patch by Jan.Pechanec at Sun.
2007-03-21 21:39:57 +11:00
Darren Tucker fd30986c92 - (dtucker) [openbsd-compat/openssl-compat.h] Bug #1291: Work around a
bug in OpenSSL 0.9.8e that prevents aes256-ctr, aes192-ctr and arcfour256
   ciphers from working correctly (disconnects with "Bad packet length"
   errors) as found by Ben Harris.  ok djm@
2007-03-05 18:25:20 +11:00
Darren Tucker 89ee69e3c6 - (dtucker) [openbsd-compat/getrrsetbyname.c] Don't attempt to calloc
an array for signatures when there are none since "calloc(0, n) returns
   NULL on some platforms (eg Tru64), which is explicitly permitted by
   POSIX.  Diagnosis and patch by svallet genoscope.cns.fr.
2007-02-19 22:56:55 +11:00
Darren Tucker 07877ca680 - (dtucker) [openbsd-compat/bsd-snprintf.c] Static declarations for public
library interfaces aren't very helpful. Fix up the DOPR_OUTCH macro
   so it works properly and modify its callers so that they don't pre or
   post decrement arguments that are conditionally evaluated. While there,
   put SNPRINTF_CONST back as it prevents build failures in some
   configurations.  ok djm@ (for most of it)
2007-01-24 00:07:29 +11:00
Damien Miller 742cc1c194 - (djm) [openbsd-compat/bsd-snprintf.c] Fix integer overflow in return
value of snprintf replacement, similar to bugs in various libc
   implementations. This overflow is not exploitable in OpenSSH.
   While I'm fiddling with it, make it a fair bit faster by inlining the
   append-char routine; ok dtucker@
2007-01-14 21:20:30 +11:00
Damien Miller be6db83462 - (djm) [bsd-asprintf.c] Better test for bad vsnprintf lengths; ok dtucker@ 2006-12-05 22:58:09 +11:00
Darren Tucker 4d13ecea54 - (dtucker) [openbsd-compat/port-solaris.c] Bug #1255: Make only hwerr
events fatal in Solaris process contract support and tell it to signal
   only processes in the same process group when something happens.
   Based on information from andrew.benham at thus.net and similar to
   a patch from Chad Mynhier.  ok djm@
2006-11-01 10:28:49 +11:00
Darren Tucker c70ce7b09d - (dtucker) [openbsd-compat/port-aix.{c,h}] Reduce scope of includes.
Prevents macro redefinition warnings of "RDONLY".
2006-09-18 23:54:32 +10:00
Darren Tucker 08432d54fa - (dtucker) [openbsd-compat/bsd-snprintf.c] Add stdarg.h. 2006-09-09 15:59:43 +10:00
Darren Tucker ed0b59218e - (dtucker) [configure.ac openbsd-compat/openbsd-compat.h] Check for
declaration of writev(2) and declare it ourselves if necessary.  Makes
   the atomiciov() calls build on really old systems.  ok djm@
2006-09-03 22:44:49 +10:00
Darren Tucker 46aa3e0ce1 - (dtucker) [ssh-keyscan.c ssh-rand-helper.c ssh.c sshconnect.c
openbsd-compat/bindresvport.c openbsd-compat/getrrsetbyname.c
   openbsd-compat/port-tun.c openbsd-compat/rresvport.c] Include <arpa/inet.h>
   for hton* and ntoh* macros.  Required on (at least) HP-UX since we define
   _XOPEN_SOURCE_EXTENDED.  Found by santhi.amirta at gmail com.
2006-09-02 15:32:40 +10:00
Darren Tucker 25fa0ee693 - (dtucker) [openbsd-compat/port-irix.c] Add errno.h, found by Iain Morgan. 2006-09-02 12:38:56 +10:00
Darren Tucker 096faecdea - (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] Explicitly
test for GLOB_NOMATCH and use our glob functions if it's not found.
   Stops sftp from segfaulting when attempting to get a nonexistent file on
   Cygwin (previous versions of OpenSSH didn't use the native glob). Partly
   from and tested by Corinna Vinschen.
2006-09-01 20:29:10 +10:00
Darren Tucker 0646ca6be8 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Fix implict declaration
warnings for binary_open and binary_close.  Patch from Corinna Vinschen.
2006-09-01 19:29:01 +10:00
Damien Miller 607aede26c - (djm) [includes.h monitor.c openbsd-compat/bindresvport.c]
[openbsd-compat/rresvport.c] Some more headers: netinet/in.h
   sys/socket.h and unistd.h in various places
2006-09-01 15:48:19 +10:00
Damien Miller ded319cca2 - (djm) [audit-bsm.c audit.c auth-bsdauth.c auth-chall.c auth-pam.c]
[auth-rsa.c auth-shadow.c auth-sia.c auth1.c auth2-chall.c]
   [auth2-gss.c auth2-kbdint.c auth2-none.c authfd.c authfile.c]
   [cipher-3des1.c cipher-aes.c cipher-bf1.c cipher-ctr.c clientloop.c]
   [dh.c dns.c entropy.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c]
   [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c loginrec.c mac.c]
   [md5crypt.c monitor.c monitor_wrap.c readconf.c rsa.c]
   [scard-opensc.c scard.c session.c ssh-add.c ssh-agent.c ssh-dss.c]
   [ssh-keygen.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c]
   [sshconnect1.c sshconnect2.c sshd.c rc4.diff]
   [openbsd-compat/bsd-cray.c openbsd-compat/port-aix.c]
   [openbsd-compat/port-linux.c openbsd-compat/port-solaris.c]
   [openbsd-compat/port-uw.c]
   Lots of headers for SCO OSR6, mainly adding stdarg.h for log.h;
   compile problems reported by rac AT tenzing.org
2006-09-01 15:38:36 +10:00
Damien Miller 1b06dc30ad - (djm) [CREDITS LICENCE Makefile.in auth.c configure.ac includes.h ]
[platform.c platform.h sshd.c openbsd-compat/Makefile.in]
   [openbsd-compat/openbsd-compat.h openbsd-compat/port-solaris.c]
   [openbsd-compat/port-solaris.h] Add support for Solaris process
   contracts, enabled with --use-solaris-contracts. Patch from Chad
   Mynhier, tweaked by dtucker@ and myself; ok dtucker@
2006-08-31 03:24:41 +10:00
Darren Tucker 26d4e19caa - (dtucker) [auth.c openbsd-compat/port-aix.c] Bug #1207: always call
loginsuccess on AIX immediately after authentication to clear the failed
   login count.  Previously this would only happen when an interactive
   session starts (ie when a pty is allocated) but this means that accounts
   that have primarily non-interactive sessions (eg scp's) may gradually
   accumulate enough failures to lock out an account.  This change may have
   a side effect of creating two audit records, one with a tty of "ssh"
   corresponding to the authentication and one with the allocated pty per
   interactive session.
2006-08-30 22:33:09 +10:00
Damien Miller 8ff1da81ec - (djm) [openbsd-compat/xcrypt.c] needs unistd.h 2006-08-30 17:52:03 +10:00
Darren Tucker 9162028887 - (dtucker) [openbsd-compat/xmmap.c] Move #define HAVE_MMAP to prevent
unused variable warning when we have a broken or missing mmap(2).

Now with 100% more diff!
2006-08-24 19:58:36 +10:00
Darren Tucker c1abe8e3e8 - (dtucker) [openbsd-compat/rresvport.c] Include <stdlib.h> for malloc. 2006-08-24 19:53:40 +10:00
Darren Tucker f80f5ec81b - (dtucker) [openbsd-compat/bsd-openpty.c] Include for ioctl(2). 2006-08-24 19:52:30 +10:00
Darren Tucker 450d2af2a3 - (dtucker) [openbsd-compat/bsd-misc.c] Include <sys/select.h> for select(2)
on POSIX systems.
2006-08-24 19:45:33 +10:00
Darren Tucker e086955531 - (dtucker) [openbsd-compat/bsd-misc.c] Add includes needed for select(2) on
older systems.
2006-08-24 19:43:16 +10:00
Darren Tucker fe408b4826 - (dtucker) [openbsd-compat/basename.c] Include errno.h. 2006-08-24 19:41:03 +10:00
Darren Tucker f0625699df - (dtucker) [openbsd-compat/regress/Makefile.in] Add $(EXEEXT) and add a
single rule for the test progs.
2006-08-19 19:12:14 +10:00
Darren Tucker 637c80aa6f - (dtucker) [openbsd-compat/regress/Makefile.in] Use implicit rules for the
test progs instead; they work better than what we have.
2006-08-18 20:56:18 +10:00
Darren Tucker ec4e4daa6c - (dtucker) [openbsd-compat/regress/snprintftest.c] Newline on error. 2006-08-18 20:09:32 +10:00
Darren Tucker 43d3ccdbdd - (dtucker) [openbsd-compat/bsd-closefrom.c] Comment out rcsid. 2006-08-18 19:49:58 +10:00
Darren Tucker d018b2e9c8 - (dtucker) [configure.ac openbsd-compat/bsd-closefrom.c] Resync with
closefrom.c from sudo.
2006-08-18 18:51:20 +10:00
Darren Tucker c889ffdbc6 - (dtucker) [openbsd-compat/regress/{Makefile.in,closefromtest.c}] Regress
test for closefrom() in compat code.
2006-08-17 19:40:35 +10:00
Darren Tucker 3083bc2b52 - (dtucker) [configure.ac openbsd-compat/bsd-closefrom.c] Use F_CLOSEM fcntl
for closefrom() on AIX.  Pointed out by William Ahern.
2006-08-17 19:35:49 +10:00
Darren Tucker e6b641a9a1 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c]
Include stdlib.h for malloc and friends.
2006-08-17 18:55:27 +10:00
Damien Miller 0e5143e88e - (djm) [openbsd-compat/bsd-getpeereid.c] Add some headers to quiet warnings
on Solaris 10
2006-08-07 11:26:36 +10:00
Darren Tucker f78fb54412 - (dtucker) [openbsd-compat/{bsd-asprintf.c,bsd-openpty.c,bsd-snprintf.c,
glob.c}] Include stdlib.h for malloc and friends in compat code.
2006-08-06 21:25:24 +10:00
Darren Tucker 2b4e38b712 - (dtucker) [openbsd-compat/fake-rfc2553.c] Add headers needed for inet_ntoa. 2006-08-05 19:18:08 +10:00
Darren Tucker 92350103fc - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Add headers required to compile
on Cygwin.
2006-08-05 19:08:16 +10:00
Darren Tucker 8a15f01aff - (dtucker) [openbsd-compat/strtonum.c] Include stdlib.h for strtoll,
otherwise it is implicitly declared as returning an int.
2006-08-05 16:27:20 +10:00
Darren Tucker d8aec107fe - (dtucker) [openbsd-compat/getrrsetbyname.c] Nees stdlib.h for malloc. 2006-08-05 16:12:15 +10:00
Darren Tucker e7eec90f38 - (dtucker) [openbsd-compat/{bsd-arc4random.c,port-tun.c,xmmap.c}] Lots of
#include stdarg.h, needed for log.h.
2006-08-05 15:47:26 +10:00
Damien Miller 75bb664458 - (djm) [auth-pam.c auth-shadow.c auth2-none.c cleanup.c sshd.c]
[openbsd-compat/port-tun.c openbsd-compat/port-tun.h] Sprinkle more
   includes for Linux in
2006-08-05 14:07:20 +10:00
Damien Miller d04db59ad9 - (djm) [openbsd-compat/regress/snprintftest.c]
[openbsd-compat/regress/strduptest.c] Add missing includes so they pass
   compilation with "-Wall -Werror"
2006-08-05 13:27:29 +10:00