Compare commits
35
Commits
V_8_4_P1
...
V_3_7_1_P2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dbe10d822 | ||
|
|
b5f8e5d4c6 | ||
|
|
e043e8e221 | ||
|
|
03575cc07d | ||
|
|
a05ec477b3 | ||
|
|
e1318fb07f | ||
|
|
d640322dd8 | ||
|
|
efa09bf250 | ||
|
|
d77263ea5c | ||
|
|
a35bebfdff | ||
|
|
4515ebb904 | ||
|
|
bd126db25c | ||
|
|
537d716831 | ||
|
|
8ceeb26993 | ||
|
|
7283b27e08 | ||
|
|
7724e94d04 | ||
|
|
2a2e64ea40 | ||
|
|
85786850fb | ||
|
|
a307b6ff14 | ||
|
|
8f4b946038 | ||
|
|
31486b0bea | ||
|
|
a21ea0840c | ||
|
|
7baaa6a961 | ||
|
|
387666a626 | ||
|
|
8f73f41d10 | ||
|
|
4dd222cb87 | ||
|
|
7b92600e9b | ||
|
|
aa9a76fe4c | ||
|
|
ade1cee573 | ||
|
|
92dc672aac | ||
|
|
9d14715146 | ||
|
|
04a1d8d67d | ||
|
|
5502e5895d | ||
|
|
315212b531 | ||
|
|
42978c7f28 |
@@ -1,3 +1,84 @@
|
||||
20030923
|
||||
- (dtucker) OpenBSD CVS Sync
|
||||
- [email protected] 2003/09/18 07:52:54
|
||||
[sshconnect.c]
|
||||
missing {}; bug #656; jclonguet at free.fr
|
||||
- [email protected] 2003/09/18 07:54:48
|
||||
[buffer.c]
|
||||
protect against double free; #660; zardoz at users.sf.net
|
||||
- [email protected] 2003/09/18 08:49:45
|
||||
[deattack.c misc.c session.c ssh-agent.c]
|
||||
more buffer allocation fixes; from Solar Designer; CAN-2003-0682;
|
||||
ok millert@
|
||||
- [email protected] 2003/09/19 09:02:02
|
||||
[packet.c]
|
||||
buffer_dump only if PACKET_DEBUG is defined; Jedi/Sector One; pr 3471
|
||||
- (djm) Fix SSH1 challenge kludge
|
||||
- (djm) Bug #671: Fix builds on OpenBSD
|
||||
- (djm) Bug #676: Fix PAM stack corruption
|
||||
- (djm) Fix bad free() in PAM code
|
||||
- (djm) Don't call pam_end before pam_init
|
||||
- (djm) Enable build with old OpenSSL again
|
||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
- (djm) Crank version.h and spec version numbers
|
||||
- (djm) Release 3.7.1p2
|
||||
|
||||
20030922
|
||||
- (dtucker) [Makefile.in] Bug #644: Fix "make clean" for out-of-tree
|
||||
builds. Portability corrections from tim@.
|
||||
- (dtucker) [configure.ac] Bug #665: uid swapping issues on Mac OS X.
|
||||
Patch from max at quendi.de.
|
||||
- (dtucker) [configure.ac] Bug #657: uid swapping issues on BSDi.
|
||||
- (dtucker) [configure.ac] Bug #653: uid swapping issues on Tru64.
|
||||
- (dtucker) [configure.ac] Bug #693: uid swapping issues on NCR MP-RAS.
|
||||
Patch from david.haughton at ncr.com
|
||||
- (dtucker) [configure.ac] Bug #659: uid swapping issues on IRIX 6.
|
||||
Part of patch supplied by bugzilla-openssh at thewrittenword.com
|
||||
- (dtucker) [configure.ac openbsd-compat/fake-rfc2553.c
|
||||
openbsd-compat/fake-rfc2553.h] Bug #659: Test for and handle systems with
|
||||
where gai_strerror is defined as "const char *". Part of patch supplied
|
||||
by bugzilla-openssh at thewrittenword.com
|
||||
- (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config] Update
|
||||
ssh-host-config to match current defaults, bump README version. Patch from
|
||||
vinschen at redhat.com.
|
||||
- (dtucker) [uidswap.c] Don't test restoration of uid on Cygwin since the
|
||||
OS does not support permanently dropping privileges. Patch from
|
||||
vinschen at redhat.com.
|
||||
- (dtucker) [openbsd-compat/port-aix.c] Use correct include for xmalloc.h,
|
||||
add canohost.h to stop warning. Based on patch from openssh-unix-dev at
|
||||
thewrittenword.com
|
||||
- (dtucker) [INSTALL] Bug #686: Document requirement for zlib 1.1.4 or
|
||||
higher.
|
||||
- (tim) Fix typo. s/SETEIUD_BREAKS_SETUID/SETEUID_BREAKS_SETUID/
|
||||
- (tim) [configure.ac] Bug 665: move 3 new AC_DEFINES outside of AC_TRY_RUN.
|
||||
Report by distler AT golem ph utexas edu.
|
||||
- (dtucker) [contrib/aix/pam.conf] Include example pam.conf for AIX from
|
||||
article by genty at austin.ibm.com, included with the author's permission.
|
||||
- (tim) [configure.ac] add --disable-etc-default-login option. ok djm
|
||||
|
||||
20030919
|
||||
- (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL;
|
||||
djast AT cs.toronto.edu
|
||||
- (djm) Bug #680: Remove missing inet_ntoa.h header reference
|
||||
- (djm) Bug #646: Fix location of x11-ssh-askpass; Jim
|
||||
- (dtucker) [openbsd-compat/port-aix.h] Bug #640: Don't include audit.h
|
||||
unless required. Reorder to reduce warnings.
|
||||
- (dtucker) [session.c] Bug #643: Fix size_t -> u_int and fix null deref
|
||||
when /etc/default/login doesn't exist or isn't readable. Fixes from
|
||||
jparsons-lists at saffron.net and georg.oppenberg at deu mci com.
|
||||
|
||||
20030918
|
||||
- (djm) Bug #652: Fix empty password auth
|
||||
|
||||
20030917
|
||||
- (djm) OpenBSD Sync
|
||||
- [email protected] 2003/09/16 21:02:40
|
||||
[buffer.c channels.c version.h]
|
||||
more malloc/fatal fixes; ok millert/deraadt; ghudson at MIT.EDU
|
||||
- (djm) Crank RPM spec versions
|
||||
- (djm) Release 3.7.1p1
|
||||
|
||||
20030916
|
||||
- (dtucker) [acconfig.h configure.ac defines.h session.c] Bug #252: Retrieve
|
||||
PATH (or SUPATH) and UMASK from /etc/default/login on platforms that have it
|
||||
@@ -7,6 +88,10 @@
|
||||
- [email protected] 2003/09/16 03:03:47
|
||||
[buffer.c]
|
||||
do not expand buffer before attempting to reallocate it; markus ok
|
||||
- (djm) Crank spec versions
|
||||
- (djm) Banish (safe) sprintf from auth-pam.c. Patch from bal
|
||||
- (tim) [configure.ac] Fix portability issues.
|
||||
- (djm) Release 3.7p1
|
||||
|
||||
20030914
|
||||
- (dtucker) [Makefile regress/Makefile] Fix portability issues preventing
|
||||
@@ -1103,4 +1188,4 @@
|
||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from [email protected], diagnosis from [email protected]
|
||||
|
||||
$Id: ChangeLog,v 1.2994 2003/09/16 03:31:03 mouring Exp $
|
||||
$Id: ChangeLog,v 1.2994.2.34 2003/09/23 09:33:17 djm Exp $
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
You will need working installations of Zlib and OpenSSL.
|
||||
|
||||
Zlib:
|
||||
Zlib 1.1.4 or greater:
|
||||
http://www.gzip.org/zlib/
|
||||
|
||||
OpenSSL 0.9.6 or greater:
|
||||
@@ -33,7 +33,7 @@ http://www.gnome.org/
|
||||
Alternatively, Jim Knoble <[email protected]> has written an excellent X11
|
||||
passphrase requester. This is maintained separately at:
|
||||
|
||||
http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/index.html
|
||||
http://www.jmknoble.net/software/x11-ssh-askpass/
|
||||
|
||||
PRNGD:
|
||||
|
||||
@@ -101,11 +101,8 @@ name).
|
||||
|
||||
There are a few other options to the configure script:
|
||||
|
||||
--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-pam enables PAM support. If PAM support is compiled in, it must
|
||||
also be enabled in sshd_config (refer to the UsePAM directive).
|
||||
|
||||
--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
|
||||
@@ -126,16 +123,6 @@ it if lastlog is installed in a different place.
|
||||
--with-osfsia, --without-osfsia 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.
|
||||
|
||||
@@ -161,12 +148,6 @@ 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.
|
||||
|
||||
@@ -217,4 +198,4 @@ Please refer to the "reporting bugs" section of the webpage at
|
||||
http://www.openssh.com/
|
||||
|
||||
|
||||
$Id: INSTALL,v 1.56 2003/05/24 01:41:16 dtucker Exp $
|
||||
$Id: INSTALL,v 1.56.2.4 2003/09/23 09:24:21 djm Exp $
|
||||
|
||||
+10
-5
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.in,v 1.249 2003/09/14 01:40:36 dtucker Exp $
|
||||
# $Id: Makefile.in,v 1.249.2.1 2003/09/22 01:00:12 dtucker Exp $
|
||||
|
||||
# uncomment if you run a non bourne compatable shell. Ie. csh
|
||||
#SHELL = @SH@
|
||||
@@ -192,20 +192,18 @@ ssh_prng_cmds.out: ssh_prng_cmds
|
||||
moduli:
|
||||
echo
|
||||
|
||||
clean:
|
||||
clean: regressclean
|
||||
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
|
||||
rm -f *.out core
|
||||
(cd openbsd-compat && $(MAKE) clean)
|
||||
(cd regress && $(MAKE) clean)
|
||||
|
||||
distclean:
|
||||
distclean: regressclean
|
||||
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)
|
||||
(cd regress && $(MAKE) distclean)
|
||||
|
||||
veryclean: distclean
|
||||
rm -f configure config.h.in *.0
|
||||
@@ -373,6 +371,8 @@ uninstall:
|
||||
tests: $(TARGETS)
|
||||
BUILDDIR=`pwd`; \
|
||||
[ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \
|
||||
[ -f `pwd`/regress/Makefile ] || \
|
||||
ln -s $(srcdir)/regress/Makefile `pwd`/regress/Makefile ; \
|
||||
TEST_SSH_SSH="$${BUILDDIR}/ssh"; \
|
||||
TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \
|
||||
TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
|
||||
@@ -398,3 +398,8 @@ tests: $(TARGETS)
|
||||
TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
|
||||
EXEEXT="$(EXEEXT)" \
|
||||
$@
|
||||
|
||||
regressclean:
|
||||
if [ -f regress/Makefile -a -r regress/Makefile ]; then \
|
||||
(cd regress && $(MAKE) clean) \
|
||||
fi
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ verify_response(Authctxt *authctxt, const char *response)
|
||||
xfree(info);
|
||||
}
|
||||
/* if we received more prompts, we're screwed */
|
||||
res = (numprompts != 0);
|
||||
res = (res == 0 && numprompts == 0) ? 0 : -1;
|
||||
}
|
||||
device->free_ctx(authctxt->kbdintctxt);
|
||||
authctxt->kbdintctxt = NULL;
|
||||
|
||||
+64
-38
@@ -31,7 +31,7 @@
|
||||
|
||||
/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
|
||||
#include "includes.h"
|
||||
RCSID("$Id: auth-pam.c,v 1.72 2003/09/13 12:12:11 dtucker Exp $");
|
||||
RCSID("$Id: auth-pam.c,v 1.72.2.2 2003/09/23 09:24:21 djm Exp $");
|
||||
|
||||
#ifdef USE_PAM
|
||||
#include <security/pam_appl.h>
|
||||
@@ -111,12 +111,12 @@ pthread_join(sp_pthread_t thread, void **value __unused)
|
||||
#endif
|
||||
|
||||
|
||||
static pam_handle_t *sshpam_handle;
|
||||
static int sshpam_err;
|
||||
static int sshpam_authenticated;
|
||||
static int sshpam_new_authtok_reqd;
|
||||
static int sshpam_session_open;
|
||||
static int sshpam_cred_established;
|
||||
static pam_handle_t *sshpam_handle = NULL;
|
||||
static int sshpam_err = 0;
|
||||
static int sshpam_authenticated = 0;
|
||||
static int sshpam_new_authtok_reqd = 0;
|
||||
static int sshpam_session_open = 0;
|
||||
static int sshpam_cred_established = 0;
|
||||
|
||||
struct pam_ctxt {
|
||||
sp_pthread_t pam_thread;
|
||||
@@ -136,42 +136,51 @@ sshpam_thread_conv(int n, const struct pam_message **msg,
|
||||
{
|
||||
Buffer buffer;
|
||||
struct pam_ctxt *ctxt;
|
||||
struct pam_response *reply;
|
||||
int i;
|
||||
|
||||
*resp = NULL;
|
||||
|
||||
ctxt = data;
|
||||
if (n <= 0 || n > PAM_MAX_NUM_MSG)
|
||||
return (PAM_CONV_ERR);
|
||||
*resp = xmalloc(n * sizeof **resp);
|
||||
|
||||
if ((reply = malloc(n * sizeof(*reply))) == NULL)
|
||||
return (PAM_CONV_ERR);
|
||||
memset(reply, 0, n * sizeof(*reply));
|
||||
|
||||
buffer_init(&buffer);
|
||||
for (i = 0; i < n; ++i) {
|
||||
resp[i]->resp_retcode = 0;
|
||||
resp[i]->resp = NULL;
|
||||
switch (PAM_MSG_MEMBER(msg, i, msg_style)) {
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
buffer_put_cstring(&buffer, PAM_MSG_MEMBER(msg, i, msg));
|
||||
buffer_put_cstring(&buffer,
|
||||
PAM_MSG_MEMBER(msg, i, msg));
|
||||
ssh_msg_send(ctxt->pam_csock,
|
||||
PAM_MSG_MEMBER(msg, i, msg_style), &buffer);
|
||||
ssh_msg_recv(ctxt->pam_csock, &buffer);
|
||||
if (buffer_get_char(&buffer) != PAM_AUTHTOK)
|
||||
goto fail;
|
||||
resp[i]->resp = buffer_get_string(&buffer, NULL);
|
||||
reply[i].resp = buffer_get_string(&buffer, NULL);
|
||||
break;
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
buffer_put_cstring(&buffer, PAM_MSG_MEMBER(msg, i, msg));
|
||||
buffer_put_cstring(&buffer,
|
||||
PAM_MSG_MEMBER(msg, i, msg));
|
||||
ssh_msg_send(ctxt->pam_csock,
|
||||
PAM_MSG_MEMBER(msg, i, msg_style), &buffer);
|
||||
ssh_msg_recv(ctxt->pam_csock, &buffer);
|
||||
if (buffer_get_char(&buffer) != PAM_AUTHTOK)
|
||||
goto fail;
|
||||
resp[i]->resp = buffer_get_string(&buffer, NULL);
|
||||
reply[i].resp = buffer_get_string(&buffer, NULL);
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
buffer_put_cstring(&buffer, PAM_MSG_MEMBER(msg, i, msg));
|
||||
buffer_put_cstring(&buffer,
|
||||
PAM_MSG_MEMBER(msg, i, msg));
|
||||
ssh_msg_send(ctxt->pam_csock,
|
||||
PAM_MSG_MEMBER(msg, i, msg_style), &buffer);
|
||||
break;
|
||||
case PAM_TEXT_INFO:
|
||||
buffer_put_cstring(&buffer, PAM_MSG_MEMBER(msg, i, msg));
|
||||
buffer_put_cstring(&buffer,
|
||||
PAM_MSG_MEMBER(msg, i, msg));
|
||||
ssh_msg_send(ctxt->pam_csock,
|
||||
PAM_MSG_MEMBER(msg, i, msg_style), &buffer);
|
||||
break;
|
||||
@@ -181,12 +190,15 @@ sshpam_thread_conv(int n, const struct pam_message **msg,
|
||||
buffer_clear(&buffer);
|
||||
}
|
||||
buffer_free(&buffer);
|
||||
*resp = reply;
|
||||
return (PAM_SUCCESS);
|
||||
|
||||
fail:
|
||||
while (i)
|
||||
xfree(resp[--i]);
|
||||
xfree(*resp);
|
||||
*resp = NULL;
|
||||
for(i = 0; i < n; i++) {
|
||||
if (reply[i].resp != NULL)
|
||||
xfree(reply[i].resp);
|
||||
}
|
||||
xfree(reply);
|
||||
buffer_free(&buffer);
|
||||
return (PAM_CONV_ERR);
|
||||
}
|
||||
@@ -258,6 +270,8 @@ sshpam_cleanup(void *arg)
|
||||
{
|
||||
(void)arg;
|
||||
debug("PAM: cleanup");
|
||||
if (sshpam_handle == NULL)
|
||||
return;
|
||||
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv);
|
||||
if (sshpam_cred_established) {
|
||||
pam_setcred(sshpam_handle, PAM_DELETE_CRED);
|
||||
@@ -600,40 +614,50 @@ pam_chauthtok_conv(int n, const struct pam_message **msg,
|
||||
struct pam_response **resp, void *data)
|
||||
{
|
||||
char input[PAM_MAX_MSG_SIZE];
|
||||
struct pam_response *reply;
|
||||
int i;
|
||||
|
||||
*resp = NULL;
|
||||
|
||||
if (n <= 0 || n > PAM_MAX_NUM_MSG)
|
||||
return (PAM_CONV_ERR);
|
||||
*resp = xmalloc(n * sizeof **resp);
|
||||
|
||||
if ((reply = malloc(n * sizeof(*reply))) == NULL)
|
||||
return (PAM_CONV_ERR);
|
||||
memset(reply, 0, n * sizeof(*reply));
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
switch (PAM_MSG_MEMBER(msg, i, msg_style)) {
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
resp[i]->resp =
|
||||
reply[i].resp =
|
||||
read_passphrase(PAM_MSG_MEMBER(msg, i, msg),
|
||||
RP_ALLOW_STDIN);
|
||||
resp[i]->resp_retcode = PAM_SUCCESS;
|
||||
reply[i].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
fputs(PAM_MSG_MEMBER(msg, i, msg), stderr);
|
||||
fgets(input, sizeof input, stdin);
|
||||
resp[i]->resp = xstrdup(input);
|
||||
resp[i]->resp_retcode = PAM_SUCCESS;
|
||||
reply[i].resp = xstrdup(input);
|
||||
reply[i].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
case PAM_TEXT_INFO:
|
||||
fputs(PAM_MSG_MEMBER(msg, i, msg), stderr);
|
||||
resp[i]->resp_retcode = PAM_SUCCESS;
|
||||
reply[i].resp_retcode = PAM_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
*resp = reply;
|
||||
return (PAM_SUCCESS);
|
||||
|
||||
fail:
|
||||
while (i)
|
||||
xfree(resp[--i]);
|
||||
xfree(*resp);
|
||||
*resp = NULL;
|
||||
for(i = 0; i < n; i++) {
|
||||
if (reply[i].resp != NULL)
|
||||
xfree(reply[i].resp);
|
||||
}
|
||||
xfree(reply);
|
||||
return (PAM_CONV_ERR);
|
||||
}
|
||||
|
||||
@@ -672,17 +696,19 @@ do_pam_chauthtok(void)
|
||||
int
|
||||
do_pam_putenv(char *name, char *value)
|
||||
{
|
||||
char *compound;
|
||||
int ret = 1;
|
||||
|
||||
#ifdef HAVE_PAM_PUTENV
|
||||
compound = xmalloc(strlen(name)+strlen(value)+2);
|
||||
if (compound) {
|
||||
sprintf(compound,"%s=%s",name,value);
|
||||
ret = pam_putenv(sshpam_handle,compound);
|
||||
xfree(compound);
|
||||
}
|
||||
char *compound;
|
||||
size_t len;
|
||||
|
||||
len = strlen(name) + strlen(value) + 2;
|
||||
compound = xmalloc(len);
|
||||
|
||||
snprintf(compound, len, "%s=%s", name, value);
|
||||
ret = pam_putenv(sshpam_handle, compound);
|
||||
xfree(compound);
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ auth_password(Authctxt *authctxt, const char *password)
|
||||
char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd;
|
||||
|
||||
/* Check for users with no password. */
|
||||
if (strcmp(pw_password, "") == 0 && strcmp(pw->pw_passwd, "") == 0)
|
||||
if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0)
|
||||
return ok;
|
||||
else {
|
||||
/* Encrypt the candidate password using the proper salt. */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: buffer.c,v 1.17 2003/09/16 03:03:47 deraadt Exp $");
|
||||
RCSID("$OpenBSD: buffer.c,v 1.19 2003/09/18 07:54:48 markus Exp $");
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "buffer.h"
|
||||
@@ -23,8 +23,11 @@ RCSID("$OpenBSD: buffer.c,v 1.17 2003/09/16 03:03:47 deraadt Exp $");
|
||||
void
|
||||
buffer_init(Buffer *buffer)
|
||||
{
|
||||
buffer->alloc = 4096;
|
||||
buffer->buf = xmalloc(buffer->alloc);
|
||||
const u_int len = 4096;
|
||||
|
||||
buffer->alloc = 0;
|
||||
buffer->buf = xmalloc(len);
|
||||
buffer->alloc = len;
|
||||
buffer->offset = 0;
|
||||
buffer->end = 0;
|
||||
}
|
||||
@@ -34,8 +37,11 @@ buffer_init(Buffer *buffer)
|
||||
void
|
||||
buffer_free(Buffer *buffer)
|
||||
{
|
||||
memset(buffer->buf, 0, buffer->alloc);
|
||||
xfree(buffer->buf);
|
||||
if (buffer->alloc > 0) {
|
||||
memset(buffer->buf, 0, buffer->alloc);
|
||||
buffer->alloc = 0;
|
||||
xfree(buffer->buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-3
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: channels.c,v 1.194 2003/08/29 10:04:36 markus Exp $");
|
||||
RCSID("$OpenBSD: channels.c,v 1.195 2003/09/16 21:02:40 markus Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh1.h"
|
||||
@@ -229,12 +229,13 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
|
||||
if (found == -1) {
|
||||
/* There are no free slots. Take last+1 slot and expand the array. */
|
||||
found = channels_alloc;
|
||||
channels_alloc += 10;
|
||||
if (channels_alloc > 10000)
|
||||
fatal("channel_new: internal error: channels_alloc %d "
|
||||
"too big.", channels_alloc);
|
||||
channels = xrealloc(channels,
|
||||
(channels_alloc + 10) * sizeof(Channel *));
|
||||
channels_alloc += 10;
|
||||
debug2("channel: expanding %d", channels_alloc);
|
||||
channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
|
||||
for (i = found; i < channels_alloc; i++)
|
||||
channels[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ RCSID("$OpenBSD: cipher-3des1.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
|
||||
#include "xmalloc.h"
|
||||
#include "log.h"
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00906000L
|
||||
#define SSH_OLD_EVP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is used by SSH1:
|
||||
*
|
||||
|
||||
@@ -31,6 +31,10 @@ RCSID("$OpenBSD: cipher-aes.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
|
||||
#include "xmalloc.h"
|
||||
#include "log.h"
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00906000L
|
||||
#define SSH_OLD_EVP
|
||||
#endif
|
||||
|
||||
#define RIJNDAEL_BLOCKSIZE 16
|
||||
struct ssh_rijndael_ctx
|
||||
{
|
||||
|
||||
@@ -28,6 +28,11 @@ RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
|
||||
#include <openssl/evp.h>
|
||||
#include "xmalloc.h"
|
||||
#include "log.h"
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00906000L
|
||||
#define SSH_OLD_EVP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SSH1 uses a variation on Blowfish, all bytes must be swapped before
|
||||
* and after encryption/decryption. Thus the swap_bytes stuff (yuk).
|
||||
|
||||
@@ -21,6 +21,10 @@ RCSID("$OpenBSD: cipher-ctr.c,v 1.2 2003/06/17 18:14:23 markus Exp $");
|
||||
#include "log.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00906000L
|
||||
#define SSH_OLD_EVP
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00907000L
|
||||
#include "rijndael.h"
|
||||
#define AES_KEY rijndael_ctx
|
||||
@@ -135,7 +139,9 @@ evp_aes_128_ctr(void)
|
||||
aes_ctr.init = ssh_aes_ctr_init;
|
||||
aes_ctr.cleanup = ssh_aes_ctr_cleanup;
|
||||
aes_ctr.do_cipher = ssh_aes_ctr;
|
||||
#ifndef SSH_OLD_EVP
|
||||
aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
|
||||
EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
|
||||
#endif
|
||||
return (&aes_ctr);
|
||||
}
|
||||
|
||||
@@ -87,9 +87,11 @@ struct Cipher {
|
||||
{ "[email protected]",
|
||||
SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc },
|
||||
#endif
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x00906000L
|
||||
{ "aes128-ctr", SSH_CIPHER_SSH2, 16, 16, evp_aes_128_ctr },
|
||||
{ "aes192-ctr", SSH_CIPHER_SSH2, 16, 24, evp_aes_128_ctr },
|
||||
{ "aes256-ctr", SSH_CIPHER_SSH2, 16, 32, evp_aes_128_ctr },
|
||||
#endif
|
||||
|
||||
{ NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL }
|
||||
};
|
||||
|
||||
+42
-6
@@ -1,4 +1,4 @@
|
||||
# $Id: configure.ac,v 1.154 2003/09/16 01:52:19 dtucker Exp $
|
||||
# $Id: configure.ac,v 1.154.2.11 2003/09/23 09:24:21 djm Exp $
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
@@ -132,6 +132,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
|
||||
[AC_MSG_RESULT(buggy)
|
||||
AC_DEFINE(BROKEN_GETADDRINFO)],
|
||||
[AC_MSG_RESULT(assume it is working)])
|
||||
AC_DEFINE(SETEUID_BREAKS_SETUID)
|
||||
AC_DEFINE(BROKEN_SETREUID)
|
||||
AC_DEFINE(BROKEN_SETREGID)
|
||||
;;
|
||||
*-*-hpux10.26)
|
||||
if test -z "$GCC"; then
|
||||
@@ -198,6 +201,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
|
||||
AC_DEFINE(WITH_IRIX_AUDIT)
|
||||
AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
|
||||
AC_DEFINE(BROKEN_INET_NTOA)
|
||||
AC_DEFINE(SETEUID_BREAKS_SETUID)
|
||||
AC_DEFINE(BROKEN_SETREUID)
|
||||
AC_DEFINE(BROKEN_SETREGID)
|
||||
AC_DEFINE(WITH_ABBREV_NO_TTY)
|
||||
AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
|
||||
;;
|
||||
@@ -227,6 +233,11 @@ mips-sony-bsd|mips-sony-newsos4)
|
||||
*-*-freebsd*)
|
||||
check_for_libcrypt_later=1
|
||||
;;
|
||||
*-*-bsdi*)
|
||||
AC_DEFINE(SETEUID_BREAKS_SETUID)
|
||||
AC_DEFINE(BROKEN_SETREUID)
|
||||
AC_DEFINE(BROKEN_SETREGID)
|
||||
;;
|
||||
*-next-*)
|
||||
conf_lastlog_location="/usr/adm/lastlog"
|
||||
conf_utmp_location=/etc/utmp
|
||||
@@ -278,6 +289,9 @@ mips-sony-bsd|mips-sony-newsos4)
|
||||
LIBS="$LIBS -lc89"
|
||||
AC_DEFINE(USE_PIPES)
|
||||
AC_DEFINE(SSHD_ACQUIRES_CTTY)
|
||||
AC_DEFINE(SETEUID_BREAKS_SETUID)
|
||||
AC_DEFINE(BROKEN_SETREUID)
|
||||
AC_DEFINE(BROKEN_SETREGID)
|
||||
;;
|
||||
*-sni-sysv*)
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
@@ -395,6 +409,9 @@ mips-sony-bsd|mips-sony-newsos4)
|
||||
fi
|
||||
AC_DEFINE(DISABLE_FD_PASSING)
|
||||
AC_DEFINE(BROKEN_GETADDRINFO)
|
||||
AC_DEFINE(SETEUID_BREAKS_SETUID)
|
||||
AC_DEFINE(BROKEN_SETREUID)
|
||||
AC_DEFINE(BROKEN_SETREGID)
|
||||
AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin")
|
||||
;;
|
||||
|
||||
@@ -463,7 +480,7 @@ AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
|
||||
sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
|
||||
sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
|
||||
sys/un.h time.h tmpdir.h ttyent.h usersec.h \
|
||||
util.h utime.h utmp.h utmpx.h)
|
||||
util.h utime.h utmp.h utmpx.h vis.h)
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
|
||||
@@ -714,7 +731,7 @@ dnl Checks for library functions. Please keep in alphabetical order
|
||||
AC_CHECK_FUNCS(\
|
||||
arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \
|
||||
bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
|
||||
gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
|
||||
getaddrinfo getcwd getgrouplist getnameinfo getopt \
|
||||
getpeereid _getpty getrlimit getttyent glob inet_aton \
|
||||
inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
|
||||
mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
|
||||
@@ -726,6 +743,21 @@ AC_CHECK_FUNCS(\
|
||||
truncate utimes vhangup vsnprintf waitpid \
|
||||
)
|
||||
|
||||
# IRIX has a const char return value for gai_strerror()
|
||||
AC_CHECK_FUNCS(gai_strerror,[
|
||||
AC_DEFINE(HAVE_GAI_STRERROR)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
||||
const char *gai_strerror(int);],[
|
||||
char *str;
|
||||
|
||||
str = gai_strerror(0);],[
|
||||
AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
|
||||
[Define if gai_strerror() returns const char *])])])
|
||||
|
||||
AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
|
||||
|
||||
dnl Make sure prototypes are defined for these before using them.
|
||||
@@ -2183,11 +2215,15 @@ else
|
||||
fi
|
||||
|
||||
# check for /etc/default/login and use it if present.
|
||||
AC_ARG_ENABLE(etc-default-login,
|
||||
[ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],,
|
||||
[
|
||||
AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
|
||||
|
||||
if test "x$external_path_file" = "x/etc/default/login"; then
|
||||
AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
|
||||
if test $ac_cv_func_login_getcapbool = "yes" -a \
|
||||
@@ -2205,7 +2241,7 @@ AC_ARG_WITH(default-path,
|
||||
--with-default-path=PATH has no effect on this system.
|
||||
Edit /etc/login.conf instead.])
|
||||
elif test "x$withval" != "xno" ; then
|
||||
if ! test -z "$external_path_file" ; then
|
||||
if test ! -z "$external_path_file" ; then
|
||||
AC_MSG_WARN([
|
||||
--with-default-path=PATH will only be used if PATH is not defined in
|
||||
$external_path_file .])
|
||||
@@ -2217,7 +2253,7 @@ $external_path_file .])
|
||||
[ if test "x$external_path_file" = "x/etc/login.conf" ; then
|
||||
AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
|
||||
else
|
||||
if ! test -z "$external_path_file" ; then
|
||||
if test ! -z "$external_path_file" ; then
|
||||
AC_MSG_WARN([
|
||||
If PATH is defined in $external_path_file, ensure the path to scp is included,
|
||||
otherwise scp will not work.])
|
||||
@@ -2652,7 +2688,7 @@ echo " At runtime, sshd will use the path defined in $external_path_file"
|
||||
echo " Make sure the path to scp is present, otherwise scp will not work"
|
||||
else
|
||||
echo " sshd default user PATH: $I"
|
||||
if ! test -z "$external_path_file"; then
|
||||
if test ! -z "$external_path_file"; then
|
||||
echo " (If PATH is set in $external_path_file it will be used instead. If"
|
||||
echo " used, ensure the path to scp is present, otherwise scp will not work.)"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# PAM configuration file /etc/pam.conf
|
||||
# Example for OpenSSH on AIX 5.2
|
||||
#
|
||||
|
||||
# Authentication Management
|
||||
sshd auth required /usr/lib/security/pam_aix
|
||||
OTHER auth required /usr/lib/security/pam_aix
|
||||
|
||||
# Account Management
|
||||
sshd account required /usr/lib/security/pam_aix
|
||||
OTHER account required /usr/lib/security/pam_aix
|
||||
|
||||
# Session Management
|
||||
sshd password required /usr/lib/security/pam_aix
|
||||
OTHER password required /usr/lib/security/pam_aix
|
||||
|
||||
# Password Management
|
||||
sshd session required /usr/lib/security/pam_aix
|
||||
OTHER session required /usr/lib/security/pam_aix
|
||||
@@ -17,9 +17,9 @@
|
||||
#old cvs stuff. please update before use. may be deprecated.
|
||||
%define use_stable 1
|
||||
%if %{use_stable}
|
||||
%define version 3.6.1p2
|
||||
%define version 3.7.1p2
|
||||
%define cvs %{nil}
|
||||
%define release 2
|
||||
%define release 1
|
||||
%else
|
||||
%define version 2.9.9p2
|
||||
%define cvs cvs20011009
|
||||
@@ -364,4 +364,4 @@ fi
|
||||
* Mon Jan 01 1998 ...
|
||||
Template Version: 1.31
|
||||
|
||||
$Id: openssh.spec,v 1.43 2003/04/29 13:22:40 djm Exp $
|
||||
$Id: openssh.spec,v 1.43.2.4 2003/09/23 09:26:52 djm Exp $
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This package is the actual port of OpenSSH to Cygwin 1.3.
|
||||
This package is the actual port of OpenSSH to Cygwin 1.5.
|
||||
|
||||
===========================================================================
|
||||
Important change since 3.4p1-2:
|
||||
|
||||
@@ -279,12 +279,14 @@ then
|
||||
# Host *
|
||||
# ForwardAgent no
|
||||
# ForwardX11 no
|
||||
# RhostsAuthentication no
|
||||
# RhostsRSAAuthentication no
|
||||
# RSAAuthentication yes
|
||||
# PasswordAuthentication yes
|
||||
# HostbasedAuthentication no
|
||||
# BatchMode no
|
||||
# CheckHostIP yes
|
||||
# AddressFamily any
|
||||
# ConnectTimeout 0
|
||||
# StrictHostKeyChecking ask
|
||||
# IdentityFile ~/.ssh/identity
|
||||
# IdentityFile ~/.ssh/id_dsa
|
||||
@@ -397,7 +399,7 @@ Port $port_number
|
||||
#HostKey ${SYSCONFDIR}/ssh_host_dsa_key
|
||||
|
||||
# Lifetime and size of ephemeral version 1 server key
|
||||
#KeyRegenerationInterval 3600
|
||||
#KeyRegenerationInterval 1h
|
||||
#ServerKeyBits 768
|
||||
|
||||
# Logging
|
||||
@@ -407,7 +409,7 @@ Port $port_number
|
||||
|
||||
# Authentication:
|
||||
|
||||
#LoginGraceTime 120
|
||||
#LoginGraceTime 2m
|
||||
#PermitRootLogin yes
|
||||
# The following setting overrides permission checks on host key files
|
||||
# and directories. For security reasons set this to "yes" when running
|
||||
@@ -418,10 +420,6 @@ StrictModes no
|
||||
#PubkeyAuthentication yes
|
||||
#AuthorizedKeysFile .ssh/authorized_keys
|
||||
|
||||
# rhosts authentication should not be used
|
||||
#RhostsAuthentication no
|
||||
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||
#IgnoreRhosts yes
|
||||
# For this to work you will also need host keys in ${SYSCONFDIR}/ssh_known_hosts
|
||||
#RhostsRSAAuthentication no
|
||||
# similar for protocol version 2
|
||||
@@ -429,6 +427,8 @@ StrictModes no
|
||||
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
||||
# RhostsRSAAuthentication and HostbasedAuthentication
|
||||
#IgnoreUserKnownHosts no
|
||||
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||
#IgnoreRhosts yes
|
||||
|
||||
# To disable tunneled clear text passwords, change to no here!
|
||||
#PasswordAuthentication yes
|
||||
@@ -437,6 +437,8 @@ StrictModes no
|
||||
# Change to no to disable s/key passwords
|
||||
#ChallengeResponseAuthentication yes
|
||||
|
||||
#AllowTcpForwarding yes
|
||||
#GatewayPorts no
|
||||
#X11Forwarding no
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
@@ -447,11 +449,14 @@ StrictModes no
|
||||
UsePrivilegeSeparation $privsep_used
|
||||
#PermitUserEnvironment no
|
||||
#Compression yes
|
||||
|
||||
#ClientAliveInterval 0
|
||||
#ClientAliveCountMax 3
|
||||
#UseDNS yes
|
||||
#PidFile /var/run/sshd.pid
|
||||
#MaxStartups 10
|
||||
|
||||
# no default banner path
|
||||
#Banner /some/path
|
||||
#VerifyReverseMapping no
|
||||
|
||||
# override default of no subsystems
|
||||
Subsystem sftp /usr/sbin/sftp-server
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%define ver 3.6.1p2
|
||||
%define rel 3
|
||||
%define ver 3.7.1p2
|
||||
%define rel 1
|
||||
|
||||
# OpenSSH privilege separation requires a user & group ID
|
||||
%define sshd_uid 74
|
||||
@@ -84,7 +84,7 @@ BuildPreReq: /bin/login
|
||||
%if ! %{build6x}
|
||||
BuildPreReq: glibc-devel, pam
|
||||
%else
|
||||
BuildPreReq: db1-devel, /usr/include/security/pam_appl.h
|
||||
BuildPreReq: /usr/include/security/pam_appl.h
|
||||
%endif
|
||||
%if ! %{no_x11_askpass}
|
||||
BuildPreReq: XFree86-devel
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
|
||||
Name: openssh
|
||||
Version: 3.6.1p2
|
||||
Version: 3.7.1p2
|
||||
URL: http://www.openssh.com/
|
||||
Release: 1
|
||||
Source0: openssh-%{version}.tar.gz
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: deattack.c,v 1.18 2002/03/04 17:27:39 stevesk Exp $");
|
||||
RCSID("$OpenBSD: deattack.c,v 1.19 2003/09/18 08:49:45 markus Exp $");
|
||||
|
||||
#include "deattack.h"
|
||||
#include "log.h"
|
||||
@@ -100,12 +100,12 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
|
||||
|
||||
if (h == NULL) {
|
||||
debug("Installing crc compensation attack detector.");
|
||||
h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE);
|
||||
n = l;
|
||||
h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
|
||||
} else {
|
||||
if (l > n) {
|
||||
h = (u_int16_t *) xrealloc(h, l * HASH_ENTRYSIZE);
|
||||
n = l;
|
||||
h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ RCSID("$OpenBSD: log.c,v 1.28 2003/05/24 09:02:22 djm Exp $");
|
||||
#include "xmalloc.h"
|
||||
|
||||
#include <syslog.h>
|
||||
#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H)
|
||||
# include <vis.h>
|
||||
#endif
|
||||
|
||||
static LogLevel log_level = SYSLOG_LEVEL_INFO;
|
||||
static int log_on_stderr = 1;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: misc.c,v 1.21 2003/04/12 10:15:36 markus Exp $");
|
||||
RCSID("$OpenBSD: misc.c,v 1.22 2003/09/18 08:49:45 markus Exp $");
|
||||
|
||||
#include "misc.h"
|
||||
#include "log.h"
|
||||
@@ -308,18 +308,21 @@ addargs(arglist *args, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buf[1024];
|
||||
int nalloc;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
nalloc = args->nalloc;
|
||||
if (args->list == NULL) {
|
||||
args->nalloc = 32;
|
||||
nalloc = 32;
|
||||
args->num = 0;
|
||||
} else if (args->num+2 >= args->nalloc)
|
||||
args->nalloc *= 2;
|
||||
} else if (args->num+2 >= nalloc)
|
||||
nalloc *= 2;
|
||||
|
||||
args->list = xrealloc(args->list, args->nalloc * sizeof(char *));
|
||||
args->list = xrealloc(args->list, nalloc * sizeof(char *));
|
||||
args->nalloc = nalloc;
|
||||
args->list[args->num++] = xstrdup(buf);
|
||||
args->list[args->num] = NULL;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
RCSID("$Id: fake-rfc2553.c,v 1.4 2003/06/13 22:43:23 djm Exp $");
|
||||
RCSID("$Id: fake-rfc2553.c,v 1.4.2.1 2003/09/22 02:09:18 dtucker Exp $");
|
||||
|
||||
#ifndef HAVE_GETNAMEINFO
|
||||
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||
@@ -77,7 +77,11 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||
#endif /* !HAVE_GETNAMEINFO */
|
||||
|
||||
#ifndef HAVE_GAI_STRERROR
|
||||
#ifdef HAVE_CONST_GAI_STRERROR_PROTO
|
||||
const char *
|
||||
#else
|
||||
char *
|
||||
#endif
|
||||
gai_strerror(int err)
|
||||
{
|
||||
switch (err) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
|
||||
/* $Id: fake-rfc2553.h,v 1.6.2.1 2003/09/22 02:09:18 dtucker Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
||||
@@ -137,7 +137,7 @@ int getaddrinfo(const char *, const char *,
|
||||
const struct addrinfo *, struct addrinfo **);
|
||||
#endif /* !HAVE_GETADDRINFO */
|
||||
|
||||
#ifndef HAVE_GAI_STRERROR
|
||||
#if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO)
|
||||
char *gai_strerror(int);
|
||||
#endif /* !HAVE_GAI_STRERROR */
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.4 2003/06/02 20:18:35 millert E
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdio.h>
|
||||
#include "inet_ntoa.h"
|
||||
|
||||
char *inet_ntoa(struct in_addr in)
|
||||
{
|
||||
|
||||
@@ -27,11 +27,12 @@
|
||||
#include "ssh.h"
|
||||
#include "log.h"
|
||||
#include "servconf.h"
|
||||
#include "canohost.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
#ifdef _AIX
|
||||
|
||||
#include <uinfo.h>
|
||||
#include <../xmalloc.h>
|
||||
#include "port-aix.h"
|
||||
|
||||
extern ServerOptions options;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: port-aix.h,v 1.14 2003/08/29 16:59:52 mouring Exp $ */
|
||||
/* $Id: port-aix.h,v 1.14.2.1 2003/09/19 10:46:22 dtucker Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -30,10 +30,10 @@
|
||||
#ifdef WITH_AIXAUTHENTICATE
|
||||
# include <login.h>
|
||||
# include <userpw.h>
|
||||
# include <usersec.h>
|
||||
# ifdef HAVE_SYS_AUDIT_H
|
||||
# if defined(HAVE_SYS_AUDIT_H) && defined(AIX_LOGINFAILED_4ARG)
|
||||
# include <sys/audit.h>
|
||||
# endif
|
||||
# include <usersec.h>
|
||||
#endif
|
||||
|
||||
/* Some versions define r_type in the above headers, which causes a conflict */
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: packet.c,v 1.109 2003/07/10 14:42:28 markus Exp $");
|
||||
RCSID("$OpenBSD: packet.c,v 1.110 2003/09/19 09:02:02 markus Exp $");
|
||||
|
||||
#include "openbsd-compat/sys-queue.h"
|
||||
|
||||
@@ -1020,7 +1020,9 @@ packet_read_poll2(u_int32_t *seqnr_p)
|
||||
cp = buffer_ptr(&incoming_packet);
|
||||
packet_length = GET_32BIT(cp);
|
||||
if (packet_length < 1 + 4 || packet_length > 256 * 1024) {
|
||||
#ifdef PACKET_DEBUG
|
||||
buffer_dump(&incoming_packet);
|
||||
#endif
|
||||
packet_disconnect("Bad packet length %u.", packet_length);
|
||||
}
|
||||
DBG(debug("input: packet len %u", packet_length+4));
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ fill_default_server_options(ServerOptions *options)
|
||||
{
|
||||
/* Portable-specific options */
|
||||
if (options->use_pam == -1)
|
||||
options->use_pam = 1;
|
||||
options->use_pam = 0;
|
||||
|
||||
/* Standard Options */
|
||||
if (options->protocol == SSH_PROTO_UNKNOWN)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: session.c,v 1.163 2003/08/31 13:29:05 markus Exp $");
|
||||
RCSID("$OpenBSD: session.c,v 1.164 2003/09/18 08:49:45 markus Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh1.h"
|
||||
@@ -798,8 +798,9 @@ void
|
||||
child_set_env(char ***envp, u_int *envsizep, const char *name,
|
||||
const char *value)
|
||||
{
|
||||
u_int i, namelen;
|
||||
char **env;
|
||||
u_int envsize;
|
||||
u_int i, namelen;
|
||||
|
||||
/*
|
||||
* If we're passed an uninitialized list, allocate a single null
|
||||
@@ -826,12 +827,13 @@ child_set_env(char ***envp, u_int *envsizep, const char *name,
|
||||
xfree(env[i]);
|
||||
} else {
|
||||
/* New variable. Expand if necessary. */
|
||||
if (i >= (*envsizep) - 1) {
|
||||
if (*envsizep >= 1000)
|
||||
fatal("child_set_env: too many env vars,"
|
||||
" skipping: %.100s", name);
|
||||
(*envsizep) += 50;
|
||||
env = (*envp) = xrealloc(env, (*envsizep) * sizeof(char *));
|
||||
envsize = *envsizep;
|
||||
if (i >= envsize - 1) {
|
||||
if (envsize >= 1000)
|
||||
fatal("child_set_env: too many env vars");
|
||||
envsize += 50;
|
||||
env = (*envp) = xrealloc(env, envsize * sizeof(char *));
|
||||
*envsizep = envsize;
|
||||
}
|
||||
/* Need to set the NULL pointer at end of array beyond the new slot. */
|
||||
env[i + 1] = NULL;
|
||||
@@ -912,8 +914,7 @@ static void
|
||||
read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
|
||||
{
|
||||
char **tmpenv = NULL, *var;
|
||||
u_int i;
|
||||
size_t tmpenvsize = 0;
|
||||
u_int i, tmpenvsize = 0;
|
||||
mode_t mask;
|
||||
|
||||
/*
|
||||
@@ -923,6 +924,9 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
|
||||
*/
|
||||
read_environment_file(&tmpenv, &tmpenvsize, "/etc/default/login");
|
||||
|
||||
if (tmpenv == NULL)
|
||||
return;
|
||||
|
||||
if (uid == 0)
|
||||
var = child_get_env(tmpenv, "SUPATH");
|
||||
else
|
||||
|
||||
@@ -351,6 +351,7 @@ get_pathname(const char **cpp, char **path)
|
||||
for (i = j = 0; i <= strlen(cp); i++) {
|
||||
if (cp[i] == quot) { /* Found quote */
|
||||
(*path)[j] = '\0';
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
if (cp[i] == '\0') { /* End of string */
|
||||
|
||||
+9
-8
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "openbsd-compat/sys-queue.h"
|
||||
RCSID("$OpenBSD: ssh-agent.c,v 1.111 2003/06/12 19:12:03 markus Exp $");
|
||||
RCSID("$OpenBSD: ssh-agent.c,v 1.112 2003/09/18 08:49:45 markus Exp $");
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/md5.h>
|
||||
@@ -784,7 +784,7 @@ process_message(SocketEntry *e)
|
||||
static void
|
||||
new_socket(sock_type type, int fd)
|
||||
{
|
||||
u_int i, old_alloc;
|
||||
u_int i, old_alloc, new_alloc;
|
||||
|
||||
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
|
||||
error("fcntl O_NONBLOCK: %s", strerror(errno));
|
||||
@@ -795,25 +795,26 @@ new_socket(sock_type type, int fd)
|
||||
for (i = 0; i < sockets_alloc; i++)
|
||||
if (sockets[i].type == AUTH_UNUSED) {
|
||||
sockets[i].fd = fd;
|
||||
sockets[i].type = type;
|
||||
buffer_init(&sockets[i].input);
|
||||
buffer_init(&sockets[i].output);
|
||||
buffer_init(&sockets[i].request);
|
||||
sockets[i].type = type;
|
||||
return;
|
||||
}
|
||||
old_alloc = sockets_alloc;
|
||||
sockets_alloc += 10;
|
||||
new_alloc = sockets_alloc + 10;
|
||||
if (sockets)
|
||||
sockets = xrealloc(sockets, sockets_alloc * sizeof(sockets[0]));
|
||||
sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
|
||||
else
|
||||
sockets = xmalloc(sockets_alloc * sizeof(sockets[0]));
|
||||
for (i = old_alloc; i < sockets_alloc; i++)
|
||||
sockets = xmalloc(new_alloc * sizeof(sockets[0]));
|
||||
for (i = old_alloc; i < new_alloc; i++)
|
||||
sockets[i].type = AUTH_UNUSED;
|
||||
sockets[old_alloc].type = type;
|
||||
sockets_alloc = new_alloc;
|
||||
sockets[old_alloc].fd = fd;
|
||||
buffer_init(&sockets[old_alloc].input);
|
||||
buffer_init(&sockets[old_alloc].output);
|
||||
buffer_init(&sockets[old_alloc].request);
|
||||
sockets[old_alloc].type = type;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
+3
-2
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshconnect.c,v 1.147 2003/06/29 12:44:38 markus Exp $");
|
||||
RCSID("$OpenBSD: sshconnect.c,v 1.148 2003/09/18 07:52:54 markus Exp $");
|
||||
|
||||
#include <openssl/bn.h>
|
||||
|
||||
@@ -271,9 +271,10 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
|
||||
optval = 0;
|
||||
optlen = sizeof(optval);
|
||||
if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval,
|
||||
&optlen) == -1)
|
||||
&optlen) == -1) {
|
||||
debug("getsockopt: %s", strerror(errno));
|
||||
break;
|
||||
}
|
||||
if (optval != 0) {
|
||||
errno = optval;
|
||||
break;
|
||||
|
||||
@@ -191,10 +191,12 @@ permanently_set_uid(struct passwd *pw)
|
||||
(u_int)pw->pw_gid);
|
||||
}
|
||||
|
||||
#ifndef HAVE_CYGWIN
|
||||
/* Try restoration of UID if changed (test clearing of saved uid) */
|
||||
if (old_uid != pw->pw_uid &&
|
||||
(setuid(old_uid) != -1 || seteuid(old_uid) != -1))
|
||||
fatal("%s: was able to restore old [e]uid", __func__);
|
||||
#endif
|
||||
|
||||
/* Verify UID drop was successful */
|
||||
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) {
|
||||
|
||||
Reference in New Issue
Block a user