fix zlib; add dropbear ipkg
[oweals/openwrt.git] / obsolete-buildroot / sources / openwrt / ipkg / dropbear / dropbear.patch
1 Only in dropbear-0.44test2: .configured
2 diff -r -u dropbear-0.44test2-old/cli-session.c dropbear-0.44test2/cli-session.c
3 --- dropbear-0.44test2-old/cli-session.c        2004-08-17 21:22:59.000000000 +1000
4 +++ dropbear-0.44test2/cli-session.c    2004-08-19 21:50:59.000000000 +1000
5 @@ -112,9 +112,14 @@
6         cli_ses.tty_raw_mode = 0;
7         cli_ses.winchange = 0;
8  
9 +       /* We store stdin's flags, so we can set them back on exit (otherwise
10 +        * busybox's ash isn't happy */
11 +       cli_ses.stdincopy = dup(STDIN_FILENO);
12 +       cli_ses.stdinflags = fcntl(STDIN_FILENO, F_GETFL, 0);
13 +
14         /* Auth */
15         cli_ses.lastpubkey = NULL;
16 -       cli_ses.lastauthtype = NULL;
17 +       cli_ses.lastauthtype = 0;
18  
19         /* For printing "remote host closed" for the user */
20         ses.remoteclosed = cli_remoteclosed;
21 @@ -240,6 +245,12 @@
22         if (!sessinitdone) {
23                 return;
24         }
25 +
26 +       /* Set stdin back to non-blocking - busybox ash dies nastily
27 +        * if we don't revert the flags */
28 +       TRACE(("close stdincopy = %d", cli_ses.stdincopy));
29 +       fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags);
30 +
31         cli_tty_cleanup();
32  
33  }
34 diff -r -u dropbear-0.44test2-old/options.h dropbear-0.44test2/options.h
35 --- dropbear-0.44test2-old/options.h    2004-08-17 21:23:00.000000000 +1000
36 +++ dropbear-0.44test2/options.h        2004-08-20 13:40:44.000000000 +1000
37 @@ -87,7 +87,7 @@
38   * for hostkey as well as for verifying signatures with pubkey auth.
39   * Removing either of these won't save very much space.
40   * SSH2 RFC Draft requires dss, recommends rsa */
41 -#define DROPBEAR_RSA
42 +//#define DROPBEAR_RSA
43  #define DROPBEAR_DSS
44  
45  /* Define DSS_PROTOK to use PuTTY's method of generating the value k for dss,
46 diff -r -u dropbear-0.44test2-old/session.h dropbear-0.44test2/session.h
47 --- dropbear-0.44test2-old/session.h    2004-08-17 21:23:00.000000000 +1000
48 +++ dropbear-0.44test2/session.h        2004-08-19 21:50:59.000000000 +1000
49 @@ -212,6 +212,8 @@
50  
51         int tty_raw_mode; /* Whether we're in raw mode (and have to clean up) */
52         struct termios saved_tio;
53 +       int stdincopy;
54 +       int stdinflags;
55  
56         int winchange; /* Set to 1 when a windowchange signal happens */
57  
58 diff -r -u dropbear-0.44test2-old/svr-auth.c dropbear-0.44test2/svr-auth.c
59 --- dropbear-0.44test2-old/svr-auth.c   2004-08-17 21:23:00.000000000 +1000
60 +++ dropbear-0.44test2/svr-auth.c       2004-08-20 15:06:15.000000000 +1000
61 @@ -102,6 +102,8 @@
62                 return;
63         }
64  
65 +       ses.connecttimeout = 0;
66 +
67         /* send the banner if it exists, it will only exist once */
68         if (svr_opts.banner) {
69                 send_msg_userauth_banner();
70 diff -r -u dropbear-0.44test2-old/svr-runopts.c dropbear-0.44test2/svr-runopts.c
71 --- dropbear-0.44test2-old/svr-runopts.c        2004-08-17 21:23:00.000000000 +1000
72 +++ dropbear-0.44test2/svr-runopts.c    2004-08-20 11:56:31.000000000 +1000
73 @@ -302,7 +302,7 @@
74         }
75  #endif
76  #ifdef DROPBEAR_DSS
77 -       type = DROPBEAR_SIGNKEY_RSA;
78 +       type = DROPBEAR_SIGNKEY_DSS;
79         ret = readhostkey(dsskeyfile, hostkey, &type);
80         if (ret == DROPBEAR_FAILURE) {
81                 disablekey(DROPBEAR_SIGNKEY_DSS, dsskeyfile);