The unified diff between revisions [7a3b7b90..] and [b0cf63e6..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "AXIS-README"
# from [6be09c49e51b04913a2815e53d89500a7ae72dfe]
# to [b0b5ca743c265bb4148ebfcd901a2c096b4d8ab9]
#
# patch "Makefile.in"
# from [112e899589f2fd132a159e6dcf148b544ff8ae91]
# to [3fb2087ef7c214449746605338d4a20f4313b93c]
#
# patch "common-channel.c"
# from [540fd62e7492e94c82e1eba8a43d50ebcb93174e]
# to [b98d336081f2cd767b935ada4e6dd9e015f47a81]
#
# patch "compat.c"
# from [9db0525e023dbbce7ce818eb6921e8062c9cc409]
# to [ce7aa00784b3701ecb125a7824a8cff4ab5b607e]
#
# patch "dbutil.h"
# from [80bc2ed10e5685a75b4443d9eceadf5159889df9]
# to [a25abeaa6c6edd0eb90f9c4b67c387a0dc8069e2]
#
# patch "fake-rfc2553.h"
# from [23f4a4712346e1a15dd0736f66beddab99836505]
# to [afef8ebbd0707ace3800eb446dd0f19a707cfab5]
#
# patch "signkey.c"
# from [c0ce28d518a22769fdee4e64e6fcd77a9100e61f]
# to [3c9e56c12498a662c7918b167e08bc1bfafa59c1]
#
# patch "svr-auth.c"
# from [1749d77bd0787101e6113cffcd5720cb7f9f5556]
# to [1f8d7f00b9b19deed2e6ad26ba0cd35b6706bba5]
#
# patch "svr-session.c"
# from [790cc112493b4feb3c1c8df67fad2efb113b5c16]
# to [0b0cddd75cb841c5a991b999fde900450a83d8f3]
#
============================================================
--- AXIS-README 6be09c49e51b04913a2815e53d89500a7ae72dfe
+++ AXIS-README b0b5ca743c265bb4148ebfcd901a2c096b4d8ab9
@@ -66,3 +66,30 @@ libtomcrypt/libtomcrypt.a libtommath/lib
svr-agentfwd.o svr-main.o svr-x11fwd.o svr-tcpfwd.o svr-authpam.o
libtomcrypt/libtomcrypt.a libtommath/libtommath.a -melinux -s -symbolic
-static -L /usr/local/cris/lib/gcc-lib/cris/2.96/elinux/ uccrt/*.o
+
+
+---------------
+
+
+Saner again:
+
+Get http://developer.axis.com/download/old/devboard/R1_1_0/devboard-R1_1_0.tgz
+And the cris-dist debian package (we're using 1.16-1).
+
+PATH=/usr/local/cris:$PATH
+
+Build the axis dev env thing with
+"prefix=/space/axis/matt/R1_1_0-prefix ./install"
+
+You'll actually end up with some images which could be flashed, I haven't tried
+them.
+
+PATH=/space/axis/matt/devboard-R1_1_0/devboard/tools:$PATH
+(includes /usr/local/cris too)
+
+In dropbear dir:
+ ./configure CC=gcc_cris CFLAGS="-melinux -muclibc=/space/axis/matt/R1_1_0-prefix -Wall -O2 -DELINUX" --disable-zlib --disable-syslog --host=cris LDFLAGS="-melinux -muclibc=/space/axis/matt/R1_1_0-prefix"
+
+make, it should work.
+
+If you strip it, it won't work. -Os should work.
============================================================
--- Makefile.in 112e899589f2fd132a159e6dcf148b544ff8ae91
+++ Makefile.in 3fb2087ef7c214449746605338d4a20f4313b93c
@@ -10,7 +10,8 @@ ifndef PROGRAMS
# Hopefully that seems intuitive.
ifndef PROGRAMS
- PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
+ PROGRAMS=dropbear
+# PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
endif
LTC=libtomcrypt/libtomcrypt.a
@@ -32,7 +33,7 @@ CLISVROBJS=common-session.o packet.o com
cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o
CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
- common-channel.o common-chansession.o termcodes.o loginrec.o \
+ common-channel.o common-chansession.o termcodes.o \
tcp-accept.o listener.o process-packet.o \
common-runopts.o circbuffer.o
============================================================
--- common-channel.c 540fd62e7492e94c82e1eba8a43d50ebcb93174e
+++ common-channel.c b98d336081f2cd767b935ada4e6dd9e015f47a81
@@ -883,7 +883,7 @@ static void send_msg_channel_open_confir
}
#if defined(USING_LISTENERS) || defined(DROPBEAR_CLIENT)
-matterror
+#error Remove this line if you intend to compile listeners (ie tcp fwding, client) in.
/* Create a new channel, and start the open request. This is intended
* for X11, agent, tcp forwarding, and should be filled with channel-specific
* options, with the calling function calling encrypt_packet() after
============================================================
--- compat.c 9db0525e023dbbce7ce818eb6921e8062c9cc409
+++ compat.c ce7aa00784b3701ecb125a7824a8cff4ab5b607e
@@ -199,6 +199,7 @@ char *basename(const char *path) {
#endif /* HAVE_BASENAME */
#ifndef HAVE_GETUSERSHELL
+#if 0
/*
* Get a list of shells from /etc/shells, if it exists.
@@ -278,4 +279,5 @@ static char **initshells() {
return (shells);
}
+#endif
#endif /* HAVE_GETUSERSHELL */
============================================================
--- dbutil.h 80bc2ed10e5685a75b4443d9eceadf5159889df9
+++ dbutil.h a25abeaa6c6edd0eb90f9c4b67c387a0dc8069e2
@@ -68,6 +68,10 @@ void setnonblocking(int fd);
#define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}
/* Dropbear assertion */
+#ifndef NDEBUG
#define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0)
+#else
+#define dropbear_assert(X)
+#endif
#endif /* _DBUTIL_H_ */
============================================================
--- fake-rfc2553.h 23f4a4712346e1a15dd0736f66beddab99836505
+++ fake-rfc2553.h afef8ebbd0707ace3800eb446dd0f19a707cfab5
@@ -64,19 +64,19 @@ struct sockaddr_storage {
#endif /* !IN6_IS_ADDR_LOOPBACK */
#ifndef HAVE_STRUCT_IN6_ADDR
-// struct in6_addr {
-// u_int8_t s6_addr[16];
-// };
+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 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 */
@@ -120,18 +120,18 @@ struct sockaddr_storage {
# define EAI_NONAME 3
#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_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
#ifdef getaddrinfo
============================================================
--- signkey.c c0ce28d518a22769fdee4e64e6fcd77a9100e61f
+++ signkey.c 3c9e56c12498a662c7918b167e08bc1bfafa59c1
@@ -259,6 +259,9 @@ void sign_key_free(sign_key *key) {
TRACE(("leave sign_key_free"))
}
+/* don't need fingerprints */
+#if 0
+
static char hexdig(unsigned char x) {
if (x > 0xf)
@@ -353,6 +356,7 @@ char * sign_key_fingerprint(unsigned cha
return sign_key_sha1_fingerprint(keyblob, keybloblen);
#endif
}
+#endif
void buf_put_sign(buffer* buf, sign_key *key, int type,
const unsigned char *data, unsigned int len) {
@@ -384,6 +388,7 @@ void buf_put_sign(buffer* buf, sign_key
}
#ifdef DROPBEAR_SIGNKEY_VERIFY
+#error Get rid of this line if you intended to have pubkey auth
/* Return DROPBEAR_SUCCESS or DROPBEAR_FAILURE.
* If FAILURE is returned, the position of
* buf is undefined. If SUCCESS is returned, buf will be positioned after the
@@ -428,6 +433,7 @@ int buf_verify(buffer * buf, sign_key *k
#endif /* DROPBEAR_SIGNKEY_VERIFY */
#ifdef DROPBEAR_KEY_LINES /* ie we're using authorized_keys or known_hosts */
+#error Get rid of this line if you intended to have pubkey auth
/* Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE when given a buffer containing
* a key, a key, and a type. The buffer is positioned at the start of the
============================================================
--- svr-auth.c 1749d77bd0787101e6113cffcd5720cb7f9f5556
+++ svr-auth.c 1f8d7f00b9b19deed2e6ad26ba0cd35b6706bba5
@@ -276,7 +276,9 @@ goodshell:
#endif
goodshell:
+#if 0
endusershell();
+#endif
TRACE(("matching shell"))
TRACE(("uid = %d", ses.authstate.pw->pw_uid))
============================================================
--- svr-session.c 790cc112493b4feb3c1c8df67fad2efb113b5c16
+++ svr-session.c 0b0cddd75cb841c5a991b999fde900450a83d8f3
@@ -182,11 +182,13 @@ void svr_dropbear_log(int priority, cons
if (!svr_opts.usingsyslog || havetrace)
{
timesec = time(NULL);
+#if 0
if (strftime(datestr, sizeof(datestr), "%b %d %H:%M:%S",
localtime(×ec)) == 0) {
datestr[0] = '?'; datestr[1] = '\0';
}
- printf( "[%d] %s %s\n", getpid(), datestr, printbuf);
+#endif
+ printf( "[%d] %d %s\n", getpid(), timesec, printbuf);
}
}