head 1.18; access; symbols OPENPKG_E1_MP_HEAD:1.12 OPENPKG_E1_MP:1.12 OPENPKG_E1_MP_2_STABLE:1.10.2.1 OPENPKG_E1_FP:1.10.2.1 OPENPKG_2_STABLE_MP:1.13 OPENPKG_2_STABLE_20061018:1.10.2.1 OPENPKG_2_STABLE_20060622:1.10 OPENPKG_2_STABLE:1.10.0.2 OPENPKG_2_STABLE_BP:1.10 OPENPKG_2_5_RELEASE:1.8 OPENPKG_2_5_SOLID:1.8.0.2 OPENPKG_2_5_SOLID_BP:1.8 OPENPKG_2_4_RELEASE:1.7 OPENPKG_2_4_SOLID:1.7.0.2 OPENPKG_2_4_SOLID_BP:1.7 OPENPKG_CW_FP:1.6 OPENPKG_2_3_RELEASE:1.5 OPENPKG_2_3_SOLID:1.5.0.4 OPENPKG_2_3_SOLID_BP:1.5 OPENPKG_2_2_RELEASE:1.5 OPENPKG_2_2_SOLID:1.5.0.2 OPENPKG_2_2_SOLID_BP:1.5 OPENPKG_2_1_RELEASE:1.3 OPENPKG_2_1_SOLID:1.3.0.2 OPENPKG_2_1_SOLID_BP:1.3 OPENPKG_2_0_SOLID:1.2.0.2; locks; strict; comment @# @; 1.18 date 2009.10.02.11.17.28; author rse; state Exp; branches; next 1.17; commitid Xk4IjVbjJ3Tu3X5u; 1.17 date 2009.02.25.11.30.07; author rse; state Exp; branches; next 1.16; commitid bjaokXKw9Z0haODt; 1.16 date 2008.07.22.06.40.11; author rse; state Exp; branches; next 1.15; commitid wzX0cmZIEkegzLbt; 1.15 date 2008.03.31.07.00.50; author rse; state Exp; branches; next 1.14; commitid AkgVggnP8MUxjfXs; 1.14 date 2007.09.05.06.48.40; author rse; state Exp; branches; next 1.13; commitid WXY9IaCSoN1TVvws; 1.13 date 2007.03.10.08.35.34; author rse; state Exp; branches; next 1.12; commitid jNQ0JCZue7Iihw9s; 1.12 date 2006.11.08.08.03.37; author rse; state Exp; branches; next 1.11; commitid rZGOJbUJEEXr1QTr; 1.11 date 2006.09.28.06.26.20; author rse; state Exp; branches; next 1.10; commitid ewMY8OERO6cONyOr; 1.10 date 2006.02.11.08.29.38; author rse; state Exp; branches 1.10.2.1; next 1.9; commitid jPhEN94SBe8uQ8lr; 1.9 date 2006.02.01.18.49.18; author rse; state Exp; branches; next 1.8; commitid xrZO6IobC2NZAUjr; 1.8 date 2005.09.01.18.21.39; author rse; state Exp; branches; next 1.7; 1.7 date 2005.05.29.08.10.06; author rse; state Exp; branches; next 1.6; 1.6 date 2005.03.12.06.54.54; author rse; state Exp; branches; next 1.5; 1.5 date 2004.08.30.08.00.33; author rse; state Exp; branches; next 1.4; 1.4 date 2004.08.17.18.01.27; author rse; state Exp; branches; next 1.3; 1.3 date 2004.05.19.15.15.33; author rse; state Exp; branches; next 1.2; 1.2 date 2004.05.06.16.06.35; author rse; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2004.05.05.08.24.16; author rse; state Exp; branches; next ; 1.10.2.1 date 2006.09.29.06.46.20; author rse; state Exp; branches; next 1.10.2.2; commitid VGQpsUXdDfQESGOr; 1.10.2.2 date 2006.11.08.08.58.50; author rse; state Exp; branches; next 1.10.2.3; commitid L8ZKn0WyVOQpkQTr; 1.10.2.3 date 2007.03.18.23.32.09; author thl; state Exp; branches; next ; commitid j886gsownDQWXCas; 1.2.2.1 date 2004.05.17.12.14.08; author rse; state Exp; branches; next 1.2.2.2; 1.2.2.2 date 2004.05.19.07.14.57; author rse; state Exp; branches; next 1.2.2.3; 1.2.2.3 date 2004.05.19.15.11.29; author rse; state Exp; branches; next ; desc @@ 1.18 log @upgrading package: openssh 5.2p1 -> 5.3p1 @ text @Index: session.c --- session.c.orig 2009-08-20 08:20:50 +0200 +++ session.c 2009-10-02 13:12:14 +0200 @@@@ -101,6 +101,10 @@@@ c[sizeof(INTERNAL_SFTP_NAME) - 1] == ' ' || \ c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\t')) +#ifndef SCPBINDIR +#define SCPBINDIR "@@l_prefix@@/bin" +#endif + /* func */ Session *session_new(void); @@@@ -781,6 +785,20 @@@@ do_exec(Session *s, const char *command) { int ret; + char *scp_command = NULL; + + if ( command != NULL + && strlen(command) >= 3 + && strncmp(command, "scp", 3) == 0 + && (command[3] == ' ' || command[3] == '\0')) { + size_t l, k; + l = strlen(SCPBINDIR); + k = strlen(command); + scp_command = xmalloc(l+1+k+1); + snprintf(scp_command, l+1+k+1, "%s/%s", SCPBINDIR, command); + command = (const char *)scp_command; + debug("Forced SCP command '%.900s'", command); + } if (options.adm_forced_command) { original_command = command; @@@@ -817,6 +835,8 @@@@ ret = do_exec_no_pty(s, command); original_command = NULL; + if (scp_command != NULL) + (scp_command); /* * Clear loginmsg: it's the child's responsibility to display @ 1.17 log @upgrading package: openssh 5.1p1 -> 5.2p1 @ text @d2 2 a3 2 --- session.c.orig 2009-01-28 06:29:49 +0100 +++ session.c 2009-02-25 12:24:37 +0100 d15 1 a15 1 @@@@ -783,6 +787,20 @@@@ d36 1 a36 1 @@@@ -819,6 +837,8 @@@@ @ 1.16 log @upgrading package: openssh 5.0p1 -> 5.1p1 @ text @d2 5 a6 5 --- session.c.orig 2008-06-16 15:29:18 +0200 +++ session.c 2008-07-22 08:31:23 +0200 @@@@ -95,6 +95,10 @@@@ #include #endif d15 1 a15 1 @@@@ -777,6 +781,20 @@@@ d36 1 a36 1 @@@@ -813,6 +831,8 @@@@ @ 1.15 log @upgrading package: openssh 4.7p1 -> 4.9p1 @ text @d2 3 a4 3 --- session.c.orig 2008-03-27 01:03:05 +0100 +++ session.c 2008-03-31 08:56:59 +0200 @@@@ -94,6 +94,10 @@@@ d15 1 a15 2 @@@@ -673,6 +677,21 @@@@ void d18 1 d33 1 a33 1 + d36 2 a37 3 command = options.adm_forced_command; @@@@ -708,6 +727,8 @@@@ do_exec_no_pty(s, command); @ 1.14 log @upgrading package: openssh 4.6p1 -> 4.7p1 @ text @d2 3 a4 3 --- session.c.orig 2007-08-16 15:28:04 +0200 +++ session.c 2007-09-05 08:41:17 +0200 @@@@ -92,6 +92,10 @@@@ d15 1 a15 1 @@@@ -680,6 +684,21 @@@@ @ 1.13 log @upgrading package: openssh 4.5p1 -> 4.6p1 @ text @d2 2 a3 2 --- session.c.orig 2007-02-19 12:10:25 +0100 +++ session.c 2007-03-10 09:31:39 +0100 @ 1.12 log @upgrading package: openssh 4.4p1 -> 4.5p1 @ text @d2 2 a3 2 --- session.c.orig 2006-10-23 19:01:56 +0200 +++ session.c 2006-11-08 09:01:31 +0100 @ 1.11 log @upgrading package: openssh 4.3p2 -> 4.4p1 @ text @d2 2 a3 2 --- session.c.orig 2006-09-01 07:38:37 +0200 +++ session.c 2006-09-28 08:04:00 +0200 @ 1.10 log @upgrading package: openssh 4.3p1 -> 4.3p2 @ text @d2 4 a5 4 --- session.c.orig 2006-02-08 00:18:55 +0100 +++ session.c 2006-02-11 09:27:54 +0100 @@@@ -67,6 +67,10 @@@@ #include "ssh-gss.h" d15 1 a15 1 @@@@ -651,6 +655,21 @@@@ d34 1 a34 1 if (forced_command) { d36 2 a37 2 command = forced_command; @@@@ -675,6 +694,8 @@@@ @ 1.10.2.1 log @MFC: security fixed version @ text @d2 4 a5 4 --- session.c.orig 2006-09-01 07:38:37 +0200 +++ session.c 2006-09-28 08:04:00 +0200 @@@@ -92,6 +92,10 @@@@ #include d15 1 a15 1 @@@@ -680,6 +684,21 @@@@ d34 1 a34 1 if (options.adm_forced_command) { d36 2 a37 2 command = options.adm_forced_command; @@@@ -708,6 +727,8 @@@@ @ 1.10.2.2 log @MFC: security fixed version plus HPN patch related packaging fixes @ text @d2 2 a3 2 --- session.c.orig 2006-10-23 19:01:56 +0200 +++ session.c 2006-11-08 09:01:31 +0100 @ 1.10.2.3 log @MFC: make up leeway for 2_STABLE by virtue of build-time results @ text @d2 2 a3 2 --- session.c.orig 2007-02-19 12:10:25 +0100 +++ session.c 2007-03-10 09:31:39 +0100 @ 1.9 log @upgrading package: openssh 4.2p1 -> 4.3p1 @ text @d2 2 a3 2 --- session.c.orig 2005-12-24 04:59:12 +0100 +++ session.c 2006-02-01 19:43:26 +0100 @ 1.8 log @upgrading package: openssh 4.1p1 -> 4.2p1 @ text @a0 8 This patch provides a workaround for the nasty issue that scp(1) is found on the server side only if it is in $PATH (due to a ~/.bashrc, /etc/profile, etc). The default $PATH is out of scope for OpenPKG and is different across platforms anyway. Nevertheless we want to ensure that with OpenPKG on the server side, scp(1) is always usable (on the client side) without having to adjust the system and/or user environment (on the server side). d2 2 a3 2 --- session.c.orig 2005-08-31 18:59:49 +0200 +++ session.c 2005-09-01 20:06:43 +0200 d15 1 a15 1 @@@@ -660,6 +664,21 @@@@ d37 1 a37 1 @@@@ -684,6 +703,8 @@@@ @ 1.7 log @upgrading package: openssh 4.0p1 -> 4.1p1 @ text @d10 3 a12 3 --- session.c.orig 2005-04-21 11:50:55 +0200 +++ session.c 2005-05-29 10:04:45 +0200 @@@@ -66,6 +66,10 @@@@ d23 1 a23 1 @@@@ -659,6 +663,21 @@@@ d45 1 a45 1 @@@@ -683,6 +702,8 @@@@ @ 1.6 log @port all patches to the new OpenSSH 4.0 source code world order @ text @d10 2 a11 2 --- session.c.orig 2005-03-06 12:38:52 +0100 +++ session.c 2005-03-12 07:49:15 +0100 @ 1.5 log @ops, scp was broken since two weeks. Sorry for the inconvinience. I've overlooked this substitution during the 3.9p1 upgrade @ text @d10 2 a11 2 --- session.c.orig 2004-08-12 14:40:25 +0200 +++ session.c 2004-08-17 19:45:21 +0200 d23 1 a23 1 @@@@ -655,6 +659,21 @@@@ d45 1 a45 1 @@@@ -675,6 +694,8 @@@@ @ 1.4 log @upgrading package: openssh 3.8.1p1 -> 3.9p1 @ text @d17 1 a17 1 +#define SCPBINDIR "/openpkg-dev/bin" @ 1.3 log @fix scp(1) hack once again @ text @d10 2 a11 2 --- session.c.orig 2004-04-16 14:47:55.000000000 +0200 +++ session.c 2004-05-19 17:02:30.000000000 +0200 d17 1 a17 1 +#define SCPBINDIR "@@l_prefix@@/bin" d23 1 a23 1 @@@@ -652,6 +656,21 @@@@ d45 1 a45 1 @@@@ -672,6 +691,8 @@@@ d50 1 a50 3 + xfree(scp_command); } d52 2 @ 1.2 log @cleanup patch and avoid having to pass a string over the command line (which is nasty because of escaping) @ text @d11 5 a15 29 +++ session.c 2004-05-05 10:10:08.000000000 +0200 @@@@ -73,9 +73,9 @@@@ void session_pty_cleanup(Session *); void session_proctitle(Session *); int session_setup_x11fwd(Session *); -void do_exec_pty(Session *, const char *); +void do_exec_pty(Session *, char *); void do_exec_no_pty(Session *, const char *); -void do_exec(Session *, const char *); +void do_exec(Session *, char *); void do_login(Session *, const char *); #ifdef LOGIN_NEEDS_UTMPX static void do_pre_login(Session *s); @@@@ -519,7 +519,7 @@@@ * lastlog, and other such operations. */ void -do_exec_pty(Session *s, const char *command) +do_exec_pty(Session *s, char *command) { int fdout, ptyfd, ttyfd, ptymaster; pid_t pid; @@@@ -650,8 +650,26 @@@@ * to be forced, execute that instead. */ void -do_exec(Session *s, const char *command) +do_exec(Session *s, char *command) { d19 10 a33 1 + char *cp; d36 3 a38 4 + cp = xmalloc(l+1+k+1); + snprintf(cp, l+1+k+1, "%s/%s", SCPBINDIR, command); + xfree(command); + command = cp; d45 9 @ 1.2.2.1 log @MFC: add workaround for scp(1) issue on server side: scp(1) was not found if the user environment had /bin not in $PATH @ text @d10 4 a13 4 --- session.c.orig 2004-05-17 14:10:57.000000000 +0200 +++ session.c 2004-05-17 14:10:57.000000000 +0200 @@@@ -69,9 +69,9 @@@@ void session_pty_cleanup(void *); d24 1 a24 1 @@@@ -512,7 +512,7 @@@@ d33 1 a33 1 @@@@ -642,8 +642,26 @@@@ d41 1 a41 1 +#define SCPBINDIR "/openpkg-dev/bin" @ 1.2.2.2 log @fix scpbin patch introduced in 2.0.1 @ text @d41 1 a41 1 +#define SCPBINDIR "@@l_prefix@@/bin" @ 1.2.2.3 log @MFC: fix scp(1) hack once again @ text @d10 30 a39 6 --- session.c.orig 2004-05-19 17:05:41.000000000 +0200 +++ session.c 2004-05-19 17:05:50.000000000 +0200 @@@@ -62,6 +62,10 @@@@ #include "ssh-gss.h" #endif a42 10 + /* func */ Session *session_new(void); @@@@ -644,6 +648,21 @@@@ void do_exec(Session *s, const char *command) { + char *scp_command = NULL; + d48 1 d51 4 a54 3 + scp_command = xmalloc(l+1+k+1); + snprintf(scp_command, l+1+k+1, "%s/%s", SCPBINDIR, command); + command = (const char *)scp_command; a60 9 @@@@ -664,6 +683,8 @@@@ do_exec_no_pty(s, command); original_command = NULL; + if (scp_command != NULL) + xfree(scp_command); } @ 1.1 log @add a cruel hack to workaround the issue that SCP would be found on the server side only if the 'scp' command is in PATH @ text @d1 8 d33 1 a33 1 @@@@ -650,8 +650,25 @@@@ d40 3 a42 1 +#ifdef OPENPKG_SCP_BINDIR d49 1 a49 1 + l = strlen(OPENPKG_SCP_BINDIR); d52 1 a52 1 + snprintf(cp, l+1+k+1, "%s/%s", OPENPKG_SCP_BINDIR, command); a56 1 +#endif @