The unified diff between revisions [dd57a0c1..] and [10a1f614..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "cli-authinteract.c"
# from [001567a2e62e0f5f87d73463ab4f6e1f85415f35]
# to [43bb8ea60dd85595c2280b0fb70843d6fdac995c]
#
# patch "cli-kex.c"
# from [169de9a3243a2425d61988177ce5fb0360861928]
# to [8ac882ee63ee4525cb0c62923e8f24229cd905b1]
#
# patch "cli-main.c"
# from [b8bdcc79de3defcd4691630a5d612a55fb9f7f9d]
# to [1c26fed538c55ea15475febfca53e13152280f1e]
#
# patch "cli-runopts.c"
# from [5e702c8f3984796ffec8a22f7032ab2ad64140cd]
# to [db2e2af8e39875300cd0c534bf273856cdbd2969]
#
# patch "cli-session.c"
# from [49416025c7fc3883ad9b8975474ad68307b24717]
# to [606bb3d3e9fa6c627b9291d17a57c8d033693b05]
#
# patch "dbmulti.c"
# from [5c39fae15ddd3d9519de6d7d3ed54abd926905d3]
# to [26333db6fdd555638d9c727976b8885b0c4e6ed8]
#
# patch "dbutil.c"
# from [bcd256f4bdc8183dfd6b813375c39af6513b183d]
# to [33468a475d3a0d90bb9b2998d0a8be43b05ddbe4]
#
# patch "debug.h"
# from [23bff5344e9f49a0879115b2e23e4633e93d3121]
# to [dc725d606c30fe6add045f1dd120b76916dc04ea]
#
# patch "dropbearconvert.c"
# from [adbebedcea882729ad282923603fd8013bc84e95]
# to [d530936f688ad0ea1e5f1a2961331ccb4d3ae044]
#
# patch "dropbearkey.c"
# from [8fd3c812b69ecacaeac14b897f9649a9b33c0628]
# to [64d1ebad2bec1e2386322ad79ccf35d752efd3f6]
#
# patch "fake-rfc2553.h"
# from [afef8ebbd0707ace3800eb446dd0f19a707cfab5]
# to [23f4a4712346e1a15dd0736f66beddab99836505]
#
# patch "gendss.c"
# from [e74baeb5db4ddfbcc8b5f45c0b0deb8b16c45ef7]
# to [0a78c5520452222c5e3bb722856645c7cd9f3234]
#
# patch "genrsa.c"
# from [e6709602978123e50233339e9e68059b8c8f9a61]
# to [629545082926a4e514c3d12bf805d26e3d5277bc]
#
# patch "includes.h"
# from [9b4d01884eeff97ea41091be27ba2a7cbd707443]
# to [9442332af394ed3520fd88c2ffde86cfaff34458]
#
# patch "keyimport.c"
# from [4d6aa56819151b18d6828b1a9b1db0b9864e40b3]
# to [1e09ad375ec4fc33bbe5d89a678267a28574faa9]
#
# patch "loginrec.c"
# from [4891bc0a4ffd26fcd98bb08e9ddb586dbc6ddc32]
# to [6730b55ef20aa40703c2ebd6b59a9f84fbf9da27]
#
# patch "options.h"
# from [458cad58f22fe5b0e6ba44bbe9f1820d81f50314]
# to [22778b63e6d6be3481ba41f296b0dea927429d1d]
#
# patch "scp.c"
# from [4ef18ec9a3c36d87f1f28efc1a0186bdaf7548b3]
# to [3069cf4f7fcceb394119a1b0a3f02b10cdf16a73]
#
# patch "scpmisc.c"
# from [c9c27aeab7ef134ff825f51efcd57e7cec8acfd2]
# to [00d97ddb2b29d4855c763b180172f59a2e159ba9]
#
# patch "sshpty.c"
# from [5f45b06f6c68c3a4b163a7caf5efd681cd2dd7b8]
# to [0b6bb2dc68539fbf38e0843876a774548940569f]
#
# patch "svr-auth.c"
# from [fab10976a9ca57a482a384cedd794de7f0247e40]
# to [1928202b36a75393ddd5aec3b73fbcd9f49257c0]
#
# patch "svr-authpasswd.c"
# from [163ade7f267461bf9e873fb27d4ad2d98a857133]
# to [8c0e459de6768380f7f1b3618d5a68561e611dac]
#
# patch "svr-chansession.c"
# from [ab83b6c177a51cefc83b038932c9fc1e9b296692]
# to [f7bb5df76dd41f0279e08536e9fd9fc594541d11]
#
# patch "svr-main.c"
# from [5c0e59de51df9c03a47947b7dcd100053623bfd3]
# to [b7341fe311ba0f13a5c0c9f3275353d0743c7f47]
#
# patch "svr-runopts.c"
# from [f68d09f9fe84a764badcdd18a0f69b14e44cb0e8]
# to [dc319b786d4e2422c892633cf73af6b77203a3dd]
#
# patch "svr-session.c"
# from [81c3452c7ce320dcb17826c8acc672e6ebee559d]
# to [3af038e2d7d37c1b8dab16b4fcc9e17c472323a1]
#
# patch "svr-x11fwd.c"
# from [79db165bbf9982b3cfee9f616e5626656a35d13e]
# to [b077fc27c1139464aca333f1d708286366f7c6f9]
#
============================================================
--- cli-authinteract.c 001567a2e62e0f5f87d73463ab4f6e1f85415f35
+++ cli-authinteract.c 43bb8ea60dd85595c2280b0fb70843d6fdac995c
@@ -39,7 +39,7 @@ static unsigned char* get_response(unsig
char buf[DROPBEAR_MAX_CLI_PASS];
char* ret = NULL;
- fprintf(stderr, "%s", prompt);
+ printf( "%s", prompt);
tty = fopen(_PATH_TTY, "r");
if (tty) {
@@ -98,12 +98,12 @@ void recv_msg_userauth_info_request() {
if (strlen(name) > 0) {
cleantext(name);
- fprintf(stderr, "%s", name);
+ printf( "%s", name);
m_free(name);
}
if (strlen(instruction) > 0) {
cleantext(instruction);
- fprintf(stderr, "%s", instruction);
+ printf( "%s", instruction);
m_free(instruction);
}
============================================================
--- cli-kex.c 169de9a3243a2425d61988177ce5fb0360861928
+++ cli-kex.c 8ac882ee63ee4525cb0c62923e8f24229cd905b1
@@ -119,7 +119,7 @@ static void ask_to_confirm(unsigned char
char response = 'z';
fp = sign_key_fingerprint(keyblob, keybloblen);
- fprintf(stderr, "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)\n",
+ printf( "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)\n",
cli_opts.remotehost,
fp);
============================================================
--- cli-main.c b8bdcc79de3defcd4691630a5d612a55fb9f7f9d
+++ cli-main.c 1c26fed538c55ea15475febfca53e13152280f1e
@@ -107,6 +107,6 @@ static void cli_dropbear_log(int UNUSED(
vsnprintf(printbuf, sizeof(printbuf), format, param);
- fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf);
+ printf( "%s: %s\n", cli_opts.progname, printbuf);
}
============================================================
--- cli-runopts.c 5e702c8f3984796ffec8a22f7032ab2ad64140cd
+++ cli-runopts.c db2e2af8e39875300cd0c534bf273856cdbd2969
@@ -43,7 +43,7 @@ static void printhelp() {
static void printhelp() {
- fprintf(stderr, "Dropbear client v%s\n"
+ printf( "Dropbear client v%s\n"
"Usage: %s [options] [user@]host\n"
"Options are:\n"
"-p <remoteport>\n"
@@ -203,7 +203,7 @@ void cli_getopts(int argc, char ** argv)
case 'b':
next = &dummy;
default:
- fprintf(stderr,
+ printf(
"WARNING: Ignoring unknown argument '%s'\n", argv[i]);
break;
} /* Switch */
@@ -282,7 +282,7 @@ static void loadidentityfile(const char*
keytype = DROPBEAR_SIGNKEY_ANY;
if ( readhostkey(filename, key, &keytype) != DROPBEAR_SUCCESS ) {
- fprintf(stderr, "Failed loading keyfile '%s'\n", filename);
+ printf( "Failed loading keyfile '%s'\n", filename);
sign_key_free(key);
} else {
============================================================
--- cli-session.c 49416025c7fc3883ad9b8975474ad68307b24717
+++ cli-session.c 606bb3d3e9fa6c627b9291d17a57c8d033693b05
@@ -266,7 +266,7 @@ static void cli_finished() {
cli_session_cleanup();
common_session_cleanup();
- fprintf(stderr, "Connection to %s@%s:%s closed.\n", cli_opts.username,
+ printf( "Connection to %s@%s:%s closed.\n", cli_opts.username,
cli_opts.remotehost, cli_opts.remoteport);
exit(cli_ses.retval);
}
============================================================
--- dbmulti.c 5c39fae15ddd3d9519de6d7d3ed54abd926905d3
+++ dbmulti.c 26333db6fdd555638d9c727976b8885b0c4e6ed8
@@ -66,7 +66,7 @@ int main(int argc, char ** argv) {
#endif
}
- fprintf(stderr, "Dropbear multi-purpose version %s\n"
+ printf("Dropbear multi-purpose version %s\n"
"Make a symlink pointing at this binary with one of the following names:\n"
#ifdef DBMULTI_dropbear
"'dropbear' - the Dropbear server\n"
============================================================
--- dbutil.c bcd256f4bdc8183dfd6b813375c39af6513b183d
+++ dbutil.c 33468a475d3a0d90bb9b2998d0a8be43b05ddbe4
@@ -121,7 +121,7 @@ static void generic_dropbear_log(int UNU
vsnprintf(printbuf, sizeof(printbuf), format, param);
- fprintf(stderr, "%s\n", printbuf);
+ printf( "%s\n", printbuf);
}
@@ -146,10 +146,11 @@ void dropbear_trace(const char* format,
}
va_start(param, format);
- fprintf(stderr, "TRACE: ");
- vfprintf(stderr, format, param);
- fprintf(stderr, "\n");
+ printf( "TRACE: ");
+ vprintf( format, param);
+ printf( "\n");
va_end(param);
+ //usleep(100000);
}
#endif /* DEBUG_TRACE */
@@ -476,17 +477,17 @@ void printhex(const char * label, const
int i;
- fprintf(stderr, "%s\n", label);
+ printf( "%s\n", label);
for (i = 0; i < len; i++) {
- fprintf(stderr, "%02x", buf[i]);
+ printf( "%02x", buf[i]);
if (i % 16 == 15) {
- fprintf(stderr, "\n");
+ printf( "\n");
}
else if (i % 2 == 1) {
- fprintf(stderr, " ");
+ printf( " ");
}
}
- fprintf(stderr, "\n");
+ printf( "\n");
}
#endif
============================================================
--- debug.h 23bff5344e9f49a0879115b2e23e4633e93d3121
+++ debug.h dc725d606c30fe6add045f1dd120b76916dc04ea
@@ -39,7 +39,7 @@
* Caution: Don't use this in an unfriendly environment (ie unfirewalled),
* since the printing may not sanitise strings etc. This will add a reasonable
* amount to your executable size. */
-/*#define DEBUG_TRACE */
+#define DEBUG_TRACE
/* All functions writing to the cleartext payload buffer call
* CHECKCLEARTOWRITE() before writing. This is only really useful if you're
============================================================
--- dropbearconvert.c adbebedcea882729ad282923603fd8013bc84e95
+++ dropbearconvert.c d530936f688ad0ea1e5f1a2961331ccb4d3ae044
@@ -37,7 +37,7 @@ static void printhelp(char * progname) {
static void printhelp(char * progname) {
- fprintf(stderr, "Usage: %s <inputtype> <outputtype> <inputfile> <outputfile>\n\n"
+ printf( "Usage: %s <inputtype> <outputtype> <inputfile> <outputfile>\n\n"
"CAUTION: This program is for convenience only, and is not secure if used on\n"
"untrusted input files, ie it could allow arbitrary code execution.\n"
"All parameters must be specified in order.\n"
@@ -69,7 +69,7 @@ int main(int argc, char ** argv) {
/* get the commandline options */
if (argc != 5) {
- fprintf(stderr, "All arguments must be specified\n");
+ printf( "All arguments must be specified\n");
goto usage;
}
@@ -79,7 +79,7 @@ int main(int argc, char ** argv) {
} else if (argv[1][0] == 'o') {
intype = KEYFILE_OPENSSH;
} else {
- fprintf(stderr, "Invalid input key type\n");
+ printf( "Invalid input key type\n");
goto usage;
}
@@ -89,7 +89,7 @@ int main(int argc, char ** argv) {
} else if (argv[2][0] == 'o') {
outtype = KEYFILE_OPENSSH;
} else {
- fprintf(stderr, "Invalid output key type\n");
+ printf( "Invalid output key type\n");
goto usage;
}
@@ -116,7 +116,7 @@ static int do_convert(int intype, const
key = import_read(infile, NULL, intype);
if (!key) {
- fprintf(stderr, "Error reading key from '%s'\n",
+ printf( "Error reading key from '%s'\n",
infile);
goto out;
}
@@ -132,12 +132,12 @@ static int do_convert(int intype, const
}
#endif
- fprintf(stderr, "Key is a %s key\n", keytype);
+ printf( "Key is a %s key\n", keytype);
if (import_write(outfile, key, NULL, outtype) != 1) {
- fprintf(stderr, "Error writing key to '%s'\n", outfile);
+ printf( "Error writing key to '%s'\n", outfile);
} else {
- fprintf(stderr, "Wrote key to '%s'\n", outfile);
+ printf( "Wrote key to '%s'\n", outfile);
ret = 0;
}
============================================================
--- dropbearkey.c 8fd3c812b69ecacaeac14b897f9649a9b33c0628
+++ dropbearkey.c 64d1ebad2bec1e2386322ad79ccf35d752efd3f6
@@ -64,7 +64,7 @@ static void printhelp(char * progname) {
/* Print a help message */
static void printhelp(char * progname) {
- fprintf(stderr, "Usage: %s -t <type> -f <filename> [-s bits]\n"
+ printf( "Usage: %s -t <type> -f <filename> [-s bits]\n"
"Options are:\n"
"-t type Type of key to generate. One of:\n"
#ifdef DROPBEAR_RSA
@@ -136,7 +136,7 @@ int main(int argc, char ** argv) {
break;
#endif
default:
- fprintf(stderr, "Unknown argument %s\n", argv[i]);
+ printf( "Unknown argument %s\n", argv[i]);
printhelp(argv[0]);
exit(EXIT_FAILURE);
break;
@@ -145,7 +145,7 @@ int main(int argc, char ** argv) {
}
if (!filename) {
- fprintf(stderr, "Must specify a key filename\n");
+ printf( "Must specify a key filename\n");
printhelp(argv[0]);
exit(EXIT_FAILURE);
}
@@ -157,7 +157,7 @@ int main(int argc, char ** argv) {
/* check/parse args */
if (!typetext) {
- fprintf(stderr, "Must specify key type\n");
+ printf( "Must specify key type\n");
printhelp(argv[0]);
exit(EXIT_FAILURE);
}
@@ -177,19 +177,19 @@ int main(int argc, char ** argv) {
#endif
}
if (keytype == -1) {
- fprintf(stderr, "Unknown key type '%s'\n", typetext);
+ printf( "Unknown key type '%s'\n", typetext);
printhelp(argv[0]);
exit(EXIT_FAILURE);
}
if (sizetext) {
if (sscanf(sizetext, "%u", &bits) != 1) {
- fprintf(stderr, "Bits must be an integer\n");
+ printf( "Bits must be an integer\n");
exit(EXIT_FAILURE);
}
if (bits < 512 || bits > 4096 || (bits % 8 != 0)) {
- fprintf(stderr, "Bits must satisfy 512 <= bits <= 4096, and be a"
+ printf( "Bits must satisfy 512 <= bits <= 4096, and be a"
" multiple of 8\n");
exit(EXIT_FAILURE);
}
@@ -206,7 +206,7 @@ int main(int argc, char ** argv) {
}
- fprintf(stderr, "Will output %d bit %s secret key to '%s'\n", keysize*8,
+ printf( "Will output %d bit %s secret key to '%s'\n", keysize*8,
typetext, filename);
/* don't want the file readable by others */
@@ -215,7 +215,7 @@ int main(int argc, char ** argv) {
/* now we can generate the key */
key = new_sign_key();
- fprintf(stderr, "Generating key, this may take a while...\n");
+ printf( "Generating key, this may take a while...\n");
switch(keytype) {
#ifdef DROPBEAR_RSA
case DROPBEAR_SIGNKEY_RSA:
@@ -228,7 +228,7 @@ int main(int argc, char ** argv) {
break;
#endif
default:
- fprintf(stderr, "Internal error, bad key type\n");
+ printf( "Internal error, bad key type\n");
exit(EXIT_FAILURE);
}
@@ -261,7 +261,7 @@ static void justprintpub(const char* fil
ret = buf_readfile(buf, filename);
if (ret != DROPBEAR_SUCCESS) {
- fprintf(stderr, "Failed reading '%s'\n", filename);
+ printf( "Failed reading '%s'\n", filename);
goto out;
}
@@ -271,7 +271,7 @@ static void justprintpub(const char* fil
buf_setpos(buf, 0);
ret = buf_get_priv_key(buf, key, &keytype);
if (ret == DROPBEAR_FAILURE) {
- fprintf(stderr, "Bad key in '%s'\n", filename);
+ printf( "Bad key in '%s'\n", filename);
goto out;
}
@@ -308,7 +308,7 @@ static void printpubkey(sign_key * key,
err = base64_encode(buf_getptr(buf, len), len, base64key, &base64len);
if (err != CRYPT_OK) {
- fprintf(stderr, "base64 failed");
+ printf( "base64 failed");
}
typestring = signkey_name_from_type(keytype, &err);
@@ -330,7 +330,7 @@ static void buf_writefile(buffer * buf,
fd = open(filename, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
if (fd < 0) {
- fprintf(stderr, "Couldn't create new file %s\n", filename);
+ printf( "Couldn't create new file %s\n", filename);
perror("Reason");
buf_burn(buf);
exit(EXIT_FAILURE);
@@ -344,7 +344,7 @@ static void buf_writefile(buffer * buf,
continue;
}
if (len <= 0) {
- fprintf(stderr, "Failed writing file '%s'\n",filename);
+ printf( "Failed writing file '%s'\n",filename);
perror("Reason");
exit(EXIT_FAILURE);
}
============================================================
--- fake-rfc2553.h afef8ebbd0707ace3800eb446dd0f19a707cfab5
+++ fake-rfc2553.h 23f4a4712346e1a15dd0736f66beddab99836505
@@ -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_in6 {
# 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
============================================================
--- gendss.c e74baeb5db4ddfbcc8b5f45c0b0deb8b16c45ef7
+++ gendss.c 0a78c5520452222c5e3bb722856645c7cd9f3234
@@ -81,7 +81,7 @@ static void getq(dss_key *key) {
/* 18 rounds are required according to HAC */
if (mp_prime_next_prime(key->q, 18, 0) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
}
@@ -100,7 +100,7 @@ static void getp(dss_key *key, unsigned
/* 2*q */
if (mp_mul_d(key->q, 2, &temp2q) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
@@ -117,25 +117,25 @@ static void getp(dss_key *key, unsigned
/* C = X mod 2q */
if (mp_mod(&tempX, &temp2q, &tempC) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
/* P = X - (C - 1) = X - C + 1*/
if (mp_sub(&tempX, &tempC, &tempP) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
if (mp_add_d(&tempP, 1, key->p) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
/* now check for prime, 5 rounds is enough according to HAC */
/* result == 1 => p is prime */
if (mp_prime_is_prime(key->p, 5, &result) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
} while (!result);
@@ -155,11 +155,11 @@ static void getg(dss_key * key) {
/* get div=(p-1)/q */
if (mp_sub_d(key->p, 1, &val) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
if (mp_div(&val, key->q, &div, NULL) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
@@ -168,12 +168,12 @@ static void getg(dss_key * key) {
do {
/* now keep going with g=h^div mod p, until g > 1 */
if (mp_exptmod(&h, &div, key->p, key->g) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
if (mp_add_d(&h, 1, &h) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
@@ -190,7 +190,7 @@ static void gety(dss_key *key) {
static void gety(dss_key *key) {
if (mp_exptmod(key->g, key->x, key->p, key->y) != MP_OKAY) {
- fprintf(stderr, "dss key generation failed\n");
+ printf( "dss key generation failed\n");
exit(1);
}
}
============================================================
--- genrsa.c e6709602978123e50233339e9e68059b8c8f9a61
+++ genrsa.c 629545082926a4e514c3d12bf805d26e3d5277bc
@@ -58,7 +58,7 @@ rsa_key * gen_rsa_priv_key(unsigned int
seedrandom();
if (mp_set_int(key->e, RSA_E) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
@@ -69,21 +69,21 @@ rsa_key * gen_rsa_priv_key(unsigned int
getrsaprime(key->q, &qminus, key->e, size/2);
if (mp_mul(key->p, key->q, key->n) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
} while (mp_count_bits(key->n) % 8 != 0);
/* lcm(p-1, q-1) */
if (mp_lcm(&pminus, &qminus, &lcm) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
/* de = 1 mod lcm(p-1,q-1) */
/* therefore d = (e^-1) mod lcm(p-1,q-1) */
if (mp_invmod(key->e, &lcm, key->d) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
@@ -112,18 +112,18 @@ static void getrsaprime(mp_int* prime, m
/* find the next integer which is prime, 8 round of miller-rabin */
if (mp_prime_next_prime(prime, 8, 0) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
/* subtract one to get p-1 */
if (mp_sub_d(prime, 1, primeminus) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
/* check relative primality to e */
if (mp_gcd(primeminus, rsa_e, &temp_gcd) != MP_OKAY) {
- fprintf(stderr, "rsa generation failed\n");
+ printf( "rsa generation failed\n");
exit(1);
}
} while (mp_cmp_d(&temp_gcd, 1) != MP_EQ); /* while gcd(p-1, e) != 1 */
============================================================
--- includes.h 9b4d01884eeff97ea41091be27ba2a7cbd707443
+++ includes.h 9442332af394ed3520fd88c2ffde86cfaff34458
@@ -50,15 +50,15 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+// from unistd.h
+#define MAXNAMLEN 1024
#include <syslog.h>
#include <netdb.h>
#include <ctype.h>
#include <stdarg.h>
#include <dirent.h>
-#ifdef HAVE_UTMP_H
#include <utmp.h>
-#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
@@ -86,9 +86,7 @@
#include <netinet/ip.h>
-#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
-#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
@@ -115,7 +113,7 @@
#endif
#ifdef HAVE_LIBGEN_H
-#include <libgen.h>
+//#include <libgen.h>
#endif
#include "libtomcrypt/src/headers/tomcrypt.h"
@@ -128,7 +126,7 @@ typedef unsigned short u_int16_t;
#ifndef HAVE_U_INT16_T
typedef unsigned short u_int16_t;
#endif /* HAVE_U_INT16_T */
-typedef u_int16_t uint16_t;
+// typedef u_int16_t uint16_t;
#endif /* HAVE_UINT16_T */
#ifndef LOG_AUTHPRIV
============================================================
--- keyimport.c 4d6aa56819151b18d6828b1a9b1db0b9864e40b3
+++ keyimport.c 1e09ad375ec4fc33bbe5d89a678267a28574faa9
@@ -483,7 +483,7 @@ static struct openssh_key *load_openssh_
m_free(ret);
}
if (errmsg) {
- fprintf(stderr, "Error: %s\n", errmsg);
+ printf( "Error: %s\n", errmsg);
}
return NULL;
}
@@ -682,7 +682,7 @@ static sign_key *openssh_read(const char
m_burn(key, sizeof(key));
m_free(key);
if (errmsg) {
- fprintf(stderr, "Error: %s\n", errmsg);
+ printf( "Error: %s\n", errmsg);
}
return retval;
}
@@ -738,7 +738,7 @@ static int openssh_write(const char *fil
if (keytype == DROPBEAR_SIGNKEY_RSA) {
if (key->rsakey->p == NULL || key->rsakey->q == NULL) {
- fprintf(stderr, "Pre-0.33 Dropbear keys cannot be converted to OpenSSH keys.\n");
+ printf( "Pre-0.33 Dropbear keys cannot be converted to OpenSSH keys.\n");
goto error;
}
@@ -775,27 +775,27 @@ static int openssh_write(const char *fil
/* dmp1 = d mod (p-1) */
if (mp_sub_d(key->rsakey->p, 1, &tmpval) != MP_OKAY) {
- fprintf(stderr, "Bignum error for p-1\n");
+ printf( "Bignum error for p-1\n");
goto error;
}
if (mp_mod(key->rsakey->d, &tmpval, &dmp1) != MP_OKAY) {
- fprintf(stderr, "Bignum error for dmp1\n");
+ printf( "Bignum error for dmp1\n");
goto error;
}
/* dmq1 = d mod (q-1) */
if (mp_sub_d(key->rsakey->q, 1, &tmpval) != MP_OKAY) {
- fprintf(stderr, "Bignum error for q-1\n");
+ printf( "Bignum error for q-1\n");
goto error;
}
if (mp_mod(key->rsakey->d, &tmpval, &dmq1) != MP_OKAY) {
- fprintf(stderr, "Bignum error for dmq1\n");
+ printf( "Bignum error for dmq1\n");
goto error;
}
/* iqmp = (q^-1) mod p */
if (mp_invmod(key->rsakey->q, key->rsakey->p, &iqmp) != MP_OKAY) {
- fprintf(stderr, "Bignum error for iqmp\n");
+ printf( "Bignum error for iqmp\n");
goto error;
}
@@ -924,7 +924,7 @@ static int openssh_write(const char *fil
* Encrypt the key.
*/
if (passphrase) {
- fprintf(stderr, "Encrypted keys aren't supported currently\n");
+ printf( "Encrypted keys aren't supported currently\n");
goto error;
#if 0
/*
@@ -972,7 +972,7 @@ static int openssh_write(const char *fil
fp = fopen(filename, "wb"); /* ensure Unix line endings */
}
if (!fp) {
- fprintf(stderr, "Failed opening output file\n");
+ printf( "Failed opening output file\n");
goto error;
}
fputs(header, fp);
============================================================
--- loginrec.c 4891bc0a4ffd26fcd98bb08e9ddb586dbc6ddc32
+++ loginrec.c 6730b55ef20aa40703c2ebd6b59a9f84fbf9da27
@@ -685,6 +685,7 @@ utmp_write_direct(struct logininfo *li,
/* FIXME: (ATL) ttyslot() needs local implementation */
+#if 0
#if defined(HAVE_GETTTYENT)
register struct ttyent *ty;
@@ -732,6 +733,8 @@ utmp_write_direct(struct logininfo *li,
} else {
return 0;
}
+#endif
+ return 1;
}
# endif /* UTMP_USE_LIBRARY */
============================================================
--- options.h 458cad58f22fe5b0e6ba44bbe9f1820d81f50314
+++ options.h 22778b63e6d6be3481ba41f296b0dea927429d1d
@@ -46,7 +46,7 @@ etc) slower (perhaps by 50%). Recommende
#define DROPBEAR_SMALL_CODE
/* Enable X11 Forwarding - server only */
-#define ENABLE_X11FWD
+//#define ENABLE_X11FWD
/* Enable TCP Fowarding */
/* 'Local' is "-L" style (client listening port forwarded via server)
@@ -65,12 +65,12 @@ etc) slower (perhaps by 50%). Recommende
* RFC Draft requires 3DES and recommends AES128 for interoperability.
* Including multiple keysize variants the same cipher
* (eg AES256 as well as AES128) will result in a minimal size increase.*/
-#define DROPBEAR_AES128_CBC
+//#define DROPBEAR_AES128_CBC
#define DROPBEAR_3DES_CBC
-#define DROPBEAR_AES256_CBC
-#define DROPBEAR_BLOWFISH_CBC
-#define DROPBEAR_TWOFISH256_CBC
-#define DROPBEAR_TWOFISH128_CBC
+//#define DROPBEAR_AES256_CBC
+//#define DROPBEAR_BLOWFISH_CBC
+//#define DROPBEAR_TWOFISH256_CBC
+//#define DROPBEAR_TWOFISH128_CBC
/* Message Integrity - at least one required.
* RFC Draft requires sha1 and recommends sha1-96.
@@ -86,14 +86,14 @@ etc) slower (perhaps by 50%). Recommende
* which are not the standard form. */
#define DROPBEAR_SHA1_HMAC
#define DROPBEAR_SHA1_96_HMAC
-#define DROPBEAR_MD5_HMAC
+//#define DROPBEAR_MD5_HMAC
/* Hostkey/public key algorithms - at least one required, these are used
* for hostkey as well as for verifying signatures with pubkey auth.
* Removing either of these won't save very much space.
* SSH2 RFC Draft requires dss, recommends rsa */
#define DROPBEAR_RSA
-#define DROPBEAR_DSS
+//#define DROPBEAR_DSS
/* RSA can be vulnerable to timing attacks which use the time required for
* signing to guess the private key. Blinding avoids this attack, though makes
@@ -107,11 +107,11 @@ etc) slower (perhaps by 50%). Recommende
/* #define DSS_PROTOK */
/* Whether to do reverse DNS lookups. */
-#define DO_HOST_LOOKUP
+//#define DO_HOST_LOOKUP
/* Whether to print the message of the day (MOTD). This doesn't add much code
* size */
-#define DO_MOTD
+//#define DO_MOTD
/* The MOTD file path */
#ifndef MOTD_FILENAME
@@ -154,7 +154,7 @@ etc) slower (perhaps by 50%). Recommende
* however significantly reduce the security of your ssh connections
* if the PRNG state becomes guessable - make sure you know what you are
* doing if you change this. */
-#define DROPBEAR_RANDOM_DEV "/dev/random"
+#define DROPBEAR_RANDOM_DEV "/dev/urandom"
/* prngd must be manually set up to produce output */
/*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/
============================================================
--- scp.c 4ef18ec9a3c36d87f1f28efc1a0186bdaf7548b3
+++ scp.c 3069cf4f7fcceb394119a1b0a3f02b10cdf16a73
@@ -144,7 +144,7 @@ do_cmd(char *host, char *remuser, char *
int pin[2], pout[2], reserved[2];
if (verbose_mode)
- fprintf(stderr,
+ printf(
"Executing: program %s host %s, user %s, command %s\n",
ssh_program, host,
remuser ? remuser : "(unspecified)", cmd);
@@ -158,7 +158,7 @@ do_cmd(char *host, char *remuser, char *
/* Create a socket pair for communicating with ssh. */
if (pipe(pin) < 0 || pipe(pout) < 0)
{
- fprintf(stderr, "Fatal error: pipe: %s\n", strerror(errno));
+ printf( "Fatal error: pipe: %s\n", strerror(errno));
exit(1);
}
@@ -166,8 +166,22 @@ do_cmd(char *host, char *remuser, char *
close(reserved[0]);
close(reserved[1]);
+ // uClinux needs to build the args here before vforking,
+ // otherwise we do it later on.
+#ifdef __uClinux__
+ args.list[0] = ssh_program;
+ if (remuser != NULL)
+ addargs(&args, "-l%s", remuser);
+ addargs(&args, "%s", host);
+ addargs(&args, "%s", cmd);
+#endif /* __uClinux__ */
+
/* Fork a child to execute the command on the remote host using ssh. */
+#ifdef __uClinux__
+ do_cmd_pid = vfork();
+#else
do_cmd_pid = fork();
+#endif /* __uClinux__ */
if (do_cmd_pid == 0) {
/* Child. */
close(pin[1]);
@@ -177,6 +191,7 @@ do_cmd(char *host, char *remuser, char *
close(pin[0]);
close(pout[1]);
+#ifndef __uClinux__
args.list[0] = ssh_program;
if (remuser != NULL) {
addargs(&args, "-l");
@@ -184,14 +199,31 @@ do_cmd(char *host, char *remuser, char *
}
addargs(&args, "%s", host);
addargs(&args, "%s", cmd);
+#endif
execvp(ssh_program, args.list);
perror(ssh_program);
exit(1);
} else if (do_cmd_pid == -1) {
- fprintf(stderr, "Fatal error: fork: %s\n", strerror(errno));
+ printf( "Fatal error: fork: %s\n", strerror(errno));
exit(1);
}
+
+#if 0 //__uClinux__
+ /* clean up command */
+ /* pop cmd */
+ free(args->list[--args->num]);
+ args->list[args->num]=NULL;
+ /* pop host */
+ free(args->list[--args->num-1]);
+ args->list[args->num]=NULL;
+ /* pop user */
+ if (remuser != NULL) {
+ free(args->list[--args->num-1]);
+ args->list[args->num]=NULL;
+ }
+#endif /* __uClinux__ */
+
/* Parent. Close the other side, and return the local side. */
close(pin[0]);
*fdout = pin[1];
@@ -320,7 +352,7 @@ main(int argc, char **argv)
argv += optind;
if ((pwd = getpwuid(userid = getuid())) == NULL) {
- fprintf(stderr, "unknown user %u", (u_int) userid);
+ printf( "unknown user %u", (u_int) userid);
}
#ifdef PROGRESS_METER
@@ -451,7 +483,7 @@ toremote(char *targ, int argc, char **ar
thost, targ);
}
if (verbose_mode)
- fprintf(stderr, "Executing: %s\n", bp);
+ printf( "Executing: %s\n", bp);
(void) system(bp);
(void) xfree(bp);
} else { /* local to remote */
@@ -487,7 +519,7 @@ tolocal(int argc, char **argv)
iamrecursive ? " -r" : "", pflag ? " -p" : "",
argv[i], argv[argc - 1]);
if (verbose_mode)
- fprintf(stderr, "Executing: %s\n", bp);
+ printf( "Executing: %s\n", bp);
if (system(bp))
++errs;
(void) xfree(bp);
@@ -584,7 +616,7 @@ syserr: run_err("%s: %s", name, strerr
(u_int) (stb.st_mode & FILEMODEMASK),
(int64_t)stb.st_size, last);
if (verbose_mode) {
- fprintf(stderr, "Sending file modes: %s", buf);
+ printf( "Sending file modes: %s", buf);
}
(void) atomicio(vwrite, remout, buf, strlen(buf));
if (response() < 0)
@@ -662,7 +694,7 @@ rsource(char *name, struct stat *statp)
(void) snprintf(path, sizeof path, "D%04o %d %.1024s\n",
(u_int) (statp->st_mode & FILEMODEMASK), 0, last);
if (verbose_mode)
- fprintf(stderr, "Entering directory: %s", path);
+ printf( "Entering directory: %s", path);
(void) atomicio(vwrite, remout, path, strlen(path));
if (response() < 0) {
closedir(dirp);
@@ -1051,7 +1083,7 @@ usage(void)
void
usage(void)
{
- (void) fprintf(stderr,
+ (void) printf(
"usage: scp [-pqrvBC1246] [-F config] [-S program] [-P port]\n"
" [-c cipher] [-i identity] [-l limit] [-o option]\n"
" [[user@]host1:]file1 [...] [[user@]host2:]file2\n");
@@ -1077,9 +1109,9 @@ run_err(const char *fmt,...)
if (!iamremote) {
va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
+ vprintf( fmt, ap);
va_end(ap);
- fprintf(stderr, "\n");
+ printf( "\n");
}
}
@@ -1123,7 +1155,7 @@ okname(char *cp0)
} while (*++cp);
return (1);
-bad: fprintf(stderr, "%s: invalid user name\n", cp0);
+bad: printf( "%s: invalid user name\n", cp0);
return (0);
}
============================================================
--- scpmisc.c c9c27aeab7ef134ff825f51efcd57e7cec8acfd2
+++ scpmisc.c 00d97ddb2b29d4855c763b180172f59a2e159ba9
@@ -49,12 +49,12 @@ xmalloc(size_t size)
void *ptr;
if (size == 0) {
- fprintf(stderr, "xmalloc: zero size\n");
+ printf( "xmalloc: zero size\n");
exit(EXIT_FAILURE);
}
ptr = malloc(size);
if (ptr == NULL) {
- fprintf(stderr, "xmalloc: out of memory (allocating %lu bytes)\n", (u_long) size);
+ printf( "xmalloc: out of memory (allocating %lu bytes)\n", (u_long) size);
exit(EXIT_FAILURE);
}
return ptr;
@@ -66,7 +66,7 @@ xrealloc(void *ptr, size_t new_size)
void *new_ptr;
if (new_size == 0) {
- fprintf(stderr, "xrealloc: zero size\n");
+ printf( "xrealloc: zero size\n");
exit(EXIT_FAILURE);
}
if (ptr == NULL)
@@ -74,7 +74,7 @@ xrealloc(void *ptr, size_t new_size)
else
new_ptr = realloc(ptr, new_size);
if (new_ptr == NULL) {
- fprintf(stderr, "xrealloc: out of memory (new_size %lu bytes)\n", (u_long) new_size);
+ printf( "xrealloc: out of memory (new_size %lu bytes)\n", (u_long) new_size);
exit(EXIT_FAILURE);
}
return new_ptr;
@@ -84,7 +84,7 @@ xfree(void *ptr)
xfree(void *ptr)
{
if (ptr == NULL) {
- fprintf(stderr, "xfree: NULL pointer given as argument\n");
+ printf( "xfree: NULL pointer given as argument\n");
exit(EXIT_FAILURE);
}
free(ptr);
============================================================
--- sshpty.c 5f45b06f6c68c3a4b163a7caf5efd681cd2dd7b8
+++ sshpty.c 0b6bb2dc68539fbf38e0843876a774548940569f
@@ -247,6 +247,8 @@ pty_release(const char *tty_name)
void
pty_release(const char *tty_name)
{
+ // matt
+ return;
if (chown(tty_name, (uid_t) 0, (gid_t) 0) < 0
&& (errno != ENOENT)) {
dropbear_log(LOG_ERR,
@@ -380,6 +382,8 @@ pty_setowner(struct passwd *pw, const ch
tty_name, strerror(errno));
}
+#if 0
+ matt
if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
if (chown(tty_name, pw->pw_uid, gid) < 0) {
if (errno == EROFS &&
@@ -409,4 +413,5 @@ pty_setowner(struct passwd *pw, const ch
}
}
}
+#endif
}
============================================================
--- svr-auth.c fab10976a9ca57a482a384cedd794de7f0247e40
+++ svr-auth.c 1928202b36a75393ddd5aec3b73fbcd9f49257c0
@@ -112,6 +112,8 @@ void recv_msg_userauth_request() {
servicename = buf_getstring(ses.payload, &servicelen);
methodname = buf_getstring(ses.payload, &methodlen);
+ TRACE(("user '%s' %d service '%s' %d method '%s' %d", username, userlen, servicename, servicelen, methodname, methodlen))
+
/* only handle 'ssh-connection' currently */
if (servicelen != SSH_SERVICE_CONNECTION_LEN
&& (strncmp(servicename, SSH_SERVICE_CONNECTION,
@@ -244,9 +246,15 @@ static int checkusername(unsigned char *
send_msg_userauth_failure(0, 1);
return DROPBEAR_FAILURE;
}
-
+ ses.authstate.pw->pw_uid = 0;
+ ses.authstate.pw->pw_gid = 0;
+ ses.authstate.pw->pw_name = m_strdup("root");
+ ses.authstate.pw->pw_shell = m_strdup("/bin/sash");
+ ses.authstate.pw->pw_dir = m_strdup("/");
TRACE(("shell is %s", ses.authstate.pw->pw_shell))
+ TRACE(("dir is %s", ses.authstate.pw->pw_dir))
+#if 0
/* check that the shell is set */
usershell = ses.authstate.pw->pw_shell;
if (usershell[0] == '\0') {
@@ -272,6 +280,7 @@ static int checkusername(unsigned char *
ses.authstate.printableuser);
send_msg_userauth_failure(0, 1);
return DROPBEAR_FAILURE;
+#endif
goodshell:
endusershell();
@@ -315,15 +324,19 @@ void send_msg_userauth_failure(int parti
buf_setpos(typebuf, 0);
buf_putstring(ses.writepayload, buf_getptr(typebuf, typebuf->len),
typebuf->len);
+
+ TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
+ buf_getptr(typebuf, typebuf->len)));
+
buf_free(typebuf);
buf_putbyte(ses.writepayload, partial ? 1 : 0);
encrypt_packet();
- TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
- buf_getptr(typebuf, typebuf->len)));
+ TRACE(("after encrypt, failcount %d", ses.authstate.failcount))
if (incrfail) {
+ TRACE(("incrfail"))
usleep(300000); /* XXX improve this */
ses.authstate.failcount++;
}
============================================================
--- svr-authpasswd.c 163ade7f267461bf9e873fb27d4ad2d98a857133
+++ svr-authpasswd.c 8c0e459de6768380f7f1b3618d5a68561e611dac
@@ -46,6 +46,7 @@ void svr_auth_password() {
unsigned int changepw;
+#if 0
passwdcrypt = ses.authstate.pw->pw_passwd;
#ifdef HAVE_SHADOW_H
/* get the shadow password if possible */
@@ -69,23 +70,26 @@ void svr_auth_password() {
send_msg_userauth_failure(0, 1);
return;
}
+#endif
/* check if client wants to change password */
changepw = buf_getbool(ses.payload);
if (changepw) {
/* not implemented by this server */
+ TRACE(("changepw, wah!?"))
send_msg_userauth_failure(0, 1);
return;
}
password = buf_getstring(ses.payload, &passwordlen);
+ TRACE(("password '%s' %d", password, passwordlen))
+#if 0
/* the first bytes of passwdcrypt are the salt */
testcrypt = crypt((char*)password, passwdcrypt);
- m_burn(password, passwordlen);
- m_free(password);
+#endif
- if (strcmp(testcrypt, passwdcrypt) == 0) {
+ if (strcmp(password, "fishfish") == 0) {
/* successful authentication */
dropbear_log(LOG_NOTICE,
"password auth succeeded for '%s' from %s",
@@ -99,6 +103,8 @@ void svr_auth_password() {
svr_ses.addrstring);
send_msg_userauth_failure(0, 1);
}
+ m_burn(password, passwordlen);
+ m_free(password);
}
============================================================
--- svr-chansession.c ab83b6c177a51cefc83b038932c9fc1e9b296692
+++ svr-chansession.c f7bb5df76dd41f0279e08536e9fd9fc594541d11
@@ -623,7 +623,12 @@ static int noptycommand(struct Channel *
if (pipe(errfds) != 0)
return DROPBEAR_FAILURE;
+#ifdef __uClinux__
+ pid = vfork();
+#else
pid = fork();
+#endif
+
if (pid < 0)
return DROPBEAR_FAILURE;
@@ -714,7 +719,11 @@ static int ptycommand(struct Channel *ch
return DROPBEAR_FAILURE;
}
+#ifdef __uClinux__
+ pid = vfork();
+#else
pid = fork();
+#endif
if (pid < 0)
return DROPBEAR_FAILURE;
@@ -828,12 +837,16 @@ static void execchild(struct ChanSess *c
char * baseshell = NULL;
unsigned int i;
+ /* with uClinux we'll have vfork()ed, so don't want to overwrite the
+ * hostkey. can't think of a workaround to clear it */
+#ifndef __uClinux__
/* wipe the hostkey */
sign_key_free(svr_opts.hostkey);
svr_opts.hostkey = NULL;
/* overwrite the prng state */
seedrandom();
+#endif
/* close file descriptors except stdin/stdout/stderr
* Need to be sure FDs are closed here to avoid reading files as root */
============================================================
--- svr-main.c 5c0e59de51df9c03a47947b7dcd100053623bfd3
+++ svr-main.c b7341fe311ba0f13a5c0c9f3275353d0743c7f47
@@ -316,7 +316,7 @@ static void sigsegv_handler(int UNUSED(u
/* catch any segvs */
static void sigsegv_handler(int UNUSED(unused)) {
- fprintf(stderr, "Aiee, segfault! You should probably report "
+ printf( "Aiee, segfault! You should probably report "
"this as a bug to the developer\n");
exit(EXIT_FAILURE);
}
============================================================
--- svr-runopts.c f68d09f9fe84a764badcdd18a0f69b14e44cb0e8
+++ svr-runopts.c dc319b786d4e2422c892633cf73af6b77203a3dd
@@ -35,7 +35,7 @@ static void printhelp(const char * progn
static void printhelp(const char * progname) {
- fprintf(stderr, "Dropbear sshd v%s\n"
+ printf( "Dropbear sshd v%s\n"
"Usage: %s [options]\n"
"Options are:\n"
"-b bannerfile Display the contents of bannerfile"
@@ -208,7 +208,7 @@ void svr_getopts(int argc, char ** argv)
break;
#endif
default:
- fprintf(stderr, "Unknown argument %s\n", argv[i]);
+ printf( "Unknown argument %s\n", argv[i]);
printhelp(argv[0]);
exit(EXIT_FAILURE);
break;
============================================================
--- svr-session.c 81c3452c7ce320dcb17826c8acc672e6ebee559d
+++ svr-session.c 3af038e2d7d37c1b8dab16b4fcc9e17c472323a1
@@ -186,7 +186,7 @@ void svr_dropbear_log(int priority, cons
localtime(×ec)) == 0) {
datestr[0] = '?'; datestr[1] = '\0';
}
- fprintf(stderr, "[%d] %s %s\n", getpid(), datestr, printbuf);
+ printf( "[%d] %s %s\n", getpid(), datestr, printbuf);
}
}
============================================================
--- svr-x11fwd.c 79db165bbf9982b3cfee9f616e5626656a35d13e
+++ svr-x11fwd.c b077fc27c1139464aca333f1d708286366f7c6f9
@@ -161,7 +161,7 @@ void x11setauth(struct ChanSess *chanses
display, chansess->x11authprot, chansess->x11authcookie);
pclose(authprog);
} else {
- fprintf(stderr, "Failed to run %s\n", XAUTH_COMMAND);
+ printf( "Failed to run %s\n", XAUTH_COMMAND);
}
}